From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM03-BY2-obe.outbound.protection.outlook.com (mail-by2nam03on0064.outbound.protection.outlook.com [104.47.42.64]) by dpdk.org (Postfix) with ESMTP id BACF11B1E6 for ; Fri, 6 Oct 2017 16:34:52 +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=ZgBef1Pb2zEPGr0NswymhSwigaP8eJbJ1DE8c5u3zrA=; b=lNr7unDMfMxtpt9wGSrfvjVzcGXKYOtcZ2ByzBTrng/XvbfAJ6DHpvC6w9h+o7qN1EUSO51E7sn3GIHcqFP2aDqtHb1CO93Nh7IPLyQ8zR4mYm7F6yseAUcKz4mjPWGdOqWNXLsC8tEFh3bF3ZyczTlbfzCOH/z6RdHxNzxKddo= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Pavan.Bhagavatula@cavium.com; Received: from PBHAGAVATULA-LT (111.93.218.67) by DM5PR07MB3466.namprd07.prod.outlook.com (10.164.153.21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.77.7; Fri, 6 Oct 2017 14:34:49 +0000 Date: Fri, 6 Oct 2017 20:04:23 +0530 From: Pavan Nikhilesh Bhagavatula To: Nikhil Rao Cc: dev@dpdk.org Message-ID: <20171006143421.GA12102@PBHAGAVATULA-LT> References: <1507324201-3517-1-git-send-email-nikhil.rao@intel.com> <1507324201-3517-7-git-send-email-nikhil.rao@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1507324201-3517-7-git-send-email-nikhil.rao@intel.com> User-Agent: Mutt/1.5.24 (2015-08-30) X-Originating-IP: [111.93.218.67] X-ClientProxiedBy: PN1PR01CA0076.INDPRD01.PROD.OUTLOOK.COM (10.174.144.144) To DM5PR07MB3466.namprd07.prod.outlook.com (10.164.153.21) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 03f221a3-c09a-4494-b7f2-08d50cc766fb X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(2017030254152)(2017052603199)(201703131423075)(201703031133081)(201702281549075); SRVR:DM5PR07MB3466; X-Microsoft-Exchange-Diagnostics: 1; DM5PR07MB3466; 3:6bI1ygVl0+cRTJPZ+thZpS2QSFRkLowoSQuyEV2lWbsPUYCoCjxKyB6Vn8adIJ+xJ0HsBruwWznl7xxQZEKnGOqmzCwi+p6hokbiooWF4MWyuoNuF1i+c+LC8ZJ3P+ZZJUs8/NQ+Tik5AG/RKMhuHUMcfBYqwaHJkZZTXjNTSLCSv6JRHDuxgKGv9ZC0/MqduvHqWhS6XDSbZEbzMRNmn9gi/kNLe9Z7ERVyIzWjLIm9Hh7PRZrPIUAqlvIK+ROb; 25:dMAnXC/HZG7XuL/3pqqqPOoyjiToVykwCxVzEYzndu5r/OMkDwY2ry7MzNEFSk781S9VFJG3GM/zI3jmYPsFGMpuWk7ppjd5wpyRu5BNcJisPAzeeZJv/WWiRUdzpMMo3k++01nWXvhEFNwApnDpkzd713uzi14RV+VZP6tP26QvYEGmG2iU/UgsWs56PorBOaV7aVwlSl/GJn27crNJGWL0RYwtiEoHPaAy05I0RovkyQ7uDDpJKAlBpEaBul38u/zNo/4QxlrAV43tTD2d1PuUTCp0G90dPrM+azlBH9ypXEUaccGXDYDi+EChdQGh+xuNczTLsI8jUCUuDQgzQg==; 31:GFMo6BYVzMf/fTcXQGFz1GCynWf3y5wtQ16+4qflaoOWhVs3FY+HTWJvhznvaEqVDl+9L6dvXtSth2foD+lcZH8BpTCUyAAjVPKx9AHK/AspNt2Ep4iIziUJbBYsBxV1ZeYSsdy/DO9k+6cr/iIAZVxn8f3A8rnEwOlpF1cUL5tJjV4HRHKdy3f1Y/BpKMkQmsmDMwYPcd7JPzaLcsAFaqSyf5g/8pRl+b82My+JEWA= X-MS-TrafficTypeDiagnostic: DM5PR07MB3466: X-Microsoft-Exchange-Diagnostics: 1; DM5PR07MB3466; 20:OdNW9qqrMYpTwmbabm6xZo97RCM4c2Fw+hMdKJ6XU4Lfbs0pbAmhEAYEAYlwZ8K2dV5MJQ9j3CGOwRa15MVPjwgEGOFzdo/JqY4vwMSVs813ziANqI5uC4/pLcAxfxYyXb/ttj5uUCXszLwnVPwIBcnRC5ZtuBLub5Wb+q9RE+Bnj1hZRNWvPaxiO3I4Lc3z9/zmSeUnuDdg51Fh6RRhf873RFWh55LrmTwq+ic4JG06e73PPZOcepWgVGQCsXZYmmX/5dGiaYmsD4f766t8rT6VFfviEivkD8Q3jHVePTn97GVClV1OL7LGBlXw/tLvhoDUPUWSCrd+g9ibKeL7Za5YNfrOXfw0W2IZ8+Dd9JRUokJOF0G85qyjg5IW9v4QW37+dl+4b219GKKB4XUg1jzCBne9K/fwcR5lcPkFLR6jBdibWXgwkxRv+//GmRv2tHxY3X9QQ2v/cAx6SUCi+QnAlYLvSGK6szy9bFdq6NOUjaB0Tu7Ygxj5DDNDtTZdqnRjAggNTBovbwtYrJBdVS9Ehv1ULOIay6nt5GEDgzuyNxKKK63Tow2BR0+PoavkV4u2jxpiiDQSk4aJGIB0UrawyoZSEfCPx2gLZE+3+ek=; 4:TMvNAF07LUG/cRoVzIYvxx1MMbrhdga//6wFqtsZspIglyaq35SLDOmYWOiX43YcqYVY4IpcTTT5kqiyUfS4DPdI5HrMOiYqFoKdQam14GPmEKOb9nPqHYfWrGPXM01rpyxy+ZbkltncB4wmAXjZ8QvCePM8SipKTHZ9nSxksO9xpnRq+JaZ0d5Shrs4k76sUYuGDyLPGjORos59XVhl2BBsq50Ub0HAdzb8UGxE9xja4RJNzoQgLEPPDZ12gQ/qj+1N9iQiJRD116xnmclKeExPeqd5EEBfKu573mpjhxQ= X-Exchange-Antispam-Report-Test: UriScan:(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)(100000703101)(100105400095)(3002001)(10201501046)(93006095)(6041248)(20161123564025)(20161123555025)(20161123560025)(20161123558100)(20161123562025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:DM5PR07MB3466; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:DM5PR07MB3466; X-Forefront-PRVS: 0452022BE1 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(6009001)(376002)(346002)(24454002)(199003)(189002)(7736002)(229853002)(68736007)(6246003)(101416001)(305945005)(33656002)(33716001)(97736004)(47776003)(83506001)(6666003)(25786009)(189998001)(8676002)(50466002)(16526018)(81166006)(478600001)(72206003)(81156014)(2906002)(8936002)(105586002)(2950100002)(5009440100003)(3846002)(6116002)(16586007)(316002)(42882006)(58126008)(9686003)(55016002)(5660300001)(53936002)(6496005)(66066001)(106356001)(50986999)(6916009)(76176999)(4326008)(1076002)(23726003)(54356999)(18370500001)(107986001); DIR:OUT; SFP:1101; SCL:1; SRVR:DM5PR07MB3466; H:PBHAGAVATULA-LT; 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; DM5PR07MB3466; 23:5tgkLOC4h7/JEuSUS/KB6f5fE5Z44hpK2uQh6KmZP?= =?us-ascii?Q?1pifL9lSVsvZbrXW2OG3at7uhHwgCJeOB55olEgKKwVkAhoJVnRwpD6aGOPe?= =?us-ascii?Q?ANOcSQ84gC22C7tBpuUN2udGXO53esa59pEKydKH5vg234F9xJrEGbJIxxdj?= =?us-ascii?Q?+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eD+HgfP9AQB9pWQJd0qWDHAuVGMqrBiOFHEw1bP+gRRQlAiHmGeiOpfUhROgOp+3+Q8C4x3PVYAH1E/ZhkayOLGYV4= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Oct 2017 14:34:49.4528 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR07MB3466 Subject: Re: [dpdk-dev] [PATCH v5 6/7] eventdev: add eth Rx adapter implementation 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: Fri, 06 Oct 2017 14:34:53 -0000 Hi Nikhil, I have verified the series with octeontx hw and found few issues mentioned below, I will send the hw driver in a while. On Sat, Oct 07, 2017 at 02:40:00AM +0530, Nikhil Rao wrote: > The adapter implementation uses eventdev PMDs to configure the packet > transfer if HW support is available and if not, it uses an EAL service > function that reads packets from ethernet Rx queues and injects these > as events into the event device. > > Signed-off-by: Gage Eads > Signed-off-by: Abhinandan Gujjar > Signed-off-by: Nikhil Rao > --- > lib/librte_eventdev/rte_event_eth_rx_adapter.c | 1237 ++++++++++++++++++++++++ > lib/Makefile | 2 +- > lib/librte_eventdev/Makefile | 1 + > lib/librte_eventdev/rte_eventdev_version.map | 9 + > 4 files changed, 1248 insertions(+), 1 deletion(-) > create mode 100644 lib/librte_eventdev/rte_event_eth_rx_adapter.c > > diff --git a/lib/librte_eventdev/rte_event_eth_rx_adapter.c b/lib/librte_eventdev/rte_event_eth_rx_adapter.c > new file mode 100644 > index 000000000..0823aee16 > --- /dev/null > +++ b/lib/librte_eventdev/rte_event_eth_rx_adapter.c > @@ -0,0 +1,1237 @@ > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > + > +#include "rte_eventdev.h" > +#include "rte_eventdev_pmd.h" > +#include "rte_event_eth_rx_adapter.h" > + > +#define BATCH_SIZE 32 > +#define BLOCK_CNT_THRESHOLD 10 > +#define ETH_EVENT_BUFFER_SIZE (4*BATCH_SIZE) > + > +#define ETH_RX_ADAPTER_SERVICE_NAME_LEN 32 > +#define ETH_RX_ADAPTER_MEM_NAME_LEN 32 > + > +/* > + * There is an instance of this struct per polled Rx queue added to the > + * adapter > + */ > +struct eth_rx_poll_entry { > + /* Eth port to poll */ > + uint8_t eth_dev_id; > + /* Eth rx queue to poll */ > + uint16_t eth_rx_qid; > +}; > + > +/* Instance per adapter */ > +struct rte_eth_event_enqueue_buffer { > + /* Count of events in this buffer */ > + uint16_t count; > + /* Array of events in this buffer */ > + struct rte_event events[ETH_EVENT_BUFFER_SIZE]; > +}; > + > +struct rte_event_eth_rx_adapter { > + /* RSS key */ > + uint8_t rss_key_be[40]; Use #define or compile time config parameter instead of hardcoding to 40 > + /* Event device identifier */ > + uint8_t eventdev_id; > + /* Per ethernet device structure */ > + struct eth_device_info *eth_devices; > + /* Event port identifier */ > + uint8_t event_port_id; > + /* Lock to serialize config updates with service function */ > + rte_spinlock_t rx_lock; > + /* Max mbufs processed in any service function invocation */ > + uint32_t max_nb_rx; > + /* Receive queues that need to be polled */ > + struct eth_rx_poll_entry *eth_rx_poll; > + > +static int add_rx_queue(struct rte_event_eth_rx_adapter *rx_adapter, > + uint8_t eth_dev_id, > + int rx_queue_id, > + const struct rte_event_eth_rx_adapter_queue_conf *queue_conf) > +{ > + struct eth_device_info *dev_info = &rx_adapter->eth_devices[eth_dev_id]; > + uint32_t i; > + int ret; > + > + if (queue_conf->servicing_weight == 0) { > + struct rte_event_eth_rx_adapter_queue_conf temp_conf; temp_conf should be declared outside if condition, It goes out of scope and the assignment queue_conf = &temp_conf; would become undefined. > + > + struct rte_eth_dev_data *data = dev_info->dev->data; > + if (data->dev_conf.intr_conf.rxq) { > + RTE_EDEV_LOG_ERR("Interrupt driven queues" > + " not supported"); > + return -ENOTSUP; > + } > + temp_conf = *queue_conf; > + temp_conf.servicing_weight = 1; > + /* If Rx interrupts are disabled set wt = 1 */ > + queue_conf = &temp_conf; > + } > + > + if (dev_info->rx_queue == NULL) { Thanks, Pavan