From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id B2A09A3160 for ; Thu, 10 Oct 2019 14:43:38 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id A032B1E95E; Thu, 10 Oct 2019 14:43:37 +0200 (CEST) Received: from EUR04-DB3-obe.outbound.protection.outlook.com (mail-eopbgr60060.outbound.protection.outlook.com [40.107.6.60]) by dpdk.org (Postfix) with ESMTP id 707631BF04 for ; Thu, 10 Oct 2019 14:43:36 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=DN4x64Su0xDFe9bte+mHxumf2tBChgUpMm3Jcxv0Yn1LkjprjTXugERHxB2zcEgTzdoEJ10QNpiwsz94X5iY4sVJlOwHiExK8ML3XtophQ17dGZW9bB1odDB6HSavzdmMgrB85PksGZGxX2dLQVidwQeEG/eT3LRPA1R+XuhRDRAZ9I5Q8xEvSWx+O6qJj/SJrF8cCk41gCSa8TRjHIwAwh7fZ3oB33gW0SB2fMtVKTjN3s/rUYgetO/Ma35FCibYXn3eT9VpaJ7B4bCaeawKap5JE306gEBtqc+vzefRV3IZMIpl0CMFhVhKeSsI3Zu5QMuzZPjDqw9sWkKDxyymQ== 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=LLynpYIVr8GJIeNXg441jc4XRoZ0NjJblOz3aGeIl0Y=; b=Qw1nEU1khCbscC/Ymrt6ygYHLuLbOneAaxmNfhG5i7w72jqPAxJ5T1DW9mntRFX3ApuYdHnQwl1ZZO6Vzz2Ct1VPGp7glmubadWEKhIjpWcet33Ak4+80BsJeyFJFpWdfbzilOK7N7iHRLmJLVOHQ4t7yapZ44fccD8zTjdir0moLo5SzUL36Idok2XvvhiT9yp/cQGCoBCtvPaXtXj2rM3QPyDni1ai7c7xFIQS0FsDUkIesgQyuiFr61dvxGOa02ou52wT0/fbpHLGzj2e9s+OcfICU2LQ6hCi8Zo5PvuR+KttbCGK6FTUdfewz4SgBg+6zLMnh7ru8usTD1BN3Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=LLynpYIVr8GJIeNXg441jc4XRoZ0NjJblOz3aGeIl0Y=; b=Y/wTwrKnvPEQxkU1BVfrj0oA2dodSGrljuRH+G107+SkbpfRqWhas84Whz6ueqx93CxhYhgiOBUgFmB/bXgCsaptPQOw9Y4058z1/+ciLXnbm88rsu8UC8vdNOcm5/RzmRINu0WBlU+ZkKIE23uLonniEMltp5IsSSHHMjdnaTU= Received: from VI1PR04MB4480.eurprd04.prod.outlook.com (20.177.53.224) by VI1PR04MB6160.eurprd04.prod.outlook.com (20.179.27.86) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2347.17; Thu, 10 Oct 2019 12:43:34 +0000 Received: from VI1PR04MB4480.eurprd04.prod.outlook.com ([fe80::681a:2c5b:e170:683]) by VI1PR04MB4480.eurprd04.prod.outlook.com ([fe80::681a:2c5b:e170:683%6]) with mapi id 15.20.2347.016; Thu, 10 Oct 2019 12:43:34 +0000 From: Nipun Gupta To: "Rao, Nikhil" , "dev@dpdk.org" CC: "jerinj@marvell.com" , "aconole@redhat.com" , "pbhagavatula@marvell.com" , "skori@marvell.com" , Hemant Agrawal , "Richardson, Bruce" , "Kovacevic, Marko" , "orika@mellanox.com" , "Nicolau, Radu" , "Kantecki, Tomasz" , "Van Haaren, Harry" Thread-Topic: [PATCH v4] eventdev: flag to identify same destined packets enqueue Thread-Index: AQHVfnXp1rc0bswJVkaVFPsRQ6/grqdTp7oAgAApibA= Date: Thu, 10 Oct 2019 12:43:34 +0000 Message-ID: References: <20191001064641.28404-1-nipun.gupta@nxp.com> <20191009073236.32661-1-nipun.gupta@nxp.com> <1F668163772FA946975B9466A9DFF729EDEE4BAD@ORSMSX122.amr.corp.intel.com> In-Reply-To: <1F668163772FA946975B9466A9DFF729EDEE4BAD@ORSMSX122.amr.corp.intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=nipun.gupta@nxp.com; x-originating-ip: [92.120.1.68] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 53130a23-f7ca-49a8-5067-08d74d7f76ec x-ms-office365-filtering-ht: Tenant x-ms-traffictypediagnostic: VI1PR04MB6160:|VI1PR04MB6160: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:10000; x-forefront-prvs: 018632C080 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(4636009)(346002)(376002)(136003)(366004)(39860400002)(396003)(199004)(189003)(13464003)(86362001)(33656002)(6506007)(53546011)(76176011)(6246003)(2906002)(99286004)(7696005)(55016002)(9686003)(6436002)(4326008)(102836004)(110136005)(54906003)(229853002)(25786009)(316002)(66066001)(3846002)(6116002)(478600001)(14454004)(76116006)(7736002)(8936002)(74316002)(44832011)(486006)(66446008)(64756008)(66556008)(66946007)(66476007)(11346002)(8676002)(305945005)(81156014)(81166006)(7416002)(5660300002)(52536014)(2501003)(14444005)(256004)(446003)(186003)(26005)(71190400001)(71200400001)(476003); DIR:OUT; SFP:1101; SCL:1; SRVR:VI1PR04MB6160; H:VI1PR04MB4480.eurprd04.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; received-spf: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: n4da/FTDfpFC+D8OqaOqOjAWym9P4xezUm88R4W6fu5qkSsymSipURUJg+3Ot7KpJqXVaxs+gMssic1vwZqlRqZ2iqO1aj713i6O46UzTNW6fPzHR4q/Nh5QgGe+kwPd1yRkVE1UaM+zE3EjzbC07a7+aLGpQor6b/P8Mcwpc/QvuDDMYnAxKvtl77MFBmRxmHJkpeGfdEHRb9mfqU+8cDTxbD2UTL9GXPKqpMTTp69IFOWzUybrThJ03zYPjLJGAw6IJ2ujjlXq6Z5avHy55BitucjMXST5J7U7egZe+j1VDQMX7nM2x9jdb+k+56FamZ+ckah5Pbje4tkNoBEUYx524cJPBLokWWi8Rjru51STOjZuDZDCQg6UcGZ/7Ydn2xLf95fAacg08fgzluLc+LkUgqqT96GDRC3fBv6GPNs= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 53130a23-f7ca-49a8-5067-08d74d7f76ec X-MS-Exchange-CrossTenant-originalarrivaltime: 10 Oct 2019 12:43:34.6309 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: /dEU4jDjzT22TDFuyJuW3x/h6rNrLMKazTUnSWpd+IZQurrhEM6c9NM6hus7EAmZkxGpu2z44z1PUQhVnAubYA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR04MB6160 Subject: Re: [dpdk-dev] [PATCH v4] eventdev: flag to identify same destined packets enqueue X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 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: Rao, Nikhil > Sent: Thursday, October 10, 2019 3:36 PM > To: Nipun Gupta ; dev@dpdk.org > Cc: jerinj@marvell.com; aconole@redhat.com; pbhagavatula@marvell.com; > skori@marvell.com; Hemant Agrawal ; > Richardson, Bruce ; Kovacevic, Marko > ; orika@mellanox.com; Nicolau, Radu > ; Kantecki, Tomasz ; > Van Haaren, Harry > Subject: RE: [PATCH v4] eventdev: flag to identify same destined packets > enqueue >=20 > Hi Nipun, >=20 >=20 > > -----Original Message----- > > From: Nipun Gupta [mailto:nipun.gupta@nxp.com] > > Sent: Wednesday, October 9, 2019 1:03 PM > > To: dev@dpdk.org > > Cc: jerinj@marvell.com; aconole@redhat.com; pbhagavatula@marvell.com; > > skori@marvell.com; hemant.agrawal@nxp.com; Richardson, Bruce > > ; Kovacevic, Marko > > ; orika@mellanox.com; Nicolau, Radu > > ; Kantecki, Tomasz > ; > > Van Haaren, Harry ; Rao, Nikhil > > ; Nipun Gupta > > Subject: [PATCH v4] eventdev: flag to identify same destined packets > enqueue > > > > This patch introduces a `flag` in the Eth TX adapter enqueue API. > > Some drivers may support burst functionality only with the packets havi= ng > > same destination device and queue. > > > > The flag `RTE_EVENT_ETH_TX_ADAPTER_ENQUEUE_SAME_DEST` can be > used > > to indicate this so the underlying driver, for drivers to utilize burst > functionality > > appropriately. > > > > Signed-off-by: Nipun Gupta > > Acked-by: Jerin Jacob > > --- > > > > Changes in v4: > > - Update rel note specifying the API change > > - Remove redundant rte_event_tx_adapter_enqueue_same_dest API > > > >=20 > > /** > > * Enqueue a burst of events objects or an event object supplied in > *rte_event* > > * structure on an event device designated by its *dev_id* through th= e > event > > @@ -324,6 +329,10 @@ > rte_event_eth_tx_adapter_event_port_get(uint8_t > > id, uint8_t *event_port_id); > > * The number of event objects to enqueue, typically number of > > * rte_event_port_attr_get(...RTE_EVENT_PORT_ATTR_ENQ_DEPTH...) > > * available for this port. > > + * @param flags > > + * RTE_EVENT_ETH_TX_ADAPTER_ENQUEUE_ flags. > > + * #RTE_EVENT_ETH_TX_ADAPTER_ENQUEUE_SAME_DEST signifies that > all > > the > > + packets > > + * which are enqueued are destined for the same Ethernet port & Tx > queue. > > * > > * @return > > * The number of event objects actually enqueued on the event device= . > The > > @@ -343,7 +352,8 @@ static inline uint16_t > > rte_event_eth_tx_adapter_enqueue(uint8_t dev_id, > > uint8_t port_id, > > struct rte_event ev[], > > - uint16_t nb_events) > > + uint16_t nb_events, > > + const uint8_t flags) > > { > > const struct rte_eventdev *dev =3D &rte_eventdevs[dev_id]; > > > > @@ -359,7 +369,12 @@ rte_event_eth_tx_adapter_enqueue(uint8_t > dev_id, > > return 0; > > } > > #endif > > - return dev->txa_enqueue(dev->data->ports[port_id], ev, > nb_events); > > + if (flags) > > + return dev->txa_enqueue_same_dest(dev->data- > > >ports[port_id], > > + ev, nb_events); > > + else > > + return dev->txa_enqueue(dev->data->ports[port_id], ev, > > + nb_events); > > } >=20 > For the if (flags) condition to work for the PMDs that support > RTE_EVENT_ETH_TX_ADAPTER_CAP_INTERNAL_PORT but do not have a > txa_enqueue_same_dest callback, doesn't the dev- > >txa_enqueue_same_dest pointer need to be set to the same value as dev- > >txa_enqueue ? Something like below would work, but it would be unnecessary additional cos= t if (flags && dev->txa_enqueue_same_dest) Instead the drivers can have both the function pointers pointing to the sam= e=20 function in such cases. Seems legitimate? Ill add the function pointers in the octeontx and octeontx2 drivers in the = next spin. Thanks, Nipun >=20 > Thanks, > Nikhil