mlx5: fix overwritten RSS configuration
RSS configuration provided by the application should not be used as storage by the PMD. Fixes: 2f97422e7759 ("mlx5: support RSS hash update and get") Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com> Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
This commit is contained in:
parent
2c4ee442c4
commit
c64ccc0eca
@ -122,6 +122,7 @@ struct priv {
|
||||
unsigned int hash_rxqs_n; /* Hash RX QPs array size. */
|
||||
/* RSS configuration array indexed by hash RX queue type. */
|
||||
struct rte_eth_rss_conf *(*rss_conf)[];
|
||||
uint64_t rss_hf; /* RSS DPDK bit field of active RSS. */
|
||||
struct rte_intr_handle intr_handle; /* Interrupt handler. */
|
||||
unsigned int (*reta_idx)[]; /* RETA index table. */
|
||||
unsigned int reta_idx_n; /* RETA index size. */
|
||||
|
@ -447,6 +447,7 @@ dev_configure(struct rte_eth_dev *dev)
|
||||
unsigned int j;
|
||||
unsigned int reta_idx_n;
|
||||
|
||||
priv->rss_hf = dev->data->dev_conf.rx_adv_conf.rss_conf.rss_hf;
|
||||
priv->rxqs = (void *)dev->data->rx_queues;
|
||||
priv->txqs = (void *)dev->data->tx_queues;
|
||||
if (txqs_n != priv->txqs_n) {
|
||||
|
@ -162,11 +162,8 @@ mlx5_rss_hash_update(struct rte_eth_dev *dev,
|
||||
rss_hash_default_key_len,
|
||||
ETH_RSS_PROTO_MASK);
|
||||
|
||||
/* Store the configuration set into port configure.
|
||||
* This will enable/disable hash RX queues associated to the protocols
|
||||
* enabled/disabled by this update. */
|
||||
priv->dev->data->dev_conf.rx_adv_conf.rss_conf.rss_hf =
|
||||
rss_conf->rss_hf;
|
||||
/* Store protocols for which RSS is enabled. */
|
||||
priv->rss_hf = rss_conf->rss_hf;
|
||||
priv_unlock(priv);
|
||||
assert(err >= 0);
|
||||
return -err;
|
||||
|
@ -312,7 +312,7 @@ priv_make_ind_table_init(struct priv *priv,
|
||||
/* Mandatory to receive frames not handled by normal hash RX queues. */
|
||||
unsigned int hash_types_sup = 1 << HASH_RXQ_ETH;
|
||||
|
||||
rss_hf = priv->dev->data->dev_conf.rx_adv_conf.rss_conf.rss_hf;
|
||||
rss_hf = priv->rss_hf;
|
||||
/* Process other protocols only if more than one queue. */
|
||||
if (priv->rxqs_n > 1)
|
||||
for (i = 0; (i != hash_rxq_init_n); ++i)
|
||||
|
Loading…
x
Reference in New Issue
Block a user