diff options
author | Shannon Nelson <snelson@pensando.io> | 2019-09-03 15:28:14 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-09-05 09:24:44 +0200 |
commit | 2a654540be106a728ddbb706c70f7c82c271b886 (patch) | |
tree | 35bb1afe5f356b79e38177c8c7b8a7993b154831 /drivers/net/ethernet/pensando/ionic/ionic_lif.h | |
parent | c1e329ebec8d0895942e292b64e432b33c93a173 (diff) |
ionic: Add Rx filter and rx_mode ndo support
Add the Rx filtering and rx_mode NDO callbacks. Also add
the deferred work thread handling needed to manage the filter
requests outside of the netif_addr_lock spinlock.
Signed-off-by: Shannon Nelson <snelson@pensando.io>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/pensando/ionic/ionic_lif.h')
-rw-r--r-- | drivers/net/ethernet/pensando/ionic/ionic_lif.h | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/drivers/net/ethernet/pensando/ionic/ionic_lif.h b/drivers/net/ethernet/pensando/ionic/ionic_lif.h index 53fb4c71a101..7da7d4a3fdf0 100644 --- a/drivers/net/ethernet/pensando/ionic/ionic_lif.h +++ b/drivers/net/ethernet/pensando/ionic/ionic_lif.h @@ -58,6 +58,29 @@ struct ionic_qcq { #define napi_to_qcq(napi) container_of(napi, struct ionic_qcq, napi) #define napi_to_cq(napi) (&napi_to_qcq(napi)->cq) +enum ionic_deferred_work_type { + IONIC_DW_TYPE_RX_MODE, + IONIC_DW_TYPE_RX_ADDR_ADD, + IONIC_DW_TYPE_RX_ADDR_DEL, + IONIC_DW_TYPE_LINK_STATUS, + IONIC_DW_TYPE_LIF_RESET, +}; + +struct ionic_deferred_work { + struct list_head list; + enum ionic_deferred_work_type type; + union { + unsigned int rx_mode; + u8 addr[ETH_ALEN]; + }; +}; + +struct ionic_deferred { + spinlock_t lock; /* lock for deferred work list */ + struct list_head list; + struct work_struct work; +}; + enum ionic_lif_state_flags { IONIC_LIF_INITED, IONIC_LIF_UP, @@ -85,13 +108,19 @@ struct ionic_lif { u64 last_eid; unsigned int neqs; unsigned int nxqs; + unsigned int rx_mode; u64 hw_features; + bool mc_overflow; + unsigned int nmcast; + bool uc_overflow; + unsigned int nucast; struct ionic_lif_info *info; dma_addr_t info_pa; u32 info_sz; struct ionic_rx_filters rx_filters; + struct ionic_deferred deferred; unsigned long *dbid_inuse; unsigned int dbid_count; struct dentry *dentry; |