From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR01-DB5-obe.outbound.protection.outlook.com (mail-db5eur01on0089.outbound.protection.outlook.com [104.47.2.89]) by dpdk.org (Postfix) with ESMTP id CA87A374E for ; Wed, 13 Sep 2017 15:36:59 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=TP2z8Y1m3bISxXFK8xzJcKF4v7CHX++S13j55bvWShY=; b=Q9aIl4fxvoDoxprhuB58JYMxZ6UtOMpI1/rE/xRpudYUMJ1m05P/Vw9n3k2tFj+qgr9O6enhe47hbGQgtCfwl4kI+ng4Dc/wxYqNXSf+IW05Qb4zV6mqXSfwLTsM2PUB8F6b25AUAcGmNF2+meSSDr8oFYb8vKtdLMcfYwZGLUU= Received: from HE1PR0401MB2425.eurprd04.prod.outlook.com (10.168.33.22) by HE1PR0401MB2313.eurprd04.prod.outlook.com (10.168.32.144) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.56.9; Wed, 13 Sep 2017 13:36:57 +0000 Received: from HE1PR0401MB2425.eurprd04.prod.outlook.com ([fe80::a1f9:523b:383c:d454]) by HE1PR0401MB2425.eurprd04.prod.outlook.com ([fe80::a1f9:523b:383c:d454%18]) with mapi id 15.20.0056.010; Wed, 13 Sep 2017 13:36:57 +0000 From: Nipun Gupta To: Nikhil Rao , "jerin.jacob@caviumnetworks.com" , "bruce.richardson@intel.com" CC: "gage.eads@intel.com" , "dev@dpdk.org" , "thomas@monjalon.net" , "harry.van.haaren@intel.com" , Hemant Agrawal , "narender.vangati@intel.com" , "erik.g.carrillo@intel.com" , "abhinandan.gujjar@intel.com" Thread-Topic: [PATCH v3 2/4] eventdev: Add eth Rx adapter caps callback to SW evdev Thread-Index: AQHTK3qj4ZnEzacHIkWv5NMk4Yd/06Ky0dcQ Date: Wed, 13 Sep 2017 13:36:56 +0000 Message-ID: References: <1505219369-2493-1-git-send-email-nikhil.rao@intel.com> <1505219369-2493-3-git-send-email-nikhil.rao@intel.com> In-Reply-To: <1505219369-2493-3-git-send-email-nikhil.rao@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: [192.88.169.1] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; HE1PR0401MB2313; 6:ThQ16E22685iEvK5o3nicQ1eUj1aOlW7aX3cKa/Sx2EHczsdP3cQ12euDcMDavh9DC9vcz6+1/JDg1p1m3jQc1ZY/712OKK0BRWO7+3urWspWGUkQa10DZfWhnrxgfgGSyRxqt7jSeigcmjDKeDxLohvbAZkys+1NCdCQPQ0NvjX+HdTGNekuIqjnBgzrbXlsPgonMvGgVsbgWBjCNHTIxZqTLBSDExD63gpX3kuJsylzXeM5e3ZzhYRqXSgnzd0GQ8eLIlgLnk0OHOW9ylbB6cBe9701RCJFOEDuV0L3JJJzRw8zNXqgxzAbN733a30Jlcd3OgDhz/ZVajlw7iUiQ==; 5:SIvGRyeVakwzv8NJotwVd+lF+5/jHwgcsnqBdLhJ54rxTCQwSVIELTwyDZnCLPq9A79KF94Oq/JD5MzvwBqq6pIc+t06r17+da5ezlMoW3FVyFfgUeJ8rXcnCZOduQcz/BTXsfM3aPd8ZqL9l2g+tg==; 24:44A1q+JXYO7vTZ3uj+7H9DsxMWbNNV0XvATTmfN63qDuUoIloImBwjcr06oT65X2eoKAWUQBiPO2hYV6YTaHFOzl/2Ovvp/KH3IsQpjReGk=; 7:i5zTRksRSVuVGJ2XFQsUSOQz8+coMUJ4pJtBIGefI92xYV7PoAvynSYGHi62WUM8pcaU521mKX3rTFkGO6CvwwuyDS7c25J3+DO0Nbu44CjTT7Cmv1hXanJS/wdxacJZUShAEtk17ROeAfZz30End/OK982nYKAPN8BRLv67A/ZwC7pAfmJgT+WVKqX+pt3A34slce56l9XfoCy1doux8Xbugm0CBMzTYfy3GizuCog= x-ms-exchange-antispam-srfa-diagnostics: SSOS;SSOR; x-forefront-antispam-report: SFV:SKI; SCL:-1; SFV:NSPM; SFS:(10009020)(6009001)(39860400002)(346002)(366002)(376002)(199003)(13464003)(189002)(101416001)(5660300001)(4326008)(7696004)(55016002)(2201001)(7416002)(3846002)(53546010)(74316002)(102836003)(25786009)(14454004)(7736002)(478600001)(6116002)(105586002)(50986999)(6246003)(53936002)(76176999)(316002)(3660700001)(189998001)(106356001)(2906002)(2900100001)(305945005)(54356999)(33656002)(229853002)(3280700002)(9686003)(8676002)(81166006)(66066001)(81156014)(8936002)(86362001)(6506006)(99286003)(6436002)(5890100001)(97736004)(54906002)(2950100002)(2501003)(68736007)(5250100002); DIR:OUT; SFP:1101; SCL:1; SRVR:HE1PR0401MB2313; H:HE1PR0401MB2425.eurprd04.prod.outlook.com; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en; x-ms-office365-filtering-correlation-id: f10bfb41-9eb4-42f8-eb57-08d4faac80f3 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(300000502095)(300135100095)(22001)(2017030254152)(48565401081)(300000503095)(300135400095)(2017052603199)(201703131423075)(201703031133081)(201702281549075)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095); SRVR:HE1PR0401MB2313; x-ms-traffictypediagnostic: HE1PR0401MB2313: x-exchange-antispam-report-test: UriScan:(185117386973197)(228905959029699); x-microsoft-antispam-prvs: x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(2401047)(5005006)(8121501046)(3002001)(100000703101)(100105400095)(10201501046)(93006095)(93001095)(6055026)(6041248)(20161123560025)(20161123564025)(20161123558100)(20161123562025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123555025)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:HE1PR0401MB2313; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:HE1PR0401MB2313; x-forefront-prvs: 042957ACD7 received-spf: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-originalarrivaltime: 13 Sep 2017 13:36:56.8995 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1PR0401MB2313 Subject: Re: [dpdk-dev] [PATCH v3 2/4] eventdev: Add eth Rx adapter caps callback to SW evdev 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: , X-List-Received-Date: Wed, 13 Sep 2017 13:37:00 -0000 > -----Original Message----- > From: Nikhil Rao [mailto:nikhil.rao@intel.com] > Sent: Tuesday, September 12, 2017 17:59 > To: jerin.jacob@caviumnetworks.com; bruce.richardson@intel.com > Cc: gage.eads@intel.com; dev@dpdk.org; thomas@monjalon.net; > harry.van.haaren@intel.com; Hemant Agrawal ; > Nipun Gupta ; narender.vangati@intel.com; > erik.g.carrillo@intel.com; abhinandan.gujjar@intel.com; Nikhil Rao > > Subject: [PATCH v3 2/4] eventdev: Add eth Rx adapter caps callback to SW = evdev >=20 > The SW event device always uses a EAL service function for packet > transfer from the eth device to the event device, this function is > capable of generating a event flow ID which is the IPv4/6 RSS hash. >=20 > The caps function returns RTE_EVENT_ETH_RX_ADAPTER_SW_CAP which is > currently set to RTE_EVENT_ETH_RX_ADAPTER_CAP_FLOW_ID. >=20 > Signed-off-by: Nikhil Rao > --- > lib/librte_eventdev/rte_eventdev_pmd.h | 6 ++++++ > drivers/event/sw/sw_evdev.c | 13 +++++++++++++ > 2 files changed, 19 insertions(+) >=20 > diff --git a/lib/librte_eventdev/rte_eventdev_pmd.h > b/lib/librte_eventdev/rte_eventdev_pmd.h > index 4cc9671..3cbc063 100644 > --- a/lib/librte_eventdev/rte_eventdev_pmd.h > +++ b/lib/librte_eventdev/rte_eventdev_pmd.h > @@ -83,6 +83,12 @@ extern "C" { > } \ > } while (0) >=20 > +#define RTE_EVENT_ETH_RX_ADAPTER_SW_CAP \ > + RTE_EVENT_ETH_RX_ADAPTER_CAP_FLOW_ID > +/**< Ethernet Rx adapter cap to return If the packet transfers from > + * the ethdev to eventdev use a SW service function > + */ Hi Nikhil, Maybe it makes more sense to have RTE_EVENT_ETH_RX_ADAPTER_SW_CAP #define i= n 'sw_evdev.h' file? Regards, Nipun > + > #define RTE_EVENTDEV_DETACHED (0) > #define RTE_EVENTDEV_ATTACHED (1) >=20 > diff --git a/drivers/event/sw/sw_evdev.c b/drivers/event/sw/sw_evdev.c > index da6ac30..1344c17 100644 > --- a/drivers/event/sw/sw_evdev.c > +++ b/drivers/event/sw/sw_evdev.c > @@ -437,6 +437,17 @@ sw_dev_configure(const struct rte_eventdev *dev) > return 0; > } >=20 > +static int > +sw_eth_rx_adapter_caps_get(const struct rte_eventdev *dev, > + uint8_t eth_port_id, > + uint32_t *caps) > +{ > + RTE_SET_USED(dev); > + RTE_SET_USED(eth_port_id); > + *caps =3D RTE_EVENT_ETH_RX_ADAPTER_SW_CAP; > + return 0; > +} > + > static void > sw_info_get(struct rte_eventdev *dev, struct rte_event_dev_info *info) > { > @@ -751,6 +762,8 @@ sw_probe(struct rte_vdev_device *vdev) > .port_link =3D sw_port_link, > .port_unlink =3D sw_port_unlink, >=20 > + .eth_rx_adapter_caps_get =3D > sw_eth_rx_adapter_caps_get, > + > .xstats_get =3D sw_xstats_get, > .xstats_get_names =3D sw_xstats_get_names, > .xstats_get_by_name =3D sw_xstats_get_by_name, > -- > 2.7.4