* [dpdk-stable] [PATCH v3 1/5] librte_table: fix acl entry add and delete functions
[not found] <1503677438-27591-1-git-send-email-bernard.iremonger@intel.com>
@ 2017-08-31 14:54 ` Bernard Iremonger
2017-08-31 14:54 ` [dpdk-stable] [PATCH v3 2/5] librte_table: fix acl lookup function Bernard Iremonger
1 sibling, 0 replies; 2+ messages in thread
From: Bernard Iremonger @ 2017-08-31 14:54 UTC (permalink / raw)
To: dev, ferruh.yigit, konstantin.ananyev, cristian.dumitrescu,
adrien.mazarguil
Cc: Bernard Iremonger, stable
The rte_table_acl_entry_add() function was returning data from
acl_memory instead of acl_rule_memory. It was also returning data
from entry instead of entry_ptr.
The rte_table_acl_entry_delete() function was returning data from
acl_memory instead of acl_rule_memory.
Fixes: 166923eb2f78 ("table: ACL")
Cc: stable@dpdk.org
Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
---
lib/librte_table/rte_table_acl.c | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/lib/librte_table/rte_table_acl.c b/lib/librte_table/rte_table_acl.c
index 3c05e4a..e84b437 100644
--- a/lib/librte_table/rte_table_acl.c
+++ b/lib/librte_table/rte_table_acl.c
@@ -316,8 +316,7 @@ struct rte_table_acl {
if (status == 0) {
*key_found = 1;
*entry_ptr = &acl->memory[i * acl->entry_size];
- memcpy(*entry_ptr, entry, acl->entry_size);
-
+ memcpy(entry, *entry_ptr, acl->entry_size);
return 0;
}
}
@@ -353,8 +352,8 @@ struct rte_table_acl {
rte_acl_free(acl->ctx);
acl->ctx = ctx;
*key_found = 0;
- *entry_ptr = &acl->memory[free_pos * acl->entry_size];
- memcpy(*entry_ptr, entry, acl->entry_size);
+ *entry_ptr = &acl->acl_rule_memory[free_pos * acl->entry_size];
+ memcpy(entry, *entry_ptr, acl->entry_size);
return 0;
}
@@ -435,7 +434,7 @@ struct rte_table_acl {
acl->ctx = ctx;
*key_found = 1;
if (entry != NULL)
- memcpy(entry, &acl->memory[pos * acl->entry_size],
+ memcpy(entry, &acl->acl_rule_memory[pos * acl->entry_size],
acl->entry_size);
return 0;
--
1.9.1
^ permalink raw reply [flat|nested] 2+ messages in thread
* [dpdk-stable] [PATCH v3 2/5] librte_table: fix acl lookup function
[not found] <1503677438-27591-1-git-send-email-bernard.iremonger@intel.com>
2017-08-31 14:54 ` [dpdk-stable] [PATCH v3 1/5] librte_table: fix acl entry add and delete functions Bernard Iremonger
@ 2017-08-31 14:54 ` Bernard Iremonger
1 sibling, 0 replies; 2+ messages in thread
From: Bernard Iremonger @ 2017-08-31 14:54 UTC (permalink / raw)
To: dev, ferruh.yigit, konstantin.ananyev, cristian.dumitrescu,
adrien.mazarguil
Cc: Bernard Iremonger, stable
The rte_table_acl_lookup() function was returning data from acl_memory
instead of acl_rule_memory.
Fixes: 166923eb2f78 ("table: ACL")
Cc: stable@dpdk.org
Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
---
lib/librte_table/rte_table_acl.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/librte_table/rte_table_acl.c b/lib/librte_table/rte_table_acl.c
index e84b437..258916d 100644
--- a/lib/librte_table/rte_table_acl.c
+++ b/lib/librte_table/rte_table_acl.c
@@ -794,7 +794,7 @@ struct rte_table_acl {
if (action_table_pos != 0) {
pkts_out_mask |= pkt_mask;
entries[pkt_pos] = (void *)
- &acl->memory[action_table_pos *
+ &acl->acl_rule_memory[action_table_pos *
acl->entry_size];
rte_prefetch0(entries[pkt_pos]);
}
--
1.9.1
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-08-31 14:54 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <1503677438-27591-1-git-send-email-bernard.iremonger@intel.com>
2017-08-31 14:54 ` [dpdk-stable] [PATCH v3 1/5] librte_table: fix acl entry add and delete functions Bernard Iremonger
2017-08-31 14:54 ` [dpdk-stable] [PATCH v3 2/5] librte_table: fix acl lookup function Bernard Iremonger
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).