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 252D0A0561; Mon, 20 Apr 2020 00:41:55 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id EFC571C18E; Mon, 20 Apr 2020 00:41:53 +0200 (CEST) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id 3C12A1C138 for ; Mon, 20 Apr 2020 00:41:52 +0200 (CEST) IronPort-SDR: YeVqquvZ/3sJKauc/HIRRKhIPCF6+ViP6wa3/jtXHLBKuWqFSk/vR4gHjMDbhOz++js+G4+Qhi V5O2/qLXN4CQ== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Apr 2020 15:41:51 -0700 IronPort-SDR: xG/TCP0GBYARBpdepcp44JHB8Zg8Ks9PlRSAw+e99aO6VbIbSSeFt3w+/X2JHR2KvgMEC1nZi6 Ekmj8SBMHEKQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.72,404,1580803200"; d="scan'208";a="455429565" Received: from orsmsx106.amr.corp.intel.com ([10.22.225.133]) by fmsmga005.fm.intel.com with ESMTP; 19 Apr 2020 15:41:50 -0700 Received: from orsmsx161.amr.corp.intel.com (10.22.240.84) by ORSMSX106.amr.corp.intel.com (10.22.225.133) with Microsoft SMTP Server (TLS) id 14.3.439.0; Sun, 19 Apr 2020 15:41:50 -0700 Received: from ORSEDG001.ED.cps.intel.com (10.7.248.4) by ORSMSX161.amr.corp.intel.com (10.22.240.84) with Microsoft SMTP Server (TLS) id 14.3.439.0; Sun, 19 Apr 2020 15:41:50 -0700 Received: from NAM10-DM6-obe.outbound.protection.outlook.com (104.47.58.109) by edgegateway.intel.com (134.134.137.100) with Microsoft SMTP Server (TLS) id 14.3.439.0; Sun, 19 Apr 2020 15:41:50 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Riv05kY14+O2LsNaXlwPD5M9j3wF3bJcO0CJNHpp3BAHYIcykeI/xlNLoHmZEG+s7ExUERJRBlPNThjBMS/IRsJ/mtO+WmiEd9+TImwB8QOSBc+5iG48GpCTbQDmooPeovjicPhQ0JC2GwEyCyVoXnuCOmWR2RBJu995t7aiO278KsOKw7v8cdVFsDqsLCFiKlAtITyMmShyR++Wm86dAMxzjjubeT3kQ7q+T7bXS4039Uh3+xhSsecRni/SkkeyP8VfUfCFS4B5pSqUOO99pzPNiKY7U2RN0JRjaplMlec4u9Tibw1Rmlb9GsBtFFOcOTNU5ZPeIAoCyr+GZysmVA== 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=ngjmhhCQWiM4bNEt/yh6mDCwRPHJoOEROcPs3uiOZD8=; b=BUyETugKzpHfCvq4zvg2havEL+lVmupn0+XY+l1tR5ueNtHiwS+MuIOask4xwsKJMS9/keBxPD/8iz3Sken03tWsSwgnMsdrs8UJnKYtMoAhsywfg954zuNXp2/zTATK7rR2u/IJpUlrZWpBJUFERmPu1MAtjKi3wYl8d0ILnc4GVsZD6VJyoTdULNe3YwGr1bMy0X6mAxUBtuzuo+K1XZFUi90w1t9n4kcz+Ab4GJYmMf0e/dk0dKyDc4F4MwMtD/eLkY5tl0j1aiR34vGhx6yBB4lj3NOJ/yoiozAzqqcBlM6ulSdywOQODjMJrxVNoF6m67f4zCORcCOM6V1qhg== 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=ngjmhhCQWiM4bNEt/yh6mDCwRPHJoOEROcPs3uiOZD8=; b=vcHO9bQvedjyfv2+rPVTZFVpz4CuUPOXqXc0Y5Jl/3b3h9VWxaCSpS8uiYm8buAOtHpY9zntJsj+lcrJ+/DgqyL61X+ZHQXEnpxLALtN9UNDHHNXcnwsZ+UJcyJzgbceX1RaxhP8rwlYEdS2Mmx0yw85MTNuhXBrSOZH/qP1/PM= Received: from BYAPR11MB3301.namprd11.prod.outlook.com (2603:10b6:a03:7f::26) by BYAPR11MB2613.namprd11.prod.outlook.com (2603:10b6:a02:cd::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2921.29; Sun, 19 Apr 2020 22:41:48 +0000 Received: from BYAPR11MB3301.namprd11.prod.outlook.com ([fe80::f8cb:58cd:e958:fff4]) by BYAPR11MB3301.namprd11.prod.outlook.com ([fe80::f8cb:58cd:e958:fff4%6]) with mapi id 15.20.2921.027; Sun, 19 Apr 2020 22:41:47 +0000 From: "Ananyev, Konstantin" To: Honnappa Nagarahalli , "dev@dpdk.org" CC: "david.marchand@redhat.com" , "jielong.zjl@antfin.com" , nd , nd Thread-Topic: [PATCH v5 7/9] ring: introduce peek style API Thread-Index: AQHWFZ8RvvbCVWB3qU658ll+ytGiJqh/uiOAgAEMLjCAAAsFYIAAIm4AgAAW0uA= Date: Sun, 19 Apr 2020 22:41:47 +0000 Message-ID: References: <20200417133639.14019-1-konstantin.ananyev@intel.com> <20200418163225.17635-1-konstantin.ananyev@intel.com> <20200418163225.17635-8-konstantin.ananyev@intel.com> In-Reply-To: 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.2.0.6 authentication-results: spf=none (sender IP is ) smtp.mailfrom=konstantin.ananyev@intel.com; x-originating-ip: [192.198.151.164] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: e740d50e-465f-40ea-32d8-08d7e4b2d842 x-ms-traffictypediagnostic: BYAPR11MB2613: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:7691; x-forefront-prvs: 0378F1E47A 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; SFTY:; SFS:(10019020)(366004)(376002)(346002)(396003)(136003)(39860400002)(71200400001)(33656002)(5660300002)(4326008)(478600001)(2906002)(64756008)(66476007)(76116006)(66446008)(66556008)(66946007)(86362001)(55016002)(316002)(52536014)(54906003)(110136005)(26005)(81156014)(8676002)(7696005)(9686003)(6506007)(186003)(8936002); DIR:OUT; SFP:1102; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: Sb3sJchScMgcQ/6KKXh+JQJ10LvOuwef8CJ6x9fbQ97K5dCTwz0tu2ukSF2b/Qrlk0FAxvxdoDM+9ALMYtBvDqk/8HFib9aV0Y6U1ZscTsb8ACQyVS0St9p5eSYwr1uyW6ba5gRz+FEZSTety9ldb5oeWGMxNCPfccAqOJqM0FWUQrYkl4IKtx7CQXU2PnaN/cTmkzRLEKdymQ0TwcQzsAZK1URkaft1bQ3s6WlYj+zNyAO8/lAtYsnQtzkGPZoSo785J67cy9JEiHeDndY6wSXKefIIp32ZOgMFdp/zxoM9DXvH7AVLVEH2FxfjRZdt7dK+WHpI0wm51MYhyJGKAfCWY0S+Lp82ibX2iDbrvtluIP6meWJto6iuFGBPMlEnv6jI3Lq7471jL6fgJa+nh7CGvFrTzuf3GYVOT2e+4LL6uWj4RT7f1BzQdhBYAl29 x-ms-exchange-antispam-messagedata: rHHMntJ4v5zOFNvNvoeWxp3oii7sI2MvYjqRQB+/9gr4REcjRGFg5wkuYuih/jycq/sC7fX7SO/Zto7I3F2ylPtooyCT9uPrtUzHqUASHt3IdMU/jMpqdccyDvKeGYIBgPAtcs3hZDUL3t5SQw4CzQ== 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-Network-Message-Id: e740d50e-465f-40ea-32d8-08d7e4b2d842 X-MS-Exchange-CrossTenant-originalarrivaltime: 19 Apr 2020 22:41:47.8264 (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: DW2W7tFokzULFVkbYQtLoZuKi0NghuhkutcZcCoRL/TCQaZc3vr5EyimH18Ui9kOO/2c0ChSg4KY7wuMBoWQvYZpQhKM8COCyhj70mXgj9M= X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR11MB2613 X-OriginatorOrg: intel.com Subject: Re: [dpdk-dev] [PATCH v5 7/9] ring: introduce peek style API 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" > > > > > > > > > > > > > diff --git a/lib/librte_ring/rte_ring_generic.h > > > > > b/lib/librte_ring/rte_ring_generic.h > > > > > index 953cdbbd5..9f5fdf13b 100644 > > > > > --- a/lib/librte_ring/rte_ring_generic.h > > > > > +++ b/lib/librte_ring/rte_ring_generic.h > > > > Changes in this file are not required as we agreed to implement onl= y C11 > > for new features. > > > > > > Right, will remove. > > > > Actually no, spoke too early before thinking properly We do need these > > functions in rte_ring_generic.h for SP/SC _start_/_finish_. > > Konstantin > The peek APIs are new functionality. So the peek APIs in legacy format sh= ould be wrappers around _elem_ APIs. That is what I see in the > code as well: > rte_ring_peek.h has this: > static __rte_always_inline void > rte_ring_dequeue_finish(struct rte_ring *r, unsigned int n) > { > rte_ring_dequeue_elem_finish(r, n); > } >=20 > I think, I gave you incomplete feedback earlier. > Actually, __rte_ring_st_get_tail and __rte_ring_st_set_head_tail should b= e in a new file named rte_ring_peek_c11_mem.h. This file should > be included in rte_ring_peek.h (same way you have done for RTS and HTS). = Then remove both these functions from rte_ring_generic.h and > rte_ring_c11_mem.h. Good idea, yes it should work.