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 056D11B01D for ; Sat, 6 Jan 2018 05:41:29 +0100 (CET) X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 05 Jan 2018 20:41:28 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.46,320,1511856000"; d="scan'208";a="7777483" Received: from debian-xvivbkq.sh.intel.com ([10.67.104.226]) by fmsmga008.fm.intel.com with ESMTP; 05 Jan 2018 20:41:27 -0800 Date: Sat, 6 Jan 2018 12:41:01 +0800 From: Tiwei Bie To: Stephen Hemminger Cc: Xiao Wang , dev@dpdk.org, yliu@fridaylinux.org Message-ID: <20180106044100.o3fgg3mggkap2rc5@debian-xvivbkq.sh.intel.com> References: <1515051700-117262-3-git-send-email-xiao.w.wang@intel.com> <1515081578-30649-1-git-send-email-xiao.w.wang@intel.com> <1515081578-30649-3-git-send-email-xiao.w.wang@intel.com> <20180105122737.52c69b1a@xeon-e3> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20180105122737.52c69b1a@xeon-e3> User-Agent: NeoMutt/20170609 (1.8.3) Subject: Re: [dpdk-dev] [PATCH v4 2/3] net/virtio: add packet injection method 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: Sat, 06 Jan 2018 04:41:30 -0000 On Fri, Jan 05, 2018 at 12:27:37PM -0800, Stephen Hemminger wrote: > On Thu, 4 Jan 2018 07:59:37 -0800 > Xiao Wang wrote: > > > This patch adds dev_pause, dev_resume and inject_pkts api to allow > > driver to pause the worker thread and inject special packets into > > Tx queue. The next patch will be based on this. > > > > Signed-off-by: Xiao Wang > > Why is this needed? It isn't obvious what the mechanism is trying to solve. Xiao needs to use such mechanism to send some special packets (RARP packet) in the interrupt handler to implement the GUEST ANNOUNCE feature. To avoid the contention between user's Tx threads and the interrupt thread. He needs to pause user's Tx threads (by reusing the existing 'started' flag in `virtio_hw`) first, and call tx_burst() to send the RARP packet. He already provided the pause() and resume() functions, but the implementation of sending the RARP packet (add a field named as `rarp_buf` in `virtio_hw`, and check it in tx_burst() functions) is too specific. So I just suggested him to give rarp_buf a more generic name and provide a simple wrapper of tx_burst for internal use: http://dpdk.org/ml/archives/dev/2018-January/085213.html Is it OK to you? Or do you have any other suggestions? Thanks! PS. The latest version is v5, below is the link: http://dpdk.org/ml/archives/dev/2018-January/085354.html Best regards, Tiwei Bie