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 83961A04F0; Mon, 13 Jan 2020 03:58:05 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 7D8511D58E; Mon, 13 Jan 2020 03:58:04 +0100 (CET) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id 600791D574 for ; Mon, 13 Jan 2020 03:58:02 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 12 Jan 2020 18:58:01 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.69,427,1571727600"; d="scan'208";a="219179987" Received: from fmsmsx107.amr.corp.intel.com ([10.18.124.205]) by fmsmga008.fm.intel.com with ESMTP; 12 Jan 2020 18:58:01 -0800 Received: from shsmsx605.ccr.corp.intel.com (10.109.6.215) by fmsmsx107.amr.corp.intel.com (10.18.124.205) with Microsoft SMTP Server (TLS) id 14.3.439.0; Sun, 12 Jan 2020 18:58:01 -0800 Received: from shsmsx602.ccr.corp.intel.com (10.109.6.142) by SHSMSX605.ccr.corp.intel.com (10.109.6.215) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Mon, 13 Jan 2020 10:57:59 +0800 Received: from shsmsx602.ccr.corp.intel.com ([10.109.6.142]) by SHSMSX602.ccr.corp.intel.com ([10.109.6.142]) with mapi id 15.01.1713.004; Mon, 13 Jan 2020 10:57:59 +0800 From: "Jiang, Cheng1" To: "Liu, Yong" , "dev@dpdk.org" CC: "maxime.coquelin@redhat.com" , "Bie, Tiwei" , "Wang, Zhihong" Thread-Topic: [dpdk-dev] [DPDK] net/virtio: packed ring notification data feature support Thread-Index: AQHVxr6HwKDJdYjZeU6c8L/vI4fiTafn7C5Q Date: Mon, 13 Jan 2020 02:57:59 +0000 Message-ID: <314345c01dbc4ee6ac0ebdee9f6bdb6a@intel.com> References: <20191204150312.32697-1-Cheng1.jiang@intel.com> <86228AFD5BCD8E4EBFD2B90117B5E81E6347B13A@SHSMSX103.ccr.corp.intel.com> In-Reply-To: <86228AFD5BCD8E4EBFD2B90117B5E81E6347B13A@SHSMSX103.ccr.corp.intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.36] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [DPDK] net/virtio: packed ring notification data feature support 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" Hi Marvin, > -----Original Message----- > From: Liu, Yong > Sent: Thursday, January 9, 2020 3:29 PM > To: Jiang, Cheng1 ; dev@dpdk.org > Cc: maxime.coquelin@redhat.com; Bie, Tiwei ; Wang, > Zhihong ; Jiang, Cheng1 > > Subject: RE: [dpdk-dev] [DPDK] net/virtio: packed ring notification data > feature support >=20 >=20 >=20 > > -----Original Message----- > > From: dev On Behalf Of Cheng Jiang > > Sent: Wednesday, December 04, 2019 11:03 PM > > To: dev@dpdk.org > > Cc: maxime.coquelin@redhat.com; Bie, Tiwei ; > > Wang, Zhihong ; Jiang, Cheng1 > > > > Subject: [dpdk-dev] [DPDK] net/virtio: packed ring notification data > > feature support > > > > This patch supports the feature that the driver passes extra data > > (besides identifying the virtqueue) in its device notifications. > > > > Signed-off-by: Cheng Jiang > > --- > > drivers/net/virtio/virtio_ethdev.h | 3 ++- > > drivers/net/virtio/virtio_pci.c | 15 ++++++++++++++- > > drivers/net/virtio/virtio_pci.h | 6 ++++++ > > 3 files changed, 22 insertions(+), 2 deletions(-) > > > > diff --git a/drivers/net/virtio/virtio_ethdev.h > > b/drivers/net/virtio/virtio_ethdev.h > > index a10111758..cd8947656 100644 > > --- a/drivers/net/virtio/virtio_ethdev.h > > +++ b/drivers/net/virtio/virtio_ethdev.h > > + if (vtpci_with_feature(hw, VIRTIO_F_RING_PACKED)) > > + notify_data =3D ((((uint32_t)vq- > >vq_packed.used_wrap_counter << > > 15) | > > + vq->vq_avail_idx) << 16) | vq- > >vq_queue_index; > > + else > > + notify_data =3D ((uint32_t)vq->vq_avail_idx << 16) | > > + vq->vq_queue_index; >=20 > Hi Cheng, > According to virtio1.1 spec, wrap counter should refer to next available > descriptor. > So used_wrap_counter should be replaced with avail_wrap_counter. Sorry > for late noticing. >=20 > Thanks, > Marvin >=20 Sure, I'm going to modify it in the next version. Thanks very much. Cheng > > + rte_write32(notify_data, vq->notify_addr); > > } > >