From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 5EC90A0C47; Wed, 27 Oct 2021 16:26:56 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 46B4340E0F; Wed, 27 Oct 2021 16:26:56 +0200 (CEST) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by mails.dpdk.org (Postfix) with ESMTP id 356CD40DDA for ; Wed, 27 Oct 2021 16:26:55 +0200 (CEST) X-IronPort-AV: E=McAfee;i="6200,9189,10150"; a="230028661" X-IronPort-AV: E=Sophos;i="5.87,186,1631602800"; d="scan'208";a="230028661" Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Oct 2021 07:26:54 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.87,186,1631602800"; d="scan'208";a="447566478" Received: from fmsmsx601.amr.corp.intel.com ([10.18.126.81]) by orsmga003.jf.intel.com with ESMTP; 27 Oct 2021 07:26:53 -0700 Received: from fmsmsx610.amr.corp.intel.com (10.18.126.90) by fmsmsx601.amr.corp.intel.com (10.18.126.81) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.12; Wed, 27 Oct 2021 07:26:52 -0700 Received: from fmsedg602.ED.cps.intel.com (10.1.192.136) by fmsmsx610.amr.corp.intel.com (10.18.126.90) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.12 via Frontend Transport; Wed, 27 Oct 2021 07:26:52 -0700 Received: from NAM12-DM6-obe.outbound.protection.outlook.com (104.47.59.170) by edgegateway.intel.com (192.55.55.71) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2242.12; Wed, 27 Oct 2021 07:26:52 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=GMc44tf/Q9I7ANwe6bO0TyDgsXw+T4btrUifGZHyRB3xPmIBPCSt4V1tCUUcbQx/Z8pqUk6qCk5trXBJUrRdzIN/mWeKmSyMPyZg2bo+2RKIuaWoW00Pqi5H+jfCRGBDaFBwAIw15BxWGIgaaS7ZIpvy0OivhEp5GDLYao85fGvDA7h+0zsSOOy6UfgeApNgEeeZ2MGGPQYxjhHO1UVP6XZPUGxcneZrvzEhbEJaC7TfubWuSPX1yZoMs6eo/CP0Llx7rTLefxNeWMDbG/MEyHXVHuNQ52J/ytkEao50I0Ng8XdXkgK4Hmj8FyUoMjip8WU5PST9F6Ve5GRnuXJMVA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=5PKb4e9ENyIo+19fqkQM2RQq/iDi7fOV/3EdRbx3n+0=; b=Gr2nWSSV7HJYb9lfd/FndpxHSjc/ms38fbU3BLf3z6x9TJgUwfJ0/uhSmpjPBuxkPWW+/9UCV4PG8r3LgO2gAmSeFQiABH3ySL4pXGGKt5OK7H3BdzO/N5Rd3Ut7FLRsNDXxGkOABjm2ADOfhKunj+dYQQ6v7fiSdZfBxCC0OUtaqzb2AMaLJOvDa/SOqtjk7Y5w+wdMcqb3GzvrAJ3EriEifroMiR31e9X4gOYQ32iomuqpM0g34TQaUo3/bJxxhmUMr3TqCjZ8FZzqB3y9jGCwxm8uBLB0D0jhhZ/vtbQTJxZ2bJTclNcNy6FPPu7Jc6dko6dI37LYvFD3l2ysZw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com; s=selector2-intel-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=5PKb4e9ENyIo+19fqkQM2RQq/iDi7fOV/3EdRbx3n+0=; b=D8zVGupLifNdSizmgANQgDNSDn7itdcQ34kwsJUB6N8Pjysahg1VAk739YsR1+VC/j+muYO6G5UJwyJjLLh1vX37oYm3sUYyaHNAROce5GFzWEcXshXOw+nFMIt6mB2ilNnspukIs/mapCB+gtThBELyofcYC9hR5eadp7z3IQ0= Authentication-Results: nxp.com; dkim=none (message not signed) header.d=none;nxp.com; dmarc=none action=none header.from=intel.com; Received: from PH0PR11MB5000.namprd11.prod.outlook.com (2603:10b6:510:41::19) by PH0PR11MB5830.namprd11.prod.outlook.com (2603:10b6:510:129::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4628.18; Wed, 27 Oct 2021 14:26:51 +0000 Received: from PH0PR11MB5000.namprd11.prod.outlook.com ([fe80::bd7d:29be:3342:632c]) by PH0PR11MB5000.namprd11.prod.outlook.com ([fe80::bd7d:29be:3342:632c%6]) with mapi id 15.20.4628.020; Wed, 27 Oct 2021 14:26:51 +0000 Message-ID: Date: Wed, 27 Oct 2021 15:26:45 +0100 Content-Language: en-US To: Apeksha Gupta , , , CC: , , References: <20211019184003.23128-2-apeksha.gupta@nxp.com> <20211021044700.12370-1-apeksha.gupta@nxp.com> <20211021044700.12370-6-apeksha.gupta@nxp.com> From: Ferruh Yigit X-User: ferruhy In-Reply-To: <20211021044700.12370-6-apeksha.gupta@nxp.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: DB8PR06CA0031.eurprd06.prod.outlook.com (2603:10a6:10:100::44) To PH0PR11MB5000.namprd11.prod.outlook.com (2603:10b6:510:41::19) MIME-Version: 1.0 Received: from [192.168.0.206] (37.228.236.146) by DB8PR06CA0031.eurprd06.prod.outlook.com (2603:10a6:10:100::44) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4649.14 via Frontend Transport; Wed, 27 Oct 2021 14:26:49 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 18731c44-73be-47ae-3e10-08d99955d149 X-MS-TrafficTypeDiagnostic: PH0PR11MB5830: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:109; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: VDkB9lwn6ZsbApX+PWViRmfno5XBhDfMPfBIzFJatmuSbE2KrBdJrKlWI8ZxoPGUs9OToCYnvPc17L90rrYtw4OIMu6775eZoC/oCG88UrxLBIxXKuv6lMeR89pgPBjecECP0hXD2KYE5pjUoWqj14CiRFYUtCNYuMb8U8GcP0CO/GOpDAGsCIXQct21k8E2QxjqTXtP2PeBLvXVIp2VAB0lt6DJAil1MKPCQSDixvYCpbLs/+dMbm/Dqoapo1sqgyRH23JblPqE/2HFmC4zuvhlv521ukTnQRK/oOCsKxu3gNnbvfZSFLCGJhY7opT1RPkm1/3aZ77Js2L32UZAJCb9EVNyUwZL5ynJg9n2oPA6wJv6vbFZg/RsaUuUbLUHQArZuvfORobGW9bMHSElm17g3Xk0glMi7QkapIDooTwfUdAIkGUo46trW6RrrXV02e5WbBIS7TnTBjPKDqY6EkEBxtlCAHeb1YvIzatLXNoBegrop2j5DTDD+KKruU9pMkIE74GhCaSE/fZlYwdPfhscQrAhYhtP6BiFc0xf0qE8gwy0NeVKzZUAneYsvMa3hmdVQSR4BbpU5q/kfxVNKw6LK1WdP4IvKn0dAIEfZE/qirTNuTt2imohAkZbL+Ghl42DlDll6wKhk+8lx83md4ocO6lL7TOmBOUTyfC4cecgeyjc/EGj7rp8uRj6JsqFFSAxHKVpCZxMSey2TgUJJg== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PH0PR11MB5000.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(366004)(8936002)(38100700002)(66946007)(316002)(31696002)(2906002)(26005)(2616005)(508600001)(36756003)(66476007)(4326008)(31686004)(16576012)(83380400001)(66556008)(5660300002)(6486002)(6666004)(956004)(44832011)(8676002)(82960400001)(86362001)(186003)(53546011)(45980500001); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?UFZHM051ZDFWTHBLTC9zOWR5aElUaC9YS3BCSkxuZWtCeVdpU1ZRejhVY0dq?= =?utf-8?B?UXp4UGk0bjVuTFI2SUExd3lrMlFycEpRYUJtcTRRUzN6VStkYXpwRi8ya1hP?= =?utf-8?B?QlZaaFBDNURZcEw1THB1dDRzWWVjYjlnMnFlVUxmTnU3ck9oZzJiVncrWHIw?= =?utf-8?B?dko1Y25FUDYyWVUxbmFyLzlFa2xTMUd6emhITmRYV0RCOWZ4MG1qRCswalRw?= =?utf-8?B?MVNQN1lRSHBydHJPMUFscU1NNFhnSjBCMUZybXk5dVJJdUhZVDZ5MEg0SU5E?= =?utf-8?B?b0JLNndWQVFCanhJTjQ5ZWpGN01CZ2dqa3o3MnRCSlZ0Ujg2MWtTY1c4VVVR?= =?utf-8?B?Y0JvQmZLVGlrNHN3WTJyZjZNajB6L3R6NFdDY1J2cmxreGpULzRWa1JaVVpS?= =?utf-8?B?M0NPanJrS1BadVNUYzc2RTdURi8rekZrWTlkZVU5M1FoeHpoblllUjZTK01J?= =?utf-8?B?VmhJN2dadjFCeG5LcHd1V05SWTdDZTgvS3I3UHU4MWcrUytLbnVKNUpBN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xhVE5IT284d3NkbzE5VWNq?= =?utf-8?B?SDQ0cFIybXBOWjJwNkRkRXV4R3pSamVBRVpGR3FiekF0NitjMmdkMVVJTjNy?= =?utf-8?B?VUx3V3pEMEhIRkFPdENyOVoxekJHRFVtSForTm9xdkppeHVFZ3owWFM0dnoy?= =?utf-8?B?U0lJMFpyNFBDQXJtTnlVSFlaMmlkUGZtejVhNS9OcjVrUG1XSkd5ays0TlVY?= =?utf-8?B?R3BzSXlxS1VsSzU4VCs1MEprWkM3eFd0MHVCN2tYRlREb0pLWk04OStFdSs4?= =?utf-8?B?MVVTL0ZGbU9kQmI1YUtzOElSNG5ROVgrRjRZRVFOeXRwWHZNRmxvdHVmdE16?= =?utf-8?B?NWttLzZFSWpnQktyS0FGakxDSzBFWU1iQytwdEkrSXVJN1prVkxqcTl2M1pN?= =?utf-8?B?MUlBVHJWc0xoc2o2ZDNNNldJREdoQ1Z0R2ZtSHErSXA2enFKSDNpd0d1K3Qw?= =?utf-8?B?b3VScml5elNHbkVzWmNCMHNocXVJa2JXWWhGRk9ITmtJc2Z0RmdlS29yYWZJ?= =?utf-8?B?amRwV2tYRzVhL2VxcnZVUXA4djVOMFlqYW8ycktqZkJxWlZEcGtodTRPdVFQ?= =?utf-8?B?ZEw5cDdTcVhlZ0VaRTFKVVF3QWNZeURuejZERkcza0tOTHpwcHU1VCs5Qk5x?= =?utf-8?B?aHJSaldYeEpUcmFJZVlwSUwrN01lcG9DaTdOMTJLZ3NrOUx4eW5zK2pLQVNx?= =?utf-8?B?dkVLVjIwZlc0SHJhMzhSNDZYTHlNUWdpMjJsR1ltOVc4dWRHY01GOXBYanVm?= =?utf-8?Q?8rE+Hv1R0ueFv0w/z83448o=3D?= X-MS-Exchange-CrossTenant-Network-Message-Id: 18731c44-73be-47ae-3e10-08d99955d149 X-MS-Exchange-CrossTenant-AuthSource: PH0PR11MB5000.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Oct 2021 14:26:51.4772 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: Mi72lFo7w5rHUOFScT1bDb+J5YZjaEhX3DM3csbAa/7/fddVt+cfqAMFwoHJJ3zOHZ+ObsW7VP3jI+SxczfMdg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR11MB5830 X-OriginatorOrg: intel.com Subject: Re: [dpdk-dev] [PATCH v6 5/5] net/enetfec: add features X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On 10/21/2021 5:47 AM, Apeksha Gupta wrote: > This patch adds checksum and VLAN offloads in enetfec network > poll mode driver. > > Signed-off-by: Sachin Saxena > Signed-off-by: Apeksha Gupta <...> > @@ -611,9 +615,20 @@ static int > enetfec_eth_init(struct rte_eth_dev *dev) > { > struct enetfec_private *fep = dev->data->dev_private; > + struct rte_eth_conf *eth_conf = &fep->dev->data->dev_conf; > + uint64_t rx_offloads = eth_conf->rxmode.offloads; > > fep->full_duplex = FULL_DUPLEX; > dev->dev_ops = &enetfec_ops; > + if (fep->quirks & QUIRK_VLAN) > + /* enable hw VLAN support */ > + rx_offloads |= DEV_RX_OFFLOAD_VLAN; > + > + if (fep->quirks & QUIRK_CSUM) { > + /* enable hw accelerator */ > + rx_offloads |= DEV_RX_OFFLOAD_CHECKSUM; > + fep->flag_csum |= RX_FLAG_CSUM_EN; > + } Driver is force enabling these Rx offloads even user is not asking for them? Is it because HW doesn't support disabling them? If it is configurable it should honor user configuration, if not configurable please document as limitation. <...> > + > + if (rxq->fep->bufdesc_ex && > + (rxq->fep->flag_csum & RX_FLAG_CSUM_EN)) { > + if ((rte_read32(&ebdp->bd_esc) & > + rte_cpu_to_le_32(RX_FLAG_CSUM_ERR)) == 0) { > + /* don't check it */ > + mbuf->ol_flags = PKT_RX_IP_CKSUM_BAD; warning: "PKT_RX_IP_CKSUM_BAD" is deprecated > + } else { > + mbuf->ol_flags = PKT_RX_IP_CKSUM_GOOD; warning: "PKT_RX_IP_CKSUM_GOOD" is deprecated > + } > + } > + > + /* Handle received VLAN packets */ > + if (vlan_packet_rcvd) { > + mbuf->vlan_tci = vlan_tag; > + mbuf->ol_flags |= PKT_RX_VLAN_STRIPPED | PKT_RX_VLAN; warning: "PKT_RX_VLAN_STRIPPED" is deprecated warning: "PKT_RX_VLAN" is deprecated > + } > + > rxq->rx_mbuf[index] = new_mbuf; > rte_write32(rte_cpu_to_le_32(rte_pktmbuf_iova(new_mbuf)), > &bdp->bd_bufaddr); > @@ -411,6 +458,10 @@ enetfec_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts, uint16_t nb_pkts) > > if (txq->fep->bufdesc_ex) { > struct bufdesc_ex *ebdp = (struct bufdesc_ex *)bdp; > + > + if (mbuf->ol_flags == PKT_RX_IP_CKSUM_GOOD) Why checking Rx flag on the transmit function? Is it typo?