Message ID | 20180327150736.10718-1-Vadim.Lomovtsev@caviumnetworks.com |
---|---|
Headers | show |
Series | net: thunderx: implement DMAC filtering support | expand |
From: Vadim Lomovtsev <Vadim.Lomovtsev@caviumnetworks.com> Date: Tue, 27 Mar 2018 08:07:29 -0700 > From: Vadim Lomovtsev <Vadim.Lomovtsev@cavium.com> > > By default CN88XX BGX accepts all incoming multicast and broadcast > packets and filtering is disabled. The nic driver doesn't provide > an ability to change such behaviour. > > This series is to implement DMAC filtering management for CN88XX > nic driver allowing user to enable/disable filtering and configure > specific MAC addresses to filter traffic. This doesn't even compile: drivers/net/ethernet/cavium/thunder/thunder_bgx.c: In function ‘bgx_lmac_save_filter’: drivers/net/ethernet/cavium/thunder/thunder_bgx.c:286:3: warning: ‘return’ with no value, in function returning non-void [-Wreturn-type] return; ^~~~~~ drivers/net/ethernet/cavium/thunder/thunder_bgx.c:281:12: note: declared here static int bgx_lmac_save_filter(struct lmac *lmac, u64 dmac, u8 vf_id) ^~~~~~~~~~~~~~~~~~~~ In file included from drivers/net/ethernet/cavium/thunder/nic.h:15:0, from drivers/net/ethernet/cavium/thunder/thunder_bgx.c:21: drivers/net/ethernet/cavium/thunder/thunder_bgx.c: In function ‘bgx_set_dmac_cam_filter_mac’: drivers/net/ethernet/cavium/thunder/thunder_bgx.h:61:38: warning: left shift count >= width of type [-Wshift-count-overflow] #define RX_DMACX_CAM_LMACID(x) (x << 49) ^ drivers/net/ethernet/cavium/thunder/thunder_bgx.c:324:8: note: in expansion of macro ‘RX_DMACX_CAM_LMACID’ cfg = RX_DMACX_CAM_LMACID(lmacid & LMAC_ID_MASK) | ^~~~~~~~~~~~~~~~~~~
Hi David, Thanks for feedback. On Tue, Mar 27, 2018 at 01:28:22PM -0400, David Miller wrote: > From: Vadim Lomovtsev <Vadim.Lomovtsev@caviumnetworks.com> > Date: Tue, 27 Mar 2018 08:07:29 -0700 > > > From: Vadim Lomovtsev <Vadim.Lomovtsev@cavium.com> > > > > By default CN88XX BGX accepts all incoming multicast and broadcast > > packets and filtering is disabled. The nic driver doesn't provide > > an ability to change such behaviour. > > > > This series is to implement DMAC filtering management for CN88XX > > nic driver allowing user to enable/disable filtering and configure > > specific MAC addresses to filter traffic. > > This doesn't even compile: > > drivers/net/ethernet/cavium/thunder/thunder_bgx.c: In function ‘bgx_lmac_save_filter’: > drivers/net/ethernet/cavium/thunder/thunder_bgx.c:286:3: warning: ‘return’ with no value, in function returning non-void [-Wreturn-type] > return; > ^~~~~~ > drivers/net/ethernet/cavium/thunder/thunder_bgx.c:281:12: note: declared here > static int bgx_lmac_save_filter(struct lmac *lmac, u64 dmac, u8 vf_id) > ^~~~~~~~~~~~~~~~~~~~ > In file included from drivers/net/ethernet/cavium/thunder/nic.h:15:0, > from drivers/net/ethernet/cavium/thunder/thunder_bgx.c:21: > drivers/net/ethernet/cavium/thunder/thunder_bgx.c: In function ‘bgx_set_dmac_cam_filter_mac’: > drivers/net/ethernet/cavium/thunder/thunder_bgx.h:61:38: warning: left shift count >= width of type [-Wshift-count-overflow] > #define RX_DMACX_CAM_LMACID(x) (x << 49) > ^ > drivers/net/ethernet/cavium/thunder/thunder_bgx.c:324:8: note: in expansion of macro ‘RX_DMACX_CAM_LMACID’ > cfg = RX_DMACX_CAM_LMACID(lmacid & LMAC_ID_MASK) | > ^~~~~~~~~~~~~~~~~~~ Will update and repost series as v2. Do you have any other comments ? WBR, Vadim
From: Vadim Lomovtsev <Vadim.Lomovtsev@cavium.com>
By default CN88XX BGX accepts all incoming multicast and broadcast
packets and filtering is disabled. The nic driver doesn't provide
an ability to change such behaviour.
This series is to implement DMAC filtering management for CN88XX
nic driver allowing user to enable/disable filtering and configure
specific MAC addresses to filter traffic.
Changes from v1:
build issues:
- update code in order to address compiler warnings;
checkpatch.pl reported issues:
- update code in order to fit 80 symbols length;
- update commit descriptions in order to fit 80 symbols length;
Vadim Lomovtsev (7):
net: thunderx: move filter register related macro into proper place
net: thunderx: add MAC address filter tracking for LMAC
net: thunderx: add multicast filter management support
net: thunderx: add new messages for handle ndo_set_rx_mode callback
net: thunderx: add XCAST messages handlers for PF
net: thunderx: add workqueue control structures for handle
ndo_set_rx_mode request
net: thunderx: add ndo_set_rx_mode callback implementation for VF
drivers/net/ethernet/cavium/thunder/nic.h | 29 ++++
drivers/net/ethernet/cavium/thunder/nic_main.c | 45 ++++-
drivers/net/ethernet/cavium/thunder/nicvf_main.c | 110 +++++++++++-
drivers/net/ethernet/cavium/thunder/thunder_bgx.c | 201 ++++++++++++++++++++--
drivers/net/ethernet/cavium/thunder/thunder_bgx.h | 19 +-
5 files changed, 374 insertions(+), 30 deletions(-)
From: Vadim Lomovtsev <Vadim.Lomovtsev@caviumnetworks.com> Date: Fri, 30 Mar 2018 04:59:46 -0700 > From: Vadim Lomovtsev <Vadim.Lomovtsev@cavium.com> > > By default CN88XX BGX accepts all incoming multicast and broadcast > packets and filtering is disabled. The nic driver doesn't provide > an ability to change such behaviour. > > This series is to implement DMAC filtering management for CN88XX > nic driver allowing user to enable/disable filtering and configure > specific MAC addresses to filter traffic. > > Changes from v1: > build issues: > - update code in order to address compiler warnings; > checkpatch.pl reported issues: > - update code in order to fit 80 symbols length; > - update commit descriptions in order to fit 80 symbols length; Series applied.
On Sat, Mar 31, 2018 at 10:07:30PM -0400, David Miller wrote: > From: Vadim Lomovtsev <Vadim.Lomovtsev@caviumnetworks.com> > Date: Fri, 30 Mar 2018 04:59:46 -0700 > > > From: Vadim Lomovtsev <Vadim.Lomovtsev@cavium.com> > > > > By default CN88XX BGX accepts all incoming multicast and broadcast > > packets and filtering is disabled. The nic driver doesn't provide > > an ability to change such behaviour. > > > > This series is to implement DMAC filtering management for CN88XX > > nic driver allowing user to enable/disable filtering and configure > > specific MAC addresses to filter traffic. > > > > Changes from v1: > > build issues: > > - update code in order to address compiler warnings; > > checkpatch.pl reported issues: > > - update code in order to fit 80 symbols length; > > - update commit descriptions in order to fit 80 symbols length; > > Series applied. Thank you. WBR, Vadim
From: Vadim Lomovtsev <Vadim.Lomovtsev@cavium.com> By default CN88XX BGX accepts all incoming multicast and broadcast packets and filtering is disabled. The nic driver doesn't provide an ability to change such behaviour. This series is to implement DMAC filtering management for CN88XX nic driver allowing user to enable/disable filtering and configure specific MAC addresses to filter traffic. Vadim Lomovtsev (7): net: thunderx: move filter register related macro into proper place net: thunderx: add MAC address filter tracking for LMAC net: thunderx: add multicast filter management support net: thunderx: add new messages for handle ndo_set_rx_mode callback net: thunderx: add XCAST messages handlers for PF net: thunderx: add workqueue control structures for handle ndo_set_rx_mode request net: thunderx: add ndo_set_rx_mode callback implementation for VF drivers/net/ethernet/cavium/thunder/nic.h | 29 ++++ drivers/net/ethernet/cavium/thunder/nic_main.c | 45 ++++- drivers/net/ethernet/cavium/thunder/nicvf_main.c | 108 +++++++++++- drivers/net/ethernet/cavium/thunder/thunder_bgx.c | 196 ++++++++++++++++++++-- drivers/net/ethernet/cavium/thunder/thunder_bgx.h | 17 +- 5 files changed, 366 insertions(+), 29 deletions(-)