[dpdk-stable] patch 'table: fix actions with different data size' has been queued to stable release 20.11.2
Xueming Li
xuemingl at nvidia.com
Mon May 10 18:00:28 CEST 2021
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 <xuemingl at nvidia.com>
---
>From 67becbfe57c061ec63b785afdbb9bc5f593dffb5 Mon Sep 17 00:00:00 2001
From: Cristian Dumitrescu <cristian.dumitrescu at intel.com>
Date: Wed, 17 Mar 2021 11:42:07 +0000
Subject: [PATCH] table: fix actions with different data size
Cc: Luca Boccassi <bluca at debian.org>
[ 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 <churchill.khangar at intel.com>
Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu at intel.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu at intel.com>
---
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 <bluca at debian.org>
+
+[ upstream commit 75a09af1b4171f14b15ea3c4bdf5595cb4c4bba5 ]
@@ -13 +15,0 @@
-Cc: stable at dpdk.org
More information about the stable
mailing list