git.droids-corp.org
/
dpdk.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
net/octeontx2: setup link config based on BP level
[dpdk.git]
/
drivers
/
net
/
mlx5
/
mlx5_rss.c
diff --git
a/drivers/net/mlx5/mlx5_rss.c
b/drivers/net/mlx5/mlx5_rss.c
index
d69b4c0
..
653b069
100644
(file)
--- a/
drivers/net/mlx5/mlx5_rss.c
+++ b/
drivers/net/mlx5/mlx5_rss.c
@@
-7,7
+7,6
@@
#include <stdint.h>
#include <errno.h>
#include <string.h>
#include <stdint.h>
#include <errno.h>
#include <string.h>
-#include <assert.h>
/* Verbs header. */
/* ISO C doesn't support unnamed structs/unions, disabling -pedantic. */
/* Verbs header. */
/* ISO C doesn't support unnamed structs/unions, disabling -pedantic. */
@@
-22,8
+21,8
@@
#include <rte_malloc.h>
#include <rte_ethdev_driver.h>
#include <rte_malloc.h>
#include <rte_ethdev_driver.h>
-#include "mlx5.h"
#include "mlx5_defs.h"
#include "mlx5_defs.h"
+#include "mlx5.h"
#include "mlx5_rxtx.h"
/**
#include "mlx5_rxtx.h"
/**
@@
-41,7
+40,7
@@
int
mlx5_rss_hash_update(struct rte_eth_dev *dev,
struct rte_eth_rss_conf *rss_conf)
{
mlx5_rss_hash_update(struct rte_eth_dev *dev,
struct rte_eth_rss_conf *rss_conf)
{
- struct priv *priv = dev->data->dev_private;
+ struct
mlx5_
priv *priv = dev->data->dev_private;
unsigned int i;
unsigned int idx;
unsigned int i;
unsigned int idx;
@@
-50,10
+49,11
@@
mlx5_rss_hash_update(struct rte_eth_dev *dev,
return -rte_errno;
}
if (rss_conf->rss_key && rss_conf->rss_key_len) {
return -rte_errno;
}
if (rss_conf->rss_key && rss_conf->rss_key_len) {
- if (rss_conf->rss_key_len !=
rss_hash_default_key_len
) {
+ if (rss_conf->rss_key_len !=
MLX5_RSS_HASH_KEY_LEN
) {
DRV_LOG(ERR,
DRV_LOG(ERR,
- "port %u RSS key len must be %zu Bytes long",
- dev->data->port_id, rss_hash_default_key_len);
+ "port %u RSS key len must be %s Bytes long",
+ dev->data->port_id,
+ RTE_STR(MLX5_RSS_HASH_KEY_LEN));
rte_errno = EINVAL;
return -rte_errno;
}
rte_errno = EINVAL;
return -rte_errno;
}
@@
-94,7
+94,7
@@
int
mlx5_rss_hash_conf_get(struct rte_eth_dev *dev,
struct rte_eth_rss_conf *rss_conf)
{
mlx5_rss_hash_conf_get(struct rte_eth_dev *dev,
struct rte_eth_rss_conf *rss_conf)
{
- struct priv *priv = dev->data->dev_private;
+ struct
mlx5_
priv *priv = dev->data->dev_private;
if (!rss_conf) {
rte_errno = EINVAL;
if (!rss_conf) {
rte_errno = EINVAL;
@@
-124,7
+124,7
@@
mlx5_rss_hash_conf_get(struct rte_eth_dev *dev,
int
mlx5_rss_reta_index_resize(struct rte_eth_dev *dev, unsigned int reta_size)
{
int
mlx5_rss_reta_index_resize(struct rte_eth_dev *dev, unsigned int reta_size)
{
- struct priv *priv = dev->data->dev_private;
+ struct
mlx5_
priv *priv = dev->data->dev_private;
void *mem;
unsigned int old_size = priv->reta_idx_n;
void *mem;
unsigned int old_size = priv->reta_idx_n;
@@
-164,7
+164,7
@@
mlx5_dev_rss_reta_query(struct rte_eth_dev *dev,
struct rte_eth_rss_reta_entry64 *reta_conf,
uint16_t reta_size)
{
struct rte_eth_rss_reta_entry64 *reta_conf,
uint16_t reta_size)
{
- struct priv *priv = dev->data->dev_private;
+ struct
mlx5_
priv *priv = dev->data->dev_private;
unsigned int idx;
unsigned int i;
unsigned int idx;
unsigned int i;
@@
-200,7
+200,7
@@
mlx5_dev_rss_reta_update(struct rte_eth_dev *dev,
uint16_t reta_size)
{
int ret;
uint16_t reta_size)
{
int ret;
- struct priv *priv = dev->data->dev_private;
+ struct
mlx5_
priv *priv = dev->data->dev_private;
unsigned int idx;
unsigned int i;
unsigned int pos;
unsigned int idx;
unsigned int i;
unsigned int pos;
@@
-217,11
+217,12
@@
mlx5_dev_rss_reta_update(struct rte_eth_dev *dev,
pos = i % RTE_RETA_GROUP_SIZE;
if (((reta_conf[idx].mask >> i) & 0x1) == 0)
continue;
pos = i % RTE_RETA_GROUP_SIZE;
if (((reta_conf[idx].mask >> i) & 0x1) == 0)
continue;
-
assert
(reta_conf[idx].reta[pos] < priv->rxqs_n);
+
MLX5_ASSERT
(reta_conf[idx].reta[pos] < priv->rxqs_n);
(*priv->reta_idx)[i] = reta_conf[idx].reta[pos];
}
if (dev->data->dev_started) {
mlx5_dev_stop(dev);
(*priv->reta_idx)[i] = reta_conf[idx].reta[pos];
}
if (dev->data->dev_started) {
mlx5_dev_stop(dev);
+ priv->skip_default_rss_reta = 1;
return mlx5_dev_start(dev);
}
return 0;
return mlx5_dev_start(dev);
}
return 0;