summaryrefslogtreecommitdiffstats
path: root/dpdk/dpdk-17.02_patches/0003-dpdk-dev-2-2-net-mlx5-fix-extended-statistics-wrong-number.patch
diff options
context:
space:
mode:
authorDamjan Marion <damarion@cisco.com>2018-06-06 14:23:42 +0200
committerMarco Varlese <marco.varlese@suse.de>2018-06-07 05:48:49 +0000
commit0e969ac8431c80ff4bca5f6985876b1c584eefcd (patch)
tree3860c4273c016bd23f2fa1e5cd51f854999c1274 /dpdk/dpdk-17.02_patches/0003-dpdk-dev-2-2-net-mlx5-fix-extended-statistics-wrong-number.patch
parentd018870d1b02109fc8b328446f15312fdd2fcd11 (diff)
Add support for DPDK 18.05
Change-Id: I205932bc727c990011bbbe1dc6c0cf5349d19806 Signed-off-by: Damjan Marion <damarion@cisco.com>
Diffstat (limited to 'dpdk/dpdk-17.02_patches/0003-dpdk-dev-2-2-net-mlx5-fix-extended-statistics-wrong-number.patch')
-rw-r--r--dpdk/dpdk-17.02_patches/0003-dpdk-dev-2-2-net-mlx5-fix-extended-statistics-wrong-number.patch87
1 files changed, 0 insertions, 87 deletions
diff --git a/dpdk/dpdk-17.02_patches/0003-dpdk-dev-2-2-net-mlx5-fix-extended-statistics-wrong-number.patch b/dpdk/dpdk-17.02_patches/0003-dpdk-dev-2-2-net-mlx5-fix-extended-statistics-wrong-number.patch
deleted file mode 100644
index 05c2e8df82c..00000000000
--- a/dpdk/dpdk-17.02_patches/0003-dpdk-dev-2-2-net-mlx5-fix-extended-statistics-wrong-number.patch
+++ /dev/null
@@ -1,87 +0,0 @@
-diff --git a/drivers/net/mlx5/mlx5_stats.c b/drivers/net/mlx5/mlx5_stats.c
-index 0c80e4f..60ffbaa 100644
---- a/drivers/net/mlx5/mlx5_stats.c
-+++ b/drivers/net/mlx5/mlx5_stats.c
-@@ -166,6 +166,29 @@ struct mlx5_counter_ctrl {
- }
-
- /**
-+ * Query the number of statistics provided by ETHTOOL.
-+ *
-+ * @param priv
-+ * Pointer to private structure.
-+ *
-+ * @return
-+ * Number of statistics on success, -1 on error.
-+ */
-+static int
-+priv_ethtool_get_stats_n(struct priv *priv) {
-+ struct ethtool_drvinfo drvinfo;
-+ struct ifreq ifr;
-+
-+ drvinfo.cmd = ETHTOOL_GDRVINFO;
-+ ifr.ifr_data = (caddr_t)&drvinfo;
-+ if (priv_ifreq(priv, SIOCETHTOOL, &ifr) != 0) {
-+ WARN("unable to query number of statistics");
-+ return -1;
-+ }
-+ return drvinfo.n_stats;
-+}
-+
-+/**
- * Init the structures to read device counters.
- *
- * @param priv
-@@ -178,19 +201,11 @@ struct mlx5_counter_ctrl {
- unsigned int i;
- unsigned int j;
- struct ifreq ifr;
-- struct ethtool_drvinfo drvinfo;
- struct ethtool_gstrings *strings = NULL;
- unsigned int dev_stats_n;
- unsigned int str_sz;
-
-- /* How many statistics are available. */
-- drvinfo.cmd = ETHTOOL_GDRVINFO;
-- ifr.ifr_data = (caddr_t)&drvinfo;
-- if (priv_ifreq(priv, SIOCETHTOOL, &ifr) != 0) {
-- WARN("unable to get driver info");
-- return;
-- }
-- dev_stats_n = drvinfo.n_stats;
-+ dev_stats_n = priv_ethtool_get_stats_n(priv);
- if (dev_stats_n < 1) {
- WARN("no extended statistics available");
- return;
-@@ -410,7 +425,15 @@ struct mlx5_counter_ctrl {
- int ret = xstats_n;
-
- if (n >= xstats_n && stats) {
-+ struct mlx5_xstats_ctrl *xstats_ctrl = &priv->xstats_ctrl;
-+ int stats_n;
-+
- priv_lock(priv);
-+ stats_n = priv_ethtool_get_stats_n(priv);
-+ if (stats_n < 0)
-+ return -1;
-+ if (xstats_ctrl->stats_n != stats_n)
-+ priv_xstats_init(priv);
- ret = priv_xstats_get(priv, stats);
- priv_unlock(priv);
- }
-@@ -427,8 +450,15 @@ struct mlx5_counter_ctrl {
- mlx5_xstats_reset(struct rte_eth_dev *dev)
- {
- struct priv *priv = mlx5_get_priv(dev);
-+ struct mlx5_xstats_ctrl *xstats_ctrl = &priv->xstats_ctrl;
-+ int stats_n;
-
- priv_lock(priv);
-+ stats_n = priv_ethtool_get_stats_n(priv);
-+ if (stats_n < 0)
-+ return;
-+ if (xstats_ctrl->stats_n != stats_n)
-+ priv_xstats_init(priv);
- priv_xstats_reset(priv);
- priv_unlock(priv);
- }