DPDK patches and discussions
 help / color / mirror / Atom feed
From: Shahaf Shuler <shahafs@mellanox.com>
To: Mordechay Haimovsky <motih@mellanox.com>,
	Adrien Mazarguil <adrienm@mellanox.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>,
	Mordechay Haimovsky <motih@mellanox.com>,
	"stable@dpdk.org" <stable@dpdk.org>
Subject: Re: [dpdk-dev] [dpdk-stable] [PATCH] net/mlx4: fix no broadcasts reception in	promisc
Date: Thu, 25 Jan 2018 15:37:37 +0000	[thread overview]
Message-ID: <VI1PR05MB31499AE6030F4FCB520F6EC4C3E10@VI1PR05MB3149.eurprd05.prod.outlook.com> (raw)
In-Reply-To: <1515323086-100332-1-git-send-email-motih@mellanox.com>

Sunday, January 7, 2018 1:05 PM, Moti Haimovsky
> Subject: [dpdk-stable] [PATCH] net/mlx4: fix no broadcasts reception in
> promisc
> 
> This patch fixes the issue of mlx4 not receiving broadcast packets when
> configured to work promiscuous mode.
> 
> Fixes: eacaac7bae36 ("net/mlx4: restore promisc and allmulti support")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Moti Haimovsky <motih@mellanox.com>
> ---
>  drivers/net/mlx4/mlx4_flow.c | 16 ++++++++--------
>  1 file changed, 8 insertions(+), 8 deletions(-)
> 
> diff --git a/drivers/net/mlx4/mlx4_flow.c b/drivers/net/mlx4/mlx4_flow.c
> index 69025da..ec13f5a 100644
> --- a/drivers/net/mlx4/mlx4_flow.c
> +++ b/drivers/net/mlx4/mlx4_flow.c
> @@ -1223,9 +1223,12 @@ struct mlx4_drop {
>   *
>   * Various flow rules are created depending on the mode the device is in:
>   *
> - * 1. Promiscuous: port MAC + catch-all (VLAN filtering is ignored).
> - * 2. All multicast: port MAC/VLAN + catch-all multicast.
> - * 3. Otherwise: port MAC/VLAN + broadcast MAC/VLAN.
> + * 1. Promiscuous:
> + *       port MAC + broadcast + catch-all (VLAN filtering is ignored).
> + * 2. All multicast:
> + *       port MAC/VLAN + broadcast + catch-all multicast.
> + * 3. Otherwise:
> + *       port MAC/VLAN + broadcast MAC/VLAN.
>   *
>   * About MAC flow rules:
>   *
> @@ -1304,9 +1307,6 @@ struct mlx4_drop {
>  		!priv->dev->data->promiscuous ?
>  		&vlan_spec.tci :
>  		NULL;
> -	int broadcast =
> -		!priv->dev->data->promiscuous &&
> -		!priv->dev->data->all_multicast;
>  	uint16_t vlan = 0;
>  	struct rte_flow *flow;
>  	unsigned int i;
> @@ -1340,7 +1340,7 @@ struct mlx4_drop {
>  			rule_vlan = NULL;
>  		}
>  	}
> -	for (i = 0; i != RTE_DIM(priv->mac) + broadcast; ++i) {
> +	for (i = 0; i != RTE_DIM(priv->mac) + 1; ++i) {
>  		const struct ether_addr *mac;
> 
>  		/* Broadcasts are handled by an extra iteration. */ @@ -
> 1404,7 +1404,7 @@ struct mlx4_drop {
>  			goto next_vlan;
>  	}
>  	/* Take care of promiscuous and all multicast flow rules. */
> -	if (!broadcast) {
> +	if (priv->dev->data->promiscuous || priv->dev->data->all_multicast)

Please help me to understand the issue.
The promisc and allmulti spec and mask contains the broadcast addresses. 
They are not received because of the ibv flow rule type (MC_DEFAULT / ALL_DEFAULT) ?

> {
>  		for (flow = LIST_FIRST(&priv->flows);
>  		     flow && flow->internal;
>  		     flow = LIST_NEXT(flow, next)) {
> --
> 1.8.3.1

  reply	other threads:[~2018-01-25 15:37 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-07 11:04 [dpdk-dev] " Moti Haimovsky
2018-01-25 15:37 ` Shahaf Shuler [this message]
2018-01-25 17:12   ` [dpdk-dev] [dpdk-stable] " Mordechay Haimovsky
2018-01-25 17:45     ` Shahaf Shuler
2018-01-26 17:03 ` [dpdk-dev] " Adrien Mazarguil

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=VI1PR05MB31499AE6030F4FCB520F6EC4C3E10@VI1PR05MB3149.eurprd05.prod.outlook.com \
    --to=shahafs@mellanox.com \
    --cc=adrienm@mellanox.com \
    --cc=dev@dpdk.org \
    --cc=motih@mellanox.com \
    --cc=stable@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).