examples/ipv4_multicast: enable multicast promiscuous for all port

Message ID 1539762086-15569-1-git-send-email-wei.zhao1@intel.com (mailing list archive)
State Accepted, archived
Delegated to: Thomas Monjalon
Headers
Series examples/ipv4_multicast: enable multicast promiscuous for all port |

Checks

Context Check Description
ci/Intel-compilation success Compilation OK
ci/checkpatch success coding style OK

Commit Message

Zhao1, Wei Oct. 17, 2018, 7:41 a.m. UTC
  This example has not been enable for receiving multicast
packet, so it will drop multicast packet. Users must send packet
with ether MAC destination address the same as pf port MAC address,
in order to forward packet successfully, but this is an example
for forwarding ipv4 multicastpacket. So calling function
rte_eth_promiscuous_enable() or rte_eth_allmulticast_enable() can
enable promiscuous mode of all multicast packet. And aslo, DPDK has
rte API function of rte_eth_dev_set_mc_addr_list() for setting
specific multicast filter table for specific multicast IP address,
but this example do not support this configuration, so it need to
be enable multicast promiscuous mode instead.

Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
---
 examples/ipv4_multicast/main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Comments

Zhao1, Wei Oct. 17, 2018, 8:09 a.m. UTC | #1
By the way, I think the maintainer's opinion is important for this change,
but there is no maintainer name for this example in file MAINTAINERS!

> -----Original Message-----
> From: Zhao1, Wei
> Sent: Wednesday, October 17, 2018 3:41 PM
> To: dev@dpdk.org
> Cc: stable@dpdk.org; Zhang, Qi Z <qi.z.zhang@intel.com>; Yigit, Ferruh
> <ferruh.yigit@intel.com>; Zhao1, Wei <wei.zhao1@intel.com>
> Subject: [PATCH] examples/ipv4_multicast: enable multicast promiscuous for
> all port
> 
> This example has not been enable for receiving multicast packet, so it will
> drop multicast packet. Users must send packet with ether MAC destination
> address the same as pf port MAC address, in order to forward packet
> successfully, but this is an example for forwarding ipv4 multicastpacket. So
> calling function
> rte_eth_promiscuous_enable() or rte_eth_allmulticast_enable() can enable
> promiscuous mode of all multicast packet. And aslo, DPDK has rte API
> function of rte_eth_dev_set_mc_addr_list() for setting specific multicast
> filter table for specific multicast IP address, but this example do not support
> this configuration, so it need to be enable multicast promiscuous mode
> instead.
> 
> Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
> ---
>  examples/ipv4_multicast/main.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/examples/ipv4_multicast/main.c
> b/examples/ipv4_multicast/main.c index 6530d48..4073a49 100644
> --- a/examples/ipv4_multicast/main.c
> +++ b/examples/ipv4_multicast/main.c
> @@ -773,7 +773,7 @@ main(int argc, char **argv)
>  			qconf->tx_queue_id[portid] = queueid;
>  			queueid++;
>  		}
> -
> +		rte_eth_allmulticast_enable(portid);
>  		/* Start device */
>  		ret = rte_eth_dev_start(portid);
>  		if (ret < 0)
> --
> 2.7.5
  
Zhao1, Wei Oct. 24, 2018, 8:11 a.m. UTC | #2
Add Wang Dong in the mailing list, he has test this patch.


> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Zhao1, Wei
> Sent: Wednesday, October 17, 2018 4:09 PM
> To: dev@dpdk.org
> Cc: stable@dpdk.org; Zhang, Qi Z <qi.z.zhang@intel.com>; Yigit, Ferruh
> <ferruh.yigit@intel.com>
> Subject: Re: [dpdk-dev] [PATCH] examples/ipv4_multicast: enable multicast
> promiscuous for all port
> 
> By the way, I think the maintainer's opinion is important for this change, but
> there is no maintainer name for this example in file MAINTAINERS!
> 
> > -----Original Message-----
> > From: Zhao1, Wei
> > Sent: Wednesday, October 17, 2018 3:41 PM
> > To: dev@dpdk.org
> > Cc: stable@dpdk.org; Zhang, Qi Z <qi.z.zhang@intel.com>; Yigit, Ferruh
> > <ferruh.yigit@intel.com>; Zhao1, Wei <wei.zhao1@intel.com>
> > Subject: [PATCH] examples/ipv4_multicast: enable multicast promiscuous
> > for all port
> >
> > This example has not been enable for receiving multicast packet, so it
> > will drop multicast packet. Users must send packet with ether MAC
> > destination address the same as pf port MAC address, in order to
> > forward packet successfully, but this is an example for forwarding
> > ipv4 multicastpacket. So calling function
> > rte_eth_promiscuous_enable() or rte_eth_allmulticast_enable() can
> > enable promiscuous mode of all multicast packet. And aslo, DPDK has
> > rte API function of rte_eth_dev_set_mc_addr_list() for setting
> > specific multicast filter table for specific multicast IP address, but
> > this example do not support this configuration, so it need to be
> > enable multicast promiscuous mode instead.
> >
> > Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
> > ---
> >  examples/ipv4_multicast/main.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/examples/ipv4_multicast/main.c
> > b/examples/ipv4_multicast/main.c index 6530d48..4073a49 100644
> > --- a/examples/ipv4_multicast/main.c
> > +++ b/examples/ipv4_multicast/main.c
> > @@ -773,7 +773,7 @@ main(int argc, char **argv)
> >  			qconf->tx_queue_id[portid] = queueid;
> >  			queueid++;
> >  		}
> > -
> > +		rte_eth_allmulticast_enable(portid);
> >  		/* Start device */
> >  		ret = rte_eth_dev_start(portid);
> >  		if (ret < 0)
> > --
> > 2.7.5
  
