DPDK patches and discussions
 help / color / mirror / Atom feed
From: Dekel Peled <dekelp@mellanox.com>
To: matan@mellanox.com, shahafs@mellanox.com
Cc: dev@dpdk.org, orika@mellanox.com, dekelp@mellanox.com
Subject: [dpdk-dev] [PATCH] net/mlx4: fix creation of flow rule w/o ETH spec
Date: Thu, 17 Jan 2019 14:12:19 +0200	[thread overview]
Message-ID: <1547727139-39646-1-git-send-email-dekelp@mellanox.com> (raw)

The original commit enabled the creation of flow rule with empty
ETH address and with specific VLAN.
It works fine on PF, but such flow rule is still rejected on VF due
to kernel limitation, which blocks MAC address of all zeroes.

This patch complements the original commit.
It sets byte 0 of MAC address to 0xFF.

Fixes: c0d239263156 ("net/mlx4: support flow w/o ETH spec and with VLAN")
Cc: dekelp@mellanox.com

Signed-off-by: Dekel Peled <dekelp@mellanox.com>
---
 drivers/net/mlx4/mlx4_flow.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/mlx4/mlx4_flow.c b/drivers/net/mlx4/mlx4_flow.c
index 6c927a6..3abde30 100644
--- a/drivers/net/mlx4/mlx4_flow.c
+++ b/drivers/net/mlx4/mlx4_flow.c
@@ -248,6 +248,7 @@ struct mlx4_drop {
 		.size = sizeof(*eth),
 	};
 	if (!mask) {
+		eth->val.dst_mac[0] = 0xff;
 		flow->ibv_attr->type = IBV_FLOW_ATTR_ALL_DEFAULT;
 		return 0;
 	}
-- 
1.8.3.1

             reply	other threads:[~2019-01-17 12:16 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-17 12:12 Dekel Peled [this message]
2019-01-21  7:33 ` Shahaf Shuler

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=1547727139-39646-1-git-send-email-dekelp@mellanox.com \
    --to=dekelp@mellanox.com \
    --cc=dev@dpdk.org \
    --cc=matan@mellanox.com \
    --cc=orika@mellanox.com \
    --cc=shahafs@mellanox.com \
    /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).