From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM02-BL2-obe.outbound.protection.outlook.com (mail-bl2nam02on0069.outbound.protection.outlook.com [104.47.38.69]) by dpdk.org (Postfix) with ESMTP id 9641E1B1AF for ; Thu, 21 Sep 2017 17:46:37 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=CAVIUMNETWORKS.onmicrosoft.com; s=selector1-cavium-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=sJffX4yTuBffDuf3o1U7/NGWtW7+4zdO6DR9i1uCZLw=; b=EnBcyebbLr9i40kgb03HQPxnrdICY4MH9U09/PVMFyIzaQqmEF8QqbyW49Kk/AXpadniTvDzvm0x5u/lEzw9hoVJjWasfx0kXXNHDl2PlXJmNhYbBpmzGDH8LXCSSdY4/IJRz++GD6+jH2+DQjiq3nl6laoSkxWIm06SMgZB8Q0= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Jerin.JacobKollanukkaran@cavium.com; Received: from jerin (111.93.218.67) by CO2PR07MB2519.namprd07.prod.outlook.com (10.166.201.6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.77.7; Thu, 21 Sep 2017 15:46:29 +0000 Date: Thu, 21 Sep 2017 21:16:09 +0530 From: Jerin Jacob To: Nikhil Rao Cc: bruce.richardson@intel.com, gage.eads@intel.com, dev@dpdk.org, thomas@monjalon.net, harry.van.haaren@intel.com, hemant.agrawal@nxp.com, nipun.gupta@nxp.com, narender.vangati@intel.com, erik.g.carrillo@intel.com, abhinandan.gujjar@intel.com, santosh.shukla@caviumnetworks.com Message-ID: <20170921154608.GC20126@jerin> References: <1506028634-22998-1-git-send-email-nikhil.rao@intel.com> <1506028634-22998-2-git-send-email-nikhil.rao@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1506028634-22998-2-git-send-email-nikhil.rao@intel.com> User-Agent: Mutt/1.9.0 (2017-09-02) X-Originating-IP: [111.93.218.67] X-ClientProxiedBy: PN1PR01CA0076.INDPRD01.PROD.OUTLOOK.COM (10.174.144.144) To CO2PR07MB2519.namprd07.prod.outlook.com (10.166.201.6) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 98c2e33f-40b6-4df6-500b-08d50107ef51 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(300000502095)(300135100095)(22001)(2017030254152)(300000503095)(300135400095)(2017052603199)(201703131423075)(201703031133081)(201702281549075)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095); SRVR:CO2PR07MB2519; X-Microsoft-Exchange-Diagnostics: 1; CO2PR07MB2519; 3:243sWZqvsGTQAbMdVTKDZBYLxP1A9ut6nazNC7De+3FgF+oykE5VoNkfBiTvxPv9vhZvI8zvlYanRIIiX1X9Ei8OZlOYrnJPBGUdGs/OToTCAgupxSoUUnpjou7MMibKDwkFssjA7NfFP+KMjH8gMzUL9AjMBUm9PooeFYmzMRzzk9R2d2Hfv8GCRopd9Y+xZOq/h3ApS5Ab/bpuCb+M8EGktr/HLCJio+llY4ToZt8/BRZjcWns+YCllH//yB6a; 25:8AzYNiCeY5G+a0XcPjVNQbfg4nWb9vLn4SimNEhApwHA8pI8FGxf1AGZxxmMDGDrCvZ0oZSD+MPwubaugRbVA+e3F/rnWVoSwuoeu6hc47uFiNig+bv7Q1vAaESZqRhAoK713xaEhxx0TgHfCT45AZPHb9keXI/PaSzlmVQsUivVYxcLKT2Znu1RNRlfJxm1IbDkMAEbs43HbCo+QFjftxfFaAmQv7FURTtAibuESvk6zodVIG3Zk2che+xi8/RBHPINM7JJANNbG2xfR/ZLfzqlcB6zA4faPGYM71as/4381Ejc20+N9AsejnZlAti6SmWp7kj8eZSTjJteS7QSUQ==; 31:nBR1Cku5d1Uv2HrA/kfpET8X0N7upLmSy9GRDM7BYkF6/hGkdVDOwyYFFoNMilI9+uz81LvIonW5N7qyDz+vr6F9HJris4CBgks6e5EJgQ1w+cZwVN8131IvGTz5pKAG8mKhmJuQF3AfYlnPdNWNjdSxoShrFAUXMZbgYu2hu8uk5/8p6vW2MbNFL51a5x44I0wNmarizvaPxtSASWS5JzFWlaoPIEWQbMprHnatU74= X-MS-TrafficTypeDiagnostic: CO2PR07MB2519: X-Microsoft-Exchange-Diagnostics: 1; CO2PR07MB2519; 20:EQPe/tJH72bB3leXf6gSZowYIyewJy9Ma9YWQjAtldBJ7GciH0DdTMuClLbIlJAmcZuTmSNSPCeza+LATCfca+9mU4qh2NL4Bc1bmMoOLaRyy05iV7gL5omQNYZdPHdKiEIffWDtInKm0JQZP+cnA7DufEulK9qaNC76POrxSTyN5IpUidw0DpsjcSZUmLW+52vc7Am9m2b7DmHR9Fsa31z4H/6nP6L/t0QhqHaZRsOz2GzCooZP/2shGiDcFmaJYLiXhXbBq8ay7gSfCgd6X0zXaqKz40WoxMj7Ky+gIkiTeNvOTawXZD9T08G5KiCUHm3y7u9dckrmS2cstapJdHXQ4j3g82eAYGsEvZSSDK2yr6CAwhbUd99hordRH/qkjxHQ6UOK0fcGtRlrJ3FUJJLlcfhxGehPWJJlqQOeCeYlggyyrIE9QdNz4fViKUp8esssvsTGSHVELG9hg0gT707K6Ye79tDNwqtB0kErjizDMR+zD5RsvY3V8MlDTnZFNu/pcnJ0cqq/hP42Ljl0vakaV/z0NCxEPDsAgghNQR3J4ewogvbg8BC0FUxTxIyxWBVzmPIiCV/veTvux1VnifrD1hU+DKnRvXN1HoWIAhg= 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)(8121501046)(5005006)(93006095)(100000703101)(100105400095)(10201501046)(3002001)(6041248)(20161123562025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123560025)(20161123558100)(20161123564025)(20161123555025)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:CO2PR07MB2519; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:CO2PR07MB2519; X-Microsoft-Exchange-Diagnostics: 1; CO2PR07MB2519; 4:NtByXnfpbQK6BS2YpILJDLZY0PkQcvkTlQhIwuib/8hoqikdEbp5WUZU5rScnthym0rWCJURwJJ7trcK/yoZONkmnBpnEVf46Pdx3cIytZN2A2NHtAnMj0SAnaz4vrFptaUuhaoqac7S6/yg0duZ3Hyi6BJryGCY+3Qb+Pqi3wcwrU88ymRP/0/9nCqhvfl3Szz+jsAbVw+zPcFGiRgaMeW3e4u9dFDZB07i+mlgQOxomtZHjxF2NE4KxTwmu56OkHW030c9/CGcbJ/nCf8u5WmJ77Do/79zTTW+QZ+o4S9YWKDQFPLO+axmxrb80XP7vj6H7kzdOs6V5ZrjjX7aWg== X-Forefront-PRVS: 04371797A5 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(6009001)(346002)(376002)(199003)(13464003)(189002)(5009440100003)(101416001)(478600001)(54356999)(50466002)(5660300001)(76176999)(50986999)(3846002)(6116002)(189998001)(23726003)(33716001)(68736007)(72206003)(105586002)(106356001)(33656002)(1076002)(7416002)(2906002)(25786009)(4326008)(8936002)(16526017)(6496005)(229853002)(53936002)(8656003)(97736004)(81166006)(81156014)(575784001)(66066001)(8676002)(316002)(107886003)(83506001)(6246003)(16586007)(47776003)(58126008)(6916009)(6666003)(55016002)(7736002)(42882006)(2950100002)(9686003)(305945005)(18370500001)(21314002); DIR:OUT; SFP:1101; SCL:1; SRVR:CO2PR07MB2519; H:jerin; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en; Received-SPF: None (protection.outlook.com: cavium.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; CO2PR07MB2519; 23:T0Z+PJ1xfC4SZL7kx13RZCK4qroFra6uItGGZR9JH?= =?us-ascii?Q?efnG/ljU9GgS+pq9JGwesyfQbC8d3uQwKWzJLocbe5xtMcCGnkVn+mkfQ0dj?= =?us-ascii?Q?3DWes6JR0QJd+FJnPXRXi7OzNSotTEbl3/ROMDMQPduY69naxm5CZvUixxGd?= =?us-ascii?Q?HCAkYQVmjCPmznOgUjEYSFeQMQN/+APBszSLVbyYNJwOoKHfH0v83mVNbBCc?= =?us-ascii?Q?f4PBj748HsHBHHvv7nMMTLxg6dIjq1QcxJQawwh3hWg7gD5H/BNSr9Fp2rnX?= =?us-ascii?Q?o1Wlg5D+e4bGXUGdbl5SxYL6JQ2aWHNIMh968tVTQZqQ7O4oikV278J6PrrX?= =?us-ascii?Q?O23fcy08M0/YVU+55NFOZjofoLHpVBM8sc/OEjaZNoyJ24a9rwB5xrJIwr2G?= =?us-ascii?Q?GjUwNWNMdIC4dy9o8kfQHdVg+BT/sI/eL1hH8eSy7NyargvfsxByHjQsHr28?= =?us-ascii?Q?1GIeJryZ8WiMQsxvpCOFYK3aCPWzXS7gmK7LA6aSS1jQxeblEgvyLlJQePqO?= =?us-ascii?Q?tztimnxvTid+7QOcfG4gGJpGUpDYay5/V8vsx/2bDJmozQo62jK+XwDSbDYK?= =?us-ascii?Q?/GcNC2bJHE1A4m5oDZcqEFOMJ6pJmys16rCgRJ2KC+rEJctiatkk5vQLcS+B?= =?us-ascii?Q?xQVbxh894hUoOXWga1goRx/3ANP1eaXSar0QhuV3s68VX6ZER4EyJcxTnpjA?= =?us-ascii?Q?DZXaYH++0aWE/+yYsLQHzHAV36UY5QW30PXmSC8LQjHnSDl7AXLagBt1fjTJ?= =?us-ascii?Q?085Tn4VOamc02/00afH3TxL2t2Q7RT/cNIrpM2A9u958278ZhaOLD6U3JnCm?= =?us-ascii?Q?UNYP9DjGit11md3fRULXG7DConCNf6eC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J/axiVyVUaLJ49b/qC53xFQ0mEmqdNg7OXSDJpYG84yg+962lFd/oFPA==; 24:SC9DKPTyqI9F1ZKvvKVkCZJYDi0Gz2Hds6+Xxow6ifvnFcS7PZus3yIWiLPW2I99oKI0PHP3GTeRQSRIdBI6Gv5eAo/pb0N49f0X5CNiZtE=; 7:GqVKXGpT7DgkuR5xgOYJDxSPVadc7nZbT1ebuCOSmXgObQK0YdegKDb5gTzMThMzW0gSkJj2HAqoQ6g8kXX8VfivuV/vr6z5SRXzzgoOFom4OECjH/cTCzlPmq+39+E7lG00BipsQ1Sa1vFNNPq2f2xRK6JImxtT32PUwux+GDT9zT7iJx+CP79qrH/hRiukjio5Sm7tU6EQwLKpUEODuaaT+s/OgI61PiIBiaBxEtk= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Sep 2017 15:46:29.6066 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO2PR07MB2519 Subject: Re: [dpdk-dev] [PATCH v4 1/4] eventdev: Add caps API and PMD callbacks for rte_event_eth_rx_adapter 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: Thu, 21 Sep 2017 15:46:38 -0000 -----Original Message----- > Date: Fri, 22 Sep 2017 02:47:11 +0530 > From: Nikhil Rao > 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@nxp.com, nipun.gupta@nxp.com, > narender.vangati@intel.com, erik.g.carrillo@intel.com, > abhinandan.gujjar@intel.com, santosh.shukla@caviumnetworks.com > Subject: [PATCH v4 1/4] eventdev: Add caps API and PMD callbacks for > rte_event_eth_rx_adapter > X-Mailer: git-send-email 2.7.4 > > The caps API allows application to get information > needed to configure the ethernet receive adapter for the eventdev and > ethdev pair. > > The PMD callbacks are used by the rte_event_eth_rx_xxx() APIs to > configure and control the ethernet receive adapter if packet transfers > from the ethdev to eventdev is implemented in hardware. IMO, it better to split the cap PMD API and cap normative API into one patch and remaining PMD API to another patch. > > For e.g., the ethdev, eventdev pairing maybe such that all of the > Eth Rx queues can only be connected to a single event queue, in > which case the application is required to pass in -1 as the queue id > when adding a receive queue to the adapter. > > Signed-off-by: Nikhil Rao > --- > lib/librte_eventdev/rte_eventdev.h | 33 +++++ > lib/librte_eventdev/rte_eventdev_pmd.h | 173 +++++++++++++++++++++++++++ > lib/librte_eventdev/rte_eventdev.c | 24 ++++ > lib/librte_eventdev/rte_eventdev_version.map | 8 ++ > 4 files changed, 238 insertions(+) > > diff --git a/lib/librte_eventdev/rte_eventdev.h b/lib/librte_eventdev/rte_eventdev.h > index 128bc5221..a8bebac01 100644 > --- a/lib/librte_eventdev/rte_eventdev.h > +++ b/lib/librte_eventdev/rte_eventdev.h > @@ -990,6 +990,39 @@ struct rte_event { > }; > }; > > +/* Ethdev Rx adapter capability bitmap flags */ > +#define RTE_EVENT_ETH_RX_ADAPTER_CAP_INTERNAL_PORT 0x1 > +/**< Eventdev can send packets to ethdev using internal event port */ > +#define RTE_EVENT_ETH_RX_ADAPTER_CAP_SINGLE_EVENTQ 0x2 > +/**< Ethdev Rx queues can be connected to single event queue */ I think, Its is more of limitation. Since we are expressing it as capability. How about changing it as RTE_EVENT_ETH_RX_ADAPTER_CAP_MULTI_EVENTQ (same as exiting !RTE_EVENT_ETH_RX_ADAPTER_CAP_SINGLE_EVENTQ and SW driver has this capability) i.e Ethdev Rx queues of single ethdev port can be connected to multiple event queue. > +#define RTE_EVENT_ETH_RX_ADAPTER_CAP_FLOW_ID 0x4 > +/**< Ethdev Rx adapter can set flow ID for event queue, if this flag > + * is unset, the application needs to provide a flow id when adding Looking at implementation, If I understand it correctly, it not application "needs" to provide instead, it is application can provide. If so, I think, making it as RTE_EVENT_ETH_RX_ADAPTER_CAP_SET_FLOW_ID or RTE_EVENT_ETH_RX_ADAPTER_CAP_OVERRIDE_FLOW_ID makes more sense. something like, #define RTE_EVENT_ETH_RX_ADAPTER_CAP_SET_FLOW_ID 0x4 /**< If this flag is set then the application can override the default * hash based flow id generated by the Rx adapter when the event * enqueues to the event queue. * * @see rte_event_eth_rx_adapter_queue_conf::rx_queue_flags * @see rte_event_eth_rx_adapter_queue_conf::ev::flow_id */ > > +int > +rte_event_eth_rx_adapter_caps_get(uint8_t dev_id, uint8_t eth_port_id, > + uint32_t *caps) > +{ > + struct rte_eventdev *dev; > + > + RTE_EVENTDEV_VALID_DEVID_OR_ERR_RET(dev_id, -EINVAL); > + RTE_ETH_VALID_PORTID_OR_ERR_RET(eth_port_id, -EINVAL); > + > + dev = &rte_eventdevs[dev_id]; > + > + if (caps == NULL) > + return -EINVAL; > + *caps = 0; > + > + RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->eth_rx_adapter_caps_get, > + -ENOTSUP); How about not returning the -ENOTSUP. Instead just call eth_rx_adapter_caps_get if it not NULL. By this way if a PMD does not have any cap, it does not need to implement this hook. > + return (*dev->dev_ops->eth_rx_adapter_caps_get) > + (dev, > + &rte_eth_devices[eth_port_id], > + caps); > +} > + > static inline int > rte_event_dev_queue_config(struct rte_eventdev *dev, uint8_t nb_queues) > { > diff --git a/lib/librte_eventdev/rte_eventdev_version.map b/lib/librte_eventdev/rte_eventdev_version.map > index 4c48e5f0a..996b361a5 100644 > --- a/lib/librte_eventdev/rte_eventdev_version.map > +++ b/lib/librte_eventdev/rte_eventdev_version.map > @@ -51,3 +51,11 @@ DPDK_17.08 { > rte_event_ring_init; > rte_event_ring_lookup; > } DPDK_17.05; > + > + Additional line feed. > +DPDK_17.11 { > + global: > + > + rte_event_eth_rx_adapter_caps_get; > + > +} DPDK_17.08; > -- > 2.14.1.145.gb3622a4 >