From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id CADE51F5 for ; Thu, 8 Jan 2015 11:07:52 +0100 (CET) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga102.jf.intel.com with ESMTP; 08 Jan 2015 02:05:23 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.07,721,1413270000"; d="scan'208";a="666355623" Received: from kmsmsx153.gar.corp.intel.com ([172.21.73.88]) by orsmga002.jf.intel.com with ESMTP; 08 Jan 2015 02:07:43 -0800 Received: from shsmsx104.ccr.corp.intel.com (10.239.110.15) by KMSMSX153.gar.corp.intel.com (172.21.73.88) with Microsoft SMTP Server (TLS) id 14.3.195.1; Thu, 8 Jan 2015 18:07:43 +0800 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.110]) by SHSMSX104.ccr.corp.intel.com ([169.254.5.182]) with mapi id 14.03.0195.001; Thu, 8 Jan 2015 18:07:35 +0800 From: "Xie, Huawei" To: "Ouyang, Changchun" , "dev@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH v2 3/5] vhost: enable promisc mode and config VMDQ offload register for multicast feature Thread-Index: AQHP8ZiWaTe6iUB4qUqeWNzwnR/mzZy2cCog Date: Thu, 8 Jan 2015 10:07:34 +0000 Message-ID: References: <1408932572-10343-1-git-send-email-changchun.ouyang@intel.com> <1414381533-30370-1-git-send-email-changchun.ouyang@intel.com> <1414381533-30370-4-git-send-email-changchun.ouyang@intel.com> In-Reply-To: <1414381533-30370-4-git-send-email-changchun.ouyang@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH v2 3/5] vhost: enable promisc mode and config VMDQ offload register for multicast feature X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Jan 2015 10:07:53 -0000 > diff --git a/lib/librte_vhost/virtio-net.c b/lib/librte_vhost/virtio-net.= c > index 27ba175..744156c 100644 > --- a/lib/librte_vhost/virtio-net.c > +++ b/lib/librte_vhost/virtio-net.c > @@ -68,7 +68,9 @@ static struct virtio_net_device_ops const *notify_ops; > static struct virtio_net_config_ll *ll_root; >=20 > /* Features supported by this application. RX merge buffers are enabled = by > default. */ > -#define VHOST_SUPPORTED_FEATURES (1ULL << VIRTIO_NET_F_MRG_RXBUF) > +#define VHOST_SUPPORTED_FEATURES ((1ULL << VIRTIO_NET_F_MRG_RXBUF) > | \ > + (1ULL << VIRTIO_NET_F_CTRL_RX)) > + CTRL_RX is dependent on CTRL_VQ. CTRL_VQ should be enabled if CTRL_RX is enabled. Observed that virtio-net driver will crash if CTRL_VQ isn't enabled in vhos= t-user case. /* Caller should know better */ BUG_ON(!virtio_has_feature(vi->vdev, VIRTIO_NET_F_CTRL_VQ) || (out + in > VIRTNET_SEND_COMMAND_SG_MAX));=20 > static uint64_t VHOST_FEATURES =3D VHOST_SUPPORTED_FEATURES; >=20 > /* Line size for reading maps file. */ > -- > 1.8.4.2