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 931F9A0A0E for ; Mon, 10 May 2021 18:12:29 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 83D6540140; Mon, 10 May 2021 18:12:29 +0200 (CEST) Received: from NAM04-BN8-obe.outbound.protection.outlook.com (mail-bn8nam08on2086.outbound.protection.outlook.com [40.107.100.86]) by mails.dpdk.org (Postfix) with ESMTP id A5919410E3 for ; Mon, 10 May 2021 18:12:28 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=lhDux7qLWF8AUJ4WIsPsA4reOHuQMM/5KC+DlnpXt+znj4TFUr4mQwAMsglgeH10azFXMMc6B25kks1ke+CaY7b+92X1EAY67YJsB2oQCjbxJywfc7agjMSavGVnhJqbPaBerw9QSTDigWb1VN4V2HcNcrbtDnmTv509vi3aeShoLXdjsDyNnqNy4fHLFj0oQlNq0gDN05Zli/GqFpE5iXtRAYOAmkfhfxpTTH34ArZ1nPxErxLzOgxa8pguDKMo9s547Y/JYjOcp3YYQtxice2PTtJp92HuJ3dfq2NUbnBbuxYTdxkw5SbYunoZ1dwlPRCDQGJdrx5uC9OCdNW9EQ== 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-SenderADCheck; bh=8L52lqEy6/zj5tRUOodcWyzvOK/9Iq+vSc/MSziYlaY=; b=F9OLUoIQKl266ucnDrnGbpl/itZ2oa9fmRRCuPFBV3Ys/v+c/cTdpdyPIOYMRK4dLHpSF/ynQF7A6MXXrFBqzpgW9C4TxwbYUSBU15hyETqOz6yj6WlxE0Z5e2TOggw9J10JmW8RyS7Qq5yNN9dhtRluGjY/IG8zr2nsaLQAg76YXeoNMOZECEwNAgJBocRa8Hg3kiKueo3VbuCcJJmr2bn2aZZskATDya6IsvsdAE3QEBchbibnu7m9Cul8ysA+XwWaJFy6CxZ8qP61hVEty1Ght5deZn6mX/3ka+wjKMNCa5KW/J8dwpvX2PwNXHCVYK5F3hDztc+IWbP+T7vT1A== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.112.34) smtp.rcpttodomain=broadcom.com smtp.mailfrom=nvidia.com; dmarc=pass (p=none sp=none 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=8L52lqEy6/zj5tRUOodcWyzvOK/9Iq+vSc/MSziYlaY=; b=XL+Qj58tp6LJuFyfL5Oz5pQT16Yv91n8+KbAhzCbUADEXI9WgLO9dMPd0GCCtmmsM+Pl7hcIdr4ibFxQ0adgQs6wloy1SMnem9BYBFVEstUZKd+8z0nzOXcZ8Hygqk7MZFr3EaZQG5NQQlzjPkFp64ac76SZQ0XytvNh/GpPUVsMLa/UmhqMayaqA+ugm58r81ArtD+Ea91KbhzxU1Gp2ZyvFMSy3liqJlWdgy8Bpn7ytiUsoeZBAvP7EhJAdZTA2V1KAybKXndlJrnyQtLJqWl21in/I6v7Mb+a0p0sOtvCZ8Ov4v6+T6oAvArE8QlJt2Y8o2ahMDGexdiwp2Attw== Received: from MW4PR04CA0028.namprd04.prod.outlook.com (2603:10b6:303:69::33) by CY4PR12MB1752.namprd12.prod.outlook.com (2603:10b6:903:120::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4108.25; Mon, 10 May 2021 16:12:27 +0000 Received: from CO1NAM11FT021.eop-nam11.prod.protection.outlook.com (2603:10b6:303:69:cafe::89) by MW4PR04CA0028.outlook.office365.com (2603:10b6:303:69::33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4108.25 via Frontend Transport; Mon, 10 May 2021 16:12:27 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.112.34) smtp.mailfrom=nvidia.com; broadcom.com; dkim=none (message not signed) header.d=none;broadcom.com; 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 CO1NAM11FT021.mail.protection.outlook.com (10.13.175.51) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.4108.25 via Frontend Transport; Mon, 10 May 2021 16:12:26 +0000 Received: from nvidia.com (172.20.145.6) by HQMAIL107.nvidia.com (172.20.187.13) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Mon, 10 May 2021 16:12:24 +0000 From: Xueming Li To: Lance Richardson CC: Luca Boccassi , Ajit Khaparde , dpdk stable Date: Tue, 11 May 2021 00:00:43 +0800 Message-ID: <20210510160258.30982-94-xuemingl@nvidia.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210510160258.30982-1-xuemingl@nvidia.com> References: <20210510160258.30982-1-xuemingl@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [172.20.145.6] X-ClientProxiedBy: HQMAIL111.nvidia.com (172.20.187.18) To HQMAIL107.nvidia.com (172.20.187.13) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 22409dba-8c0c-425c-0727-08d913ce6782 X-MS-TrafficTypeDiagnostic: CY4PR12MB1752: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:10000; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: B2CvU4Q0QWeCnhEovCBWRcjf2l7pSajg/itJs31nvAlhHC5OBt1NaQnee7KonF3IhIi1nlF9XlSnlc1/ZFFqhfOtd9RxjSMTxHfMC6agd23SXPXVh4hX6u4i0xq1Jwo+RWwsHECelyz1pFR+vsa7akUHLmsMYVPi5+sFzAzHnK6cVtiTfZXfx1W2JadgQrtnX26ajT2Vpsh+v8H/Jwcc7BxWyBRb1cdpMf8yC1zKJm3gW9ZQEF4dJ0QAXnioh/OXDGqDv0sAeY01oaZX1PGeIQNXWlrdxyLRRtbum0OKrmu08i/bZ4RTTMs1My4zz+iN83wp8x3nh2phm1XPpKdO4fEm7DglMu5dANxpbulhhBijjUlkoWPGFzPIvT3W56OyOckP8yTpVFkfszMk8nbEkFU9CWJNLEkVpeHfG6Ss7kjan8sXbe7NfErzJa6mVDu/H1NMRcdAM+PduccYmDiYrGwbCAxoqUGtT+VYC46qYaVAFmOrxfB/QkcZGP8Nf45qRcq/h7rUxnyyEdbI/gLoFZaPOh00ueHmwFN36ltO1uVLnNrrEq/krUSZd+iwxd0wog749wHwmViMRFPjyZn+j3YAIZQnWOV3RG3HH3o4T6MVLjOfkSJe2lrvtWXnVtERLu/gu7AT3zVgrR/QO92DqEcLL0YoIJb4JLXW5a7vhYSfh/1d/lmvo9KXtdg5h3jY+wxhzrd8sFDJiXajjT3BSwOlDeZDuvXoWKyzYFUbsi2nAlQlaB4PWUp+ILY+J7Z4q/IRrW7AOcyVmgJIU/e/yA== 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)(346002)(39860400002)(396003)(136003)(376002)(36840700001)(46966006)(2616005)(426003)(82310400003)(82740400003)(26005)(7636003)(356005)(1076003)(55016002)(316002)(4326008)(8676002)(36860700001)(36906005)(478600001)(54906003)(70206006)(2906002)(83380400001)(8936002)(47076005)(6916009)(53546011)(966005)(6286002)(6666004)(36756003)(86362001)(5660300002)(336012)(7696005)(16526019)(186003)(70586007); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 May 2021 16:12:26.9231 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 22409dba-8c0c-425c-0727-08d913ce6782 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: CO1NAM11FT021.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR12MB1752 Subject: [dpdk-stable] patch 'net/bnxt: fix handling of null flow mask' has been queued to stable release 20.11.2 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" Hi, FYI, your patch has been queued to stable release 20.11.2 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 05/12/21. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/steevenlee/dpdk This queued commit can be viewed at: https://github.com/steevenlee/dpdk/commit/b1f8911ea3a32a31b91aaa15a81c60c32e06c0ec Thanks. Xueming Li --- >From b1f8911ea3a32a31b91aaa15a81c60c32e06c0ec Mon Sep 17 00:00:00 2001 From: Lance Richardson Date: Thu, 18 Mar 2021 15:52:51 -0400 Subject: [PATCH] net/bnxt: fix handling of null flow mask Cc: Luca Boccassi [ upstream commit dea1afc71ffce08fccef2d49f09f6ad874c433c5 ] When the mask field of an rte_flow pattern item is NULL, the default mask for that item type should be used. Fixes: 5ef3b79fdfe6 ("net/bnxt: support flow filter ops") Signed-off-by: Lance Richardson Reviewed-by: Ajit Khaparde --- drivers/net/bnxt/bnxt_flow.c | 47 +++++++++++++++++++++++++++--------- 1 file changed, 36 insertions(+), 11 deletions(-) diff --git a/drivers/net/bnxt/bnxt_flow.c b/drivers/net/bnxt/bnxt_flow.c index 127d51c45b..514a5ed433 100644 --- a/drivers/net/bnxt/bnxt_flow.c +++ b/drivers/net/bnxt/bnxt_flow.c @@ -188,11 +188,15 @@ bnxt_validate_and_parse_flow_type(struct bnxt *bp, PMD_DRV_LOG(DEBUG, "Parse inner header\n"); break; case RTE_FLOW_ITEM_TYPE_ETH: - if (!item->spec || !item->mask) + if (!item->spec) break; eth_spec = item->spec; - eth_mask = item->mask; + + if (item->mask) + eth_mask = item->mask; + else + eth_mask = &rte_flow_item_eth_mask; /* Source MAC address mask cannot be partially set. * Should be All 0's or all 1's. @@ -281,7 +285,12 @@ bnxt_validate_and_parse_flow_type(struct bnxt *bp, break; case RTE_FLOW_ITEM_TYPE_VLAN: vlan_spec = item->spec; - vlan_mask = item->mask; + + if (item->mask) + vlan_mask = item->mask; + else + vlan_mask = &rte_flow_item_vlan_mask; + if (en & en_ethertype) { rte_flow_error_set(error, EINVAL, RTE_FLOW_ERROR_TYPE_ITEM, @@ -324,11 +333,15 @@ bnxt_validate_and_parse_flow_type(struct bnxt *bp, case RTE_FLOW_ITEM_TYPE_IPV4: /* If mask is not involved, we could use EM filters. */ ipv4_spec = item->spec; - ipv4_mask = item->mask; - if (!item->spec || !item->mask) + if (!item->spec) break; + if (item->mask) + ipv4_mask = item->mask; + else + ipv4_mask = &rte_flow_item_ipv4_mask; + /* Only IP DST and SRC fields are maskable. */ if (ipv4_mask->hdr.version_ihl || ipv4_mask->hdr.type_of_service || @@ -385,11 +398,15 @@ bnxt_validate_and_parse_flow_type(struct bnxt *bp, break; case RTE_FLOW_ITEM_TYPE_IPV6: ipv6_spec = item->spec; - ipv6_mask = item->mask; - if (!item->spec || !item->mask) + if (!item->spec) break; + if (item->mask) + ipv6_mask = item->mask; + else + ipv6_mask = &rte_flow_item_ipv6_mask; + /* Only IP DST and SRC fields are maskable. */ if (ipv6_mask->hdr.vtc_flow || ipv6_mask->hdr.payload_len || @@ -437,11 +454,15 @@ bnxt_validate_and_parse_flow_type(struct bnxt *bp, break; case RTE_FLOW_ITEM_TYPE_TCP: tcp_spec = item->spec; - tcp_mask = item->mask; - if (!item->spec || !item->mask) + if (!item->spec) break; + if (item->mask) + tcp_mask = item->mask; + else + tcp_mask = &rte_flow_item_tcp_mask; + /* Check TCP mask. Only DST & SRC ports are maskable */ if (tcp_mask->hdr.sent_seq || tcp_mask->hdr.recv_ack || @@ -482,11 +503,15 @@ bnxt_validate_and_parse_flow_type(struct bnxt *bp, break; case RTE_FLOW_ITEM_TYPE_UDP: udp_spec = item->spec; - udp_mask = item->mask; - if (!item->spec || !item->mask) + if (!item->spec) break; + if (item->mask) + udp_mask = item->mask; + else + udp_mask = &rte_flow_item_udp_mask; + if (udp_mask->hdr.dgram_len || udp_mask->hdr.dgram_cksum) { rte_flow_error_set(error, -- 2.25.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2021-05-10 23:59:29.052612700 +0800 +++ 0095-net-bnxt-fix-handling-of-null-flow-mask.patch 2021-05-10 23:59:26.460000000 +0800 @@ -1 +1 @@ -From dea1afc71ffce08fccef2d49f09f6ad874c433c5 Mon Sep 17 00:00:00 2001 +From b1f8911ea3a32a31b91aaa15a81c60c32e06c0ec Mon Sep 17 00:00:00 2001 @@ -4,0 +5,3 @@ +Cc: Luca Boccassi + +[ upstream commit dea1afc71ffce08fccef2d49f09f6ad874c433c5 ] @@ -10 +12,0 @@ -Cc: stable@dpdk.org @@ -19 +21 @@ -index a8f5d91fc4..e3906b4779 100644 +index 127d51c45b..514a5ed433 100644