summaryrefslogtreecommitdiff
path: root/drivers/net/mlx5/mlx5_ethdev.c
diff options
context:
space:
mode:
authorNĂ©lio Laranjeiro <nelio.laranjeiro@6wind.com>2018-03-05 13:20:57 +0100
committerFerruh Yigit <ferruh.yigit@intel.com>2018-03-30 14:08:43 +0200
commita61888c8f297eac7e917850e2a4f66601bb715c1 (patch)
treefd63383fe5c7828cfe830e3809226c7c4bc417f9 /drivers/net/mlx5/mlx5_ethdev.c
parentc3637258d8946ed3c490c358202baaaf673526ba (diff)
downloaddpdk-a61888c8f297eac7e917850e2a4f66601bb715c1.zip
dpdk-a61888c8f297eac7e917850e2a4f66601bb715c1.tar.gz
dpdk-a61888c8f297eac7e917850e2a4f66601bb715c1.tar.xz
net/mlx5: fix sriov flag
priv_get_num_vfs() was used to help the PMD in prefetching the mbuf in datapath when the PMD was behaving in VF mode. This knowledge is no more used. Fixes: 528a9fbec6de ("net/mlx5: support ConnectX-5 devices") Cc: stable@dpdk.org Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com> Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Diffstat (limited to 'drivers/net/mlx5/mlx5_ethdev.c')
-rw-r--r--drivers/net/mlx5/mlx5_ethdev.c37
1 files changed, 0 insertions, 37 deletions
diff --git a/drivers/net/mlx5/mlx5_ethdev.c b/drivers/net/mlx5/mlx5_ethdev.c
index b73cb53..f98fc4c 100644
--- a/drivers/net/mlx5/mlx5_ethdev.c
+++ b/drivers/net/mlx5/mlx5_ethdev.c
@@ -201,43 +201,6 @@ priv_ifreq(const struct priv *priv, int req, struct ifreq *ifr)
}
/**
- * Return the number of active VFs for the current device.
- *
- * @param[in] priv
- * Pointer to private structure.
- * @param[out] num_vfs
- * Number of active VFs.
- *
- * @return
- * 0 on success, -1 on failure and errno is set.
- */
-int
-priv_get_num_vfs(struct priv *priv, uint16_t *num_vfs)
-{
- /* The sysfs entry name depends on the operating system. */
- const char **name = (const char *[]){
- "sriov_numvfs",
- "mlx5_num_vfs",
- NULL,
- };
-
- do {
- int n;
- FILE *file;
- MKSTR(path, "%s/device/%s", priv->ibdev_path, *name);
-
- file = fopen(path, "rb");
- if (!file)
- continue;
- n = fscanf(file, "%" SCNu16, num_vfs);
- fclose(file);
- if (n == 1)
- return 0;
- } while (*(++name));
- return -1;
-}
-
-/**
* Get device MTU.
*
* @param priv