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 407B2A04F3; Thu, 9 Jan 2020 08:29:46 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id E24D41DBB3; Thu, 9 Jan 2020 08:29:45 +0100 (CET) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by dpdk.org (Postfix) with ESMTP id 3CB9F1DBB2 for ; Thu, 9 Jan 2020 08:29:44 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 08 Jan 2020 23:29:42 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.69,413,1571727600"; d="scan'208";a="254504598" Received: from fmsmsx105.amr.corp.intel.com ([10.18.124.203]) by fmsmga002.fm.intel.com with ESMTP; 08 Jan 2020 23:29:42 -0800 Received: from fmsmsx603.amr.corp.intel.com (10.18.126.83) by FMSMSX105.amr.corp.intel.com (10.18.124.203) with Microsoft SMTP Server (TLS) id 14.3.439.0; Wed, 8 Jan 2020 23:29:42 -0800 Received: from fmsmsx603.amr.corp.intel.com (10.18.126.83) 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; Wed, 8 Jan 2020 23:29:42 -0800 Received: from shsmsx104.ccr.corp.intel.com (10.239.4.70) by fmsmsx603.amr.corp.intel.com (10.18.126.83) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.1.1713.5 via Frontend Transport; Wed, 8 Jan 2020 23:29:42 -0800 Received: from shsmsx103.ccr.corp.intel.com ([169.254.4.245]) by SHSMSX104.ccr.corp.intel.com ([169.254.5.197]) with mapi id 14.03.0439.000; Thu, 9 Jan 2020 15:29:29 +0800 From: "Liu, Yong" To: "Jiang, Cheng1" , "dev@dpdk.org" CC: "maxime.coquelin@redhat.com" , "Bie, Tiwei" , "Wang, Zhihong" , "Jiang, Cheng1" Thread-Topic: [dpdk-dev] [DPDK] net/virtio: packed ring notification data feature support Thread-Index: AQHVqnQzD3YNN5+qPEWfg3kzQRM1v6fiJwsw Date: Thu, 9 Jan 2020 07:29:29 +0000 Message-ID: <86228AFD5BCD8E4EBFD2B90117B5E81E6347B13A@SHSMSX103.ccr.corp.intel.com> References: <20191204150312.32697-1-Cheng1.jiang@intel.com> In-Reply-To: <20191204150312.32697-1-Cheng1.jiang@intel.com> Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiNDJkYzE1OGUtNjQyMC00MTEzLWExMTQtMjc5NDM4MWFlOGM4IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiN0ZGRlZmeTU0NmlNWEhEdWs3NG41c0w0elNQK29xSjRTTWI1U3JpMkJuQjVVQmxQVU1MSzU5UGN1MUg4aHBTNCJ9 x-ctpclassification: CTP_NT dlp-product: dlpe-windows dlp-version: 11.2.0.6 dlp-reaction: no-action x-originating-ip: [10.239.127.40] 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" > -----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 >=20 > This patch supports the feature that the driver passes extra data > (besides identifying the virtqueue) in its device notifications. >=20 > 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(-) >=20 > 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; Hi Cheng, According to virtio1.1 spec, wrap counter should refer to next available de= scriptor. So used_wrap_counter should be replaced with avail_wrap_counter. Sorry for = late noticing.=20 Thanks, Marvin > + rte_write32(notify_data, vq->notify_addr); > } >=20