From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by dpdk.org (Postfix) with ESMTP id 172294CC5 for ; Thu, 6 Apr 2017 06:02:30 +0200 (CEST) Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga105.jf.intel.com with ESMTP; 05 Apr 2017 21:02:29 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.37,282,1488873600"; d="scan'208";a="74170316" Received: from yliu-dev.sh.intel.com (HELO yliu-dev) ([10.239.67.162]) by orsmga004.jf.intel.com with ESMTP; 05 Apr 2017 21:02:28 -0700 Date: Thu, 6 Apr 2017 11:59:53 +0800 From: Yuanhan Liu To: Zhiyong Yang Cc: dev@dpdk.org, maxime.coquelin@redhat.com Message-ID: <20170406035953.GM18844@yliu-dev.sh.intel.com> References: <1490960419-16779-1-git-send-email-zhiyong.yang@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1490960419-16779-1-git-send-email-zhiyong.yang@intel.com> User-Agent: Mutt/1.5.23 (2014-03-12) 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: Thu, 06 Apr 2017 04:02:31 -0000 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/stop. > > The implementation refers to vhost pmd. That's a difference story. Vhost pmd uses 2 vars to track the status, whereas you are using only one here. So why not setting/clearing "started" at dev_start/stop, respectively? Then we can check "started" at Rx/Tx functions. BTW, why does it have to be atomic? --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