#include <errno.h>
#include <string.h>
-/* Verbs header. */
-/* ISO C doesn't support unnamed structs/unions, disabling -pedantic. */
-#ifdef PEDANTIC
-#pragma GCC diagnostic ignored "-Wpedantic"
-#endif
-#include <infiniband/verbs.h>
-#ifdef PEDANTIC
-#pragma GCC diagnostic error "-Wpedantic"
-#endif
-
-#include <rte_ethdev_driver.h>
+#include <ethdev_driver.h>
+#include <mlx5_glue.h>
#include "mlx5.h"
-#include "mlx5_rxtx.h"
#include "mlx5_utils.h"
/**
dev->data->port_id);
return 0;
}
- if (priv->config.vf) {
- ret = mlx5_nl_promisc(dev, 1);
+ if (priv->sh->dev_cap.vf || priv->sh->dev_cap.sf) {
+ ret = mlx5_os_set_promisc(dev, 1);
if (ret)
return ret;
}
int ret;
dev->data->promiscuous = 0;
- if (priv->config.vf) {
- ret = mlx5_nl_promisc(dev, 0);
+ if (priv->sh->dev_cap.vf || priv->sh->dev_cap.sf) {
+ ret = mlx5_os_set_promisc(dev, 0);
if (ret)
return ret;
}
dev->data->port_id);
return 0;
}
- if (priv->config.vf) {
- ret = mlx5_nl_allmulti(dev, 1);
+ if (priv->sh->dev_cap.vf || priv->sh->dev_cap.sf) {
+ ret = mlx5_os_set_allmulti(dev, 1);
if (ret)
goto error;
}
int ret;
dev->data->all_multicast = 0;
- if (priv->config.vf) {
- ret = mlx5_nl_allmulti(dev, 0);
+ if (priv->sh->dev_cap.vf || priv->sh->dev_cap.sf) {
+ ret = mlx5_os_set_allmulti(dev, 0);
if (ret)
goto error;
}