List patch comments

GET /api/patches/200/comments/?format=api
HTTP 200 OK
Allow: GET, HEAD, OPTIONS
Content-Type: application/json
Link: 
<http://patches.dpdk.org/api/patches/200/comments/?format=api&page=1>; rel="first",
<http://patches.dpdk.org/api/patches/200/comments/?format=api&page=1>; rel="last"
Vary: Accept
[ { "id": 444, "web_url": "http://patches.dpdk.org/comment/444/", "msgid": "<20140825171303.21e20d8b@uryu.home.lan>", "list_archive_url": "https://inbox.dpdk.org/dev/20140825171303.21e20d8b@uryu.home.lan", "date": "2014-08-26T00:13:03", "subject": "Re: [dpdk-dev] [PATCH 4/5] virtio: New API to enable/disable\n\tmulticast and promisc mode", "submitter": { "id": 27, "url": "http://patches.dpdk.org/api/people/27/?format=api", "name": "Stephen Hemminger", "email": "stephen@networkplumber.org" }, "content": "On Mon, 25 Aug 2014 10:09:31 +0800\nOuyang Changchun <changchun.ouyang@intel.com> wrote:\n\n> This patch adds new API in virtio for supporting promiscuous and allmulticast enabling and disabling.\n> \n> Signed-off-by: Changchun Ouyang <changchun.ouyang@intel.com>\n> Acked-by: Huawei Xie <huawei.xie@intel.com>\n> Acked-by: Cunming Liang <cunming.liang@intel.com>\n> \n> ---\n> lib/librte_pmd_virtio/virtio_ethdev.c | 98 ++++++++++++++++++++++++++++++++++-\n> 1 file changed, 97 insertions(+), 1 deletion(-)\n> \n> diff --git a/lib/librte_pmd_virtio/virtio_ethdev.c b/lib/librte_pmd_virtio/virtio_ethdev.c\n> index 6293ac6..c7f874a 100644\n> --- a/lib/librte_pmd_virtio/virtio_ethdev.c\n> +++ b/lib/librte_pmd_virtio/virtio_ethdev.c\n> @@ -66,6 +66,10 @@ static int eth_virtio_dev_init(struct eth_driver *eth_drv,\n> static int virtio_dev_configure(struct rte_eth_dev *dev);\n> static int virtio_dev_start(struct rte_eth_dev *dev);\n> static void virtio_dev_stop(struct rte_eth_dev *dev);\n> +static void virtio_dev_promiscuous_enable(struct rte_eth_dev *dev);\n> +static void virtio_dev_promiscuous_disable(struct rte_eth_dev *dev);\n> +static void virtio_dev_allmulticast_enable(struct rte_eth_dev *dev);\n> +static void virtio_dev_allmulticast_disable(struct rte_eth_dev *dev);\n> static void virtio_dev_info_get(struct rte_eth_dev *dev,\n> \t\t\t\tstruct rte_eth_dev_info *dev_info);\n> static int virtio_dev_link_update(struct rte_eth_dev *dev,\n> @@ -403,6 +407,94 @@ virtio_dev_close(struct rte_eth_dev *dev)\n> \tvirtio_dev_stop(dev);\n> }\n> \n> +static void\n> +virtio_dev_promiscuous_enable(struct rte_eth_dev *dev)\n> +{\n> +\tstruct virtio_hw *hw\n> +\t\t= VIRTIO_DEV_PRIVATE_TO_HW(dev->data->dev_private);\n> +\tstruct virtio_pmd_ctrl ctrl;\n> +\tint dlen[1];\n> +\tint ret;\n> +\n> +\tctrl.hdr.class = VIRTIO_NET_CTRL_RX;\n> +\tctrl.hdr.cmd = VIRTIO_NET_CTRL_RX_PROMISC;\n> +\tctrl.data[0] = 1;\n> +\tdlen[0] = 1;\n> +\n> +\tret = virtio_send_command(hw->cvq, &ctrl, dlen, 1);\n> +\n> +\tif (ret) {\n> +\t\tPMD_INIT_LOG(ERR, \"Promisc enabling but send command \"\n> +\t\t\t \"failed, this is too late now...\\n\");\n> +\t}\n> +}\n> +\n> +static void\n> +virtio_dev_promiscuous_disable(struct rte_eth_dev *dev)\n> +{\n> +\tstruct virtio_hw *hw\n> +\t\t= VIRTIO_DEV_PRIVATE_TO_HW(dev->data->dev_private);\n> +\tstruct virtio_pmd_ctrl ctrl;\n> +\tint dlen[1];\n> +\tint ret;\n> +\n> +\tctrl.hdr.class = VIRTIO_NET_CTRL_RX;\n> +\tctrl.hdr.cmd = VIRTIO_NET_CTRL_RX_PROMISC;\n> +\tctrl.data[0] = 0;\n> +\tdlen[0] = 1;\n> +\n> +\tret = virtio_send_command(hw->cvq, &ctrl, dlen, 1);\n> +\n> +\tif (ret) {\n> +\t\tPMD_INIT_LOG(ERR, \"Promisc disabling but send command \"\n> +\t\t\t \"failed, this is too late now...\\n\");\n> +\t}\n> +}\n> +\n> +static void\n> +virtio_dev_allmulticast_enable(struct rte_eth_dev *dev)\n> +{\n> +\tstruct virtio_hw *hw\n> +\t\t= VIRTIO_DEV_PRIVATE_TO_HW(dev->data->dev_private);\n> +\tstruct virtio_pmd_ctrl ctrl;\n> +\tint dlen[1];\n> +\tint ret;\n> +\n> +\tctrl.hdr.class = VIRTIO_NET_CTRL_RX;\n> +\tctrl.hdr.cmd = VIRTIO_NET_CTRL_RX_ALLMULTI;\n> +\tctrl.data[0] = 1;\n> +\tdlen[0] = 1;\n> +\n> +\tret = virtio_send_command(hw->cvq, &ctrl, dlen, 1);\n> +\n> +\tif (ret) {\n> +\t\tPMD_INIT_LOG(ERR, \"Promisc enabling but send command \"\n> +\t\t\t \"failed, this is too late now...\\n\");\n> +\t}\n> +}\n> +\n> +static void\n> +virtio_dev_allmulticast_disable(struct rte_eth_dev *dev)\n> +{\n> +\tstruct virtio_hw *hw\n> +\t\t= VIRTIO_DEV_PRIVATE_TO_HW(dev->data->dev_private);\n> +\tstruct virtio_pmd_ctrl ctrl;\n> +\tint dlen[1];\n> +\tint ret;\n> +\n> +\tctrl.hdr.class = VIRTIO_NET_CTRL_RX;\n> +\tctrl.hdr.cmd = VIRTIO_NET_CTRL_RX_ALLMULTI;\n> +\tctrl.data[0] = 0;\n> +\tdlen[0] = 1;\n> +\n> +\tret = virtio_send_command(hw->cvq, &ctrl, dlen, 1);\n> +\n> +\tif (ret) {\n> +\t\tPMD_INIT_LOG(ERR, \"Promisc disabling but send command \"\n> +\t\t\t \"failed, this is too late now...\\n\");\n> +\t}\n> +}\n> +\n> /*\n> * dev_ops for virtio, bare necessities for basic operation\n> */\n> @@ -411,6 +503,10 @@ static struct eth_dev_ops virtio_eth_dev_ops = {\n> \t.dev_start = virtio_dev_start,\n> \t.dev_stop = virtio_dev_stop,\n> \t.dev_close = virtio_dev_close,\n> +\t.promiscuous_enable = virtio_dev_promiscuous_enable,\n> +\t.promiscuous_disable = virtio_dev_promiscuous_disable,\n> +\t.allmulticast_enable = virtio_dev_allmulticast_enable,\n> +\t.allmulticast_disable = virtio_dev_allmulticast_disable,\n> \n> \t.dev_infos_get = virtio_dev_info_get,\n> \t.stats_get = virtio_dev_stats_get,\n> @@ -561,7 +657,7 @@ virtio_negotiate_features(struct virtio_hw *hw)\n> {\n> \tuint32_t host_features, mask;\n> \n> -\tmask = VIRTIO_NET_F_CTRL_RX | VIRTIO_NET_F_CTRL_VLAN;\n> +\tmask = VIRTIO_NET_F_CTRL_VLAN;\n> \tmask |= VIRTIO_NET_F_CSUM | VIRTIO_NET_F_GUEST_CSUM;\n> \n> \t/* TSO and LRO are only available when their corresponding\n\nI have similar patches, but you really need to fix the driver\nso that control queue is brought up on dev_init, not start.\nIt makes sense to allow code to change modes independent of whether\ndriver has been started or not.\n\nAlso, the virtio driver is doing reset on stop. This may not be\nbest solution because it conflicts with what Linux driver is doing.\n\nAnother current bug is that virtio DPDK driver is broken on latest\nKVM. It works with Debian stable, but not with Debian testing.\nToo busy to investigate further.", "headers": { "Return-Path": "<stephen@networkplumber.org>", "Received": [ "from mail-pd0-f181.google.com (mail-pd0-f181.google.com\n\t[209.85.192.181]) by dpdk.org (Postfix) with ESMTP id 82A1E3975\n\tfor <dev@dpdk.org>; Tue, 26 Aug 2014 02:09:13 +0200 (CEST)", "by mail-pd0-f181.google.com with SMTP id g10so20968271pdj.40\n\tfor <dev@dpdk.org>; Mon, 25 Aug 2014 17:13:09 -0700 (PDT)", "from uryu.home.lan (static-50-53-65-80.bvtn.or.frontiernet.net.\n\t[50.53.65.80]) by mx.google.com with ESMTPSA id\n\tnn5sm1021024pbc.26.2014.08.25.17.13.09 for <multiple recipients>\n\t(version=TLSv1.2 cipher=RC4-SHA bits=128/128);\n\tMon, 25 Aug 2014 17:13:09 -0700 (PDT)" ], "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20130820;\n\th=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to\n\t:references:mime-version:content-type:content-transfer-encoding;\n\tbh=zMj6pPecMbyTBKR78RagbDA52zkQm8QAlz/CO9WQiKs=;\n\tb=BwmWVDV1kb5GXWaBYYnH+xhM8FfW3jyaJRiJfI7x/Nreths+lb+lM5mqh0rdpdHsYN\n\tCAa/XYqX0Br3JpXFQqF6MGuL72tSFtIaG9N5zyp9nypCgXS4n2JuvP/muEaGR+AkQ0tc\n\tlmVyL/FQR+WXwQjpsuFjeRYtG0SA+Z39ECLA/aEE82Kp1f835pg/1pkld2barI+x03XL\n\tzJNEzybG7wDQmzrsAULA8uZdpDSUAvzhPViXXl4/YwqhgXLgjNioFa2DTkbm4oM+CGOe\n\tARSxRv5ErOxGp1xC3H+spEuEqmje3Tn2drmoII2OAYNw4ZQaY/V+It/zDGE8jaJiJ65y\n\tc9zg==", "X-Gm-Message-State": "ALoCoQlIgA0SrQXp6zILJrgmCOnSs9Rm72qcF6z4yz4QOu3i094IUy6tGSs6IOZPC0FBbNMJ309d", "X-Received": "by 10.70.102.200 with SMTP id fq8mr8692131pdb.152.1409011989764; \n\tMon, 25 Aug 2014 17:13:09 -0700 (PDT)", "Date": "Mon, 25 Aug 2014 17:13:03 -0700", "From": "Stephen Hemminger <stephen@networkplumber.org>", "To": "Ouyang Changchun <changchun.ouyang@intel.com>", "Message-ID": "<20140825171303.21e20d8b@uryu.home.lan>", "In-Reply-To": "<1408932572-10343-5-git-send-email-changchun.ouyang@intel.com>", "References": "<1408932572-10343-1-git-send-email-changchun.ouyang@intel.com>\n\t<1408932572-10343-5-git-send-email-changchun.ouyang@intel.com>", "X-Mailer": "Claws Mail 3.8.1 (GTK+ 2.24.10; x86_64-pc-linux-gnu)", "Mime-Version": "1.0", "Content-Type": "text/plain; charset=US-ASCII", "Content-Transfer-Encoding": "7bit", "Cc": "dev@dpdk.org", "Subject": "Re: [dpdk-dev] [PATCH 4/5] virtio: New API to enable/disable\n\tmulticast and promisc mode", "X-BeenThere": "dev@dpdk.org", "X-Mailman-Version": "2.1.15", "Precedence": "list", "List-Id": "patches and discussions about DPDK <dev.dpdk.org>", "List-Unsubscribe": "<http://dpdk.org/ml/options/dev>,\n\t<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": "<http://dpdk.org/ml/listinfo/dev>,\n\t<mailto:dev-request@dpdk.org?subject=subscribe>", "X-List-Received-Date": "Tue, 26 Aug 2014 00:09:14 -0000" }, "addressed": null }, { "id": 447, "web_url": "http://patches.dpdk.org/comment/447/", "msgid": "<F52918179C57134FAEC9EA62FA2F96251183AFD6@shsmsx102.ccr.corp.intel.com>", "list_archive_url": "https://inbox.dpdk.org/dev/F52918179C57134FAEC9EA62FA2F96251183AFD6@shsmsx102.ccr.corp.intel.com", "date": "2014-08-26T01:05:16", "subject": "Re: [dpdk-dev] [PATCH 4/5] virtio: New API to enable/disable\n\tmulticast and promisc mode", "submitter": { "id": 31, "url": "http://patches.dpdk.org/api/people/31/?format=api", "name": "Ouyang Changchun", "email": "changchun.ouyang@intel.com" }, "content": "Hi Stephen,\n\nMy response below.\n\nThanks \nChangchun\n\n\n> -----Original Message-----\n> From: Stephen Hemminger [mailto:stephen@networkplumber.org]\n> Sent: Tuesday, August 26, 2014 8:13 AM\n> To: Ouyang, Changchun\n> Cc: dev@dpdk.org\n> Subject: Re: [dpdk-dev] [PATCH 4/5] virtio: New API to enable/disable\n> multicast and promisc mode\n> \n> On Mon, 25 Aug 2014 10:09:31 +0800\n> Ouyang Changchun <changchun.ouyang@intel.com> wrote:\n> \n> > This patch adds new API in virtio for supporting promiscuous and\n> allmulticast enabling and disabling.\n> >\n> > Signed-off-by: Changchun Ouyang <changchun.ouyang@intel.com>\n> > Acked-by: Huawei Xie <huawei.xie@intel.com>\n> > Acked-by: Cunming Liang <cunming.liang@intel.com>\n> >\n> > ---\n> > lib/librte_pmd_virtio/virtio_ethdev.c | 98\n> > ++++++++++++++++++++++++++++++++++-\n> > 1 file changed, 97 insertions(+), 1 deletion(-)\n> >\n> > diff --git a/lib/librte_pmd_virtio/virtio_ethdev.c\n> > b/lib/librte_pmd_virtio/virtio_ethdev.c\n> > index 6293ac6..c7f874a 100644\n> > --- a/lib/librte_pmd_virtio/virtio_ethdev.c\n> > +++ b/lib/librte_pmd_virtio/virtio_ethdev.c\n> > @@ -66,6 +66,10 @@ static int eth_virtio_dev_init(struct eth_driver\n> > *eth_drv, static int virtio_dev_configure(struct rte_eth_dev *dev);\n> > static int virtio_dev_start(struct rte_eth_dev *dev); static void\n> > virtio_dev_stop(struct rte_eth_dev *dev);\n> > +static void virtio_dev_promiscuous_enable(struct rte_eth_dev *dev);\n> > +static void virtio_dev_promiscuous_disable(struct rte_eth_dev *dev);\n> > +static void virtio_dev_allmulticast_enable(struct rte_eth_dev *dev);\n> > +static void virtio_dev_allmulticast_disable(struct rte_eth_dev *dev);\n> > static void virtio_dev_info_get(struct rte_eth_dev *dev,\n> > \t\t\t\tstruct rte_eth_dev_info *dev_info); static\n> int\n> > virtio_dev_link_update(struct rte_eth_dev *dev, @@ -403,6 +407,94 @@\n> > virtio_dev_close(struct rte_eth_dev *dev)\n> > \tvirtio_dev_stop(dev);\n> > }\n> >\n> > +static void\n> > +virtio_dev_promiscuous_enable(struct rte_eth_dev *dev) {\n> > +\tstruct virtio_hw *hw\n> > +\t\t= VIRTIO_DEV_PRIVATE_TO_HW(dev->data->dev_private);\n> > +\tstruct virtio_pmd_ctrl ctrl;\n> > +\tint dlen[1];\n> > +\tint ret;\n> > +\n> > +\tctrl.hdr.class = VIRTIO_NET_CTRL_RX;\n> > +\tctrl.hdr.cmd = VIRTIO_NET_CTRL_RX_PROMISC;\n> > +\tctrl.data[0] = 1;\n> > +\tdlen[0] = 1;\n> > +\n> > +\tret = virtio_send_command(hw->cvq, &ctrl, dlen, 1);\n> > +\n> > +\tif (ret) {\n> > +\t\tPMD_INIT_LOG(ERR, \"Promisc enabling but send command \"\n> > +\t\t\t \"failed, this is too late now...\\n\");\n> > +\t}\n> > +}\n> > +\n> > +static void\n> > +virtio_dev_promiscuous_disable(struct rte_eth_dev *dev) {\n> > +\tstruct virtio_hw *hw\n> > +\t\t= VIRTIO_DEV_PRIVATE_TO_HW(dev->data->dev_private);\n> > +\tstruct virtio_pmd_ctrl ctrl;\n> > +\tint dlen[1];\n> > +\tint ret;\n> > +\n> > +\tctrl.hdr.class = VIRTIO_NET_CTRL_RX;\n> > +\tctrl.hdr.cmd = VIRTIO_NET_CTRL_RX_PROMISC;\n> > +\tctrl.data[0] = 0;\n> > +\tdlen[0] = 1;\n> > +\n> > +\tret = virtio_send_command(hw->cvq, &ctrl, dlen, 1);\n> > +\n> > +\tif (ret) {\n> > +\t\tPMD_INIT_LOG(ERR, \"Promisc disabling but send command \"\n> > +\t\t\t \"failed, this is too late now...\\n\");\n> > +\t}\n> > +}\n> > +\n> > +static void\n> > +virtio_dev_allmulticast_enable(struct rte_eth_dev *dev) {\n> > +\tstruct virtio_hw *hw\n> > +\t\t= VIRTIO_DEV_PRIVATE_TO_HW(dev->data->dev_private);\n> > +\tstruct virtio_pmd_ctrl ctrl;\n> > +\tint dlen[1];\n> > +\tint ret;\n> > +\n> > +\tctrl.hdr.class = VIRTIO_NET_CTRL_RX;\n> > +\tctrl.hdr.cmd = VIRTIO_NET_CTRL_RX_ALLMULTI;\n> > +\tctrl.data[0] = 1;\n> > +\tdlen[0] = 1;\n> > +\n> > +\tret = virtio_send_command(hw->cvq, &ctrl, dlen, 1);\n> > +\n> > +\tif (ret) {\n> > +\t\tPMD_INIT_LOG(ERR, \"Promisc enabling but send command \"\n> > +\t\t\t \"failed, this is too late now...\\n\");\n> > +\t}\n> > +}\n> > +\n> > +static void\n> > +virtio_dev_allmulticast_disable(struct rte_eth_dev *dev) {\n> > +\tstruct virtio_hw *hw\n> > +\t\t= VIRTIO_DEV_PRIVATE_TO_HW(dev->data->dev_private);\n> > +\tstruct virtio_pmd_ctrl ctrl;\n> > +\tint dlen[1];\n> > +\tint ret;\n> > +\n> > +\tctrl.hdr.class = VIRTIO_NET_CTRL_RX;\n> > +\tctrl.hdr.cmd = VIRTIO_NET_CTRL_RX_ALLMULTI;\n> > +\tctrl.data[0] = 0;\n> > +\tdlen[0] = 1;\n> > +\n> > +\tret = virtio_send_command(hw->cvq, &ctrl, dlen, 1);\n> > +\n> > +\tif (ret) {\n> > +\t\tPMD_INIT_LOG(ERR, \"Promisc disabling but send command \"\n> > +\t\t\t \"failed, this is too late now...\\n\");\n> > +\t}\n> > +}\n> > +\n> > /*\n> > * dev_ops for virtio, bare necessities for basic operation\n> > */\n> > @@ -411,6 +503,10 @@ static struct eth_dev_ops virtio_eth_dev_ops = {\n> > \t.dev_start = virtio_dev_start,\n> > \t.dev_stop = virtio_dev_stop,\n> > \t.dev_close = virtio_dev_close,\n> > +\t.promiscuous_enable = virtio_dev_promiscuous_enable,\n> > +\t.promiscuous_disable = virtio_dev_promiscuous_disable,\n> > +\t.allmulticast_enable = virtio_dev_allmulticast_enable,\n> > +\t.allmulticast_disable = virtio_dev_allmulticast_disable,\n> >\n> > \t.dev_infos_get = virtio_dev_info_get,\n> > \t.stats_get = virtio_dev_stats_get,\n> > @@ -561,7 +657,7 @@ virtio_negotiate_features(struct virtio_hw *hw) {\n> > \tuint32_t host_features, mask;\n> >\n> > -\tmask = VIRTIO_NET_F_CTRL_RX | VIRTIO_NET_F_CTRL_VLAN;\n> > +\tmask = VIRTIO_NET_F_CTRL_VLAN;\n> > \tmask |= VIRTIO_NET_F_CSUM | VIRTIO_NET_F_GUEST_CSUM;\n> >\n> > \t/* TSO and LRO are only available when their corresponding\n> \n> I have similar patches, but you really need to fix the driver so that control\n> queue is brought up on dev_init, not start.\n> It makes sense to allow code to change modes independent of whether\n> driver has been started or not.\n> \n> Also, the virtio driver is doing reset on stop. This may not be best solution\n> because it conflicts with what Linux driver is doing.\n> \nYes, agree with you on these 2 existing issues, but I'd like to use a separate patch to fix them,\nAnd let this patch focus on multicast feature.\n\nIf you have already a patch to fix them, that's great.\n\n> Another current bug is that virtio DPDK driver is broken on latest KVM. It\n> works with Debian stable, but not with Debian testing.\n> Too busy to investigate further.\n\nIs this bug introduced by this patch or it is an existing bug?\nIf it is introduced by this patch, a v2 patch is necessary,\nOtherwise, a separate patch is suggested.", "headers": { "Return-Path": "<changchun.ouyang@intel.com>", "Received": [ "from mga01.intel.com (mga01.intel.com [192.55.52.88])\n\tby dpdk.org (Postfix) with ESMTP id 82D9CB36D\n\tfor <dev@dpdk.org>; Tue, 26 Aug 2014 03:01:23 +0200 (CEST)", "from fmsmga003.fm.intel.com ([10.253.24.29])\n\tby fmsmga101.fm.intel.com with ESMTP; 25 Aug 2014 18:05:19 -0700", "from fmsmsx105.amr.corp.intel.com ([10.18.124.203])\n\tby FMSMGA003.fm.intel.com with ESMTP; 25 Aug 2014 18:01:12 -0700", "from shsmsx152.ccr.corp.intel.com (10.239.6.52) by\n\tFMSMSX105.amr.corp.intel.com (10.18.124.203) with Microsoft SMTP\n\tServer (TLS) id 14.3.195.1; Mon, 25 Aug 2014 18:05:19 -0700", "from shsmsx102.ccr.corp.intel.com ([169.254.2.246]) by\n\tSHSMSX152.ccr.corp.intel.com ([169.254.6.147]) with mapi id\n\t14.03.0195.001; Tue, 26 Aug 2014 09:05:17 +0800" ], "X-ExtLoop1": "1", "X-IronPort-AV": "E=Sophos;i=\"4.97,862,1389772800\"; d=\"scan'208\";a=\"376910332\"", "From": "\"Ouyang, Changchun\" <changchun.ouyang@intel.com>", "To": "Stephen Hemminger <stephen@networkplumber.org>", "Thread-Topic": "[dpdk-dev] [PATCH 4/5] virtio: New API to enable/disable\n\tmulticast and promisc mode", "Thread-Index": "AQHPwAmwIk65bWSexE+vSBXOCe0wT5vhftGAgACSYyA=", "Date": "Tue, 26 Aug 2014 01:05:16 +0000", "Message-ID": "<F52918179C57134FAEC9EA62FA2F96251183AFD6@shsmsx102.ccr.corp.intel.com>", "References": "<1408932572-10343-1-git-send-email-changchun.ouyang@intel.com>\n\t<1408932572-10343-5-git-send-email-changchun.ouyang@intel.com>\n\t<20140825171303.21e20d8b@uryu.home.lan>", "In-Reply-To": "<20140825171303.21e20d8b@uryu.home.lan>", "Accept-Language": "zh-CN, 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", "Cc": "\"dev@dpdk.org\" <dev@dpdk.org>", "Subject": "Re: [dpdk-dev] [PATCH 4/5] virtio: New API to enable/disable\n\tmulticast and promisc mode", "X-BeenThere": "dev@dpdk.org", "X-Mailman-Version": "2.1.15", "Precedence": "list", "List-Id": "patches and discussions about DPDK <dev.dpdk.org>", "List-Unsubscribe": "<http://dpdk.org/ml/options/dev>,\n\t<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": "<http://dpdk.org/ml/listinfo/dev>,\n\t<mailto:dev-request@dpdk.org?subject=subscribe>", "X-List-Received-Date": "Tue, 26 Aug 2014 01:01:24 -0000" }, "addressed": null }, { "id": 448, "web_url": "http://patches.dpdk.org/comment/448/", "msgid": "<20140825182604.7a8ab935@urahara>", "list_archive_url": "https://inbox.dpdk.org/dev/20140825182604.7a8ab935@urahara", "date": "2014-08-26T01:26:04", "subject": "Re: [dpdk-dev] [PATCH 4/5] virtio: New API to enable/disable\n\tmulticast and promisc mode", "submitter": { "id": 27, "url": "http://patches.dpdk.org/api/people/27/?format=api", "name": "Stephen Hemminger", "email": "stephen@networkplumber.org" }, "content": "On Tue, 26 Aug 2014 01:05:16 +0000\n\"Ouyang, Changchun\" <changchun.ouyang@intel.com> wrote:\n\n> Hi Stephen,\n> \n> My response below.\n> \n> Thanks \n> Changchun\n> \n> \n> > -----Original Message-----\n> > From: Stephen Hemminger [mailto:stephen@networkplumber.org]\n> > Sent: Tuesday, August 26, 2014 8:13 AM\n> > To: Ouyang, Changchun\n> > Cc: dev@dpdk.org\n> > Subject: Re: [dpdk-dev] [PATCH 4/5] virtio: New API to enable/disable\n> > multicast and promisc mode\n> > \n> > On Mon, 25 Aug 2014 10:09:31 +0800\n> > Ouyang Changchun <changchun.ouyang@intel.com> wrote:\n> > \n> > > This patch adds new API in virtio for supporting promiscuous and\n> > allmulticast enabling and disabling.\n> > >\n> > > Signed-off-by: Changchun Ouyang <changchun.ouyang@intel.com>\n> > > Acked-by: Huawei Xie <huawei.xie@intel.com>\n> > > Acked-by: Cunming Liang <cunming.liang@intel.com>\n> > >\n> > > ---\n> > > lib/librte_pmd_virtio/virtio_ethdev.c | 98\n> > > ++++++++++++++++++++++++++++++++++-\n> > > 1 file changed, 97 insertions(+), 1 deletion(-)\n> > >\n> > > diff --git a/lib/librte_pmd_virtio/virtio_ethdev.c\n> > > b/lib/librte_pmd_virtio/virtio_ethdev.c\n> > > index 6293ac6..c7f874a 100644\n> > > --- a/lib/librte_pmd_virtio/virtio_ethdev.c\n> > > +++ b/lib/librte_pmd_virtio/virtio_ethdev.c\n> > > @@ -66,6 +66,10 @@ static int eth_virtio_dev_init(struct eth_driver\n> > > *eth_drv, static int virtio_dev_configure(struct rte_eth_dev *dev);\n> > > static int virtio_dev_start(struct rte_eth_dev *dev); static void\n> > > virtio_dev_stop(struct rte_eth_dev *dev);\n> > > +static void virtio_dev_promiscuous_enable(struct rte_eth_dev *dev);\n> > > +static void virtio_dev_promiscuous_disable(struct rte_eth_dev *dev);\n> > > +static void virtio_dev_allmulticast_enable(struct rte_eth_dev *dev);\n> > > +static void virtio_dev_allmulticast_disable(struct rte_eth_dev *dev);\n> > > static void virtio_dev_info_get(struct rte_eth_dev *dev,\n> > > \t\t\t\tstruct rte_eth_dev_info *dev_info); static\n> > int\n> > > virtio_dev_link_update(struct rte_eth_dev *dev, @@ -403,6 +407,94 @@\n> > > virtio_dev_close(struct rte_eth_dev *dev)\n> > > \tvirtio_dev_stop(dev);\n> > > }\n> > >\n> > > +static void\n> > > +virtio_dev_promiscuous_enable(struct rte_eth_dev *dev) {\n> > > +\tstruct virtio_hw *hw\n> > > +\t\t= VIRTIO_DEV_PRIVATE_TO_HW(dev->data->dev_private);\n> > > +\tstruct virtio_pmd_ctrl ctrl;\n> > > +\tint dlen[1];\n> > > +\tint ret;\n> > > +\n> > > +\tctrl.hdr.class = VIRTIO_NET_CTRL_RX;\n> > > +\tctrl.hdr.cmd = VIRTIO_NET_CTRL_RX_PROMISC;\n> > > +\tctrl.data[0] = 1;\n> > > +\tdlen[0] = 1;\n> > > +\n> > > +\tret = virtio_send_command(hw->cvq, &ctrl, dlen, 1);\n> > > +\n> > > +\tif (ret) {\n> > > +\t\tPMD_INIT_LOG(ERR, \"Promisc enabling but send command \"\n> > > +\t\t\t \"failed, this is too late now...\\n\");\n> > > +\t}\n> > > +}\n> > > +\n> > > +static void\n> > > +virtio_dev_promiscuous_disable(struct rte_eth_dev *dev) {\n> > > +\tstruct virtio_hw *hw\n> > > +\t\t= VIRTIO_DEV_PRIVATE_TO_HW(dev->data->dev_private);\n> > > +\tstruct virtio_pmd_ctrl ctrl;\n> > > +\tint dlen[1];\n> > > +\tint ret;\n> > > +\n> > > +\tctrl.hdr.class = VIRTIO_NET_CTRL_RX;\n> > > +\tctrl.hdr.cmd = VIRTIO_NET_CTRL_RX_PROMISC;\n> > > +\tctrl.data[0] = 0;\n> > > +\tdlen[0] = 1;\n> > > +\n> > > +\tret = virtio_send_command(hw->cvq, &ctrl, dlen, 1);\n> > > +\n> > > +\tif (ret) {\n> > > +\t\tPMD_INIT_LOG(ERR, \"Promisc disabling but send command \"\n> > > +\t\t\t \"failed, this is too late now...\\n\");\n> > > +\t}\n> > > +}\n> > > +\n> > > +static void\n> > > +virtio_dev_allmulticast_enable(struct rte_eth_dev *dev) {\n> > > +\tstruct virtio_hw *hw\n> > > +\t\t= VIRTIO_DEV_PRIVATE_TO_HW(dev->data->dev_private);\n> > > +\tstruct virtio_pmd_ctrl ctrl;\n> > > +\tint dlen[1];\n> > > +\tint ret;\n> > > +\n> > > +\tctrl.hdr.class = VIRTIO_NET_CTRL_RX;\n> > > +\tctrl.hdr.cmd = VIRTIO_NET_CTRL_RX_ALLMULTI;\n> > > +\tctrl.data[0] = 1;\n> > > +\tdlen[0] = 1;\n> > > +\n> > > +\tret = virtio_send_command(hw->cvq, &ctrl, dlen, 1);\n> > > +\n> > > +\tif (ret) {\n> > > +\t\tPMD_INIT_LOG(ERR, \"Promisc enabling but send command \"\n> > > +\t\t\t \"failed, this is too late now...\\n\");\n> > > +\t}\n> > > +}\n> > > +\n> > > +static void\n> > > +virtio_dev_allmulticast_disable(struct rte_eth_dev *dev) {\n> > > +\tstruct virtio_hw *hw\n> > > +\t\t= VIRTIO_DEV_PRIVATE_TO_HW(dev->data->dev_private);\n> > > +\tstruct virtio_pmd_ctrl ctrl;\n> > > +\tint dlen[1];\n> > > +\tint ret;\n> > > +\n> > > +\tctrl.hdr.class = VIRTIO_NET_CTRL_RX;\n> > > +\tctrl.hdr.cmd = VIRTIO_NET_CTRL_RX_ALLMULTI;\n> > > +\tctrl.data[0] = 0;\n> > > +\tdlen[0] = 1;\n> > > +\n> > > +\tret = virtio_send_command(hw->cvq, &ctrl, dlen, 1);\n> > > +\n> > > +\tif (ret) {\n> > > +\t\tPMD_INIT_LOG(ERR, \"Promisc disabling but send command \"\n> > > +\t\t\t \"failed, this is too late now...\\n\");\n> > > +\t}\n> > > +}\n> > > +\n> > > /*\n> > > * dev_ops for virtio, bare necessities for basic operation\n> > > */\n> > > @@ -411,6 +503,10 @@ static struct eth_dev_ops virtio_eth_dev_ops = {\n> > > \t.dev_start = virtio_dev_start,\n> > > \t.dev_stop = virtio_dev_stop,\n> > > \t.dev_close = virtio_dev_close,\n> > > +\t.promiscuous_enable = virtio_dev_promiscuous_enable,\n> > > +\t.promiscuous_disable = virtio_dev_promiscuous_disable,\n> > > +\t.allmulticast_enable = virtio_dev_allmulticast_enable,\n> > > +\t.allmulticast_disable = virtio_dev_allmulticast_disable,\n> > >\n> > > \t.dev_infos_get = virtio_dev_info_get,\n> > > \t.stats_get = virtio_dev_stats_get,\n> > > @@ -561,7 +657,7 @@ virtio_negotiate_features(struct virtio_hw *hw) {\n> > > \tuint32_t host_features, mask;\n> > >\n> > > -\tmask = VIRTIO_NET_F_CTRL_RX | VIRTIO_NET_F_CTRL_VLAN;\n> > > +\tmask = VIRTIO_NET_F_CTRL_VLAN;\n> > > \tmask |= VIRTIO_NET_F_CSUM | VIRTIO_NET_F_GUEST_CSUM;\n> > >\n> > > \t/* TSO and LRO are only available when their corresponding\n> > \n> > I have similar patches, but you really need to fix the driver so that control\n> > queue is brought up on dev_init, not start.\n> > It makes sense to allow code to change modes independent of whether\n> > driver has been started or not.\n> > \n> > Also, the virtio driver is doing reset on stop. This may not be best solution\n> > because it conflicts with what Linux driver is doing.\n> > \n> Yes, agree with you on these 2 existing issues, but I'd like to use a separate patch to fix them,\n> And let this patch focus on multicast feature.\n> \n> If you have already a patch to fix them, that's great.\n> \n> > Another current bug is that virtio DPDK driver is broken on latest KVM. It\n> > works with Debian stable, but not with Debian testing.\n> > Too busy to investigate further.\n> \n> Is this bug introduced by this patch or it is an existing bug?\n> If it is introduced by this patch, a v2 patch is necessary,\n> Otherwise, a separate patch is suggested.\n\nIt is an existing bug (in KVM). Not getting warm response from upstream.", "headers": { "Return-Path": "<stephen@networkplumber.org>", "Received": [ "from mail-pd0-f175.google.com (mail-pd0-f175.google.com\n\t[209.85.192.175]) by dpdk.org (Postfix) with ESMTP id 585E7B36D\n\tfor <dev@dpdk.org>; Tue, 26 Aug 2014 03:22:11 +0200 (CEST)", "by mail-pd0-f175.google.com with SMTP id r10so20996592pdi.6\n\tfor <dev@dpdk.org>; Mon, 25 Aug 2014 18:26:07 -0700 (PDT)", "from urahara (static-50-53-65-80.bvtn.or.frontiernet.net.\n\t[50.53.65.80]) by mx.google.com with ESMTPSA id\n\tfk5sm1095097pbc.53.2014.08.25.18.26.07 for <multiple recipients>\n\t(version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tMon, 25 Aug 2014 18:26:07 -0700 (PDT)" ], "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20130820;\n\th=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to\n\t:references:mime-version:content-type:content-transfer-encoding;\n\tbh=oBD3f0XqWC13caYmsLR94VV5WHBf2Wm6ecTuvtPFb6I=;\n\tb=atub3XIj7WeSGP4E4CVBJChKuzf+nYbScnNTpl5UD2ik2OC1rmSG/3x/c6T863TOFL\n\t7Ycu5TtggujtVJWWHO+cK8qHNajNgQ3qcd1X7UOQJGj4SMx+SRc7mMSgcYqn1pZBi+H0\n\t0uBSbOORgzdm//3WrRt75CRXohc/sTIvtuOtimooIlpkUCChPd0n5kJkF0LVXRiShOza\n\tgL6Yvsl70npqWgyqjSSVoL/gHZ4Ji96bq2WIYdzUf/0xFiC90Qp70EQpoGvuR35Ds1ZO\n\tOz409jOllYnGmzaxjgcIckvOYzmPgTJ86Ub83a6RTuRnYA3m8RpEofXAq0nRadFCsYNl\n\tOsRA==", "X-Gm-Message-State": "ALoCoQmS4pjJbh703torc1fg4nj13YIqw2Mql8StbUk83WD5AgulH6oXX8FadYlaiffB4SGY8t02", "X-Received": "by 10.68.223.138 with SMTP id qu10mr32849887pbc.45.1409016367783;\n\tMon, 25 Aug 2014 18:26:07 -0700 (PDT)", "Date": "Mon, 25 Aug 2014 18:26:04 -0700", "From": "Stephen Hemminger <stephen@networkplumber.org>", "To": "\"Ouyang, Changchun\" <changchun.ouyang@intel.com>", "Message-ID": "<20140825182604.7a8ab935@urahara>", "In-Reply-To": "<F52918179C57134FAEC9EA62FA2F96251183AFD6@shsmsx102.ccr.corp.intel.com>", "References": "<1408932572-10343-1-git-send-email-changchun.ouyang@intel.com>\n\t<1408932572-10343-5-git-send-email-changchun.ouyang@intel.com>\n\t<20140825171303.21e20d8b@uryu.home.lan>\n\t<F52918179C57134FAEC9EA62FA2F96251183AFD6@shsmsx102.ccr.corp.intel.com>", "MIME-Version": "1.0", "Content-Type": "text/plain; charset=US-ASCII", "Content-Transfer-Encoding": "7bit", "Cc": "\"dev@dpdk.org\" <dev@dpdk.org>", "Subject": "Re: [dpdk-dev] [PATCH 4/5] virtio: New API to enable/disable\n\tmulticast and promisc mode", "X-BeenThere": "dev@dpdk.org", "X-Mailman-Version": "2.1.15", "Precedence": "list", "List-Id": "patches and discussions about DPDK <dev.dpdk.org>", "List-Unsubscribe": "<http://dpdk.org/ml/options/dev>,\n\t<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": "<http://dpdk.org/ml/listinfo/dev>,\n\t<mailto:dev-request@dpdk.org?subject=subscribe>", "X-List-Received-Date": "Tue, 26 Aug 2014 01:22:11 -0000" }, "addressed": null } ]