From patchwork Fri Apr 28 05:57:07 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mengyuan Lou X-Patchwork-Id: 13226002 X-Patchwork-Delegate: kuba@kernel.org Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 26D84C77B7E for ; Fri, 28 Apr 2023 05:57:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345282AbjD1F55 (ORCPT ); Fri, 28 Apr 2023 01:57:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58460 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345279AbjD1F5z (ORCPT ); Fri, 28 Apr 2023 01:57:55 -0400 Received: from smtpbgau1.qq.com (smtpbgau1.qq.com [54.206.16.166]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 21C4C3C3D for ; Thu, 27 Apr 2023 22:57:51 -0700 (PDT) X-QQ-mid: bizesmtp65t1682661466tekcezgj Received: from localhost.localdomain ( [183.129.236.74]) by bizesmtp.qq.com (ESMTP) with id ; Fri, 28 Apr 2023 13:57:44 +0800 (CST) X-QQ-SSF: 01400000000000N0S000000A0000000 X-QQ-FEAT: j86OQQvu8eTdMDQf3mLZUj2XHI6uTEd6gWosjLIiJEk0uhYHdP4CFcBkaGehl XrT+zZ6o/xYY+HP89a80beJdSGTei4THbmJCDX6mh4K4Lg3kQ+x3JM4GiIWUGz24VENQYKG mLvfIG4fPyI1f6wePzqaNwRiDUCPWIRcZv2xG8wB+OASpBOpEudWaT9ZiPwb0fAPKKgaCSX 1+EOdyV2QZZi63F6vmEF1aC/2bFVODohbR+cLonddjOAHEx2QujcoZ3jRi2E52c9zGA/KHT BRvj4PL1lKIDJcttmLgbarBzzmmomSwUTuR75i+QxJd/vKXhV/y7ZLbHa2uqVxeeuzVZjCR PnCMd0t1C4NZdwR9YPiPREw1u40w8tl2rRR/q0t313rSp6iHr7/cIx7Go5Nx7XzQ9ADKhdm 7IKzJUnlDMIMSStuh3Kt0g== X-QQ-GoodBg: 2 X-BIZMAIL-ID: 17474453065245964190 From: Mengyuan Lou To: netdev@vger.kernel.org Cc: jiawenwu@trustnetic.com, Mengyuan Lou Subject: [RFC PATCH net-next v4 5/7] net: ngbe: Implement vlan add and remove ops Date: Fri, 28 Apr 2023 13:57:07 +0800 Message-Id: <20230428055709.66071-6-mengyuanlou@net-swift.com> X-Mailer: git-send-email 2.40.0 In-Reply-To: <20230428055709.66071-1-mengyuanlou@net-swift.com> References: <20230428055709.66071-1-mengyuanlou@net-swift.com> MIME-Version: 1.0 X-QQ-SENDSIZE: 520 Feedback-ID: bizesmtp:net-swift.com:qybglogicsvrgz:qybglogicsvrgz6a-1 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org X-Patchwork-State: RFC ngbe add ndo_vlan_rx_add_vid and ndo_vlan_rx_kill_vid. Signed-off-by: Mengyuan Lou --- drivers/net/ethernet/wangxun/ngbe/ngbe_main.c | 3 +++ drivers/net/ethernet/wangxun/ngbe/ngbe_type.h | 1 + 2 files changed, 4 insertions(+) diff --git a/drivers/net/ethernet/wangxun/ngbe/ngbe_main.c b/drivers/net/ethernet/wangxun/ngbe/ngbe_main.c index 793ebed925ef..582c90dce4d0 100644 --- a/drivers/net/ethernet/wangxun/ngbe/ngbe_main.c +++ b/drivers/net/ethernet/wangxun/ngbe/ngbe_main.c @@ -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; @@ -476,6 +477,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, }; /** diff --git a/drivers/net/ethernet/wangxun/ngbe/ngbe_type.h b/drivers/net/ethernet/wangxun/ngbe/ngbe_type.h index 373d5af628cd..b70eca397b67 100644 --- a/drivers/net/ethernet/wangxun/ngbe/ngbe_type.h +++ b/drivers/net/ethernet/wangxun/ngbe/ngbe_type.h @@ -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 */