From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <yliu@fridaylinux.org>
Received: from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com
 [66.111.4.25]) by dpdk.org (Postfix) with ESMTP id ABC12324D
 for <dev@dpdk.org>; Thu, 18 Jan 2018 04:09:25 +0100 (CET)
Received: from compute1.internal (compute1.nyi.internal [10.202.2.41])
 by mailout.nyi.internal (Postfix) with ESMTP id 1A20120B84;
 Wed, 17 Jan 2018 22:09:25 -0500 (EST)
Received: from frontend1 ([10.202.2.160])
 by compute1.internal (MEProxy); Wed, 17 Jan 2018 22:09:25 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fridaylinux.org;
 h=cc:content-type:date:from:in-reply-to:message-id:mime-version
 :references:subject:to:x-me-sender:x-me-sender:x-sasl-enc; s=
 fm1; bh=RpsD8Loa+6BpxMBM1X9qxugYM6eQBlDcuTIikf9bEvk=; b=ViPp5jA6
 rtjXu5ncHDMg+fb+2OBg1q1B8kgwFGiVVTNsvdtp10N+Bla43jKwnNImF5z07x1w
 7bw5LecrzLoQm9Fnmu57wIzmXYjCU4F2iRVYNzxn0JpDVWOwgtxt27CKDjq4HjO+
 mHhGhHMdCWZ7krVgVVOtmqXjGhSe/u/ooW7g4Ov+lza308SJ40p6Elpu89iHi7D1
 q3dffv1ZNQvLcDP+jMqD1ZU6bO8RwcPxMswL7NLVR2WnfXNxoC3+gnE6uk+ZjYCF
 htq2IBrY36XQuyH13e1A72N+o7jpr7bNqkrdlY8cApTq7IYgPrLqm3xRJJUMmk1/
 kZy+lWn8lnABCw==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
 messagingengine.com; h=cc:content-type:date:from:in-reply-to
 :message-id:mime-version:references:subject:to:x-me-sender
 :x-me-sender:x-sasl-enc; s=fm1; bh=RpsD8Loa+6BpxMBM1X9qxugYM6eQB
 lDcuTIikf9bEvk=; b=D7mt656X03Q4kPod0WBcjeaPkmZmD1CAqiL519Pvugg38
 +w6mYyg2D8+7145GS11grApd7F4rArltxPRHcrmZPqhwa7ntfiRM1QiUXu2hbOQp
 iak+DYoLvE74B7fNPxPwu96HxIne9FeSiwd1tlVPXctDtBTo1r2Cfezealop8gpI
 OcJaPzxSjbVGpKM670j22M9l6m7JkfiY+81a0oZuJ59gC5MZ2OCBr7LUK4iK+z3O
 g8u/9Vqx18L/PubOwp4+F/mgHb3W4jHb67veQiQiOgo+ms5y3gz4C2lQJ2IOYGKI
 4uuOUyTKbUFXL9rD8Y8QzTyratqJ/cjsnxdsjkXXQ==
X-ME-Sender: <xms:5Q9gWtYdMuDB2c-U1IRYZ5hAbv2OqbomPjrjeAusPd89ks6xRfVX4A>
Received: from yliu-mob (unknown [115.148.90.22])
 by mail.messagingengine.com (Postfix) with ESMTPA id 16A7C7E349;
 Wed, 17 Jan 2018 22:09:23 -0500 (EST)
Date: Thu, 18 Jan 2018 11:09:21 +0800
From: Yuanhan Liu <yliu@fridaylinux.org>
To: Xiao Wang <xiao.w.wang@intel.com>
Cc: olivier.matz@6wind.com, dev@dpdk.org, thomas@monjalon.net,
 tiwei.bie@intel.com, stephen@networkplumber.org,
 maxime.coquelin@redhat.com, Ferruh Yigit <ferruh.yigit@intel.com>
Message-ID: <20180118030921.GW29540@yliu-mob>
References: <20180110012356.57456-4-xiao.w.wang@intel.com>
 <20180116214103.67803-1-xiao.w.wang@intel.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <20180116214103.67803-1-xiao.w.wang@intel.com>
User-Agent: Mutt/1.5.24 (2015-08-30)
Subject: Re: [dpdk-dev] [PATCH v11 0/5] net/virtio: support GUEST ANNOUNCE
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: DPDK patches and discussions <dev.dpdk.org>
List-Unsubscribe: <https://dpdk.org/ml/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://dpdk.org/ml/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <https://dpdk.org/ml/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
X-List-Received-Date: Thu, 18 Jan 2018 03:09:26 -0000

