From patchwork Thu Jan 17 12:12:19 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dekel Peled X-Patchwork-Id: 49912 X-Patchwork-Delegate: shahafs@mellanox.com Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 85BB22082; Thu, 17 Jan 2019 13:16:04 +0100 (CET) Received: from mellanox.co.il (mail-il-dmz.mellanox.com [193.47.165.129]) by dpdk.org (Postfix) with ESMTP id 7243D10A3 for ; Thu, 17 Jan 2019 13:16:03 +0100 (CET) Received: from Internal Mail-Server by MTLPINE1 (envelope-from dekelp@mellanox.com) with ESMTPS (AES256-SHA encrypted); 17 Jan 2019 14:15:58 +0200 Received: from mtl-vdi-280.wap.labs.mlnx. (mtl-vdi-280.wap.labs.mlnx [10.128.130.87]) by labmailer.mlnx (8.13.8/8.13.8) with ESMTP id x0HCFwuh015421; Thu, 17 Jan 2019 14:15:58 +0200 From: Dekel Peled To: matan@mellanox.com, shahafs@mellanox.com Cc: dev@dpdk.org, orika@mellanox.com, dekelp@mellanox.com Date: Thu, 17 Jan 2019 14:12:19 +0200 Message-Id: <1547727139-39646-1-git-send-email-dekelp@mellanox.com> X-Mailer: git-send-email 1.7.1 Subject: [dpdk-dev] [PATCH] net/mlx4: fix creation of flow rule w/o ETH spec X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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 --- 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; }