From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id 8B34E2B87 for ; Mon, 17 Apr 2017 10:51:01 +0200 (CEST) Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 17 Apr 2017 01:50:59 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.37,214,1488873600"; d="scan'208";a="78046603" Received: from fmsmsx108.amr.corp.intel.com ([10.18.124.206]) by orsmga004.jf.intel.com with ESMTP; 17 Apr 2017 01:50:59 -0700 Received: from bgsmsx151.gar.corp.intel.com (10.224.48.42) by FMSMSX108.amr.corp.intel.com (10.18.124.206) with Microsoft SMTP Server (TLS) id 14.3.319.2; Mon, 17 Apr 2017 01:50:56 -0700 Received: from bgsmsx101.gar.corp.intel.com ([169.254.1.71]) by BGSMSX151.gar.corp.intel.com ([169.254.3.224]) with mapi id 14.03.0319.002; Mon, 17 Apr 2017 14:20:54 +0530 From: "Yang, Zhiyong" To: Yuanhan Liu CC: "dev@dpdk.org" , "maxime.coquelin@redhat.com" Thread-Topic: [PATCH 0/2] net/virtio: support to turn on/off the traffic flow Thread-Index: AQHSroqeji8l837xMU6uH6LcnmTzoaHJR42g Date: Mon, 17 Apr 2017 08:50:52 +0000 Message-ID: References: <1490960419-16779-1-git-send-email-zhiyong.yang@intel.com> <20170406035953.GM18844@yliu-dev.sh.intel.com> In-Reply-To: <20170406035953.GM18844@yliu-dev.sh.intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 10.0.102.7 dlp-reaction: no-action x-originating-ip: [10.223.10.10] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH 0/2] net/virtio: support to turn on/off the traffic flow 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, 17 Apr 2017 08:51:02 -0000 Hi, yuanhan: Sorry for the delay reply due to my annual leave. > -----Original Message----- > From: Yuanhan Liu [mailto:yuanhan.liu@linux.intel.com] > Sent: Thursday, April 6, 2017 12:00 PM > To: Yang, Zhiyong > Cc: dev@dpdk.org; maxime.coquelin@redhat.com > Subject: Re: [PATCH 0/2] net/virtio: support to turn on/off the traffic f= low >=20 > On Fri, Mar 31, 2017 at 07:40:17PM +0800, Zhiyong Yang wrote: > > Current dpdk code virtio_dev_stop only disables interrupt and marks > > link down, When it is invoked, tx/rx traffic flows still work. This is = a strange > behavior. > > The patchset supports the switch of flow by calling virtio_dev_start/st= op. > > > > The implementation refers to vhost pmd. >=20 > That's a difference story. Vhost pmd uses 2 vars to track the status, whe= reas you > are using only one here. So why not setting/clearing "started" at dev_sta= rt/stop, > respectively? > Then we can check "started" at Rx/Tx functions. Yes, I use only one var since I think vhost pmd using two is too complex an= d it is unnecessary. I'm setting/clearing started at virtio_dev_start/stop, update_queuing_stat= us is added to avoid duplicate code. I don't understand your question. >=20 > BTW, why does it have to be atomic? >=20 Consider again. It is not necessary to use atomic here. But It seems that i= t doesn't have an negative effect. Thanks Zhiyong > --yliu > > > > Zhiyong Yang (2): > > net/virtio: add data elements to turn on/off traffic flow > > net/virtio: support to turn on/off the traffic flow > > > > drivers/net/virtio/virtio_ethdev.c | 37 ++++++++++++++++++++= +++++++- > > drivers/net/virtio/virtio_pci.h | 1 + > > drivers/net/virtio/virtio_rxtx.c | 12 +++++++++ > > drivers/net/virtio/virtio_rxtx.h | 6 +++++ > > drivers/net/virtio/virtio_rxtx_simple.c | 4 +++ > > drivers/net/virtio/virtio_rxtx_simple_neon.c | 5 +++- > > drivers/net/virtio/virtio_rxtx_simple_sse.c | 5 +++- > > drivers/net/virtio/virtio_user_ethdev.c | 1 + > > 8 files changed, 68 insertions(+), 3 deletions(-) > > > > -- > > 2.7.4