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 AEEF0A0A0E for ; Mon, 10 May 2021 18:11:04 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A43DA4003E; Mon, 10 May 2021 18:11:04 +0200 (CEST) Received: from NAM11-BN8-obe.outbound.protection.outlook.com (mail-bn8nam11on2061.outbound.protection.outlook.com [40.107.236.61]) by mails.dpdk.org (Postfix) with ESMTP id 9FA384003E for ; Mon, 10 May 2021 18:11:03 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=eAkh224m4EdYxOikPWWy0ydB4hG3RBF0ZfEE0uana0/V6yvOOUgRRUSgu/NS/IQcbR2HWkPbrhx/gOOrU4/eOKko4yB2YfzLXDgIAi5o2axPr2pk6x67F2ya8mcz1YDFr7k0vt21Lty4hKnc3ewdXJPWh/P2hPxbEZlomCRO/209AyYZglw/haldUlNhXKGlhcsLBGOlT6JKwIiDLNP/aiAVWz7Bmi4K8yQoJUuBUSD7syAGK38Ji+yz7VILomqlbVsihkZMzvOFevVCYAzQzfANvHvtidsfaq36KWYgRkDtYSW0NadsxgLcxOpd7ocJFg16uuD9OIrZ2uYwAKiT9Q== 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=05XNIw7+n5iJ/r5DeL8eIorzAC04RW5CXpoe8iAokGE=; b=U4mndI8oslib+NGNdRhB3qT9YOfd+elsZhkWSEC7dA+9ZoRS4xlUkausVxCA3YSuDVmKJwB+Dkjd3Uf7Q2EPp7V/TBPOyWzPzaGzMi/ekKl8F1ASUK+yQqC9dm0ENtPzpv0oRrcER7/0LEMNQWxdsVZgp7Y0w8tpQmE2im+JjmUSljypTrcO/rx7o5IyxXeqogARtIHn/LEN+M63AsN3Rgs88D+r/7z5tY1jqyB6OrhvL+Y8dJSTv6x9nH42UHmNzckg4elcUv+BoSTIQMOzvpDzJSB1LdvfbjApmwcfdU6WoR++8pYrsXo3ajGxOpsO2Kl7XnafO6NpRvlbafkUGQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.112.34) smtp.rcpttodomain=intel.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=05XNIw7+n5iJ/r5DeL8eIorzAC04RW5CXpoe8iAokGE=; b=UwBdbSRps4VxcYPvsCLePFVL68yi2wjj/BcXVqUntW7Qd+dvFEEbsQ+iKik0amhkdZOSQt58RdeNMe5r85CoFYCpVPD43421O649ysowxpNenWvWPFw+M97R+6UqCXrrBrXMV1W+wphOOpHXh9Cpma+Eybr4YLegY3pb4pMNYIth3x0l8HYBa9y6mQVXt72GoEAe+xiMD+imZYfVz5kBrLD0BwDUPBj4MryPI/eKJDiTFgmFaUrxPUGVYqt8oW+565/386Ey0duFvAMawRP/WGXzfGb70TjvyFT/AdRux9Gno3DiQ4a+AEyrv8YQl+Q2ENTsd2jlzOAuy9q66w9Pqg== Received: from MW4P220CA0004.NAMP220.PROD.OUTLOOK.COM (2603:10b6:303:115::9) by BYAPR12MB2726.namprd12.prod.outlook.com (2603:10b6:a03:66::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4108.31; Mon, 10 May 2021 16:11:01 +0000 Received: from CO1NAM11FT028.eop-nam11.prod.protection.outlook.com (2603:10b6:303:115:cafe::74) by MW4P220CA0004.outlook.office365.com (2603:10b6:303:115::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4108.24 via Frontend Transport; Mon, 10 May 2021 16:11:01 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.112.34) smtp.mailfrom=nvidia.com; intel.com; dkim=none (message not signed) header.d=none;intel.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 CO1NAM11FT028.mail.protection.outlook.com (10.13.175.214) 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:11:01 +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:10:59 +0000 From: Xueming Li To: Cristian Dumitrescu CC: Luca Boccassi , Churchill Khangar , dpdk stable Date: Tue, 11 May 2021 00:00:28 +0800 Message-ID: <20210510160258.30982-79-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: 459af7ce-3952-4687-5149-08d913ce34a5 X-MS-TrafficTypeDiagnostic: BYAPR12MB2726: 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: NT/Sgsgs1AR2dlfC8KqGwjpCujBm+xWSfzWRsc2OFMblS4+WVKupniLAjvuRJzfMAPBmbb1q92s2ZGkdUOuxIh19Q/jJ4nbTnKDfTdiKmi3eU4uGBAQcmcMDn3owADiVxgLbcNQLNmASL57TZA7SQETQuor1G9NDyjQCw+MclseVEGKjP4cofSstCJ6Z63REzfU36oGBSoJzsK9wvJ3JAHaLZHzM5oc/alEdT7F4gRn30PmXNo5u+qDyhk+YvA6UNpFyehlgcfVwbHbYdB4IVcr2S7+FuKTdFUWs1I9tTj4Xp3x87qqFxn+NwG0iJsCWe8Ve+pW5N7IWRRvlBjni8+1B5imXPES2YQtxkvtipJghIS62qb5CUMrbmT2DqJz/zIiYbLGk+1ZQAdeuVPTiq57Gr2NUNlnkm+seCd+l4j+CAuAqru9F+9vKYnW9rO+uHG/D9yR3u6uslBqUKmTeQ+DeEcEGaJfQDH8aBTBvH6vrAS015o21dB1L349OQRZseeiep0+Xjg8XLTjOBH7X8KQVwOdKfjl4KbXzk7qQ6lRXog+hEvgYz9UkdZj9k+IPUm0Gp4mxeLr+BDKWND2Vfo6/qyj79Fc1HkyLOqXR7mmgIfZiYDIJMpqaqH4yf5CJSl0v06i8XcXZiWnhq7U847vOIcspS95QqjX7jiO3Rr5gWJmc7yiWTHJSI7UhEoGwUTv6wvmCUCISQfQ532+eDxAuVA92HoRQcyT1G/ByWmU= 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)(39860400002)(376002)(136003)(396003)(346002)(46966006)(36840700001)(36906005)(82740400003)(2616005)(2906002)(478600001)(316002)(70586007)(16526019)(82310400003)(86362001)(47076005)(356005)(53546011)(7696005)(54906003)(83380400001)(966005)(7636003)(26005)(70206006)(6916009)(6286002)(8676002)(8936002)(36756003)(55016002)(426003)(186003)(36860700001)(4326008)(6666004)(5660300002)(336012)(1076003); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 May 2021 16:11:01.5886 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 459af7ce-3952-4687-5149-08d913ce34a5 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: CO1NAM11FT028.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR12MB2726 Subject: [dpdk-stable] patch 'table: fix actions with different data size' 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/67becbfe57c061ec63b785afdbb9bc5f593dffb5 Thanks. Xueming Li --- >From 67becbfe57c061ec63b785afdbb9bc5f593dffb5 Mon Sep 17 00:00:00 2001 From: Cristian Dumitrescu Date: Wed, 17 Mar 2021 11:42:07 +0000 Subject: [PATCH] table: fix actions with different data size Cc: Luca Boccassi [ upstream commit 75a09af1b4171f14b15ea3c4bdf5595cb4c4bba5 ] The table layer provisions an action_id and action_data_size data bytes for each table key. This action_data_size is a maximal amount, as some actions (depending on action_id) can require zero or less data bytes than the maximal action_data_size. This fix allows for actions with different data sizes to co-exist within the same table. Fixes: d0a00966618b ("table: add exact match SWX table") Signed-off-by: Churchill Khangar Signed-off-by: Cristian Dumitrescu Acked-by: Cristian Dumitrescu --- lib/librte_table/rte_swx_table_em.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/lib/librte_table/rte_swx_table_em.c b/lib/librte_table/rte_swx_table_em.c index 5f67223060..788e25f6b9 100644 --- a/lib/librte_table/rte_swx_table_em.c +++ b/lib/librte_table/rte_swx_table_em.c @@ -337,7 +337,7 @@ bkt_key_install(struct table *t, /* Key data. */ bkt_data = table_key_data(t, bkt_key_id); bkt_data[0] = input->action_id; - if (t->params.action_data_size) + if (t->params.action_data_size && input->action_data) memcpy(&bkt_data[1], input->action_data, t->params.action_data_size); @@ -358,7 +358,7 @@ bkt_key_data_update(struct table *t, /* Key data. */ bkt_data = table_key_data(t, bkt_key_id); bkt_data[0] = input->action_id; - if (t->params.action_data_size) + if (t->params.action_data_size && input->action_data) memcpy(&bkt_data[1], input->action_data, t->params.action_data_size); @@ -485,8 +485,6 @@ table_add(void *table, struct rte_swx_table_entry *entry) CHECK(t, EINVAL); CHECK(entry, EINVAL); CHECK(entry->key, EINVAL); - CHECK((!t->params.action_data_size && !entry->action_data) || - (t->params.action_data_size && entry->action_data), EINVAL); input_sig = hash(entry->key, t->key_mask, t->key_size, 0); bkt_id = input_sig & (t->n_buckets - 1); -- 2.25.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2021-05-10 23:59:28.684211100 +0800 +++ 0080-table-fix-actions-with-different-data-size.patch 2021-05-10 23:59:26.440000000 +0800 @@ -1 +1 @@ -From 75a09af1b4171f14b15ea3c4bdf5595cb4c4bba5 Mon Sep 17 00:00:00 2001 +From 67becbfe57c061ec63b785afdbb9bc5f593dffb5 Mon Sep 17 00:00:00 2001 @@ -4,0 +5,3 @@ +Cc: Luca Boccassi + +[ upstream commit 75a09af1b4171f14b15ea3c4bdf5595cb4c4bba5 ] @@ -13 +15,0 @@ -Cc: stable@dpdk.org