46 typedef struct sof_kstat sof_kstat_t;
47
48 #define SOF_MAXNAMELEN FILNAME_MAX
49 #define SOF_MAXSOCKTUPLECNT 32
50 #define SOF_MODPATH SOCKMOD_PATH
51
52 struct sof_module {
53 char *sofm_name;
54 sof_ops_t sofm_ops;
55 uint_t sofm_refcnt;
56 list_node_t sofm_node;
57 };
58
59 struct sof_kstat {
60 kstat_named_t sofks_defer_closed;
61 kstat_named_t sofks_defer_close_backlog;
62 kstat_named_t sofks_defer_close_failed_backlog_too_big;
63 };
64
65 #define SOF_GLOBAL_STAT_BUMP(s) \
66 atomic_add_64(&sof_stat.sofks_##s.value.ui64, 1)
67
68 /*
69 * Per filter statistics.
70 */
71 struct sof_entry_kstat {
72 kstat_named_t sofek_nactive; /* # of consumers */
73 kstat_named_t sofek_tot_active_attach;
74 kstat_named_t sofek_tot_passive_attach;
75 kstat_named_t sofek_ndeferred; /* # of deferred conns */
76 kstat_named_t sofek_attach_failures;
77 };
78
79 /*
80 * Socket filter entry - one for each configured filter (added and
81 * removed by soconfig(1M)).
82 *
83 * sofe_flags, sofe_refcnt and sofe_mod are protected by sofe_lock, and all
84 * other fields are write once.
85 */
86 struct sof_entry {
|
46 typedef struct sof_kstat sof_kstat_t;
47
48 #define SOF_MAXNAMELEN FILNAME_MAX
49 #define SOF_MAXSOCKTUPLECNT 32
50 #define SOF_MODPATH SOCKMOD_PATH
51
52 struct sof_module {
53 char *sofm_name;
54 sof_ops_t sofm_ops;
55 uint_t sofm_refcnt;
56 list_node_t sofm_node;
57 };
58
59 struct sof_kstat {
60 kstat_named_t sofks_defer_closed;
61 kstat_named_t sofks_defer_close_backlog;
62 kstat_named_t sofks_defer_close_failed_backlog_too_big;
63 };
64
65 #define SOF_GLOBAL_STAT_BUMP(s) \
66 atomic_inc_64(&sof_stat.sofks_##s.value.ui64)
67
68 /*
69 * Per filter statistics.
70 */
71 struct sof_entry_kstat {
72 kstat_named_t sofek_nactive; /* # of consumers */
73 kstat_named_t sofek_tot_active_attach;
74 kstat_named_t sofek_tot_passive_attach;
75 kstat_named_t sofek_ndeferred; /* # of deferred conns */
76 kstat_named_t sofek_attach_failures;
77 };
78
79 /*
80 * Socket filter entry - one for each configured filter (added and
81 * removed by soconfig(1M)).
82 *
83 * sofe_flags, sofe_refcnt and sofe_mod are protected by sofe_lock, and all
84 * other fields are write once.
85 */
86 struct sof_entry {
|