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 6F0F8A0547; Tue, 20 Apr 2021 10:03:39 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E8855415D7; Tue, 20 Apr 2021 10:03:38 +0200 (CEST) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by mails.dpdk.org (Postfix) with ESMTP id B761F415D0 for ; Tue, 20 Apr 2021 10:03:37 +0200 (CEST) IronPort-SDR: h+BWJCsVnltvnww5/6vqq+Zi7bd9fBJqpq/rtuHYJtL1AfXos2XEjtZOVaSf7RugVactvGEpDi 6czdJpy7JROQ== X-IronPort-AV: E=McAfee;i="6200,9189,9959"; a="195579353" X-IronPort-AV: E=Sophos;i="5.82,236,1613462400"; d="scan'208";a="195579353" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Apr 2021 01:03:33 -0700 IronPort-SDR: 8n2nEweAll50DyYkrKY7fya/dOPTsn2OHMPN0rDmtPCY1I5caRP5yCcTCeGBiejWwlQGkumUub 4Go1VIJvV6dw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.82,236,1613462400"; d="scan'208";a="422946962" Received: from orsmsx602.amr.corp.intel.com ([10.22.229.15]) by orsmga007.jf.intel.com with ESMTP; 20 Apr 2021 01:03:33 -0700 Received: from orsmsx611.amr.corp.intel.com (10.22.229.24) by ORSMSX602.amr.corp.intel.com (10.22.229.15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2106.2; Tue, 20 Apr 2021 01:03:32 -0700 Received: from orsmsx609.amr.corp.intel.com (10.22.229.22) by ORSMSX611.amr.corp.intel.com (10.22.229.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2106.2; Tue, 20 Apr 2021 01:03:32 -0700 Received: from ORSEDG601.ED.cps.intel.com (10.7.248.6) by orsmsx609.amr.corp.intel.com (10.22.229.22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2106.2 via Frontend Transport; Tue, 20 Apr 2021 01:03:32 -0700 Received: from NAM10-MW2-obe.outbound.protection.outlook.com (104.47.55.100) 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; Tue, 20 Apr 2021 01:03:32 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=VR0VHWgoBDEocx1E/mI+TTrx+kf7M1yke6teJbBSXej9z4ddinkks7R3uQ3yA9jj3HGQS0g7U88Wf+fuEayp9Cdb+0hzUwy58EeRhaorRtuJMQrr9nnUgsLcoj8aQu/HZMxdc+KGTnSf5hEYrTd9b7krz4jC9tCTB3nTzghrDROaP3pfCxIvmDZicXCsNkGuOJATVyrwGcaINaAk3o2Nn3EtMfgQRbscQM2MpmaPS4owW76PfBd+vvDgqMFDwc4NP2cJ87w6G84Yt58+py/N+jRYX4GkohUVDAEy0+/O6BufNtFyv+fIVZuB5aKeTUggDQ0UjSeX0shcg8feFpl28w== 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=z8m+OVOo1XTpS0ZYeZPzjRvBDvJMsF0RubVdF1ffszU=; b=cF4x4LreFuAk7W1/xxXup7f0kNzjnWyYTUSkMR1f1b2KrnmP0NxFCSnfbsSEyXWCPs/ZT5EINad0aQPFDmtMR6qH+OgtpLHtunEuXLzjqROz09GGa9uShlKiGDzsqtvRQ5kDnWxawyuKDFUZemlphgiUzkjarzePq4MU3Q4ASTBc0Gs7/BSW/m8l7ZDZ61e1BM2nCdMk9eCuwRxdZxkvYfkuH+P14CUkzXoEDTKOu1J4ClEdDziq+a3UMoBlsBeCiR7eQhLsAHx2BEQaEdifZOaBWfpAbDzq4lPsuq52ZEL+F3321CJIuCrN1A1U0N5Nu8nwKrXc8AEYrfHJs69b8A== 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=z8m+OVOo1XTpS0ZYeZPzjRvBDvJMsF0RubVdF1ffszU=; b=CnIQTT/JxrXZABXm7JoM5E1Ek56JIsXAlt7+CfGzQYdVS6sq0Gipc9uaXKag4OtyqNrexFEHQDNgHilDd1Fs8VdwDja/GptRVOBCLVuZEX+xaxef0h7W2+EWNfjGOsnmjq0H2e08OGC9MPLJVYKhNzikRoipTKTxqy4yU9lxwcQ= Received: from DM6PR11MB4491.namprd11.prod.outlook.com (2603:10b6:5:204::19) by DM4PR11MB5311.namprd11.prod.outlook.com (2603:10b6:5:392::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4042.16; Tue, 20 Apr 2021 08:03:30 +0000 Received: from DM6PR11MB4491.namprd11.prod.outlook.com ([fe80::3182:6da2:8c64:f07a]) by DM6PR11MB4491.namprd11.prod.outlook.com ([fe80::3182:6da2:8c64:f07a%3]) with mapi id 15.20.4042.024; Tue, 20 Apr 2021 08:03:30 +0000 From: "Ananyev, Konstantin" To: "Rong, Leyi" , "Zhang, Qi Z" CC: "dev@dpdk.org" Thread-Topic: [PATCH v3] net/i40e: add Tx preparation for simple Tx data path Thread-Index: AQHXNanVWCDqF9fhMU+EK2MeeXtHGaq9C6zg Date: Tue, 20 Apr 2021 08:03:29 +0000 Message-ID: References: <20210331085345.6290-1-leyi.rong@intel.com> <20210420052945.89472-1-leyi.rong@intel.com> In-Reply-To: <20210420052945.89472-1-leyi.rong@intel.com> Accept-Language: en-GB, 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: [109.255.184.192] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 0360206a-83fc-4d60-f959-08d903d2c903 x-ms-traffictypediagnostic: DM4PR11MB5311: 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:4502; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: H0c4jH+qjyLTvmAUqCuKTpjv3V0MZBoXT30ywV2gUQhB7EdOOKUpHzHvSIrVvd5j1A2HxrT3pF+7UCZSbKJdOYIQGaX1GOCiHkuH9MxL+CuAHxt6wZASx2H8R3YgJGK/5LZDfiQjrbQnCrCvhg0CiUSlz/fkqhsuWHvm2N91C++XlguHrw/W2g5zI0/x1UJZ9TuaueG3SMF20i0dLqgoSKtvQDrJ3f6oS6y5FhVxrMUDrlLRnWftiPlGgk+VXVTGiWyJylxEu5eTcUQfl9t36UgueK3Vp4LuXWGFTOAVZVR1goKLWT6A4Owm5jfoiVIPTewRRJ2UB5xT+ZAoswfjTCHYHC3+aJH5Y8oEsegyhE4zCHhwqicBRP7xm80vWkDD/Q8lZMUTykRVO4h6as2HYjCCWvDbcXmhJUvA3oNMvA79wiI1ABYPqOaF0Qbl8tx10KBEVLp8SnH2t8rYGAv7NdLql6z3lzs2H4QCDhIS8QFk+utd7Fpe1FcpS7fdVdGpAwrC0E8d/R5i7Ny04iINjZYpIZQvbSoSHdF3U+KxiPes15OAaX4k7TF0YR+50RALZaNeDQN6aJagV/6i7bb/d3SmPshuUJa7iaOWieKI3vo= x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM6PR11MB4491.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(136003)(376002)(396003)(346002)(366004)(39860400002)(66476007)(55016002)(9686003)(66446008)(2906002)(64756008)(478600001)(5660300002)(26005)(52536014)(66946007)(38100700002)(4326008)(33656002)(66556008)(122000001)(83380400001)(6636002)(7696005)(6506007)(8936002)(86362001)(8676002)(186003)(76116006)(55236004)(316002)(110136005)(71200400001); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata: =?us-ascii?Q?W29jGeatHQDDIBVhumVZDmdaoVKTUrM0TNQsl6v/JJLAr/N56UeJ6QCXu+Kq?= =?us-ascii?Q?QEFELYQZ91/35gKGG8AsPuzHWqcYPV5yTD/KAE7CZ3m3xARrKlIJTbe9qJtr?= =?us-ascii?Q?MX9eqcAPa1vqzPgH00YegvHESBigO0DuNJ1r9CcJmeR8RhA95YEMkgthtJKL?= =?us-ascii?Q?L4xVEAzuo+ckruzCy9tYQ/wZiZPe8pJHNwoeAtBUFv6gxohzun/NEijZLVPo?= =?us-ascii?Q?qTV3pHd01+/HGYDFkLz+gVzYKsSCVU1p4AgLmQDq63B+UpJZ8OttFAFJKrgy?= =?us-ascii?Q?3pdehG+BdwloCYRWT/9UKIctAZ1amA5E6pE8+rEBFxp+15fAO7rIwdEUMq7h?= =?us-ascii?Q?4M30Beu9YspP8ws2XRA7F8/wzhqpZ1uFQAgCnIixvEvV2raM1OTPYnJ78d8l?= =?us-ascii?Q?ItEExtb6gz/VeCXEJ2vqcORLVBaRElnwPxNvmeoyKyJuQDA77yfLkX8Hnxtw?= =?us-ascii?Q?hEQjmlAS/oxNjgq6oG4X1KYCXc11/09XJkY5WitVIpYqhQNQbAIA8D/mPkXP?= =?us-ascii?Q?VHryck+QacrgR28b1+UYlrMmnwa7Ax32TIqQfhpy7ajvbnqPGOo63EoqA5Ek?= =?us-ascii?Q?YGIes3x5n4fv6phe1Yf8OT37o7ROzp4esnLX5gPJOnON+xXR3q2iNIFGhKQ+?= =?us-ascii?Q?fmz9/2xsqP7OC9uz1z60VDJHrLACRWweqAlN6njxAnD3mcxWEMX8MhgC73/x?= =?us-ascii?Q?YJIg5GipPh8qX+c3ImQ2/PRZX4kzdj0u5YrtQn/5PhqFg4jSKRq8QniZChP+?= =?us-ascii?Q?7otmbB8qnzI5TVeUCKITExeTURze8RXTe4htobhlV7HEV/4R5ZRjJ90IZVPh?= =?us-ascii?Q?BTCn+PnEKzapni/2w64e3mwDkj0AU4/z2pAu95sLeOV3VAL290fxaI8jEP2J?= =?us-ascii?Q?MNiTPTMdF18x9GXgxpjxr1U1C343G1d4jwmQqa5eJ3SHjD0iOmLXDnOhs7Nj?= =?us-ascii?Q?xJowlZiIFyIs7r9KZKVUvje2DfpO2ggrlQfOQij19Bqr+V0mSmsIg1l/zwoY?= =?us-ascii?Q?lEEo3tnSmLtRj39GW15xg8tww1MfNX4R1CGj/0EaFc5JGtuUcwiMnXKco23E?= =?us-ascii?Q?SLz+JjXeMvEmjxtgd3wVHMD1/UeT28fFLWsOVW3yEjlZ4dqDB+YIAEpsiUzN?= =?us-ascii?Q?pHkYM5qbHSPDIU9gemhdzUu0e6g+opIeb6LEXsXYk5u6ku2PcDGj8/k0AXB0?= =?us-ascii?Q?Lrr/m6ksUfvXDd7vLr6S+p6gkrW3DNdt46toyOG4i9lYytbkJsZzsvlm6576?= =?us-ascii?Q?9hy9vepEjlvJrVvjpN7Z2m9Gw2knypMfXGxqTN94HMp2EIdfx+FUoFSKMKya?= =?us-ascii?Q?Q4C5zUzo5B4Ei+nLRkeESp7S?= 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: DM6PR11MB4491.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 0360206a-83fc-4d60-f959-08d903d2c903 X-MS-Exchange-CrossTenant-originalarrivaltime: 20 Apr 2021 08:03:29.8772 (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: /Gi2xuvsSu6Pb9jgmHOSISjlFYxQmYcNHpTiGSHDVThmbvSkEhNGZjuuUS91QjpLLO0RWCbQz+PNTBZNV1gbtN5bTt3qIEvPHtlvqCYvpCo= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM4PR11MB5311 X-OriginatorOrg: intel.com Subject: Re: [dpdk-dev] [PATCH v3] 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" =20 > Introduce i40e_simple_prep_pkts() as the preparation function for > simple Tx data path, as it's for sanity check for simple Tx. >=20 > Suggested-by: Konstantin Ananyev > Signed-off-by: Leyi Rong > --- > drivers/net/i40e/i40e_rxtx.c | 39 +++++++++++++++++++++++++++++++++++- > drivers/net/i40e/i40e_rxtx.h | 2 ++ > 2 files changed, 40 insertions(+), 1 deletion(-) >=20 > diff --git a/drivers/net/i40e/i40e_rxtx.c b/drivers/net/i40e/i40e_rxtx.c > index 3c7686c3f4..86a9eae370 100644 > --- a/drivers/net/i40e/i40e_rxtx.c > +++ b/drivers/net/i40e/i40e_rxtx.c > @@ -1479,6 +1479,43 @@ i40e_xmit_pkts_vec(void *tx_queue, struct rte_mbuf= **tx_pkts, > return nb_tx; > } >=20 > +/********************************************************************* > + * > + * 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; > + > + for (i =3D 0; i < nb_pkts; i++) { > + m =3D tx_pkts[i]; > + ol_flags =3D m->ol_flags; > + > + if (m->nb_segs !=3D 1) { > + rte_errno =3D EINVAL; > + return i; > + } > + > + if (ol_flags & PKT_TX_OFFLOAD_MASK) { > + rte_errno =3D ENOTSUP; > + return i; > + } > + > + /* check the size of packet */ > + if (m->pkt_len < I40E_TX_MIN_PKT_LEN || > + m->pkt_len > I40E_FRAME_SIZE_MAX) { > + rte_errno =3D EINVAL; > + return i; > + } > + } > + return i; > +} > + > /********************************************************************* > * > * TX prep functions > @@ -3412,7 +3449,7 @@ i40e_set_tx_function(struct rte_eth_dev *dev) > PMD_INIT_LOG(DEBUG, "Simple tx finally be used."); > dev->tx_pkt_burst =3D i40e_xmit_pkts_simple; > } > - dev->tx_pkt_prepare =3D NULL; > + dev->tx_pkt_prepare =3D i40e_simple_prep_pkts; > } else { > PMD_INIT_LOG(DEBUG, "Xmit tx finally be used."); > dev->tx_pkt_burst =3D i40e_xmit_pkts; > diff --git a/drivers/net/i40e/i40e_rxtx.h b/drivers/net/i40e/i40e_rxtx.h > index 3447a58c82..5ccf5773e8 100644 > --- a/drivers/net/i40e/i40e_rxtx.h > +++ b/drivers/net/i40e/i40e_rxtx.h > @@ -208,6 +208,8 @@ uint16_t i40e_recv_scattered_pkts(void *rx_queue, > uint16_t i40e_xmit_pkts(void *tx_queue, > struct rte_mbuf **tx_pkts, > uint16_t nb_pkts); > +uint16_t i40e_simple_prep_pkts(void *tx_queue, struct rte_mbuf **tx_pkts= , > + uint16_t nb_pkts); > uint16_t i40e_prep_pkts(void *tx_queue, struct rte_mbuf **tx_pkts, > uint16_t nb_pkts); > int i40e_tx_queue_init(struct i40e_tx_queue *txq); > -- Acked-by: Konstantin Ananyev > 2.17.1