Thread (5 messages) 5 messages, 2 authors, 2017-08-30

Re: [dpdk-stable] [PATCH] net/sfc: specify correct scale table size on Rx start

From: Ferruh Yigit <hidden>
Date: 2017-08-30 07:24:30

On 8/29/2017 6:03 PM, Ferruh Yigit wrote:
On 8/28/2017 1:53 PM, Andrew Rybchenko wrote:
quoted
From: Ivan Malov <redacted>

efx_rx_scale_tbl_set() takes the number of entries in the scale table
to be set, not the size of the table in bytes; currently this bug does
not make any damage since the size argument is used to wrap the loop
on the input table when filling in an MCDI request in case if the table
size in the MCDI request is larger then one provided by the user,
and MCDI scale table size is the same as the size of the table provided
by the driver; this patch brings a fix for the bug

Fixes: 4ec1fc3ba881 ("net/sfc: add basic stubs for RSS support on driver attach")
Cc: stable@dpdk.org

Signed-off-by: Ivan Malov <redacted>
Signed-off-by: Andrew Rybchenko <redacted>
---
 drivers/net/sfc/sfc_rx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/sfc/sfc_rx.c b/drivers/net/sfc/sfc_rx.c
index 1bf8644..364f718 100644
--- a/drivers/net/sfc/sfc_rx.c
+++ b/drivers/net/sfc/sfc_rx.c
@@ -1068,7 +1068,7 @@ struct sfc_dp_rx sfc_efx_rx = {
 			goto finish;
 
It is not shown in this patch, but there is "sizeof(sa->rss_key)" usage
here, since its type is uint8_t, it is not wrong, but it can be good to
change that one too to RTE_DIM() both to show the intent and to be safe
if in the future type updated... But this is your call to update or not.
quoted
 		rc = efx_rx_scale_tbl_set(sa->nic, sa->rss_tbl,
-					  sizeof(sa->rss_tbl));
+					  RTE_DIM(sa->rss_tbl));
There are more sizeof(sa->rss_tbl) usage in sfc_ethdev.c [1], can you
please check them too? malloc and memcpy ones look suspicious.
My bad, please ignore this.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help