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 9F349A0547; Tue, 20 Apr 2021 07:31:17 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1BE174159C; Tue, 20 Apr 2021 07:31:17 +0200 (CEST) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by mails.dpdk.org (Postfix) with ESMTP id BE1A841598 for ; Tue, 20 Apr 2021 07:31:14 +0200 (CEST) IronPort-SDR: 62rTr+2PD/ii64d3GUshf96/LbbLVSGnWpxO+SqdPcRC6rzzFzTAFEnBqShzllN0PJP2GMJJnk MyRuQyCfKm0A== X-IronPort-AV: E=McAfee;i="6200,9189,9959"; a="195559156" X-IronPort-AV: E=Sophos;i="5.82,236,1613462400"; d="scan'208";a="195559156" Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Apr 2021 22:31:13 -0700 IronPort-SDR: hr8MbTSYaLEanmcy3YQrd0bL2a2zDYCXDI4ZV8pURZVWZ6wwDxHYmHd+BHxiSkQdxKt3YlsuXc YB6dzSQ/HxsA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.82,236,1613462400"; d="scan'208";a="445396856" Received: from orsmsx604.amr.corp.intel.com ([10.22.229.17]) by fmsmga004.fm.intel.com with ESMTP; 19 Apr 2021 22:31:13 -0700 Received: from orsmsx610.amr.corp.intel.com (10.22.229.23) by ORSMSX604.amr.corp.intel.com (10.22.229.17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2106.2; Mon, 19 Apr 2021 22:31:12 -0700 Received: from orsmsx612.amr.corp.intel.com (10.22.229.25) by ORSMSX610.amr.corp.intel.com (10.22.229.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2106.2; Mon, 19 Apr 2021 22:31:12 -0700 Received: from ORSEDG601.ED.cps.intel.com (10.7.248.6) by orsmsx612.amr.corp.intel.com (10.22.229.25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2106.2 via Frontend Transport; Mon, 19 Apr 2021 22:31:12 -0700 Received: from NAM11-CO1-obe.outbound.protection.outlook.com (104.47.56.169) by edgegateway.intel.com (134.134.137.102) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2106.2; Mon, 19 Apr 2021 22:31:10 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=kaM3cKR0Jz5MsUZ2vPoixu0jDB/qvOnOB5633EWeC7qEppe+L9fQMh28CEcKejmWSTKRfRKvVa0j7N7K9It+3Ul+n2hzrwkOyu7x1I75nGCRsbShgtdM9aOL3bOXrIiXddr9h62qi7gtwznyEsYHdJPC+qrjZVGyk8Z6OQ4NsKbk5pFHu0v/j5PlD+Oc6CUx+DxlTwzfYvU4HN6h/fBhtbKBS5fkEWCzXmaC1/kn3a9lOb5y9f4G9SF5JJTJbBObtVRnCVnfSmYnolWav3BAj3mB/demczNgzCMOmKSxg+AkdA7vhvvV9PRY4ajGXGOGa69lL2t6zUH7cwRBHQpyrA== 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-SenderADCheck; bh=n3dXlPJGJlkepcXScHzq7PElB2gADkbLF66CTY/6ZzY=; b=UrLzr9C7yTfE/FPLcOtN1xo39/8dWRTrcQwzZ56IZt2lspFhQFhMfj1MxKQHhKoYa7A7AiYpgq6TYneZwjc/dMtaf4IY9xQNBJchdw3/GlLtRlyEeBoupSc0pq6guDOMElmd8tiAjHVvVpOuqW09O85NGUeqVExNINfB6dIlBcpuI3SN9VGMb0CxweZvOazsM+x5QNqFflKIX9iVnHYcSeXbom7Dz4hZKWSqZI6f8fOTKUtpCIL+XZ/1F5tGzKyq0xeaHr6BT9x2qHBgFHylSFdDt7fwKcqyFyAuJGrvUVb3LrzOW0sFH0aV1LGJgoPq1vRugJNjADiShaHJ52SUVA== 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=n3dXlPJGJlkepcXScHzq7PElB2gADkbLF66CTY/6ZzY=; b=R6iHtKLqVeNrx21b1GUxwiYXmaB1nR7KElWQrJRh6YZ5rUMw1iJm6VM1UDzTgxzUtKqUvkHIaArhJGBgAY3hz4p+qbRfjWEndtr/5kyhijZY9qeBqFKHxq6P7rIj80sX+veRIe8X3U98NA7969B42K09RiV6qyeAVkb1XjivMIE= Received: from SN6PR11MB2621.namprd11.prod.outlook.com (2603:10b6:805:59::15) by SA2PR11MB5210.namprd11.prod.outlook.com (2603:10b6:806:fa::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4042.19; Tue, 20 Apr 2021 05:31:07 +0000 Received: from SN6PR11MB2621.namprd11.prod.outlook.com ([fe80::50e2:3791:51f4:fc8b]) by SN6PR11MB2621.namprd11.prod.outlook.com ([fe80::50e2:3791:51f4:fc8b%5]) with mapi id 15.20.4042.024; Tue, 20 Apr 2021 05:31:07 +0000 From: "Rong, Leyi" To: "Ananyev, Konstantin" , "Zhang, Qi Z" CC: "dev@dpdk.org" Thread-Topic: [PATCH v2] net/i40e: add Tx preparation for simple Tx data path Thread-Index: AQHXNPq6594k1KZBqkypbQS+ns99/qq7rBiAgAE2LfA= Date: Tue, 20 Apr 2021 05:31:07 +0000 Message-ID: References: <20210331085345.6290-1-leyi.rong@intel.com> <20210419083622.83717-1-leyi.rong@intel.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-reaction: no-action dlp-version: 11.5.1.3 authentication-results: intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=none action=none header.from=intel.com; x-originating-ip: [192.198.147.217] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: ddaf3db3-8d9a-42fc-4ef6-08d903bd7fbc x-ms-traffictypediagnostic: SA2PR11MB5210: x-ld-processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:7691; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: 1Actsalrbhwp9DPuzDxX2EGCE5VbrK5Gm4qV2iScG4PvNk3Oa3QrO5nfMOtkUcKtvEg9YTI6xMIIjOkHkx0oBeWra0WnRipwv2j/oQjF9L8Xp+tVIFaCnNGLmLKxOM2Dw07wRu5ku6ZB80FcR01LnJj3MQgrU2MvW/CssN9AqCWYAG6B8Wb4FyswEMKWBKm7uuyc/LRENfK/R0/CRuwKOB962Wk7VjikapJYALfUS+wHqQQnOObDlvuadllT2eWHSOEzMUDCIHvUrAPIZuw0eerewPuFyvoAO6/Z95h/a/Heva1BVas4wc3QdjS61M5EBuy1z0DWM0gO/O+QXeOe4zfnttEiiLPn5BkaYmLf0JMS8QpZBlBJr2J0S/FRhfAXkCsA4DVOG2182CDqupHPMVsNapydndsu2cBJZXw2ZsCZuI6uW0ENREAQ9hMheaLfKbvsmujRUr23bXWw0DlHWoOohKt3E+kPHjD2AImSPuNtZ6u261Hs7nnfoBDiv4Xq5zyFk9gu1wcJ5f79uews67qQkI5bo1UOB1rD7a+Wqa0iLuWW6ZcLQFmWXf50TjMGnLIdMgsu/FV+I4cdNN7cw/OXUf7qIdvDNWBpE3FNqWU= x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SN6PR11MB2621.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(136003)(376002)(346002)(39860400002)(396003)(366004)(478600001)(26005)(66946007)(186003)(66476007)(64756008)(66556008)(86362001)(71200400001)(83380400001)(122000001)(33656002)(8676002)(5660300002)(52536014)(7696005)(8936002)(38100700002)(6636002)(76116006)(6506007)(53546011)(110136005)(2906002)(55016002)(316002)(66446008)(4326008)(9686003); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata: =?us-ascii?Q?lZWRf6K5Mt5+JV82FsTUDtqNuii27FFSG6NpIZkgJS6QkisjgcpRzJYKcMNr?= =?us-ascii?Q?V6WbwUzlbGRqJ8qnxjemIRv+xeAdeunfgp44KgQZLtEFrHg/CViRoJnpdlzD?= =?us-ascii?Q?FN4I2qKBq+qzp45idCc492k6Y5jdTySmHEuc8E4OgYWLx199IUUBrPmwhigE?= =?us-ascii?Q?+9uOBYAe0b/z6wsleWFdPcd7wOZq3DmZL7RO+FmsZZTRP3WttMnGVP0EPKP3?= =?us-ascii?Q?TYgBUYUi/Qfgec1iF8azXZZXiyyn/t7yuf+HUOpSDQkEQDt0baW07B+LGOoF?= =?us-ascii?Q?a9ojwETz5q9aDPgWUq7OTVpmWQq+Dy+RCcySd/0q7tRLsxzKeppS6F9RmUF7?= =?us-ascii?Q?Bx0DJBzt/vGcQqEH+9e/osx7Sb/vk+2VMzU9P1Xs184nBYBONltDnYPq6Yum?= =?us-ascii?Q?PmZdrxYQbaxXvBIkpy6EojjkW+3mLDi4LNVTkdAA7G+whzs8Qb1VOlU5bw/S?= =?us-ascii?Q?XIi/1hkNkT8rnkZNEKspeNVa99WCmTnZeJuGuqFG5d3vgYuCYlC+lBfQ2iNm?= =?us-ascii?Q?LGpRC/KSURZM+PfbKPqetci701zfLI1r3RDrUNqz3L7AHByU46KLfrERezTx?= =?us-ascii?Q?3U91ExeFFugwFr6RkbnL5TE8g6xMLdWF0tXkr5MRT3i7Z+3OM+S+iJYRIJO3?= =?us-ascii?Q?2gMkJYIjJ5DGeo+xDFNFDUkid9yJUv8d+40rQoPOTBBgWYN0h3Uf9RCGauFM?= =?us-ascii?Q?Yq+Sxt/pAf7B/VbYDBpjnWfRYbff5qRsLmhZjPukIbqiOFH2twX9Mi31F/1M?= =?us-ascii?Q?ssuz2IxaBg28QghcotKA700K7OpgVqmqajDXtCjCVOc4fTmrwhsg/OrLER+t?= =?us-ascii?Q?Zr0auU3QucaFv+w7HM6I7fW84Cx+A3FRykNjfic1fUSUyakDjNsfnDXx7bDL?= =?us-ascii?Q?4Ac7STu8MhX8sAF5LNxYwfEG0q16hsvbCVW0xQs8Nq5eYbSkXCzWFo6x/VQv?= =?us-ascii?Q?mPkZo86Rw0nSORYQsiY/+LzHYyO9NB5/nPbsxAUgRsBD9fW+JG6I9425x/xI?= =?us-ascii?Q?SZr6RQAfjiK6xGbyFxJLIXQrwOTsfzcpNnC03NaJIkRQvm3t6KO//m5mQVLF?= =?us-ascii?Q?g78tG7tngXNZKWHYfIcFpBll5gfyGFmxt5Md7X44ioVUBi6qTJoXH+Y3sZ/0?= =?us-ascii?Q?2TNvcUV8Q/vgxbmRW8FU/0uIvhVAR2JZ3CWcA/igSn+9O24Nho+U4z065lus?= =?us-ascii?Q?zdvTaKmS31pgyRb5AxN/PKKAqHZEfRHEXi+6C1B5hZ+PMasDLa0egzKbQxlY?= =?us-ascii?Q?S8AZqvp585QgTnPUklqKhHwrRoH6siRKlo38L8p7tEJDWylE4/EyyYyD1Qwa?= =?us-ascii?Q?VXV80Q41jmNHRS9xGok0n3Hq?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: SN6PR11MB2621.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: ddaf3db3-8d9a-42fc-4ef6-08d903bd7fbc X-MS-Exchange-CrossTenant-originalarrivaltime: 20 Apr 2021 05:31:07.5276 (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: bZqtSnW+VE/jPyoJXWOR4eFNkyr0nDGLl3/TFcdB1iGCrbCL6rKsEcPdN5jc26NpsPshuNbcq8cBiwNdWcxfJQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA2PR11MB5210 X-OriginatorOrg: intel.com Subject: Re: [dpdk-dev] [PATCH v2] net/i40e: add Tx preparation for simple Tx data path 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" > -----Original Message----- > From: Ananyev, Konstantin > Sent: Monday, April 19, 2021 6:59 PM > To: Rong, Leyi ; Zhang, Qi Z > Cc: dev@dpdk.org > Subject: RE: [PATCH v2] net/i40e: add Tx preparation for simple Tx data p= ath >=20 > Hi Leyi, >=20 > > Introduce i40e_simple_prep_pkts() as the preparation function for > > simple Tx data path, as it's for sanity check for simple Tx. > > > > Suggested-by: Konstantin Ananyev > > Signed-off-by: Leyi Rong > > --- > > drivers/net/i40e/i40e_rxtx.c | 42 > > +++++++++++++++++++++++++++++++++++- > > drivers/net/i40e/i40e_rxtx.h | 2 ++ > > 2 files changed, 43 insertions(+), 1 deletion(-) > > > > diff --git a/drivers/net/i40e/i40e_rxtx.c > > b/drivers/net/i40e/i40e_rxtx.c index 3c7686c3f4..282eb5924b 100644 > > --- a/drivers/net/i40e/i40e_rxtx.c > > +++ b/drivers/net/i40e/i40e_rxtx.c > > @@ -1479,6 +1479,46 @@ i40e_xmit_pkts_vec(void *tx_queue, struct > rte_mbuf **tx_pkts, > > return nb_tx; > > } > > > > > +/*************************************************************** > ***** > > +* > > + * > > + * TX simple prep functions > > + * > > + > > > +**************************************************************** > ***** > > +*/ > > +uint16_t > > +i40e_simple_prep_pkts(__rte_unused void *tx_queue, struct rte_mbuf > **tx_pkts, > > + uint16_t nb_pkts) > > +{ > > + int i; > > + uint64_t ol_flags; > > + struct rte_mbuf *m; > > + struct i40e_tx_queue *txq =3D (struct i40e_tx_queue *)tx_queue; > > + > > + for (i =3D 0; i < nb_pkts; i++) { > > + m =3D tx_pkts[i]; > > + ol_flags =3D m->ol_flags; > > + > > + if (!(txq->offloads =3D=3D > > + (txq->offloads & DEV_TX_OFFLOAD_MBUF_FAST_FREE) > && > > + m->nb_segs =3D=3D 1)) { >=20 > I think we don't need to check txq->offloads here, they should be alread= y > checked at setup phase. > I suppose: > if (m->nb_segs !=3D 1) {...} > should be enough here. >=20 > > + rte_errno =3D EINVAL; > > + return i; > > + } > > + > > + if (ol_flags & I40E_TX_OFFLOAD_NOTSUP_MASK) { >=20 > It would return OK for the packet with any supported by any i40e TX offlo= ad > (full-featured path). > Probably we need here instead: > if (ol_flags & PKT_TX_OFFLOAD_MASK) {...} >=20 > > + rte_errno =3D ENOTSUP; > > + return i; > > + } Hi Konstantin, Got your points, will be fixed in v3, thanks!