DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH v1] examples/l2fwd: add check for promiscuous no support
@ 2020-02-26  9:15 Sivaprasad Tummala
  2020-02-26  9:22 ` David Marchand
  0 siblings, 1 reply; 7+ messages in thread
From: Sivaprasad Tummala @ 2020-02-26  9:15 UTC (permalink / raw)
  To: Marko Kovacevic, Ori Kam, Bruce Richardson, Radu Nicolau,
	Akhil Goyal, Tomasz Kantecki, Sunil Kumar Kori, Pavan Nikhilesh
  Cc: dev

l2fwd application exits, if return for rte_eth_promiscuous_enable
is not success. But for vHost PMD, promiscuous enable returns "Not
Supported".

This patch validates success and no support of promiscuous enable.

Signed-off-by: Sivaprasad Tummala <Sivaprasad.Tummala@intel.com>
---
 examples/l2fwd/main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/examples/l2fwd/main.c b/examples/l2fwd/main.c
index 09257aab1..ea9831f07 100644
--- a/examples/l2fwd/main.c
+++ b/examples/l2fwd/main.c
@@ -727,7 +727,7 @@ main(int argc, char **argv)
 		printf("done: \n");
 
 		ret = rte_eth_promiscuous_enable(portid);
-		if (ret != 0)
+		if ((ret != 0) && (ret != -ENOTSUP))
 			rte_exit(EXIT_FAILURE,
 				 "rte_eth_promiscuous_enable:err=%s, port=%u\n",
 				 rte_strerror(-ret), portid);
-- 
2.17.1


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [dpdk-dev] [PATCH v1] examples/l2fwd: add check for promiscuous no support
  2020-02-26  9:15 [dpdk-dev] [PATCH v1] examples/l2fwd: add check for promiscuous no support Sivaprasad Tummala
@ 2020-02-26  9:22 ` David Marchand
  2020-02-26 13:43   ` Ye Xiaolong
  2020-02-26 13:45   ` [dpdk-dev] [PATCH] net/vhost: enable promiscuous and multicast by default Xiaolong Ye
  0 siblings, 2 replies; 7+ messages in thread
From: David Marchand @ 2020-02-26  9:22 UTC (permalink / raw)
  To: Sivaprasad Tummala
  Cc: Marko Kovacevic, Ori Kam, Bruce Richardson, Radu Nicolau,
	Akhil Goyal, Tomasz Kantecki, Sunil Kumar Kori, Pavan Nikhilesh,
	dev, Maxime Coquelin, Xiaolong Ye

On Wed, Feb 26, 2020 at 10:15 AM Sivaprasad Tummala
<Sivaprasad.Tummala@intel.com> wrote:
>
> l2fwd application exits, if return for rte_eth_promiscuous_enable
> is not success. But for vHost PMD, promiscuous enable returns "Not
> Supported".

