net/cxgbe: rte_flow related bug fixes
PATCH 1/2 net/cxgbe: fix overlapping regions in TID table
In reply to Rahul LakkireddyLocation of filter TID table should be after active TID table memory, and not from the beginning of TID table memory. This fixes memory corruption due to overlapping regions.
--- drivers/net/cxgbe/cxgbe_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/cxgbe/cxgbe_main.c +1 -1
@@ -415,7 +415,7 @@ static int tid_init(struct tid_info *t)return -ENOMEM ; t->atid_tab = (union aopen_entry *)&t->tid_tab[t->ntids]; - t->ftid_tab = (struct filter_entry *)&t->tid_tab[t->natids]; + t->ftid_tab = (struct filter_entry *)&t->atid_tab[t->natids]; t->ftid_bmap_array =t4_os_alloc (ftid_bmap_size);if (!t->ftid_bmap_array) {tid_free (t);
Signature · 1 line
2.18.0
PATCH 2/2 net/cxgbe: skip parsing match items with no spec
In reply to Rahul LakkireddySkip parsing pattern match items that have no spec. This fixes NULL dereference when accessing their non-existent spec.
--- drivers/net/cxgbe/cxgbe_flow.c | 4 ++++ 1 file changed, 4 insertions(+)
drivers/net/cxgbe/cxgbe_flow.c +4 -0
@@ -732,6 +732,10 @@ cxgbe_rtef_parse_items(struct rte_flow *flow, "parse items cannot be repeated (except void)"); repeat[i->type] =1 ; +/* No spec found for this pattern item. Skip it */ +if (!i->spec) +break ; +/* validate the item */ ret =cxgbe_validate_item (i, e);if (ret)
Signature · 1 line
2.18.0
cover net/cxgbe: rte_flow related bug fixes
Patch 1 fixes memory corruption due to overlapping regions in TID table. Patch 2 fixes NULL pointer dereference when attempting to parse pattern match items without any spec.
Thanks,
Rahul
Rahul Lakkireddy (2):
net/cxgbe: fix overlapping regions in TID table net/cxgbe: skip parsing match items with no spec
drivers/net/cxgbe/cxgbe_flow.c | 4 ++++ drivers/net/cxgbe/cxgbe_main.c | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-)
Signature · 1 line
2.18.0
Quoted 10 lines · Rahul Lakkireddy
Patch 1 fixes memory corruption due to overlapping regions in TID table. Patch 2 fixes NULL pointer dereference when attempting to parse pattern match items without any spec.
Thanks,
RahulRahul Lakkireddy (2):
net/cxgbe: fix overlapping regions in TID table net/cxgbe: skip parsing match items with no spec
Series applied to dpdk-next-net/master, thanks.