From patchwork Wed May 10 09:38:44 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mengyuan Lou X-Patchwork-Id: 13236693 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 D95A96FDE for ; Wed, 10 May 2023 09:39:39 +0000 (UTC) Received: from smtpbg153.qq.com (smtpbg153.qq.com [13.245.218.24]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DC95F30C7 for ; Wed, 10 May 2023 02:39:36 -0700 (PDT) X-QQ-mid: bizesmtp73t1683711563trxh89zb Received: from localhost.localdomain ( [125.119.253.217]) by bizesmtp.qq.com (ESMTP) with id ; Wed, 10 May 2023 17:39:21 +0800 (CST) X-QQ-SSF: 01400000000000N0Z000000A0000000 X-QQ-FEAT: mRz6/7wsmIj+7k6Z5w/60CPfgn71A0L/20kBDPgZmRKEAG8jek+M237opVCCN ajGAx2SMxwd0TpMyxeVIvmM2ZEFeLS90vTk2NggzhF+R/e0FY3UFohfGIXjGgHzMCUr5QXw KSlt5m95QGOPN612lkraMppKFYpg4mwziIGiKfj2ZW9sCN0SDggkOZyVRYP63cphrVluNC2 9OA3I6MaP7Ty6k3jNS/tozVgJJBTKF0lkF6FQ+8suLe9Qf53TYMfiainqQb8ECZSuorgmiS YzI/c4oIfHFKXfgdXFRY5spItfooKMnQxdo10BJu2S57+IvHa7uVYKmaWC9a4pTNAoi1kSA W3D8E7oVylqO1SYYGrCmxRTHNJXBAXzM89gfMnxInpuCpuAm5wVFhRK/b+I4/1xfPlWOb95 igQ7oJgeero= X-QQ-GoodBg: 2 X-BIZMAIL-ID: 1328926299747573261 From: Mengyuan Lou To: netdev@vger.kernel.org Cc: jiawenwu@trustnetic.com, Mengyuan Lou Subject: [PATCH net-next v4 6/7] net: txgbe add netdev features support Date: Wed, 10 May 2023 17:38:44 +0800 Message-Id: <20230510093845.47446-7-mengyuanlou@net-swift.com> X-Mailer: git-send-email 2.40.0 In-Reply-To: <20230510093845.47446-1-mengyuanlou@net-swift.com> References: <20230510093845.47446-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_H2,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 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;