On 10/29/19 8:03 AM, pbhagavat...@marvell.com wrote:
From: Pavan Nikhilesh <pbhagavat...@marvell.com>

Add new Rx offload flag `DEV_RX_OFFLOAD_RSS_HASH` which can be used to
enable/disable PMDs write to `rte_mbuf::hash::rss`.
PMDs notify the validity of `rte_mbuf::hash:rss` to the applcation
by enabling `PKT_RX_RSS_HASH ` flag in `rte_mbuf::ol_flags`.

Signed-off-by: Pavan Nikhilesh <pbhagavat...@marvell.com>
Reviewed-by: Andrew Rybchenko <arybche...@solarflare.com>

[snip]

diff --git a/lib/librte_ethdev/rte_ethdev.c b/lib/librte_ethdev/rte_ethdev.c
index 6ce8f5e75..fef1dbb61 100644

[snip]

@@ -1303,6 +1304,16 @@ rte_eth_dev_configure(uint16_t port_id, uint16_t 
nb_rx_q, uint16_t nb_tx_q,
                goto rollback;
        }
+ /* Check if Rx*/
+       if ((dev_conf->rxmode.mq_mode & ETH_MQ_RX_NONE) &&

ETH_MQ_RX_NONE is 0 so above condition is always false.
It should be
if ((dev_conf->rxmode.mq_mode & ETH_MQ_RX_RSS_FLAG) == 0 &&

+           (dev_conf->rxmode.offloads & DEV_RX_OFFLOAD_RSS_HASH)) {
+               RTE_ETHDEV_LOG(ERR,
+                       "Ethdev port_id=%u config invalid mq_mode %s with offloads 
%s\n",
+                       port_id, "ETH_MQ_RX_NONE", "DEV_RX_OFFLOAD_RSS_HASH");

I think the error message is a bit misleading. It should be:

"Ethdev port_id=%u config invalid mq_mode without RSS but %s offload is 
requested\n"

rte_eth_dev_rx_offload_name(DEV_RX_OFFLOAD_RSS_HASH) should be used
to log offload name.

+               ret = -EINVAL;
+               goto rollback;
+       }
+
        /*
         * Setup new number of RX/TX queues and reconfigure device.
         */

[snip]

Reply via email to