Skip to content

Commit

Permalink
net: ngbe: Implement vlan add and remove ops
Browse files Browse the repository at this point in the history
ngbe add ndo_vlan_rx_add_vid and ndo_vlan_rx_kill_vid.

Signed-off-by: Mengyuan Lou <mengyuanlou@net-swift.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
  • Loading branch information
Mengyuan Lou authored and Jakub Kicinski committed Jun 1, 2023
1 parent 50a908a commit 361bf4f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/net/ethernet/wangxun/ngbe/ngbe_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ static int ngbe_sw_init(struct wx *wx)
wx->mac.max_rx_queues = NGBE_MAX_RX_QUEUES;
wx->mac.max_tx_queues = NGBE_MAX_TX_QUEUES;
wx->mac.mcft_size = NGBE_MC_TBL_SIZE;
wx->mac.vft_size = NGBE_SP_VFT_TBL_SIZE;
wx->mac.rx_pb_size = NGBE_RX_PB_SIZE;
wx->mac.tx_pb_size = NGBE_TDB_PB_SZ;

Expand Down Expand Up @@ -477,6 +478,8 @@ static const struct net_device_ops ngbe_netdev_ops = {
.ndo_validate_addr = eth_validate_addr,
.ndo_set_mac_address = wx_set_mac,
.ndo_get_stats64 = wx_get_stats64,
.ndo_vlan_rx_add_vid = wx_vlan_rx_add_vid,
.ndo_vlan_rx_kill_vid = wx_vlan_rx_kill_vid,
};

/**
Expand Down
1 change: 1 addition & 0 deletions drivers/net/ethernet/wangxun/ngbe/ngbe_type.h
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@ enum NGBE_MSCA_CMD_value {
#define NGBE_RAR_ENTRIES 32
#define NGBE_RX_PB_SIZE 42
#define NGBE_MC_TBL_SIZE 128
#define NGBE_SP_VFT_TBL_SIZE 128
#define NGBE_TDB_PB_SZ (20 * 1024) /* 160KB Packet Buffer */

/* TX/RX descriptor defines */
Expand Down

0 comments on commit 361bf4f

Please sign in to comment.