* [PATCH 07/12] net/ionic: fix RSS query routine
[not found] <20240119204150.723-1-andrew.boyer@amd.com>
@ 2024-01-19 20:41 ` Andrew Boyer
2024-01-22 15:44 ` Please ignore " Boyer, Andrew
0 siblings, 1 reply; 2+ messages in thread
From: Andrew Boyer @ 2024-01-19 20:41 UTC (permalink / raw)
To: ferruh.yigit; +Cc: andrew.boyer, Akshay Dorwat, cardigliano, stable
From: Akshay Dorwat <akshay.dorwat@amd.com>
It can't use memcpy() because the LIF fields are only 8-bit values.
Instead, copy the values individually.
Fixes: 22e7171bc63b ("net/ionic: support RSS")
Cc: cardigliano@ntop.org
Cc: stable@dpdk.org
Signed-off-by: Akshay Dorwat <akshay.dorwat@amd.com>
Signed-off-by: Andrew Boyer <andrew.boyer@amd.com>
---
drivers/net/ionic/ionic_ethdev.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/drivers/net/ionic/ionic_ethdev.c b/drivers/net/ionic/ionic_ethdev.c
index 340fd0cd59..008e50e0b9 100644
--- a/drivers/net/ionic/ionic_ethdev.c
+++ b/drivers/net/ionic/ionic_ethdev.c
@@ -561,7 +561,7 @@ ionic_dev_rss_reta_query(struct rte_eth_dev *eth_dev,
struct ionic_lif *lif = IONIC_ETH_DEV_TO_LIF(eth_dev);
struct ionic_adapter *adapter = lif->adapter;
struct ionic_identity *ident = &adapter->ident;
- int i, num;
+ int i, j, num;
uint16_t tbl_sz = rte_le_to_cpu_16(ident->lif.eth.rss_ind_tbl_sz);
IONIC_PRINT_CALL();
@@ -582,9 +582,10 @@ ionic_dev_rss_reta_query(struct rte_eth_dev *eth_dev,
num = reta_size / RTE_ETH_RETA_GROUP_SIZE;
for (i = 0; i < num; i++) {
- memcpy(reta_conf->reta,
- &lif->rss_ind_tbl[i * RTE_ETH_RETA_GROUP_SIZE],
- RTE_ETH_RETA_GROUP_SIZE);
+ for (j = 0; j < RTE_ETH_RETA_GROUP_SIZE; j++) {
+ reta_conf->reta[j] =
+ lif->rss_ind_tbl[(i * RTE_ETH_RETA_GROUP_SIZE) + j];
+ }
reta_conf++;
}
--
2.17.1
^ permalink raw reply [flat|nested] 2+ messages in thread
* Please ignore Re: [PATCH 07/12] net/ionic: fix RSS query routine
2024-01-19 20:41 ` [PATCH 07/12] net/ionic: fix RSS query routine Andrew Boyer
@ 2024-01-22 15:44 ` Boyer, Andrew
0 siblings, 0 replies; 2+ messages in thread
From: Boyer, Andrew @ 2024-01-22 15:44 UTC (permalink / raw)
To: stable
Please ignore. This was not ready for submission to the list.
My apologies,
Andrew
> On Jan 19, 2024, at 3:41 PM, Boyer, Andrew <Andrew.Boyer@amd.com> wrote:
>
> From: Akshay Dorwat <akshay.dorwat@amd.com>
>
> It can't use memcpy() because the LIF fields are only 8-bit values.
> Instead, copy the values individually.
>
> Fixes: 22e7171bc63b ("net/ionic: support RSS")
> Cc: cardigliano@ntop.org
> Cc: stable@dpdk.org
>
> Signed-off-by: Akshay Dorwat <akshay.dorwat@amd.com>
> Signed-off-by: Andrew Boyer <andrew.boyer@amd.com>
> ---
> drivers/net/ionic/ionic_ethdev.c | 9 +++++----
> 1 file changed, 5 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/net/ionic/ionic_ethdev.c b/drivers/net/ionic/ionic_ethdev.c
> index 340fd0cd59..008e50e0b9 100644
> --- a/drivers/net/ionic/ionic_ethdev.c
> +++ b/drivers/net/ionic/ionic_ethdev.c
> @@ -561,7 +561,7 @@ ionic_dev_rss_reta_query(struct rte_eth_dev *eth_dev,
> struct ionic_lif *lif = IONIC_ETH_DEV_TO_LIF(eth_dev);
> struct ionic_adapter *adapter = lif->adapter;
> struct ionic_identity *ident = &adapter->ident;
> - int i, num;
> + int i, j, num;
> uint16_t tbl_sz = rte_le_to_cpu_16(ident->lif.eth.rss_ind_tbl_sz);
>
> IONIC_PRINT_CALL();
> @@ -582,9 +582,10 @@ ionic_dev_rss_reta_query(struct rte_eth_dev *eth_dev,
> num = reta_size / RTE_ETH_RETA_GROUP_SIZE;
>
> for (i = 0; i < num; i++) {
> - memcpy(reta_conf->reta,
> - &lif->rss_ind_tbl[i * RTE_ETH_RETA_GROUP_SIZE],
> - RTE_ETH_RETA_GROUP_SIZE);
> + for (j = 0; j < RTE_ETH_RETA_GROUP_SIZE; j++) {
> + reta_conf->reta[j] =
> + lif->rss_ind_tbl[(i * RTE_ETH_RETA_GROUP_SIZE) + j];
> + }
> reta_conf++;
> }
>
> --
> 2.17.1
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-01-22 15:44 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <20240119204150.723-1-andrew.boyer@amd.com>
2024-01-19 20:41 ` [PATCH 07/12] net/ionic: fix RSS query routine Andrew Boyer
2024-01-22 15:44 ` Please ignore " Boyer, Andrew
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).