From patchwork Fri May 26 09:02:29 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mengyuan Lou X-Patchwork-Id: 13256619 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 5E736107AE for ; Fri, 26 May 2023 09:03:27 +0000 (UTC) Received: from smtpbgeu2.qq.com (smtpbgeu2.qq.com [18.194.254.142]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 05DB1135 for ; Fri, 26 May 2023 02:03:21 -0700 (PDT) X-QQ-mid: bizesmtp89t1685091788t5whn913 Received: from localhost.localdomain ( [125.120.148.168]) by bizesmtp.qq.com (ESMTP) with id ; Fri, 26 May 2023 17:03:07 +0800 (CST) X-QQ-SSF: 01400000000000N0Z000000A0000000 X-QQ-FEAT: znfcQSa1hKYP29dfiKvz+gtETz1gTLozdyW669rdMF6UeS8XaPvkZ6uH49eTm MwTXSkceIGnYXo1utJCQ4PwjlzVTw0rm4NXlEbTUDzWZqIn0tIEvWDzQYVLzlFPjpIDTWe8 jOBBA6AHPy0tm1/lsVqh9Zw4vXZNUmE7LFV5fa2MsjnU2kQZCcu+t40N+5PSgDtRUj766z/ L2+IRbFgjPVn8jeD4yp+NxrB3aJMSD+YPu0d6IyNhJiIJKEl8i7+m4njBuVq93Xk7YkRy0O wY6C6uz7GnVfDYMnDBeARDHG+XxQQn1/XqHLbgi77tfNscv6ea4jaCGoPR6/t8hSTL+IS0w dW/pFEL66zqqHKM1MZM4EHDsq3/EJfacjHWTwhie9m9OiQPUpoIJARmBDaHWteu9Z/c7V4C hyZWNXzN/a+1yxCl1M564Q== X-QQ-GoodBg: 2 X-BIZMAIL-ID: 7292762642920215544 From: Mengyuan Lou To: netdev@vger.kernel.org Cc: jiawenwu@trustnetic.com, Mengyuan Lou Subject: [PATCH net-next v7 7/8] net: txgbe: Add netdev features support Date: Fri, 26 May 2023 17:02:29 +0800 Message-Id: <20230526090230.71487-8-mengyuanlou@net-swift.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230526090230.71487-1-mengyuanlou@net-swift.com> References: <20230526090230.71487-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_PASS,T_SCC_BODY_TEXT_LINE, T_SPF_HELO_TEMPERROR 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 Add features and hw_features that ngbe can support. Signed-off-by: Mengyuan Lou --- .../net/ethernet/wangxun/txgbe/txgbe_main.c | 21 ++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/drivers/net/ethernet/wangxun/txgbe/txgbe_main.c b/drivers/net/ethernet/wangxun/txgbe/txgbe_main.c index 5b8a121fb496..bcc9c2959177 100644 --- a/drivers/net/ethernet/wangxun/txgbe/txgbe_main.c +++ b/drivers/net/ethernet/wangxun/txgbe/txgbe_main.c @@ -491,6 +491,7 @@ static const struct net_device_ops txgbe_netdev_ops = { .ndo_change_mtu = wx_change_mtu, .ndo_start_xmit = wx_xmit_frame, .ndo_set_rx_mode = wx_set_rx_mode, + .ndo_set_features = wx_set_features, .ndo_validate_addr = eth_validate_addr, .ndo_set_mac_address = wx_set_mac, .ndo_get_stats64 = wx_get_stats64, @@ -596,11 +597,25 @@ static int txgbe_probe(struct pci_dev *pdev, goto err_free_mac_table; } - netdev->features |= NETIF_F_HIGHDMA; - netdev->features = NETIF_F_SG; - + netdev->features = NETIF_F_SG | + NETIF_F_TSO | + NETIF_F_TSO6 | + NETIF_F_RXHASH | + NETIF_F_RXCSUM | + NETIF_F_HW_CSUM; + + netdev->gso_partial_features = NETIF_F_GSO_ENCAP_ALL; + netdev->features |= netdev->gso_partial_features; + netdev->features |= NETIF_F_SCTP_CRC; + netdev->vlan_features |= netdev->features | NETIF_F_TSO_MANGLEID; + netdev->hw_enc_features |= netdev->vlan_features; + netdev->features |= NETIF_F_VLAN_FEATURES; /* copy netdev features into list of user selectable features */ netdev->hw_features |= netdev->features | NETIF_F_RXALL; + netdev->hw_features |= NETIF_F_NTUPLE | NETIF_F_HW_TC; + netdev->features |= NETIF_F_HIGHDMA; + netdev->hw_features |= NETIF_F_GRO; + netdev->features |= NETIF_F_GRO; netdev->priv_flags |= IFF_UNICAST_FLT; netdev->priv_flags |= IFF_SUPP_NOFCS;