From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 22957A04B5; Tue, 27 Oct 2020 14:51:50 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 8793E4C95; Tue, 27 Oct 2020 14:51:48 +0100 (CET) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id 8FAEC4C90 for ; Tue, 27 Oct 2020 14:51:45 +0100 (CET) IronPort-SDR: YXjZf+RKitKT2DmaElPKv3DZYGMCTJ06K0bUN77olHKzAihlWReCEL/Z+rsyIkG2fA2O53jNDN MjbIeMbFSgrg== X-IronPort-AV: E=McAfee;i="6000,8403,9786"; a="168181259" X-IronPort-AV: E=Sophos;i="5.77,424,1596524400"; d="scan'208";a="168181259" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Oct 2020 06:51:44 -0700 IronPort-SDR: BtCy03egc1AB7b3Q0r+rSJ38Gofpz0oJaZq6GggiBt+6C/fCs5BVNEtCWdyT4PWipPJGmXHUeE koUw4vCSMIHQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.77,424,1596524400"; d="scan'208";a="468315159" Received: from fmsmsx605.amr.corp.intel.com ([10.18.126.85]) by orsmga004.jf.intel.com with ESMTP; 27 Oct 2020 06:51:44 -0700 Received: from fmsmsx611.amr.corp.intel.com (10.18.126.91) by fmsmsx605.amr.corp.intel.com (10.18.126.85) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Tue, 27 Oct 2020 06:51:43 -0700 Received: from fmsmsx603.amr.corp.intel.com (10.18.126.83) by fmsmsx611.amr.corp.intel.com (10.18.126.91) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Tue, 27 Oct 2020 06:51:43 -0700 Received: from fmsedg601.ED.cps.intel.com (10.1.192.135) by fmsmsx603.amr.corp.intel.com (10.18.126.83) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5 via Frontend Transport; Tue, 27 Oct 2020 06:51:43 -0700 Received: from NAM11-BN8-obe.outbound.protection.outlook.com (104.47.58.177) by edgegateway.intel.com (192.55.55.70) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.1713.5; Tue, 27 Oct 2020 06:51:43 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=O2VOqyEO1mW8pY0FsrXQA+ouSaHXMZO1y+wHsE5h3BFWIl9BGCCJVF0R1M3R9p5NoxD0uFf+u3QGJJYy5JonHQCL/SD4Rlz3hyiBm1gy0DKf4yKj0Od0m3swQoUXnFjt0leTieNVHwdJGyw4K8YledSClR/a7Avjk+dNRmKx+/4nMP/hpk4AgdF7yUYc0RfGmWyRN8W0iVXt5/rHDfAN3VUfRaYqb117dUrVqUrBThXJCPVRGCXIn5fOBYrXGtBe6phMWRj2v3q8QNezUK1nhKUCTe3OTfr9mXV9yT2BMdHbGasctpujY1b+uZryfoYweBohbWSysJIbL5r5NWB34g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=q6nBPfNm0htZ1M/XhaXXANYoGWjdznXnud8jnfEy1zM=; b=YBm7SOLizjXWUAwrw8EeE7908d6N2Z7DgKttHTjHvDSfdJlW+VRuojnY4we/WqTl7/vm3AX8i2x8B7gI9bSNSvmn/U6whqp59yHLFokUfWJfYtg3iomH6c632XpdxkTaCKrggn7vi8tM6cffHQ2Yqbk2VSRXHEqoASaOA74D4nEm4KcydQ68sWKx7aMe5Te3yZig44r4hjqFG8amPigOUzF4vVQQ5m1mtLnF8t9Bm5dH2w4viPhq9DI2V4NAbrrcD3QoRp7sQjeZ4vwrerlDddueDXN4BXic1UU1OzaXBVBx6JsrMFWg05quMvT/OWZAfPIBswqAVyglIeO3XCAWlw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com; s=selector2-intel-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=q6nBPfNm0htZ1M/XhaXXANYoGWjdznXnud8jnfEy1zM=; b=FTfbL72+QEFBOe1XJuJ9O043UICzk/aodP1FWl1zTjEwD3e86/mfQ7sCkKSFnAqH07M/Sp9RIBebOoSDYc/pfU2d1tXW/a8hB1L5kflKnziByKoWD6Wd/Q41JsWzAD+sfy84NooR8d+UsHIRX7w8hzY/v4/499Ozn/JvwdY1giA= Received: from BYAPR11MB3301.namprd11.prod.outlook.com (2603:10b6:a03:7f::26) by BYAPR11MB3814.namprd11.prod.outlook.com (2603:10b6:a03:fb::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3477.27; Tue, 27 Oct 2020 13:51:41 +0000 Received: from BYAPR11MB3301.namprd11.prod.outlook.com ([fe80::f5a4:3f6b:ade3:296b]) by BYAPR11MB3301.namprd11.prod.outlook.com ([fe80::f5a4:3f6b:ade3:296b%3]) with mapi id 15.20.3499.018; Tue, 27 Oct 2020 13:51:40 +0000 From: "Ananyev, Konstantin" To: Honnappa Nagarahalli , "dev@dpdk.org" , "stephen@networkplumber.org" CC: "dharmik.thakkar@arm.com" , "ruifeng.wang@arm.com" , "olivier.matz@6wind.com" , "david.marchand@redhat.com" , "nd@arm.com" Thread-Topic: [PATCH v5 2/8] test/ring: move common function to header file Thread-Index: AQHWqpIvWsIs3IU+VEewMR3hIxkwpamre0lg Date: Tue, 27 Oct 2020 13:51:40 +0000 Message-ID: References: <20200224203931.21256-1-honnappa.nagarahalli@arm.com> <20201025054556.14277-1-honnappa.nagarahalli@arm.com> <20201025054556.14277-3-honnappa.nagarahalli@arm.com> In-Reply-To: <20201025054556.14277-3-honnappa.nagarahalli@arm.com> Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-reaction: no-action dlp-version: 11.5.1.3 authentication-results: arm.com; dkim=none (message not signed) header.d=none;arm.com; dmarc=none action=none header.from=intel.com; x-originating-ip: [46.7.39.127] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 392750d7-22f7-429f-3c35-08d87a7f6eb7 x-ms-traffictypediagnostic: BYAPR11MB3814: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:1417; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: 7FP9ZnXScOOYElY4BQEx0XvF8f0KaiO+Cn9o7+2nbMUd/Tf18mAlLU1gvReFXyTYkhelhDBKYAcr9Jj6bwZjVYbfPaRcjctzxMq3geSwmGg6vASq6aleLqF5PGiVHPMWDp3ds+UZe36hzNXZKN5jfNSqg9cFhnismaoiprInEFuSOmTdtRZYUoXsdvwfU8GYSnspAzn2EPHegXhVXkNUGzpycN2dZpVh9YXeyZ+dpdbaamI1yY8bcPRhdubwiUEglTXH4UReTMVF8jTIvCaGvGUbI/0VW1F4rk22IDgtuubkGxgzLQg9ADtrlzgOtaNHXuNiXznJwcXgHDqAabQ+5A== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BYAPR11MB3301.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(346002)(366004)(39860400002)(136003)(376002)(396003)(186003)(110136005)(316002)(8936002)(66946007)(66556008)(64756008)(2906002)(76116006)(83380400001)(9686003)(66446008)(5660300002)(55016002)(66476007)(53546011)(6506007)(54906003)(26005)(8676002)(4326008)(52536014)(86362001)(478600001)(33656002)(7696005)(71200400001); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata: BsuwhDrOEaLd7Lo2oF1Jk1EX+nEP2dWLq0bTHJnsex9pE9JzdLFY+inEpjsmeV4vyrIPbxdwt7+RntRzDTafTK93UP2CpMokxujRdSqM4DtgMukFRQp8898LrGazJrUusStNIJB+OkgYKCOGdMCehc/HxlJklA+fzlS9yQZv2BqgjfnCiJJAQb60JVnT7QHU5BpR08X9/UNSAAouOai/yMHiQpommEip58ex4BUqopYNlG79QHNMnrygDdKW946Q54/6etBmrFaXhJPtpyZYoPj0oUxUT5uUfHqccrspN22wwj/lm24uENCIAVBn7e5JRd20jWEsGNDu0rQFvF5981FiJSvgJUcXUhk02OshhqvXkcMnG1YIaYfufRg+T5AtfLnBx8tSrjH9wcyqdyVGStI0w/lPRuZB5hsWH+Fgi1vxQ3ZFheSIYrYz9uZPvtdl8OqKq4HzXf0SmA/9lj1xRv6vO7lsbK+KH98qt/XioHmAmsFdmq8Y2kK90TVs7QFpNQj8pTubNFtWjizFArzAR8LF0gOaJXH3CiNl97dU3iTR2UXvSssbW2mLuEMT+aM6GIKcdyVkqcFmKBAL0Kg3aKxBVK8rHyTnywhycLW1Io+ZH1yBh37t8ndpMkXx5IXOn1WCTU3HsnDblmVzHp5drw== x-ms-exchange-transport-forked: True Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: BYAPR11MB3301.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 392750d7-22f7-429f-3c35-08d87a7f6eb7 X-MS-Exchange-CrossTenant-originalarrivaltime: 27 Oct 2020 13:51:40.8263 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: uPx1KS7e4iT4ZYJIejT6CzSjT7xXtbcET+ZjgMYEZySlajde1tRZS1rPOXL2mcBTXb6wKZGAZ/m1yRjknzPgaZ5hpzSuOkxV1IHmjHZAZrk= X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR11MB3814 X-OriginatorOrg: intel.com Subject: Re: [dpdk-dev] [PATCH v5 2/8] test/ring: move common function to header file 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" > -----Original Message----- > From: Honnappa Nagarahalli > Sent: Sunday, October 25, 2020 5:46 AM > To: dev@dpdk.org; honnappa.nagarahalli@arm.com; Ananyev, Konstantin ; > stephen@networkplumber.org > Cc: dharmik.thakkar@arm.com; ruifeng.wang@arm.com; olivier.matz@6wind.com= ; david.marchand@redhat.com; nd@arm.com > Subject: [PATCH v5 2/8] test/ring: move common function to header file >=20 > Move test_ring_inc_ptr to header file so that it can be used by > functions in other files. >=20 > Signed-off-by: Honnappa Nagarahalli > Reviewed-by: Dharmik Thakkar > --- > app/test/test_ring.c | 11 ----------- > app/test/test_ring.h | 13 +++++++++++++ > 2 files changed, 13 insertions(+), 11 deletions(-) >=20 > diff --git a/app/test/test_ring.c b/app/test/test_ring.c > index a62cb263b..329d538a9 100644 > --- a/app/test/test_ring.c > +++ b/app/test/test_ring.c > @@ -243,17 +243,6 @@ test_ring_deq_impl(struct rte_ring *r, void **obj, i= nt esize, unsigned int n, > NULL); > } >=20 > -static void** > -test_ring_inc_ptr(void **obj, int esize, unsigned int n) > -{ > - /* Legacy queue APIs? */ > - if ((esize) =3D=3D -1) > - return ((void **)obj) + n; > - else > - return (void **)(((uint32_t *)obj) + > - (n * esize / sizeof(uint32_t))); > -} > - > static void > test_ring_mem_init(void *obj, unsigned int count, int esize) > { > diff --git a/app/test/test_ring.h b/app/test/test_ring.h > index d4b15af7c..b44711398 100644 > --- a/app/test/test_ring.h > +++ b/app/test/test_ring.h > @@ -42,6 +42,19 @@ test_ring_create(const char *name, int esize, unsigned= int count, > (socket_id), (flags)); > } >=20 > +static inline void* > +test_ring_inc_ptr(void *obj, int esize, unsigned int n) > +{ > + size_t sz; > + > + sz =3D sizeof(void *); > + /* Legacy queue APIs? */ > + if (esize !=3D -1) > + sz =3D esize; > + > + return (void *)((uint32_t *)obj + (n * sz / sizeof(uint32_t))); > +} > + > static __rte_always_inline unsigned int > test_ring_enqueue(struct rte_ring *r, void **obj, int esize, unsigned in= t n, > unsigned int api_type) > -- Acked-by: Konstantin Ananyev > 2.17.1