From patchwork Wed May 10 09:38:42 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mengyuan Lou X-Patchwork-Id: 13236695 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 4B0B063E for ; Wed, 10 May 2023 09:40:52 +0000 (UTC) Received: from smtpbguseast1.qq.com (smtpbguseast1.qq.com [54.204.34.129]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4B39D30C7 for ; Wed, 10 May 2023 02:40:37 -0700 (PDT) X-QQ-mid: bizesmtp73t1683711555tawfvkb0 Received: from localhost.localdomain ( [125.119.253.217]) by bizesmtp.qq.com (ESMTP) with id ; Wed, 10 May 2023 17:39:13 +0800 (CST) X-QQ-SSF: 01400000000000N0Z000000A0000000 X-QQ-FEAT: YNhQxxQKZUKeClNdfH309gqII8lRspgeVItJkHyNveRO/zKrgSmZ4lKMGOhM0 epmiTFYAjJkhMmXkEkVcVk9s73kWOiHSRj3FQUh2/q5NspSAdd+F8q2dRDOwbXvRPlRHdbD uviSKQ6KDoSW3aebVMGaB0WyoG9YN8sQUI0kaCphuUioE0Gl1II/KDHJn8litEmLXCC5EIj 6gCSRed4HAGypWimVXS7lie5I2T3yNgBhPOl6tYcUM18/cvZRruI2zGD8Txg/eH6oHKmm52 7QUGq3lnCbKb6wFyIQvvyh2jFX0QLtF9UHjAjjtzb87epiDrZyfyI1FHOq3sILGqGtfsdHp nqjkFyrXanOt7ktaDS1WJNniUgdH6hxt60wF610/SzKnT5EWG16v/VDqiIBH20AcC0BNrPO toeMIQXEOVFS4MzdhUGGcA== X-QQ-GoodBg: 2 X-BIZMAIL-ID: 282522838949692191 From: Mengyuan Lou To: netdev@vger.kernel.org Cc: jiawenwu@trustnetic.com, Mengyuan Lou Subject: [PATCH net-next v4 4/7] net: ngbe add netdev features support Date: Wed, 10 May 2023 17:38:42 +0800 Message-Id: <20230510093845.47446-5-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 --- drivers/net/ethernet/wangxun/ngbe/ngbe_main.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/drivers/net/ethernet/wangxun/ngbe/ngbe_main.c b/drivers/net/ethernet/wangxun/ngbe/ngbe_main.c index df6b870aa871..793ebed925ef 100644 --- a/drivers/net/ethernet/wangxun/ngbe/ngbe_main.c +++ b/drivers/net/ethernet/wangxun/ngbe/ngbe_main.c @@ -551,12 +551,18 @@ static int ngbe_probe(struct pci_dev *pdev, ngbe_set_ethtool_ops(netdev); netdev->netdev_ops = &ngbe_netdev_ops; - netdev->features |= NETIF_F_HIGHDMA; - netdev->features = NETIF_F_SG; - + netdev->features = NETIF_F_SG | NETIF_F_IP_CSUM | + NETIF_F_TSO | NETIF_F_TSO6 | + NETIF_F_RXHASH | NETIF_F_RXCSUM; + netdev->features |= NETIF_F_SCTP_CRC | NETIF_F_TSO_MANGLEID; + netdev->vlan_features |= netdev->features; + netdev->features |= NETIF_F_IPV6_CSUM | NETIF_F_VLAN_FEATURES; /* copy netdev features into list of user selectable features */ - netdev->hw_features |= netdev->features | - NETIF_F_RXALL; + 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;