From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM02-CY1-obe.outbound.protection.outlook.com (mail-cys01nam02on0077.outbound.protection.outlook.com [104.47.37.77]) by dpdk.org (Postfix) with ESMTP id 5C098A10 for ; Mon, 13 Mar 2017 09:52:53 +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=lrSSBleC4KfqycMm47XXaXn3e56uFZXsXgtZUbto2CA=; b=kLBmP6s/H4iffHkby1VzWbb8O8jVxJYy/+h1QgQIa4VTILmSFx8UAzO/TeYUcIq/Y1CYkL06xykii3EjHRGXG79J/5L1AhW+d1DqF1JCcZH3R9B0W6qTmTGW3OPmmodvFgO1jOO/ysYKeFYlnnZQOoUKFAfgyDGzqksgs53VvWU= 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 (111.93.218.67) by BY1PR0701MB1722.namprd07.prod.outlook.com (10.162.111.141) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.961.17; Mon, 13 Mar 2017 08:52:48 +0000 Date: Mon, 13 Mar 2017 14:22:30 +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: <20170313085229.lp7kvwfwpqjwfz5e@localhost.localdomain> References: <1488430056-32055-1-git-send-email-gage.eads@intel.com> <1488903900-27056-1-git-send-email-gage.eads@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1488903900-27056-1-git-send-email-gage.eads@intel.com> User-Agent: NeoMutt/20170306 (1.8.0) X-Originating-IP: [111.93.218.67] X-ClientProxiedBy: PN1PR01CA0058.INDPRD01.PROD.OUTLOOK.COM (10.164.136.158) To BY1PR0701MB1722.namprd07.prod.outlook.com (10.162.111.141) X-MS-Office365-Filtering-Correlation-Id: c89e7d7d-3b1a-47a6-02b3-08d469ee551d X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001); SRVR:BY1PR0701MB1722; X-Microsoft-Exchange-Diagnostics: 1; BY1PR0701MB1722; 3:dn7rdmqaUjRnzeO1x4L0hJtU1V4fI/LfV4p7sv3IA9hDBB27u3nvIRpxhf1UBX6LndNYgVVmZrVFjiPATJs4MChywTDhZgh8OxG+q1U7yb89ve9QnoNbPmDdrZOO+d4YCg+hEoiSmbr6KIfCF6sr0SFvfm6F4on/yaZS4RIuGuCkJCIYU2QhesZTeaLZr0aad5EHWkzu/2IXJ0lw1UIUkZ8TcaDrGxppCkgA/VYIu0uYD3UDyrLQ4rEegBvQIXbPBODZwImWR/q5hDG4bv2kbw==; 25:vkDz7Zzmxy8B+IoTlgAxY0jNPxUjeS5cn/BzpTZKLD2h/Ef4uHNtWM+xJgvY6eFyvvEawOSVd+tpUoQMOSyqawLHIdSRDOLjEiI21jnY8gY4Eg+OXDO2cBt/h5YT3GISkcJeiVSVSIhJfK6pjkaOXPjUrOodhhQ0D1ctQt9H1YKsb76JQ484UdfmG8CcN7UwAXMdl0OLLX9pwg+deovYctxufo46kdDrTWtzdZZ2KYgAJTk4aMuAonoEZFJAtytOs7NKGlYWUmZYuHZftSeu0GFWhD9x/gdGP/71Z/TWS5fFo+C8oTCwMi1TlX1Zhs/Da6k4nWhlLH+YdaPiZMyt55VTa3uxy9dfguBDnSzmp79I091et4+mYsd9mvqWs6ilsaSFG/8GAZ66Ro4Vcl6vOxBna3h80dOKzeVvI82fAKbD6ktUWdVD4F4fdwO33XzFva7MIZpYNVHdR2xsVAZ26w== X-Microsoft-Exchange-Diagnostics: 1; BY1PR0701MB1722; 31:E9DwB/CV0D2perdhPfY1nRyhTWL3WCMjw/ep0xv/XJxXxlvmahoIYGBAsJ9yMUoCfZ/8YlHOh5zNA9cWYAF7laPGDMxvNoJnCyGdsfWaQph8mS+7z6JsI7bhI2r4zIlkBa5bkUKCFqJYWjeSBmlitG0GggVYyI3+9cQAengG5MJmfPMi8+SL8Bm0YocNW256CSYxZMbjvyWigTlz/p3KWT5B0IvBVKOHQ+ikrVTDPG4idRO1tY3332heuleDk3NF; 20:t9zxXjN0Cqos+Y7iNFmls8sGfqsuFpu6q5k4J7MgwuE1WMA9VP5o6lO01+wdahNPkdxBvgqf4zA8ltyi/ISALiPSGabgRHefsvaU0VXVr4r1Gf+/umzGdiK/qgnfAh/u2plk07N0WjP6i+1MFIsfDLmXmIY09F/U8iQDWpIv7SOdP+V8v7+3PtgyxJprJtxsHWzeKe3D1TVwdvijoqBgBUpfqyo6q+IrTovNL+NznlS29IytqOuXKbnzj1035YqyR51g9OajdNYZqobk7C4fhJocuff8dzxr/agz4m7hwfrVuSES6Y0gyzJfrC4prs50qO9iVcwfVRDksHjxUY81SOGJ/2oaoLPboSVAsR9PDImxhV9MLnlVJcTnILQ0DZgS4VtXTYjjN8/hZDxUuI/RBTlA2AtQIDc7LpqH2cRwFFF3deTZlCwCWOqiJW+v681GqXLkLtl2XmAnRL/19csrJTjZ/nMaMWEjXnpf8zGLgsRVRtQtqHfwsyVlo10SHEyaGjHvndtzTsmJzVoTT0Ny1oxKW6gIecEMN4XBv6gtcA+tphppT44Q5aAxcY0dxE4qXpxNBnU/sktGdnOFSMObfQxdut6TLR9zQ4t1ZIRpl5Y= 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)(5005006)(8121501046)(3002001)(10201501046)(6041248)(20161123555025)(20161123560025)(20161123558025)(20161123562025)(20161123564025)(6072148); SRVR:BY1PR0701MB1722; BCL:0; PCL:0; RULEID:; SRVR:BY1PR0701MB1722; X-Microsoft-Exchange-Diagnostics: 1; BY1PR0701MB1722; 4:g9qv0BhrUKWYfshkbT1ztOcG7MuoAlyu5aThHxxdYWUy8iw76ysshWj8/ZgicvKuiz94TM38248GgyLPYyPFX8t4jrlf6Om7OS2+XXk+scBuj0IFBia/sec7/4G/NGjMv9OK2Y3KoTQiGOWySlEVZnEvhbWzDDyeuxa23hS8LQiaxhggpoqefNf+VwK/zfQpgAY/XQVUgcLIf5hGRjCkjaQAEbSRDclcGUSufIBw7zmTt4cJ0DmXPmE0CzwQqUP8qtwjClNaaWInh7IaEZX4aO0jy8mZvxoz4GX3BWAHpoMktlHMvND1ee7JkYMNfs/mpOiQVdn+xVThu2Iw0PYRNZzcxPkVapt5zoNMuM8obrOxo94ybIxIJq7zUMwDPT1FD8hdsb+91hA3bdZuVUVgofDdNEbGbA6K6lFdlGsvf36IFMmVuULS7K84VK3znakxU+HKfytcBlYeu78uH5lT4TkXJoiaSBKWdJ98L1CTWDSAn9Uynx3A79hPFdI6DDDiEW5nBTO1C4Gdw67oPz2G00IXXeDjgOG+P652hQsbKB40dsqpXsLUK+pmp4aCIYMXGUl1QJvtzVFTxu2i4weGGzeCsVsSJBCRVHV6QhXYNMfcbe+aA1YHGiUainxVnUkn+d9AIVZk8S5TpN6sVUQABQ== X-Forefront-PRVS: 0245702D7B X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6009001)(6069001)(39450400003)(24454002)(966004)(8676002)(81166006)(6246003)(38730400002)(4326008)(53376002)(5660300001)(305945005)(6116002)(3846002)(7736002)(23726003)(42882006)(2950100002)(6916009)(8656002)(5009440100003)(25786008)(6306002)(6666003)(229853002)(2906002)(6506006)(53936002)(9686003)(1076002)(55016002)(50986999)(76176999)(54356999)(42186005)(33646002)(47776003)(61506002)(189998001)(110136004)(66066001)(7099028); DIR:OUT; SFP:1101; SCL:1; SRVR:BY1PR0701MB1722; H:localhost.localdomain; FPR:; SPF:None; MLV:sfv; LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?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kCBKsduYCg?= =?us-ascii?Q?kiaF5s1Ks8Yk5icEoQUwFVNH2FFEBp4G5t6gPBMYU02p+tfqJMLURMbhI7yn?= =?us-ascii?Q?owjHLwNzWhaxJWTmyVd0JJs+AFjAvumPuz7yqE3WVVlrL3NygB88hWL24bpc?= =?us-ascii?Q?3dy0oTovZTPp+jm/GsBzg7T67JNIvCkNlR/bb7vrA2hcggEhQJbuXz3TKNs8?= =?us-ascii?Q?IcIMnr/evU51TcaWNs+M2UoJwe31L?= X-Microsoft-Exchange-Diagnostics: 1; BY1PR0701MB1722; 6:iwDqeb8suhVsJvDDKsPzK7C4YkbulCoZSCI8SlsDETDnraR4yBdEPmw5+BUHVyoGaBDZ/ulZwDMup1TQcx4SR7LTI7oJBku3n0Sglz0ApicwYZ0Pu39miN1Xnmt/OFzbVYxYgyt43h5SHQGz0DcF8/8FxRIULNmRkWnoatIkWCr86eYhOsWs+32eRtemHwj1KEj2gVpNmsoBKZkMYAf2cY71gXBe6RRbo58/V87yA9hC8Q8vUtfSmta1vcDl/Wxoghl+/V0xVsc7JPlE+49YRlDMtEjfrxcixDPuRWHHafl1nEoA4BdUgUJiToFgYRD1DJncjKrQaRMa1Owsy4/rcsCf4r6UVSzpLoyMvQAApxm8GbkjErGcI3kEM549Zlycjw+/hjxLtoWDo4ajiGo1cQ==; 5:d53/stJ3C3pNpyU2W00Hw8TIWPCVKXdqvi9vonI3cyBGe6Lwbn5uKhkpFzTNJkTHp/ZbQ8YSLYD3b/tCvsQc24CCLbpgP9f2JIWF281rBndjLuESMdzFPk+zCtxqXiUAt54H18ecJVIqBSC1uqB7IQ==; 24:gYO2wQuThS0Zp8Pnvz22RIBrfb7jFb3TaaQF1cCFJouiWjNqjLYZuOJpJZvkVIHqEPJ6Zfjivk0ZaKGVZg4cZ2cNfCHJhk3XsTj4r2Ly1Ag= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; BY1PR0701MB1722; 7:MbFTAKLc6+swVF4wMKX62lu1r6pIZEwzL/vdnZlTShXvynwrVhnhQuY+Iwleq2eb0tfIqV15rFKb4ygMvcoXeDeegWuDxoh5StRHLfx3TbeZtKsffU/r9bd0oy09Bcr+wARADHROEfb6H2BU6tT/5fHeH27R2XZJdWPjlGzzH2fPtCn2i7c3jQYMtmvV+W5wJvdPQot+xaIT/TqI0jFru+x6Ar8RUKUJWkI6zOAmLDLa/du3ohVIOpPZ9c08OMimznd+6WZrrrnQRYhf42ifiQrvYZ53g48YyLHmT5WKRB8qSkpTi/DzB5wK9IhRVAaItJ4YlZM3gBxxIOG7Rh1nXg== X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Mar 2017 08:52:48.4522 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY1PR0701MB1722 Subject: Re: [dpdk-dev] [PATCH v3] 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: Mon, 13 Mar 2017 08:52:53 -0000 On Tue, Mar 07, 2017 at 10:25:00AM -0600, Gage Eads wrote: > 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(). > > Fixes: e36bf651b3ca2 ("eventdev: implement the northbound APIs") > > Signed-off-by: Gage Eads > Acked-by: Jerin Jacob Applied to dpdk-next-eventdev/master after fixing check-git-log.sh warning http://dpdk.org/ml/archives/test-report/2017-March/013029.html Thanks. > --- > v2: Refined commit message's description of patch > v3: Fixed check-git-log.sh errors, added Jerin's Acked-by > > 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 >