From patchwork Tue Apr 25 01:50:10 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mengyuan Lou X-Patchwork-Id: 13222769 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 53BAFC7618E for ; Tue, 25 Apr 2023 01:51:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233239AbjDYBvP (ORCPT ); Mon, 24 Apr 2023 21:51:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48938 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233224AbjDYBvN (ORCPT ); Mon, 24 Apr 2023 21:51:13 -0400 Received: from smtpbg156.qq.com (smtpbg156.qq.com [15.184.82.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7410B9EF7 for ; Mon, 24 Apr 2023 18:51:03 -0700 (PDT) X-QQ-mid: bizesmtp86t1682387455tbgol9g6 Received: from localhost.localdomain ( [183.129.236.74]) by bizesmtp.qq.com (ESMTP) with id ; Tue, 25 Apr 2023 09:50:54 +0800 (CST) X-QQ-SSF: 01400000000000N0S000000A0000000 X-QQ-FEAT: dKvkn8qoLrEthdgFABjfoIKfYirX0Uydc8t/ueFe9PkgwbTYi1eubRCobs6qA iK2Zm8UPmw8vj7fvNBxKkCPZB8mlXxGdbUnEiSsAsXc9OfvS89+yX1eyxNFVtfiOmBpzxkB xW9wMpLxL3yeZ8QktgWkH6roRjJ1PYvfEcjuKuk5iU6EsE8zh/7FRMLcb7BJw1PhXmE9Rhr 3HbQ79Gbf9NISQsJAZEWSsuyMAL0FLGmN7sRUjRlZ4dh7WvA7U+CITehmBqFgnavfn59/mO JDiGazoQmEAShwxOX8XS4kl2OTSKtC5YdznXfiMdtj1my3iZD147Aqi05MhRZHKh4vpCYY2 QHWzb3WnLqxQgm6VXtf3Dn8IVggWQlN5fbGWGuyDZAhedm8Pej+DAzHRe2vH2YQVim+Kanw xqsG1Bjbjqo= X-QQ-GoodBg: 2 X-BIZMAIL-ID: 3658545713674799089 From: Mengyuan Lou To: netdev@vger.kernel.org Cc: jiawenwu@trustnetic.com, linyunsheng@huawei.com, Mengyuan Lou Subject: [PATCH net-next 6/7] net: txgbe add netdev features support Date: Tue, 25 Apr 2023 09:50:10 +0800 Message-Id: <20230425015011.19980-7-mengyuanlou@net-swift.com> X-Mailer: git-send-email 2.40.0 In-Reply-To: <20230425015011.19980-1-mengyuanlou@net-swift.com> References: <20230425015011.19980-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 Add features and hw_features that ngbe can support. Signed-off-by: Mengyuan Lou --- .../net/ethernet/wangxun/txgbe/txgbe_main.c | 20 ++++++++++++++++--- 1 file changed, 17 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..be795d175aed 100644 --- a/drivers/net/ethernet/wangxun/txgbe/txgbe_main.c +++ b/drivers/net/ethernet/wangxun/txgbe/txgbe_main.c @@ -596,11 +596,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;