Could the vhost pmd announce that it is already in promiscuous mode?
Like in f165210321c4 ("drivers/net: enable promiscuous and multicast
by default")


-- 
David Marchand


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [dpdk-dev] [PATCH v1] examples/l2fwd: add check for promiscuous no support
  2020-02-26  9:22 ` David Marchand
@ 2020-02-26 13:43   ` Ye Xiaolong
  2020-04-24 20:33     ` David Marchand
  2020-02-26 13:45   ` [dpdk-dev] [PATCH] net/vhost: enable promiscuous and multicast by default Xiaolong Ye
  1 sibling, 1 reply; 7+ messages in thread
From: Ye Xiaolong @ 2020-02-26 13:43 UTC (permalink / raw)
  To: David Marchand
  Cc: Sivaprasad Tummala, Marko Kovacevic, Ori Kam, Bruce Richardson,
	Radu Nicolau, Akhil Goyal, Tomasz Kantecki, Sunil Kumar Kori,
	Pavan Nikhilesh, dev, Maxime Coquelin

Hi, David

On 02/26, David Marchand wrote:
>On Wed, Feb 26, 2020 at 10:15 AM Sivaprasad Tummala
><Sivaprasad.Tummala@intel.com> wrote:
>>
>> l2fwd application exits, if return for rte_eth_promiscuous_enable
>> is not success. But for vHost PMD, promiscuous enable returns "Not
>> Supported".
>
>Could the vhost pmd announce that it is already in promiscuous mode?
>Like in f165210321c4 ("drivers/net: enable promiscuous and multicast
>by default")

I think it makes sense, I don't see any risk of doing it. I'll cook a patch
for it soon.

Thanks,
Xiaolong

>
>
>-- 
>David Marchand
>

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [dpdk-dev] [PATCH] net/vhost: enable promiscuous and multicast by default
  2020-02-26  9:22 ` David Marchand
  2020-02-26 13:43   ` Ye Xiaolong
@ 2020-02-26 13:45   ` Xiaolong Ye
  2020-03-04  8:03     ` Maxime Coquelin
  2020-04-10 14:44     ` Maxime Coquelin
  1 sibling, 2 replies; 7+ messages in thread
From: Xiaolong Ye @ 2020-02-26 13:45 UTC (permalink / raw)
  To: Maxime Coquelin, Tiwei Bie, Zhihong Wang; +Cc: dev, David Marchand, Xiaolong Ye

With this patch, the promiscuous and multicast fields are initialized as
enabled for vhost PMD by default, this allows the devices to be used when
running applications that attempt to enable promiscuous or multicast mode.
Similar things have done for other virtual PMDs by commit f165210321c4
("drivers/net: enable promiscuous and multicast by default")

Signed-off-by: Xiaolong Ye <xiaolong.ye@intel.com>
---
 drivers/net/vhost/rte_eth_vhost.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/net/vhost/rte_eth_vhost.c b/drivers/net/vhost/rte_eth_vhost.c
index 458ed58f5..fcf317151 100644
--- a/drivers/net/vhost/rte_eth_vhost.c
+++ b/drivers/net/vhost/rte_eth_vhost.c
@@ -1331,6 +1331,8 @@ eth_dev_vhost_create(struct rte_vdev_device *dev, char *iface_name,
 	internal->disable_flags = disable_flags;
 	data->dev_link = pmd_link;
 	data->dev_flags = RTE_ETH_DEV_INTR_LSC | RTE_ETH_DEV_CLOSE_REMOVE;
+	data->promiscuous = 1;
+	data->all_multicast = 1;
 
 	eth_dev->dev_ops = &ops;
 
-- 
2.17.1


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [dpdk-dev] [PATCH] net/vhost: enable promiscuous and multicast by default
  2020-02-26 13:45   ` [dpdk-dev] [PATCH] net/vhost: enable promiscuous and multicast by default Xiaolong Ye
@ 2020-03-04  8:03     ` Maxime Coquelin
  2020-04-10 14:44     ` Maxime Coquelin
  1 sibling, 0 replies; 7+ messages in thread
From: Maxime Coquelin @ 2020-03-04  8:03 UTC (permalink / raw)
  To: Xiaolong Ye, Tiwei Bie, Zhihong Wang; +Cc: dev, David Marchand



On 2/26/20 2:45 PM, Xiaolong Ye wrote:
> With this patch, the promiscuous and multicast fields are initialized as
> enabled for vhost PMD by default, this allows the devices to be used when
> running applications that attempt to enable promiscuous or multicast mode.
> Similar things have done for other virtual PMDs by commit f165210321c4
> ("drivers/net: enable promiscuous and multicast by default")
> 
> Signed-off-by: Xiaolong Ye <xiaolong.ye@intel.com>
> ---
>  drivers/net/vhost/rte_eth_vhost.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/net/vhost/rte_eth_vhost.c b/drivers/net/vhost/rte_eth_vhost.c
> index 458ed58f5..fcf317151 100644
> --- a/drivers/net/vhost/rte_eth_vhost.c
> +++ b/drivers/net/vhost/rte_eth_vhost.c
> @@ -1331,6 +1331,8 @@ eth_dev_vhost_create(struct rte_vdev_device *dev, char *iface_name,
>  	internal->disable_flags = disable_flags;
>  	data->dev_link = pmd_link;
>  	data->dev_flags = RTE_ETH_DEV_INTR_LSC | RTE_ETH_DEV_CLOSE_REMOVE;
> +	data->promiscuous = 1;
> +	data->all_multicast = 1;
>  
>  	eth_dev->dev_ops = &ops;
>  
> 

Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>

Thanks,
Maxime


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [dpdk-dev] [PATCH] net/vhost: enable promiscuous and multicast by default
  2020-02-26 13:45   ` [dpdk-dev] [PATCH] net/vhost: enable promiscuous and multicast by default Xiaolong Ye
  2020-03-04  8:03     ` Maxime Coquelin
@ 2020-04-10 14:44     ` Maxime Coquelin
  1 sibling, 0 replies; 7+ messages in thread
From: Maxime Coquelin @ 2020-04-10 14:44 UTC (permalink / raw)
  To: Xiaolong Ye, Tiwei Bie, Zhihong Wang; +Cc: dev, David Marchand



On 2/26/20 2:45 PM, Xiaolong Ye wrote:
> With this patch, the promiscuous and multicast fields are initialized as
> enabled for vhost PMD by default, this allows the devices to be used when
> running applications that attempt to enable promiscuous or multicast mode.
> Similar things have done for other virtual PMDs by commit f165210321c4
> ("drivers/net: enable promiscuous and multicast by default")
> 
> Signed-off-by: Xiaolong Ye <xiaolong.ye@intel.com>
> ---
>  drivers/net/vhost/rte_eth_vhost.c | 2 ++
>  1 file changed, 2 insertions(+)

Applied to dpdk-next-virtio/master.

Thanks,
Maxime


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [dpdk-dev] [PATCH v1] examples/l2fwd: add check for promiscuous no support
  2020-02-26 13:43   ` Ye Xiaolong
@ 2020-04-24 20:33     ` David Marchand
  0 siblings, 0 replies; 7+ messages in thread
From: David Marchand @ 2020-04-24 20:33 UTC (permalink / raw)
  To: Ye Xiaolong, Sivaprasad Tummala
  Cc: Marko Kovacevic, Ori Kam, Bruce Richardson, Radu Nicolau,
	Akhil Goyal, Tomasz Kantecki, Sunil Kumar Kori, Pavan Nikhilesh,
	dev, Maxime Coquelin

On Wed, Feb 26, 2020 at 2:46 PM Ye Xiaolong <xiaolong.ye@intel.com> wrote:
> On 02/26, David Marchand wrote:
> >On Wed, Feb 26, 2020 at 10:15 AM Sivaprasad Tummala
> ><Sivaprasad.Tummala@intel.com> wrote:
> >>
> >> l2fwd application exits, if return for rte_eth_promiscuous_enable
> >> is not success. But for vHost PMD, promiscuous enable returns "Not
> >> Supported".
> >
> >Could the vhost pmd announce that it is already in promiscuous mode?
> >Like in f165210321c4 ("drivers/net: enable promiscuous and multicast
> >by default")
>
> I think it makes sense, I don't see any risk of doing it. I'll cook a patch
> for it soon.

Now that vhost has been fixed [1], I'll mark this patch as rejected.
1: https://git.dpdk.org/dpdk/commit?id=a2154606ffa6b5ddacbebd8714facc7e2fda3262


Thanks.

-- 
David Marchand


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2020-04-24 20:33 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-26  9:15 [dpdk-dev] [PATCH v1] examples/l2fwd: add check for promiscuous no support Sivaprasad Tummala
2020-02-26  9:22 ` David Marchand
2020-02-26 13:43   ` Ye Xiaolong
2020-04-24 20:33     ` David Marchand
2020-02-26 13:45   ` [dpdk-dev] [PATCH] net/vhost: enable promiscuous and multicast by default Xiaolong Ye
2020-03-04  8:03     ` Maxime Coquelin
2020-04-10 14:44     ` Maxime Coquelin

DPDK patches and discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://inbox.dpdk.org/dev/0 dev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 dev dev/ http://inbox.dpdk.org/dev \
		dev@dpdk.org
	public-inbox-index dev

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.dev


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git