From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id B416AA0032; Mon, 22 Nov 2021 14:53:51 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8264A4014E; Mon, 22 Nov 2021 14:53:51 +0100 (CET) Received: from NAM04-DM6-obe.outbound.protection.outlook.com (mail-dm6nam08on2076.outbound.protection.outlook.com [40.107.102.76]) by mails.dpdk.org (Postfix) with ESMTP id 723F94003C; Mon, 22 Nov 2021 14:53:50 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=EcKa0XtiNWnVW7FKafNY+us7jBrE/QFZFmCWgLpiyHPY5ZVwjfeivS6NKqDC1X+S+hM+MImaMOEalxQC206OrQt9zqB78r1l9RTUQgPxdUQ0T1mTAHoT/VBuVekKfhKzUJYmXLcvsWojuavxRdkebVeM1SDyGNb2NbTOmfExpq4ILd/BmnAifC5gJpKO6P9QdfyYW9KzmuiFBmHIGW6toQ5vfWBIqYz8zdprduU17gvGiCZQhMWI2y6bgJMpnLrF747iQuufOaRTStP1uacCu7UbXVjQ3McDJa9WIo7mdiWRlQmze0m34LddQCZLyxNH5Y57gvFDhb1nSnZYEqLKGg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=Ec94YAWGlXiiedEnHcJp8AqoQASJrRr9hm9usSNXMfE=; b=Ij8rITVH8S6iCoOHaT0DNt2Pcru4F2xpd2Z2eAnPLewJDccym4C0djjmlgmcTLy0cJdX9pdqfIf6fq7lR7pbRvArTpWiRSoaJoG+IDsnkbnpMtKnN2UKijPe+lzSvUf6zx5KXLFaczXKo21lqegtGGCAY9do6GJSMAFJ2MQzfS0OZkIbERcBnL9dYDVGsi1vrybDdssjDBrC4KnYtwKkYRnogoJ1fUfbIxxYd/7/4x0Z6xAEhHQxSoqnH8wTJa566BGjJ/2ewxtoqgxS0tsiZazPsmSo2naZ629GA6UOu1NR3yBNTbkaZLOTFNnpVRH8QqVIqueK/x2s93Y0LgCWww== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.112.34) smtp.rcpttodomain=dpdk.org smtp.mailfrom=nvidia.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Ec94YAWGlXiiedEnHcJp8AqoQASJrRr9hm9usSNXMfE=; b=dEDarRCYdMzAaYYsLezTJ/X3UxcgPX7fJakW9LvzqePIJbn+bvTH7yhSa/1C4pLpDr/cxJsTRAUQkVAAKkj/h3u9ZpRyLiA1DD0oiIYjK5zTO3OsewF5Q1Hcihf9xmO6kndyCA+R7ph7alSTtn97Wy0lewtalZoTMW+OsDPDF1SRgix5nxE0AxGGU7OQblA0cqN8Ttq/1oOWSv7nlEM3imkYcoJwMFxSMN9dcjeMQ3N7MJU4d0B/iHExn/ATg2UTxp0oSFi0Ky57SmhAcNAiXqd/i9cppauqmISrof2UBsL3nDA2DMBSdpnMW5gzv1MAczLeFvskTTxs+tNMPJYJcQ== Received: from MW4PR03CA0282.namprd03.prod.outlook.com (2603:10b6:303:b5::17) by BYAPR12MB4774.namprd12.prod.outlook.com (2603:10b6:a03:10b::33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4713.22; Mon, 22 Nov 2021 13:53:47 +0000 Received: from CO1NAM11FT038.eop-nam11.prod.protection.outlook.com (2603:10b6:303:b5:cafe::74) by MW4PR03CA0282.outlook.office365.com (2603:10b6:303:b5::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4713.19 via Frontend Transport; Mon, 22 Nov 2021 13:53:47 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.112.34) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.112.34 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.112.34; helo=mail.nvidia.com; Received: from mail.nvidia.com (216.228.112.34) by CO1NAM11FT038.mail.protection.outlook.com (10.13.174.231) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.4713.20 via Frontend Transport; Mon, 22 Nov 2021 13:53:47 +0000 Received: from nvidia.com (172.20.187.5) by HQMAIL107.nvidia.com (172.20.187.13) with Microsoft SMTP Server (TLS) id 15.0.1497.18; Mon, 22 Nov 2021 13:53:45 +0000 From: Xiaoyu Min To: Matan Azrad , Viacheslav Ovsiienko , Dekel Peled CC: , Subject: [PATCH] net/mlx4: fix empty ETH spec with VLAN support Date: Mon, 22 Nov 2021 21:53:29 +0800 Message-ID: <3672e46dd1181429c73952a93cc211ad11769b99.1637589050.git.jackmin@nvidia.com> X-Mailer: git-send-email 2.34.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [172.20.187.5] X-ClientProxiedBy: HQMAIL101.nvidia.com (172.20.187.10) To HQMAIL107.nvidia.com (172.20.187.13) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: adfbbb15-8f53-4eb7-2580-08d9adbf81a7 X-MS-TrafficTypeDiagnostic: BYAPR12MB4774: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:298; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Q87PjQX5Jb4xo7uhmKkiXNOqNlMZ536IrOHF2gHCleTrptPVp+3uss4CNeQ0M88Srnwin6kjgh5svlUNevF7lJrf91K/F/PBAQwRXXFjZUNeAPkmA+RT0RJmxmdjzA34z1zqJl9s0p0m61rkxgarfRivZte//YtZyE8vRg6Umcrvwj/sma8Lq6cUdsMQLXPIC+8t0e7ByIWRgTmWw+a+d2pzdwWmu4LKdikfxMR/ikuzu688rQ0TD/KepUsaSBhDuz9bFpTt+QHMQYOsVr6PtXXiJGwhh21RrJBVT9kQtVF9pDsTI1LYYA4wo+qnt59JkX6jg+GCHetGG6Io4vEhBYk4Y+GBeOPifz86CpSkho/Z+4vMVf0dZgY6oMGdvqD4opZ9hYOkhTBtsjYbdTBALc80ER6v5AO2xQNbApsOqGgEkhlA3PhCRPte454WWhJ8pzPY7OUhY3ogD8YDxIIH/GZN1weh/wvTwQtcFVGpSawhkfNGvaWpAX4AIk09UzBkNV6cnZTehYUuEzaq7grGQbWS5VwgCrganHRo59BKK4lR1Njc5kxZD2CRaIU6Ma2k+KGC/YVor0JQVJ1PoJL/HYObA96QFNJuI+jCUb3V0jIUkjmEpMpM9w+FWPaPDSrPoAtzwMQQsMoS3O6QvjsclhDCkmzU89wap3epQcwlvSZ56Tc+EvEsm7CLb5Krpp2hsvQD2Hw0/d3aCylspcj3cg== X-Forefront-Antispam-Report: CIP:216.228.112.34; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:schybrid03.nvidia.com; CAT:NONE; SFS:(4636009)(36840700001)(46966006)(82310400003)(36860700001)(356005)(70206006)(55016002)(426003)(2616005)(4326008)(186003)(26005)(36756003)(508600001)(16526019)(47076005)(54906003)(8676002)(336012)(8936002)(70586007)(6666004)(86362001)(7636003)(316002)(2906002)(36906005)(6286002)(450100002)(5660300002)(83380400001)(7696005)(110136005); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Nov 2021 13:53:47.4100 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: adfbbb15-8f53-4eb7-2580-08d9adbf81a7 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.112.34]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: CO1NAM11FT038.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR12MB4774 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org When the ETH spec is empty MLX4 PMD doesn't allow match other criteria, which means the flow should be promisc one. Currently, PMD validates this by setting flow->promisc bit when ETH spec is empty and checking whether there is other rte_flow_item followed when flow->promisc is on. However, commit [1] adds support to match traffic only on VLAN id, the above validation logic should be changed accordingly. This patch changes the above validate logic by skipping flow->promisc check if this item is VLAN. Fixes: c0d239263156 ("net/mlx4: support flow w/o ETH spec and with VLAN") Cc: stable@dpdk.org [1]: commit c0d239263156 ("net/mlx4: support flow w/o ETH spec and with VLAN") Signed-off-by: Xiaoyu Min Acked-by: Matan Azrad --- drivers/net/mlx4/mlx4_flow.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/mlx4/mlx4_flow.c b/drivers/net/mlx4/mlx4_flow.c index 2e1b6c87e9..9d7247cf81 100644 --- a/drivers/net/mlx4/mlx4_flow.c +++ b/drivers/net/mlx4/mlx4_flow.c @@ -713,7 +713,8 @@ mlx4_flow_prepare(struct mlx4_priv *priv, flow->internal = 1; continue; } - if (flow->promisc || flow->allmulti) { + if ((item->type != RTE_FLOW_ITEM_TYPE_VLAN && flow->promisc) || + flow->allmulti) { msg = "mlx4 does not support additional matching" " criteria combined with indiscriminate" " matching on Ethernet headers"; -- 2.34.0