From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM01-BY2-obe.outbound.protection.outlook.com (mail-by2nam01on0048.outbound.protection.outlook.com [104.47.34.48]) by dpdk.org (Postfix) with ESMTP id 86189108A for ; Tue, 7 Mar 2017 07:13:00 +0100 (CET) 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=qwXmGdw8gMqlrqSlwAX9jYHc1bZb8CnDF6rZqMfEM0Q=; b=TWK1F0MFYU0SGzBtWnUBpcsTpJp32KPDaLtEF5u04DQFRxizulmsQGUouKG0FfrSVhgd67ea9H0jURUxz5JPzZRyUjioFrapxtcqnQa16SR/BhV6RIv5HhInl+huELK8pLWWuDcxfqcyN+LaHU2l3uEtaQLr+pUo9mUvebutaaI= Authentication-Results: intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=none action=none header.from=caviumnetworks.com; Received: from localhost.localdomain (106.200.230.99) by BY1PR0701MB1723.namprd07.prod.outlook.com (10.162.111.142) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.947.12; Tue, 7 Mar 2017 06:12:56 +0000 Date: Tue, 7 Mar 2017 11:42:39 +0530 From: Jerin Jacob To: Gage Eads Cc: dev@dpdk.org, bruce.richardson@intel.com, hemant.agrawal@nxp.com, harry.van.haaren@intel.com, nipun.gupta@nxp.com Message-ID: <20170307061238.GA5726@localhost.localdomain> References: <1488430056-32055-1-git-send-email-gage.eads@intel.com> <1488819768-9474-1-git-send-email-gage.eads@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1488819768-9474-1-git-send-email-gage.eads@intel.com> User-Agent: Mutt/1.7.1 (2016-10-04) X-Originating-IP: [106.200.230.99] X-ClientProxiedBy: MAXPR01CA0020.INDPRD01.PROD.OUTLOOK.COM (10.164.147.27) To BY1PR0701MB1723.namprd07.prod.outlook.com (10.162.111.142) X-MS-Office365-Filtering-Correlation-Id: 95203880-ced8-4dda-1bcc-08d4652100d1 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001); SRVR:BY1PR0701MB1723; X-Microsoft-Exchange-Diagnostics: 1; BY1PR0701MB1723; 3:jlvu3IxelxXYkhS61wZthjWHSCdGrITfBLtGKU3hvTB32lzuQ2SC94bGPuaiFI74FVZ1l78F77TJ5S5oGzKiBYGZr1Kn+BrV1YwjCra5O3DT5F+sKNAoXHPqQO0lYTsa9WfxmP+/O6qv5GixoWyFYRiwafSosAT5bqBmA+6T+6jqsk63LbmeGrpwighvI8wxH0nRGK1vIHrRjz5qHNC9hr+/o9SbHLlISeliX4oQ/Jp04lCuOWi3xvvXMiWRmxWvtBB5Ov5g8OjlBBPk7f06lA==; 25:p4/ghkZf8HAsnBSc01MNFZGtOsTN6pUYbeyp42WmnosemYhEEFMKWLhrpCHBNfCASUfwah9vp1V0VJvm4hKWXouyPk5Gun14The0Xk6wVfOfO9DRrAzN+ReaNzt48wmLdOTkus9uR3hi1ui4q3glEHn2EUIb7WMAec/eWOU/QXfz3ONYhyGNcnAItXmpTuNMHXiBFHssArseGrgiwRSe7G/gYQo7l3ctMPm65Wgno4a2QM447Rf7dbM0S/T30G0IPylw5Q0K6GFJnbwcavGlCpgv/GNtUCTtf0HfKVVgVGQVOXZvaGxQgZl7oxMbPq9WjzGMalofEOoJd5afeDbhODpYCVH2rbroAGC5UTOraTZCpV1VXCYmVsY8Est7wks2cd0F6ycj5jX0ZhdM1heX1FGHZ9wUo61W7HFjuYQ8vOgeZ5STdL23uM89MH1m0RrZ+ZMpVMfsW+iSbuV4SqWZeA== X-Microsoft-Exchange-Diagnostics: 1; BY1PR0701MB1723; 31:kjaS4MNGEv0iPIO81th5QZ19zIMuYJz47ihxQpj417/8PtPi9m8d87dv+Dy+EO3L6ckSjOzAaSHwbvqOs1xIH5FkyzNhKQez7ckLLHR4gmVUUAtUT3Lj/6ZKUTM9hrUzBcOASU1KzYeUeYpkLoD7NFEDUbZOr79dv0YFU5aNONPS45/ldzAn5poIZV7u6VkgEbePaAmhtfV4mpxDPR4xqNc59NjEQWyvBLrZmQHgeK5I1aUnt4SL0gNVu+vo8dNLUQ963Q9s+84pw3OR+sG6QA==; 20:ZKtyywaY+sXeBRVpNVTNYgvOl19ug+DG0ooZbYaSQdNyiJvIQnuSnKlfHYdc1Ky3A80/q92VL5yhZDv6KCeEDq3cbjfsLAwslsMHcWqQosaa+PFJF8yb8ERLL4f0vaZflEHsNDkYQoXPq5K6L/BWZDbNK632vFtxt/ffMmG0fybD4rXdx6Oai73cqXKsuuZ1cNqtzUnz1fra23Ojdu2fuk3Q5o9Cf9suuAWSIpEE8kOGcERJuHMtHZ4/1bayvtLjLdoffbWPUDyiFWsv+hnUTeq9U+pjOGcnqih8MOQ6FQvqDvg/28pe2Cp/OMIQ5Fe0GEtU1TldIXMRFMtwatO8v/WJ4Ethbn7jh6F5KgJPb2leNFkJu99HPbqR+UjUwitykgYmNjx/AiMCWp6XeqVLwxa100TaNRYjwT09DVXn+IkLYXXbYjO2OD25d2pPzzEwhQ50/lXq+oHxVmS91q15AbH+ySYQssS15SpTl6eRFulFKFoA4J7OU/lGZ6ylg+tFM6RLxWcOtwsXZ0r0A8Lq7LdvVLua6Dbv914yRzBtbJXoUQJTrAjkyyiD7O+DcQyTNdFdmYysGnd5ItUAmHjfhFu/0X/E2FRH37NWeCfN3bM= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(228905959029699); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040375)(601004)(2401047)(8121501046)(5005006)(3002001)(10201501046)(6041248)(20161123564025)(20161123560025)(20161123558025)(20161123562025)(20161123555025)(6072148); SRVR:BY1PR0701MB1723; BCL:0; PCL:0; RULEID:; SRVR:BY1PR0701MB1723; X-Microsoft-Exchange-Diagnostics: 1; BY1PR0701MB1723; 4:n5EgnmRYYq64vzUOpp8qBNryeT08Rf52CMF0Qm9+Bnu6SjkDSD9BqjyB6g2j6E+0RRxx/ehdV/g7mGerFDiWPdLnEEcJnqPtB5bP360j2L2ogyuKO8vha9M4Om9I32nfdIyAMU8zgWR7mmDdJ6EnTtH5sXrz25g7QDjFvklaCyflwTh1RAu02V+Qh5GJ1bbUU0iCuYspYkQi/wAbS3qfmqDZh6V63944fj3W5IUuQRV7vRpZpI0XfC8btGDn/l9LUFe6HMprC03tIzF0Gl/41nIHGsT8pE4gzSeKzz7c2qc0Rmfm1ffVP0LWVNDH011bUT8byH6jniLMW5sZE5tvPwefiBD8bbS5TeWRmP59w4sUZMTxc3/VKL2H4rzlFoCSOS0BU1ydaoXBIs7c+dQm5lMOVeCodHKrvCYDq4xVvrHmfsVeRq/CjFHTqVV9g0IOAgbM96dyCLBgRYFA0cCIOxCjOCcAYeMrZ4WW6lJsSJNVhH+lTDvloyh22AIzFuFlhs+89IpLb6peXmxX4GZYbeg17q2RglGTTlngyZuW8N/GHPT/zprWsfaI1zYhKF9K3nsczWx3djuGTB640W2+gOdZY9k3H8V2cB/KpZDUDjkmZQpnH1paiU1jr3t5O2dhZAQghImhJTmXJIjudwFOfw== X-Forefront-PRVS: 0239D46DB6 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6009001)(6069001)(7916002)(39450400003)(24454002)(2906002)(50466002)(229853002)(81166006)(23676002)(7736002)(305945005)(2870700001)(8676002)(92566002)(2950100002)(6666003)(42882006)(6916009)(4001350100001)(5009440100003)(6116002)(3846002)(5660300001)(1076002)(66066001)(9686003)(53936002)(8656002)(47776003)(55016002)(38730400002)(61506002)(6246003)(110136004)(42186005)(33656002)(54356999)(76176999)(25786008)(4326008)(50986999)(189998001)(6506006)(18370500001); DIR:OUT; SFP:1101; SCL:1; SRVR:BY1PR0701MB1723; H:localhost.localdomain; FPR:; SPF:None;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zWQihmfqEVVGRmcRYoPxqahDj3yGILIluckNKDizLMX80a5Y6do+yKegHfyPAV/xszm3lKNrJEfDGn9E626BQlo9hQF1dykzbunh3RojKnMO5U6dKbOaBvOG5i/KkXooXteLJ4lU0bANlUUaFGCyMrTzc9NoDrcOJLUbI71OAIiqdycdKHdMZjlc+Eagx4VkxHCg356fg2oRk/3uIgZC+ojPxe8+qJjttu1iWJIokCyUoxdOB/PKoN9BgC5FM+aKxUp3Q==; 5:U3dZJc3kqHE6R8CVt9UtJYz1yDwtUuyQ+7qMFkPsAtVSXxfAxG3cRwfo9CByof5TSXCN7RT1cmGne+CqLlUrDveT2XC4jLSRBgERXtVWXEIXY/dI4pSOf6Lm3vRRxZabREniUL2iAj+u5Ch3f9g1yg==; 24:P/H5XFU3WhuFvqslUoQ6IsLg59+eMtrjGUKcBjsYpLF9OoQq06eJKEYhM3dQYF/Ek7QCeAbQ+nXjETAxmMjoQxaIs05iL6mx6ATE7TFjd08= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; BY1PR0701MB1723; 7:kyfRzYFgnCxXRxSBOvMHypc3kPpZVbqDR0d6i4zhjfsOePtMB/mXuSw9Prh/qwyK87ifA3OfX1bOxPWvrC0FajTzRV+KQ5RPAXZBUJiCuzRMzkUhyX/tRodp6Hb0fgx4tkaCc+7wBbuDM8f4LpePrAIfzJpdgUtVdFcs4sMW5K+cXcH6wz94uAH/efURs1O6B5kFQnV918AlzBH/mFptHRn6xF4fttf8aiKtwV8kVk3ACCF7VCKiHPlnNkyAmAEdik58/xuLKZOOQzIkfbIAl+c/53V9YN6a9cceDRfA9Qn3GlCJ+utExqtZSAgCCCiEj8XV1QHzTj1DrcvczT4yog== X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Mar 2017 06:12:56.2330 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY1PR0701MB1723 Subject: Re: [dpdk-dev] [PATCH v2] eventdev: Fix links_map initialization for sw PMD 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: Tue, 07 Mar 2017 06:13:01 -0000 On Mon, Mar 06, 2017 at 11:02:48AM -0600, Gage Eads wrote: Please fix the check-git-log.sh errors with this patch. With that change, Acked-by: Jerin Jacob ➜ $ ./devtools/check-git-log.sh Wrong headline format: eventdev: Fix links_map initialization for sw PMD Wrong headline uppercase: eventdev: Fix links_map initialization for sw PMD Wrong headline lowercase: eventdev: Fix links_map initialization for sw PMD Missing 'Fixes' tag: eventdev: Fix links_map initialization for sw PMD > This patch initializes the links_map array entries to > EVENT_QUEUE_SERVICE_PRIORITY_INVALID, as expected by > rte_event_port_links_get(). This is necessary for the sw eventdev PMD, > which does not initialize links_map when rte_event_port_setup() calls > rte_event_port_unlink(). > > Signed-off-by: Gage Eads > --- > v2: Refined commit message's description of patch > > lib/librte_eventdev/rte_eventdev.c | 17 ++++++++++++----- > 1 file changed, 12 insertions(+), 5 deletions(-) > > diff --git a/lib/librte_eventdev/rte_eventdev.c b/lib/librte_eventdev/rte_eventdev.c > index 68bfc3b..b8cd92b 100644 > --- a/lib/librte_eventdev/rte_eventdev.c > +++ b/lib/librte_eventdev/rte_eventdev.c > @@ -190,6 +190,8 @@ rte_event_dev_queue_config(struct rte_eventdev *dev, uint8_t nb_queues) > return 0; > } > > +#define EVENT_QUEUE_SERVICE_PRIORITY_INVALID (0xdead) > + > static inline int > rte_event_dev_port_config(struct rte_eventdev *dev, uint8_t nb_ports) > { > @@ -251,6 +253,9 @@ rte_event_dev_port_config(struct rte_eventdev *dev, uint8_t nb_ports) > "nb_ports %u", nb_ports); > return -(ENOMEM); > } > + for (i = 0; i < nb_ports * RTE_EVENT_MAX_QUEUES_PER_DEV; i++) > + dev->data->links_map[i] = > + EVENT_QUEUE_SERVICE_PRIORITY_INVALID; > } else if (dev->data->ports != NULL && nb_ports != 0) {/* re-config */ > RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->port_release, -ENOTSUP); > > @@ -305,6 +310,10 @@ rte_event_dev_port_config(struct rte_eventdev *dev, uint8_t nb_ports) > > if (nb_ports > old_nb_ports) { > uint8_t new_ps = nb_ports - old_nb_ports; > + unsigned int old_links_map_end = > + old_nb_ports * RTE_EVENT_MAX_QUEUES_PER_DEV; > + unsigned int links_map_end = > + nb_ports * RTE_EVENT_MAX_QUEUES_PER_DEV; > > memset(ports + old_nb_ports, 0, > sizeof(ports[0]) * new_ps); > @@ -312,9 +321,9 @@ rte_event_dev_port_config(struct rte_eventdev *dev, uint8_t nb_ports) > sizeof(ports_dequeue_depth[0]) * new_ps); > memset(ports_enqueue_depth + old_nb_ports, 0, > sizeof(ports_enqueue_depth[0]) * new_ps); > - memset(links_map + > - (old_nb_ports * RTE_EVENT_MAX_QUEUES_PER_DEV), > - 0, sizeof(ports_enqueue_depth[0]) * new_ps); > + for (i = old_links_map_end; i < links_map_end; i++) > + links_map[i] = > + EVENT_QUEUE_SERVICE_PRIORITY_INVALID; > } > > dev->data->ports = ports; > @@ -815,8 +824,6 @@ rte_event_port_link(uint8_t dev_id, uint8_t port_id, > return diag; > } > > -#define EVENT_QUEUE_SERVICE_PRIORITY_INVALID (0xdead) > - > int > rte_event_port_unlink(uint8_t dev_id, uint8_t port_id, > uint8_t queues[], uint16_t nb_unlinks) > -- > 2.7.4 >