[dpdk-dev] [PATCH v3 1/7] net/mrvl: sync compilation with musdk-17.10

Tomasz Duszynski tdu at semihalf.com
Tue Dec 5 10:39:16 CET 2017


Followig changes are needed to switch to musdk-17.10:

- With a new version of the musdk library it's no longer necessary to
  explicitly define MVCONF_ARCH_DMA_ADDR_T_64BIT and
  CONF_PP2_BPOOL_COOKIE_SIZE.

  Proper defines are autogenerated by ./configure script based on
  passed options and available after mv_autogen_comp_flags.h inclusion.

- API used to set promiscuous mode was renamed. Thus in order to
  compile against the latest library new API must be used.

Signed-off-by: Tomasz Duszynski <tdu at semihalf.com>
Acked-by: Jianbo Liu <jianbo.liu at arm.com>
---
 drivers/net/mrvl/Makefile      | 4 ++--
 drivers/net/mrvl/mrvl_ethdev.c | 8 ++------
 drivers/net/mrvl/mrvl_ethdev.h | 5 +++++
 3 files changed, 9 insertions(+), 8 deletions(-)

diff --git a/drivers/net/mrvl/Makefile b/drivers/net/mrvl/Makefile
index 815c3ba..f75e53c 100644
--- a/drivers/net/mrvl/Makefile
+++ b/drivers/net/mrvl/Makefile
@@ -51,8 +51,8 @@ EXPORT_MAP := rte_pmd_mrvl_version.map

 # external library dependencies
 CFLAGS += -I$(LIBMUSDK_PATH)/include
-CFLAGS += -DMVCONF_ARCH_DMA_ADDR_T_64BIT
-CFLAGS += -DCONF_PP2_BPOOL_COOKIE_SIZE=32
+CFLAGS += -DMVCONF_TYPES_PUBLIC
+CFLAGS += -DMVCONF_DMA_PHYS_ADDR_T_PUBLIC
 CFLAGS += $(WERROR_FLAGS)
 CFLAGS += -O3
 LDLIBS += -L$(LIBMUSDK_PATH)/lib
diff --git a/drivers/net/mrvl/mrvl_ethdev.c b/drivers/net/mrvl/mrvl_ethdev.c
index 2936165..a1ae2c1 100644
--- a/drivers/net/mrvl/mrvl_ethdev.c
+++ b/drivers/net/mrvl/mrvl_ethdev.c
@@ -47,10 +47,6 @@
 #undef container_of
 #endif

-#include <drivers/mv_pp2.h>
-#include <drivers/mv_pp2_bpool.h>
-#include <drivers/mv_pp2_hif.h>
-
 #include <fcntl.h>
 #include <linux/ethtool.h>
 #include <linux/sockios.h>
@@ -690,7 +686,7 @@ mrvl_promiscuous_enable(struct rte_eth_dev *dev)
 	struct mrvl_priv *priv = dev->data->dev_private;
 	int ret;

-	ret = pp2_ppio_set_uc_promisc(priv->ppio, 1);
+	ret = pp2_ppio_set_promisc(priv->ppio, 1);
 	if (ret)
 		RTE_LOG(ERR, PMD, "Failed to enable promiscuous mode\n");
 }
@@ -724,7 +720,7 @@ mrvl_promiscuous_disable(struct rte_eth_dev *dev)
 	struct mrvl_priv *priv = dev->data->dev_private;
 	int ret;

-	ret = pp2_ppio_set_uc_promisc(priv->ppio, 0);
+	ret = pp2_ppio_set_promisc(priv->ppio, 0);
 	if (ret)
 		RTE_LOG(ERR, PMD, "Failed to disable promiscuous mode\n");
 }
diff --git a/drivers/net/mrvl/mrvl_ethdev.h b/drivers/net/mrvl/mrvl_ethdev.h
index 2a4ab5a..8a647a5 100644
--- a/drivers/net/mrvl/mrvl_ethdev.h
+++ b/drivers/net/mrvl/mrvl_ethdev.h
@@ -36,7 +36,12 @@
 #define _MRVL_ETHDEV_H_

 #include <rte_spinlock.h>
+
+#include <env/mv_autogen_comp_flags.h>
+#include <drivers/mv_pp2.h>
+#include <drivers/mv_pp2_bpool.h>
 #include <drivers/mv_pp2_cls.h>
+#include <drivers/mv_pp2_hif.h>
 #include <drivers/mv_pp2_ppio.h>

 /** Maximum number of rx queues per port */
--
2.7.4



More information about the dev mailing list