Xiao told me that this series (except the last patch) was already applied
to the Thomas master branch. I then realised it was my mistake.

I applied v10 last week locally for some basic testing. There is a conflict
in last patch, that's why the last patch is not merged. I forgot to do
a reset before I applied another patch. Then later, I did a push to the
next-virtio tree, thus patches from Xiao were also pushed. Ferruh then
did a pull from it. As a result, they got merged to the master branch
before I realised. Non-rebase is allowed there, thus I have made a patch
to fix my mistake.

Meanwhile, I have also spotted a build error when shared lib is enabled.
I will send them out soon.

	--yliu

On Wed, Jan 17, 2018 at 05:40:58AM +0800, Xiao Wang wrote:
> When live migration is finished, the backup VM needs to proactively announce
> its new location. DPDK vhost has implemented VHOST_USER_PROTOCOL_F_RARP to
> generate a RARP packet to switch in dequeue path. Another method is to let
> the guest proactively send out RARP packet using VIRTIO_NET_F_GUEST_ANNOUNCE
> feature.
> 
> This patch set enables this feature in virtio pmd, to support VM running virtio
> pmd be migrated without vhost supporting RARP generation.
> 
> v11:
> - Add check for parameter and tailroom in rte_net_make_rarp_packet.
> - Allocate mbuf in rte_net_make_rarp_packet.
> 
> v10:
> - Add a bold doxygen comment for the experimental function.
> 
> v9:
> - Introduce function with the experimental state.
> 
> v8:
> - Add a helper in lib/librte_net to make rarp packet, it's used by
>   both vhost and virtio.
> 
> v7:
> - Improve comment for state_lock.
> - Rename spinlock variable 'sl' to 'lock'.
> 
> v6:
> - Use rte_pktmbuf_alloc() instead of rte_mbuf_raw_alloc().
> - Remove the 'len' parameter in calling virtio_send_command().
> - Remove extra space between typo and var.
> - Improve comment and alignment.
> - Remove the unnecessary header file.
> - A better usage of 'unlikely' indication.
> 
> v5:
> - Remove txvq parameter in virtio_inject_pkts.
> - Zero hw->special_buf after using it.
> - Return the retval of tx_pkt_burst().
> - Allocate a mbuf pointer on stack directly.
> 
> v4:
> - Move spinlock lock/unlock into dev_pause/resume.
> - Separate out a patch for packet injection.
> 
> v3:
> - Remove Tx function code duplication, use a special pointer for rarp
>   injection.
> - Rename function generate_rarp to virtio_notify_peers, replace
>   'virtnet_' with 'virtio_'.
> - Add comment for state_lock.
> - Typo fix and comment improvement.
> 
> v2:
> - Use spaces instead of tabs between the code and comments.
> - Remove unnecessary parentheses.
> - Use rte_pktmbuf_mtod directly to get eth_hdr addr.
> - Fix virtio_dev_pause return value check.
> 
> Xiao Wang (5):
>   net/virtio: make control queue thread-safe
>   net/virtio: add packet injection method
>   net: add a helper for making RARP packet
>   vhost: use lib API to make RARP packet
>   net/virtio: support GUEST ANNOUNCE
> 
>  drivers/net/virtio/virtio_ethdev.c      | 113 +++++++++++++++++++++++++++++++-
>  drivers/net/virtio/virtio_ethdev.h      |   6 ++
>  drivers/net/virtio/virtio_pci.h         |   7 ++
>  drivers/net/virtio/virtio_rxtx.c        |   3 +-
>  drivers/net/virtio/virtio_rxtx.h        |   1 +
>  drivers/net/virtio/virtio_rxtx_simple.c |   2 +-
>  drivers/net/virtio/virtqueue.h          |  11 ++++
>  lib/Makefile                            |   3 +-
>  lib/librte_net/Makefile                 |   1 +
>  lib/librte_net/rte_arp.c                |  50 ++++++++++++++
>  lib/librte_net/rte_arp.h                |  18 +++++
>  lib/librte_net/rte_net_version.map      |   6 ++
>  lib/librte_vhost/Makefile               |   2 +-
>  lib/librte_vhost/virtio_net.c           |  51 +-------------
>  14 files changed, 219 insertions(+), 55 deletions(-)
>  create mode 100644 lib/librte_net/rte_arp.c
> 
> -- 
> 2.15.1