Wang, Dong1 Oct. 24, 2018, 8:50 a.m. UTC | #3
Tested it with 82599 PF.

Acked-by: Wang Dong <dong1.wang@intel.com>

-----Original Message-----
From: Zhao1, Wei 
Sent: Wednesday, October 24, 2018 16:11
To: Zhao1, Wei <wei.zhao1@intel.com>; dev@dpdk.org
Cc: stable@dpdk.org; Zhang, Qi Z <qi.z.zhang@intel.com>; Yigit, Ferruh <ferruh.yigit@intel.com>; Wang, Dong1 <dong1.wang@intel.com>; Thomas Monjalon <thomas@monjalon.net>
Subject: RE: [PATCH] examples/ipv4_multicast: enable multicast promiscuous for all port

Add Wang Dong in the mailing list, he has test this patch.


> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Zhao1, Wei
> Sent: Wednesday, October 17, 2018 4:09 PM
> To: dev@dpdk.org
> Cc: stable@dpdk.org; Zhang, Qi Z <qi.z.zhang@intel.com>; Yigit, Ferruh 
> <ferruh.yigit@intel.com>
> Subject: Re: [dpdk-dev] [PATCH] examples/ipv4_multicast: enable 
> multicast promiscuous for all port
> 
> By the way, I think the maintainer's opinion is important for this 
> change, but there is no maintainer name for this example in file MAINTAINERS!
> 
> > -----Original Message-----
> > From: Zhao1, Wei
> > Sent: Wednesday, October 17, 2018 3:41 PM
> > To: dev@dpdk.org
> > Cc: stable@dpdk.org; Zhang, Qi Z <qi.z.zhang@intel.com>; Yigit, 
> > Ferruh <ferruh.yigit@intel.com>; Zhao1, Wei <wei.zhao1@intel.com>
> > Subject: [PATCH] examples/ipv4_multicast: enable multicast 
> > promiscuous for all port
> >
> > This example has not been enable for receiving multicast packet, so 
> > it will drop multicast packet. Users must send packet with ether MAC 
> > destination address the same as pf port MAC address, in order to 
> > forward packet successfully, but this is an example for forwarding
> > ipv4 multicastpacket. So calling function
> > rte_eth_promiscuous_enable() or rte_eth_allmulticast_enable() can 
> > enable promiscuous mode of all multicast packet. And aslo, DPDK has 
> > rte API function of rte_eth_dev_set_mc_addr_list() for setting 
> > specific multicast filter table for specific multicast IP address, 
> > but this example do not support this configuration, so it need to be 
> > enable multicast promiscuous mode instead.
> >
> > Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
> > ---
> >  examples/ipv4_multicast/main.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/examples/ipv4_multicast/main.c 
> > b/examples/ipv4_multicast/main.c index 6530d48..4073a49 100644
> > --- a/examples/ipv4_multicast/main.c
> > +++ b/examples/ipv4_multicast/main.c
> > @@ -773,7 +773,7 @@ main(int argc, char **argv)
> >  			qconf->tx_queue_id[portid] = queueid;
> >  			queueid++;
> >  		}
> > -
> > +		rte_eth_allmulticast_enable(portid);
> >  		/* Start device */
> >  		ret = rte_eth_dev_start(portid);
> >  		if (ret < 0)
> > --
> > 2.7.5
  
Zhao1, Wei Oct. 25, 2018, 2:07 a.m. UTC | #4
> -----Original Message-----
> From: Wang, Dong1
> Sent: Wednesday, October 24, 2018 4:51 PM
> To: Zhao1, Wei <wei.zhao1@intel.com>; dev@dpdk.org
> Cc: stable@dpdk.org; Zhang, Qi Z <qi.z.zhang@intel.com>; Yigit, Ferruh
> <ferruh.yigit@intel.com>; Thomas Monjalon <thomas@monjalon.net>
> Subject: RE: [PATCH] examples/ipv4_multicast: enable multicast promiscuous
> for all port
> 
> Tested it with 82599 PF.
> 
> Acked-by: Wang Dong <dong1.wang@intel.com>
> 

Thank you!


