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 D058AA00E6 for ; Mon, 2 Sep 2019 08:49:05 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id B264F1DFE1; Mon, 2 Sep 2019 08:49:05 +0200 (CEST) Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by dpdk.org (Postfix) with ESMTP id F37491BFFE; Mon, 2 Sep 2019 08:49:01 +0200 (CEST) X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga106.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 01 Sep 2019 23:49:01 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,457,1559545200"; d="scan'208";a="265946130" Received: from dpdk-virtio-tbie-2.sh.intel.com (HELO ___) ([10.67.104.71]) by orsmga001.jf.intel.com with ESMTP; 01 Sep 2019 23:48:59 -0700 Date: Mon, 2 Sep 2019 14:46:32 +0800 From: Tiwei Bie To: Maxime Coquelin Cc: zhihong.wang@intel.com, amorenoz@redhat.com, xiao.w.wang@intel.com, dev@dpdk.org, jfreimann@redhat.com, stable@dpdk.org Message-ID: <20190902064632.GA15339@___> References: <20190829080000.20806-1-maxime.coquelin@redhat.com> <20190829080000.20806-10-maxime.coquelin@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20190829080000.20806-10-maxime.coquelin@redhat.com> User-Agent: Mutt/1.9.4 (2018-02-28) Subject: Re: [dpdk-stable] [PATCH 09/15] net/virtio: add virtio vDPA op to get protocol features X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" On Thu, Aug 29, 2019 at 09:59:54AM +0200, Maxime Coquelin wrote: > This patch implements the vDPA .get_protocol_features() > callback. > > Signed-off-by: Maxime Coquelin > --- > drivers/net/virtio/virtio_vdpa.c | 13 +++++++++++++ > 1 file changed, 13 insertions(+) > > diff --git a/drivers/net/virtio/virtio_vdpa.c b/drivers/net/virtio/virtio_vdpa.c > index 9e2af8313..fc52a8e92 100644 > --- a/drivers/net/virtio/virtio_vdpa.c > +++ b/drivers/net/virtio/virtio_vdpa.c > @@ -204,9 +204,22 @@ virtio_vdpa_get_features(int did, uint64_t *features) > return 0; > } > > +#define VDPA_SUPPORTED_PROTOCOL_FEATURES \ > + (1ULL << VHOST_USER_PROTOCOL_F_REPLY_ACK | \ > + 1ULL << VHOST_USER_PROTOCOL_F_SLAVE_REQ | \ > + 1ULL << VHOST_USER_PROTOCOL_F_SLAVE_SEND_FD | \ > + 1ULL << VHOST_USER_PROTOCOL_F_HOST_NOTIFIER) Looks better to add an empty line here. > +static int > +virtio_vdpa_get_protocol_features(int did __rte_unused, uint64_t *features) > +{ > + *features = VDPA_SUPPORTED_PROTOCOL_FEATURES; > + return 0; > +} > + > static struct rte_vdpa_dev_ops virtio_vdpa_ops = { > .get_queue_num = virtio_vdpa_get_queue_num, > .get_features = virtio_vdpa_get_features, > + .get_protocol_features = virtio_vdpa_get_protocol_features, > }; > > static inline int > -- > 2.21.0 > Reviewed-by: Tiwei Bie