From patchwork Tue May 30 02:26:30 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mengyuan Lou X-Patchwork-Id: 13259119 X-Patchwork-Delegate: kuba@kernel.org Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net [23.128.96.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 53FB7ECD for ; Tue, 30 May 2023 02:27:40 +0000 (UTC) Received: from smtpbgsg1.qq.com (smtpbgsg1.qq.com [54.254.200.92]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 43048A7 for ; Mon, 29 May 2023 19:27:37 -0700 (PDT) X-QQ-mid: bizesmtp68t1685413651tr2nej59 Received: from localhost.localdomain ( [183.159.96.128]) by bizesmtp.qq.com (ESMTP) with id ; Tue, 30 May 2023 10:27:30 +0800 (CST) X-QQ-SSF: 01400000000000N0Z000000A0000000 X-QQ-FEAT: znfcQSa1hKZsfAmNMNnPIRMtYyMpwVrEAV7GV2LeJM8E2vr9oy2NxINMX6jHS aaB4NDx+hMFyE5/eJ5qk+5S6ednG54uei/qcgU94ps6F1czQ9AjzVARtFItVGp8+WU9shg6 TmDH/XI9Nt0OIri/SzjMVcfHnamBvJzJZbPCSS2A8xEmxcESE6sfuF3wDOHQtEDvLaz7U4w 9l0sU68DQDpO9NKg5vE2PwEjgEN6Dv5SoY+OyIQdSmZEwcTTVxAHyPmy5qRM+KoTtzLHypx sJzTFhT9CqEOhay2/OFEQrkXG82Fua16emjGilAKc/9Fv6ZMyliLcyhYyww7YnJfHiwE0bJ 8SjtiFp85Q4hnH9z0I7Qcr701NQY7ULS4YEf7x1USes1v5vipR9+4TVRrr8SLVv1vLXo+sx LIdZLUKAafmIGlvxHdMkQg== X-QQ-GoodBg: 2 X-BIZMAIL-ID: 1554311602917598326 From: Mengyuan Lou To: netdev@vger.kernel.org Cc: jiawenwu@trustnetic.com, Mengyuan Lou Subject: [RESEND,PATCH net-next v7 6/8] net: ngbe: Implement vlan add and remove ops Date: Tue, 30 May 2023 10:26:30 +0800 Message-Id: <20230530022632.17938-7-mengyuanlou@net-swift.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230530022632.17938-1-mengyuanlou@net-swift.com> References: <20230530022632.17938-1-mengyuanlou@net-swift.com> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-QQ-SENDSIZE: 520 Feedback-ID: bizesmtp:net-swift.com:qybglogicsvrgz:qybglogicsvrgz5a-3 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net X-Patchwork-Delegate: kuba@kernel.org 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 f234c9c4b942..c99a5d3de72e 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; @@ -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, }; /** 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 */