> -----Original Message-----
> From: Zhao1, Wei
> Sent: Wednesday, October 24, 2018 16:11
> To: Zhao1, Wei <wei.zhao1@intel.com>; dev@dpdk.org
> Cc: stable@dpdk.org; Zhang, Qi Z <qi.z.zhang@intel.com>; Yigit, Ferruh
> <ferruh.yigit@intel.com>; Wang, Dong1 <dong1.wang@intel.com>; Thomas
> Monjalon <thomas@monjalon.net>
> Subject: RE: [PATCH] examples/ipv4_multicast: enable multicast promiscuous
> for all port
> 
> Add Wang Dong in the mailing list, he has test this patch.
> 
> 
> > -----Original Message-----
> > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Zhao1, Wei
> > Sent: Wednesday, October 17, 2018 4:09 PM
> > To: dev@dpdk.org
> > Cc: stable@dpdk.org; Zhang, Qi Z <qi.z.zhang@intel.com>; Yigit, Ferruh
> > <ferruh.yigit@intel.com>
> > Subject: Re: [dpdk-dev] [PATCH] examples/ipv4_multicast: enable
> > multicast promiscuous for all port
> >
> > By the way, I think the maintainer's opinion is important for this
> > change, but there is no maintainer name for this example in file
> MAINTAINERS!
> >
> > > -----Original Message-----
> > > From: Zhao1, Wei
> > > Sent: Wednesday, October 17, 2018 3:41 PM
> > > To: dev@dpdk.org
> > > Cc: stable@dpdk.org; Zhang, Qi Z <qi.z.zhang@intel.com>; Yigit,
> > > Ferruh <ferruh.yigit@intel.com>; Zhao1, Wei <wei.zhao1@intel.com>
> > > Subject: [PATCH] examples/ipv4_multicast: enable multicast
> > > promiscuous for all port
> > >
> > > This example has not been enable for receiving multicast packet, so
> > > it will drop multicast packet. Users must send packet with ether MAC
> > > destination address the same as pf port MAC address, in order to
> > > forward packet successfully, but this is an example for forwarding
> > > ipv4 multicastpacket. So calling function
> > > rte_eth_promiscuous_enable() or rte_eth_allmulticast_enable() can
> > > enable promiscuous mode of all multicast packet. And aslo, DPDK has
> > > rte API function of rte_eth_dev_set_mc_addr_list() for setting
> > > specific multicast filter table for specific multicast IP address,
> > > but this example do not support this configuration, so it need to be
> > > enable multicast promiscuous mode instead.
> > >
> > > Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
> > > ---
> > >  examples/ipv4_multicast/main.c | 2 +-
> > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > >
> > > diff --git a/examples/ipv4_multicast/main.c
> > > b/examples/ipv4_multicast/main.c index 6530d48..4073a49 100644
> > > --- a/examples/ipv4_multicast/main.c
> > > +++ b/examples/ipv4_multicast/main.c
> > > @@ -773,7 +773,7 @@ main(int argc, char **argv)
> > >  			qconf->tx_queue_id[portid] = queueid;
> > >  			queueid++;
> > >  		}
> > > -
> > > +		rte_eth_allmulticast_enable(portid);
> > >  		/* Start device */
> > >  		ret = rte_eth_dev_start(portid);
> > >  		if (ret < 0)
> > > --
> > > 2.7.5
  
Thomas Monjalon Oct. 29, 2018, 2:01 a.m. UTC | #5
24/10/2018 10:50, Wang, Dong1:
> Tested it with 82599 PF.
> 
> Acked-by: Wang Dong <dong1.wang@intel.com>

The correct tag is probably Tested-by

> From: Zhao1, Wei 
> 
> Add Wang Dong in the mailing list, he has test this patch.
> 
> > > This example has not been enable for receiving multicast packet, so 
> > > it will drop multicast packet. Users must send packet with ether MAC 
> > > destination address the same as pf port MAC address, in order to 
> > > forward packet successfully, but this is an example for forwarding
> > > ipv4 multicastpacket. So calling function
> > > rte_eth_promiscuous_enable() or rte_eth_allmulticast_enable() can 
> > > enable promiscuous mode of all multicast packet. And aslo, DPDK has 
> > > rte API function of rte_eth_dev_set_mc_addr_list() for setting 
> > > specific multicast filter table for specific multicast IP address, 
> > > but this example do not support this configuration, so it need to be 
> > > enable multicast promiscuous mode instead.
> > >
> > > Signed-off-by: Wei Zhao <wei.zhao1@intel.com>

Applied, thanks
  

Patch

diff --git a/examples/ipv4_multicast/main.c b/examples/ipv4_multicast/main.c
index 6530d48..4073a49 100644
--- a/examples/ipv4_multicast/main.c
+++ b/examples/ipv4_multicast/main.c
@@ -773,7 +773,7 @@  main(int argc, char **argv)
 			qconf->tx_queue_id[portid] = queueid;
 			queueid++;
 		}
-
+		rte_eth_allmulticast_enable(portid);
 		/* Start device */
 		ret = rte_eth_dev_start(portid);
 		if (ret < 0)