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/enic: fix freeing memory for descriptor ring
[dpdk.git]
/
drivers
/
net
/
mlx5
/
mlx5_ethdev.c
diff --git
a/drivers/net/mlx5/mlx5_ethdev.c
b/drivers/net/mlx5/mlx5_ethdev.c
index
0e7ed01
..
bf4232a
100644
(file)
--- a/
drivers/net/mlx5/mlx5_ethdev.c
+++ b/
drivers/net/mlx5/mlx5_ethdev.c
@@
-50,7
+50,7
@@
/* DPDK headers don't like -pedantic. */
#ifdef PEDANTIC
/* DPDK headers don't like -pedantic. */
#ifdef PEDANTIC
-#pragma GCC diagnostic ignored "-pedantic"
+#pragma GCC diagnostic ignored "-
W
pedantic"
#endif
#include <rte_atomic.h>
#include <rte_ethdev.h>
#endif
#include <rte_atomic.h>
#include <rte_ethdev.h>
@@
-60,7
+60,7
@@
#include <rte_alarm.h>
#include <rte_malloc.h>
#ifdef PEDANTIC
#include <rte_alarm.h>
#include <rte_malloc.h>
#ifdef PEDANTIC
-#pragma GCC diagnostic error "-pedantic"
+#pragma GCC diagnostic error "-
W
pedantic"
#endif
#include "mlx5.h"
#endif
#include "mlx5.h"
@@
-461,7
+461,7
@@
priv_set_flags(struct priv *priv, unsigned int keep, unsigned int flags)
if (priv_get_sysfs_ulong(priv, "flags", &tmp) == -1)
return -1;
tmp &= keep;
if (priv_get_sysfs_ulong(priv, "flags", &tmp) == -1)
return -1;
tmp &= keep;
- tmp |=
flags
;
+ tmp |=
(flags & (~keep))
;
return priv_set_sysfs_ulong(priv, "flags", tmp);
}
return priv_set_sysfs_ulong(priv, "flags", tmp);
}
@@
-583,7
+583,8
@@
mlx5_dev_infos_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *info)
(DEV_RX_OFFLOAD_IPV4_CKSUM |
DEV_RX_OFFLOAD_UDP_CKSUM |
DEV_RX_OFFLOAD_TCP_CKSUM) :
(DEV_RX_OFFLOAD_IPV4_CKSUM |
DEV_RX_OFFLOAD_UDP_CKSUM |
DEV_RX_OFFLOAD_TCP_CKSUM) :
- 0);
+ 0) |
+ (priv->hw_vlan_strip ? DEV_RX_OFFLOAD_VLAN_STRIP : 0);
if (!priv->mps)
info->tx_offload_capa = DEV_TX_OFFLOAD_VLAN_INSERT;
if (priv->hw_csum)
if (!priv->mps)
info->tx_offload_capa = DEV_TX_OFFLOAD_VLAN_INSERT;
if (priv->hw_csum)
@@
-807,7
+808,7
@@
recover:
if (rehash)
ret = rxq_rehash(dev, rxq_ctrl);
else
if (rehash)
ret = rxq_rehash(dev, rxq_ctrl);
else
- ret = rxq_ctrl_setup(dev, rxq_ctrl, rxq->elts_n,
+ ret = rxq_ctrl_setup(dev, rxq_ctrl,
1 <<
rxq->elts_n,
rxq_ctrl->socket, NULL, rxq->mp);
if (!ret)
continue;
rxq_ctrl->socket, NULL, rxq->mp);
if (!ret)
continue;
@@
-1150,7
+1151,7
@@
priv_dev_interrupt_handler_install(struct priv *priv, struct rte_eth_dev *dev)
/**
* Change the link state (UP / DOWN).
*
/**
* Change the link state (UP / DOWN).
*
- * @param
de
v
+ * @param
pri
v
* Pointer to Ethernet device structure.
* @param up
* Nonzero for link up, otherwise link down.
* Pointer to Ethernet device structure.
* @param up
* Nonzero for link up, otherwise link down.
@@
-1313,7
+1314,7
@@
mlx5_secondary_data_setup(struct priv *priv)
if (txq_ctrl != NULL) {
if (txq_ctrl_setup(priv->dev,
primary_txq_ctrl,
if (txq_ctrl != NULL) {
if (txq_ctrl_setup(priv->dev,
primary_txq_ctrl,
- primary_txq->elts_n,
+
1 <<
primary_txq->elts_n,
primary_txq_ctrl->socket,
NULL) == 0) {
txq_ctrl->txq.stats.idx =
primary_txq_ctrl->socket,
NULL) == 0) {
txq_ctrl->txq.stats.idx =
@@
-1397,10
+1398,6
@@
priv_select_tx_function(struct priv *priv)
} else if ((priv->sriov == 0) && priv->mps) {
priv->dev->tx_pkt_burst = mlx5_tx_burst_mpw;
DEBUG("selected MPW TX function");
} else if ((priv->sriov == 0) && priv->mps) {
priv->dev->tx_pkt_burst = mlx5_tx_burst_mpw;
DEBUG("selected MPW TX function");
- } else if (priv->txq_inline && (priv->txqs_n >= priv->txqs_inline)) {
- priv->dev->tx_pkt_burst = mlx5_tx_burst_inline;
- DEBUG("selected inline TX function (%u >= %u queues)",
- priv->txqs_n, priv->txqs_inline);
}
}
}
}