net/mvpp2: adjust number of unicast address
[dpdk.git] / drivers / net / mvpp2 / mrvl_ethdev.c
index e28dcc0..ced9578 100644 (file)
@@ -1,6 +1,6 @@
 /* SPDX-License-Identifier: BSD-3-Clause
- * Copyright(c) 2017 Marvell International Ltd.
- * Copyright(c) 2017 Semihalf.
+ * Copyright(c) 2017-2021 Marvell International Ltd.
+ * Copyright(c) 2017-2021 Semihalf.
  * All rights reserved.
  */
 
 /* prefetch shift */
 #define MRVL_MUSDK_PREFETCH_SHIFT 2
 
-/* TCAM has 25 entries reserved for uc/mc filter entries */
-#define MRVL_MAC_ADDRS_MAX 25
+/* TCAM has 25 entries reserved for uc/mc filter entries
+ * + 1 for primary mac address
+ */
+#define MRVL_MAC_ADDRS_MAX (1 + 25)
 #define MRVL_MATCH_LEN 16
 #define MRVL_PKT_EFFEC_OFFS (MRVL_PKT_OFFS + MV_MH_SIZE)
 /* Maximum allowable packet size */
                          DEV_RX_OFFLOAD_CHECKSUM)
 
 /** Port Tx offloads capabilities */
-#define MRVL_TX_OFFLOADS (DEV_TX_OFFLOAD_IPV4_CKSUM | \
-                         DEV_TX_OFFLOAD_UDP_CKSUM | \
-                         DEV_TX_OFFLOAD_TCP_CKSUM | \
+#define MRVL_TX_OFFLOAD_CHECKSUM (DEV_TX_OFFLOAD_IPV4_CKSUM | \
+                                 DEV_TX_OFFLOAD_UDP_CKSUM  | \
+                                 DEV_TX_OFFLOAD_TCP_CKSUM)
+#define MRVL_TX_OFFLOADS (MRVL_TX_OFFLOAD_CHECKSUM | \
                          DEV_TX_OFFLOAD_MULTI_SEGS)
 
+#define MRVL_TX_PKT_OFFLOADS (PKT_TX_IP_CKSUM | \
+                             PKT_TX_TCP_CKSUM | \
+                             PKT_TX_UDP_CKSUM)
+
 static const char * const valid_args[] = {
        MRVL_IFACE_NAME_ARG,
        MRVL_CFG_ARG,
@@ -146,6 +153,15 @@ static int rte_pmd_mrvl_remove(struct rte_vdev_device *vdev);
 static void mrvl_deinit_pp2(void);
 static void mrvl_deinit_hifs(void);
 
+static int
+mrvl_mac_addr_add(struct rte_eth_dev *dev, struct rte_ether_addr *mac_addr,
+                 uint32_t index, uint32_t vmdq __rte_unused);
+static int
+mrvl_mac_addr_set(struct rte_eth_dev *dev, struct rte_ether_addr *mac_addr);
+static int
+mrvl_vlan_filter_set(struct rte_eth_dev *dev, uint16_t vlan_id, int on);
+static int mrvl_promiscuous_enable(struct rte_eth_dev *dev);
+static int mrvl_allmulticast_enable(struct rte_eth_dev *dev);
 
 #define MRVL_XSTATS_TBL_ENTRY(name) { \
        #name, offsetof(struct pp2_ppio_statistics, name),      \
@@ -403,7 +419,7 @@ mrvl_dev_configure(struct rte_eth_dev *dev)
        }
 
        return mrvl_configure_rss(priv,
-                                 &dev->data->dev_conf.rx_adv_conf.rss_conf);
+                       &dev->data->dev_conf.rx_adv_conf.rss_conf);
 }
 
 /**
@@ -490,8 +506,10 @@ mrvl_dev_set_link_up(struct rte_eth_dev *dev)
        struct mrvl_priv *priv = dev->data->dev_private;
        int ret;
 
-       if (!priv->ppio)
-               return -EPERM;
+       if (!priv->ppio) {
+               dev->data->dev_link.link_status = ETH_LINK_UP;
+               return 0;
+       }
 
        ret = pp2_ppio_enable(priv->ppio);
        if (ret)
@@ -505,10 +523,13 @@ mrvl_dev_set_link_up(struct rte_eth_dev *dev)
         * Set mtu to default DPDK value here.
         */
        ret = mrvl_mtu_set(dev, dev->data->mtu);
-       if (ret)
+       if (ret) {
                pp2_ppio_disable(priv->ppio);
+               return ret;
+       }
 
-       return ret;
+       dev->data->dev_link.link_status = ETH_LINK_UP;
+       return 0;
 }
 
 /**
@@ -524,11 +545,18 @@ static int
 mrvl_dev_set_link_down(struct rte_eth_dev *dev)
 {
        struct mrvl_priv *priv = dev->data->dev_private;
+       int ret;
 
-       if (!priv->ppio)
-               return -EPERM;
+       if (!priv->ppio) {
+               dev->data->dev_link.link_status = ETH_LINK_DOWN;
+               return 0;
+       }
+       ret = pp2_ppio_disable(priv->ppio);
+       if (ret)
+               return ret;
 
-       return pp2_ppio_disable(priv->ppio);
+       dev->data->dev_link.link_status = ETH_LINK_DOWN;
+       return 0;
 }
 
 /**
@@ -595,6 +623,51 @@ mrvl_tx_queue_stop(struct rte_eth_dev *dev, uint16_t queue_id)
        return 0;
 }
 
+/**
+ * Populate VLAN Filter configuration.
+ *
+ * @param dev
+ *   Pointer to Ethernet device structure.
+ * @param on
+ *   Toggle filter.
+ *
+ * @return
+ *   0 on success, negative error value otherwise.
+ */
+static int mrvl_populate_vlan_table(struct rte_eth_dev *dev, int on)
+{
+       uint32_t j;
+       int ret;
+       struct rte_vlan_filter_conf *vfc;
+
+       vfc = &dev->data->vlan_filter_conf;
+       for (j = 0; j < RTE_DIM(vfc->ids); j++) {
+               uint64_t vlan;
+               uint64_t vbit;
+               uint64_t ids = vfc->ids[j];
+
+               if (ids == 0)
+                       continue;
+
+               while (ids) {
+                       vlan = 64 * j;
+                       /* count trailing zeroes */
+                       vbit = ~ids & (ids - 1);
+                       /* clear least significant bit set */
+                       ids ^= (ids ^ (ids - 1)) ^ vbit;
+                       for (; vbit; vlan++)
+                               vbit >>= 1;
+                       ret = mrvl_vlan_filter_set(dev, vlan, on);
+                       if (ret) {
+                               MRVL_LOG(ERR, "Failed to setup VLAN filter\n");
+                               return ret;
+                       }
+               }
+       }
+
+       return 0;
+}
+
 /**
  * DPDK callback to start the device.
  *
@@ -610,6 +683,7 @@ mrvl_dev_start(struct rte_eth_dev *dev)
        struct mrvl_priv *priv = dev->data->dev_private;
        char match[MRVL_MATCH_LEN];
        int ret = 0, i, def_init_size;
+       struct rte_ether_addr *mac_addr;
 
        if (priv->ppio)
                return mrvl_dev_set_link_up(dev);
@@ -617,6 +691,10 @@ mrvl_dev_start(struct rte_eth_dev *dev)
        snprintf(match, sizeof(match), "ppio-%d:%d",
                 priv->pp_id, priv->ppio_id);
        priv->ppio_params.match = match;
+       priv->ppio_params.eth_start_hdr = PP2_PPIO_HDR_ETH;
+       if (mrvl_qos_cfg)
+               priv->ppio_params.eth_start_hdr =
+                       mrvl_qos_cfg->port[dev->data->port_id].eth_start_hdr;
 
        /*
         * Calculate the minimum bpool size for refill feature as follows:
@@ -675,6 +753,30 @@ mrvl_dev_start(struct rte_eth_dev *dev)
        if (ret)
                MRVL_LOG(ERR, "Failed to set MTU to %d", dev->data->mtu);
 
+       if (!rte_is_zero_ether_addr(&dev->data->mac_addrs[0]))
+               mrvl_mac_addr_set(dev, &dev->data->mac_addrs[0]);
+
+       for (i = 1; i < MRVL_MAC_ADDRS_MAX; i++) {
+               mac_addr = &dev->data->mac_addrs[i];
+
+               /* skip zero address */
+               if (rte_is_zero_ether_addr(mac_addr))
+                       continue;
+
+               mrvl_mac_addr_add(dev, mac_addr, i, 0);
+       }
+
+       if (dev->data->all_multicast == 1)
+               mrvl_allmulticast_enable(dev);
+
+       if (dev->data->dev_conf.rxmode.offloads & DEV_RX_OFFLOAD_VLAN_FILTER) {
+               ret = mrvl_populate_vlan_table(dev, 1);
+               if (ret) {
+                       MRVL_LOG(ERR, "Failed to populate VLAN table");
+                       goto out;
+               }
+       }
+
        /* For default QoS config, don't start classifier. */
        if (mrvl_qos_cfg  &&
            mrvl_qos_cfg->port[dev->data->port_id].use_global_defaults == 0) {
@@ -685,12 +787,24 @@ mrvl_dev_start(struct rte_eth_dev *dev)
                }
        }
 
-       ret = mrvl_dev_set_link_up(dev);
+       ret = pp2_ppio_set_loopback(priv->ppio, dev->data->dev_conf.lpbk_mode);
        if (ret) {
-               MRVL_LOG(ERR, "Failed to set link up");
+               MRVL_LOG(ERR, "Failed to set loopback");
                goto out;
        }
 
+       if (dev->data->promiscuous == 1)
+               mrvl_promiscuous_enable(dev);
+
+       if (dev->data->dev_link.link_status == ETH_LINK_UP) {
+               ret = mrvl_dev_set_link_up(dev);
+               if (ret) {
+                       MRVL_LOG(ERR, "Failed to set link up");
+                       dev->data->dev_link.link_status = ETH_LINK_DOWN;
+                       goto out;
+               }
+       }
+
        /* start tx queues */
        for (i = 0; i < dev->data->nb_tx_queues; i++) {
                struct mrvl_txq *txq = dev->data->tx_queues[i];
@@ -995,10 +1109,10 @@ mrvl_promiscuous_enable(struct rte_eth_dev *dev)
        struct mrvl_priv *priv = dev->data->dev_private;
        int ret;
 
-       if (!priv->ppio)
-               return 0;
-
        if (priv->isolated)
+               return -ENOTSUP;
+
+       if (!priv->ppio)
                return 0;
 
        ret = pp2_ppio_set_promisc(priv->ppio, 1);
@@ -1025,10 +1139,10 @@ mrvl_allmulticast_enable(struct rte_eth_dev *dev)
        struct mrvl_priv *priv = dev->data->dev_private;
        int ret;
 
-       if (!priv->ppio)
-               return 0;
-
        if (priv->isolated)
+               return -ENOTSUP;
+
+       if (!priv->ppio)
                return 0;
 
        ret = pp2_ppio_set_mc_promisc(priv->ppio, 1);
@@ -1055,6 +1169,9 @@ mrvl_promiscuous_disable(struct rte_eth_dev *dev)
        struct mrvl_priv *priv = dev->data->dev_private;
        int ret;
 
+       if (priv->isolated)
+               return -ENOTSUP;
+
        if (!priv->ppio)
                return 0;
 
@@ -1082,6 +1199,9 @@ mrvl_allmulticast_disable(struct rte_eth_dev *dev)
        struct mrvl_priv *priv = dev->data->dev_private;
        int ret;
 
+       if (priv->isolated)
+               return -ENOTSUP;
+
        if (!priv->ppio)
                return 0;
 
@@ -1109,10 +1229,10 @@ mrvl_mac_addr_remove(struct rte_eth_dev *dev, uint32_t index)
        char buf[RTE_ETHER_ADDR_FMT_SIZE];
        int ret;
 
-       if (!priv->ppio)
+       if (priv->isolated)
                return;
 
-       if (priv->isolated)
+       if (!priv->ppio)
                return;
 
        ret = pp2_ppio_remove_mac_addr(priv->ppio,
@@ -1150,13 +1270,13 @@ mrvl_mac_addr_add(struct rte_eth_dev *dev, struct rte_ether_addr *mac_addr,
        if (priv->isolated)
                return -ENOTSUP;
 
+       if (!priv->ppio)
+               return 0;
+
        if (index == 0)
                /* For setting index 0, mrvl_mac_addr_set() should be used.*/
                return -1;
 
-       if (!priv->ppio)
-               return 0;
-
        /*
         * Maximum number of uc addresses can be tuned via kernel module mvpp2x
         * parameter uc_filter_max. Maximum number of mc addresses is then
@@ -1197,12 +1317,12 @@ mrvl_mac_addr_set(struct rte_eth_dev *dev, struct rte_ether_addr *mac_addr)
        struct mrvl_priv *priv = dev->data->dev_private;
        int ret;
 
-       if (!priv->ppio)
-               return 0;
-
        if (priv->isolated)
                return -ENOTSUP;
 
+       if (!priv->ppio)
+               return 0;
+
        ret = pp2_ppio_set_mac_addr(priv->ppio, mac_addr->addr_bytes);
        if (ret) {
                char buf[RTE_ETHER_ADDR_FMT_SIZE];
@@ -1578,16 +1698,51 @@ mrvl_vlan_filter_set(struct rte_eth_dev *dev, uint16_t vlan_id, int on)
 {
        struct mrvl_priv *priv = dev->data->dev_private;
 
-       if (!priv->ppio)
-               return -EPERM;
-
        if (priv->isolated)
                return -ENOTSUP;
 
+       if (!priv->ppio)
+               return 0;
+
        return on ? pp2_ppio_add_vlan(priv->ppio, vlan_id) :
                    pp2_ppio_remove_vlan(priv->ppio, vlan_id);
 }
 
+/**
+ * DPDK callback to Configure VLAN offload.
+ *
+ * @param dev
+ *   Pointer to Ethernet device structure.
+ * @param mask
+ *   VLAN offload mask.
+ *
+ * @return
+ *   0 on success, negative error value otherwise.
+ */
+static int mrvl_vlan_offload_set(struct rte_eth_dev *dev, int mask)
+{
+       uint64_t rx_offloads = dev->data->dev_conf.rxmode.offloads;
+       int ret;
+
+       if (mask & ETH_VLAN_STRIP_MASK)
+               MRVL_LOG(ERR, "VLAN stripping is not supported\n");
+
+       if (mask & ETH_VLAN_FILTER_MASK) {
+               if (rx_offloads & DEV_RX_OFFLOAD_VLAN_FILTER)
+                       ret = mrvl_populate_vlan_table(dev, 1);
+               else
+                       ret = mrvl_populate_vlan_table(dev, 0);
+
+               if (ret)
+                       return ret;
+       }
+
+       if (mask & ETH_VLAN_EXTEND_MASK)
+               MRVL_LOG(ERR, "Extend VLAN not supported\n");
+
+       return 0;
+}
+
 /**
  * Release buffers to hardware bpool (buffer-pool)
  *
@@ -1880,6 +2035,19 @@ mrvl_flow_ctrl_get(struct rte_eth_dev *dev, struct rte_eth_fc_conf *fc_conf)
 
        fc_conf->mode = en ? RTE_FC_RX_PAUSE : RTE_FC_NONE;
 
+       ret = pp2_ppio_get_tx_pause(priv->ppio, &en);
+       if (ret) {
+               MRVL_LOG(ERR, "Failed to read tx pause state");
+               return ret;
+       }
+
+       if (en) {
+               if (fc_conf->mode == RTE_FC_NONE)
+                       fc_conf->mode = RTE_FC_TX_PAUSE;
+               else
+                       fc_conf->mode = RTE_FC_FULL;
+       }
+
        return 0;
 }
 
@@ -1898,6 +2066,9 @@ static int
 mrvl_flow_ctrl_set(struct rte_eth_dev *dev, struct rte_eth_fc_conf *fc_conf)
 {
        struct mrvl_priv *priv = dev->data->dev_private;
+       struct pp2_ppio_tx_pause_params mrvl_pause_params;
+       int ret;
+       int rx_en, tx_en;
 
        if (!priv)
                return -EPERM;
@@ -1912,16 +2083,43 @@ mrvl_flow_ctrl_set(struct rte_eth_dev *dev, struct rte_eth_fc_conf *fc_conf)
                return -EINVAL;
        }
 
-       if (fc_conf->mode == RTE_FC_NONE ||
-           fc_conf->mode == RTE_FC_RX_PAUSE) {
-               int ret, en;
+       switch (fc_conf->mode) {
+       case RTE_FC_FULL:
+               rx_en = 1;
+               tx_en = 1;
+               break;
+       case RTE_FC_TX_PAUSE:
+               rx_en = 0;
+               tx_en = 1;
+               break;
+       case RTE_FC_RX_PAUSE:
+               rx_en = 1;
+               tx_en = 0;
+               break;
+       case RTE_FC_NONE:
+               rx_en = 0;
+               tx_en = 0;
+               break;
+       default:
+               MRVL_LOG(ERR, "Incorrect Flow control flag (%d)",
+                        fc_conf->mode);
+               return -EINVAL;
+       }
 
-               en = fc_conf->mode == RTE_FC_NONE ? 0 : 1;
-               ret = pp2_ppio_set_rx_pause(priv->ppio, en);
-               if (ret)
-                       MRVL_LOG(ERR,
-                               "Failed to change flowctrl on RX side");
+       /* Set RX flow control */
+       ret = pp2_ppio_set_rx_pause(priv->ppio, rx_en);
+       if (ret) {
+               MRVL_LOG(ERR, "Failed to change RX flowctrl");
+               return ret;
+       }
 
+       /* Set TX flow control */
+       mrvl_pause_params.en = tx_en;
+       /* all inqs participate in xon/xoff decision */
+       mrvl_pause_params.use_tc_pause_inqs = 0;
+       ret = pp2_ppio_set_tx_pause(priv->ppio, &mrvl_pause_params);
+       if (ret) {
+               MRVL_LOG(ERR, "Failed to change TX flowctrl");
                return ret;
        }
 
@@ -2081,6 +2279,7 @@ static const struct eth_dev_ops mrvl_ops = {
        .rxq_info_get = mrvl_rxq_info_get,
        .txq_info_get = mrvl_txq_info_get,
        .vlan_filter_set = mrvl_vlan_filter_set,
+       .vlan_offload_set = mrvl_vlan_offload_set,
        .tx_queue_start = mrvl_tx_queue_start,
        .tx_queue_stop = mrvl_tx_queue_stop,
        .rx_queue_setup = mrvl_rx_queue_setup,
@@ -2336,8 +2535,6 @@ mrvl_rx_pkt_burst(void *rxq, struct rte_mbuf **rx_pkts, uint16_t nb_pkts)
  *
  * @param ol_flags
  *   Offload flags.
- * @param packet_type
- *   Packet type bitfield.
  * @param l3_type
  *   Pointer to the pp2_ouq_l3_type structure.
  * @param l4_type
@@ -2346,12 +2543,9 @@ mrvl_rx_pkt_burst(void *rxq, struct rte_mbuf **rx_pkts, uint16_t nb_pkts)
  *   Will be set to 1 in case l3 checksum is computed.
  * @param l4_cksum
  *   Will be set to 1 in case l4 checksum is computed.
- *
- * @return
- *   0 on success, negative error value otherwise.
  */
-static inline int
-mrvl_prepare_proto_info(uint64_t ol_flags, uint32_t packet_type,
+static inline void
+mrvl_prepare_proto_info(uint64_t ol_flags,
                        enum pp2_outq_l3_type *l3_type,
                        enum pp2_outq_l4_type *l4_type,
                        int *gen_l3_cksum,
@@ -2361,26 +2555,22 @@ mrvl_prepare_proto_info(uint64_t ol_flags, uint32_t packet_type,
         * Based on ol_flags prepare information
         * for pp2_ppio_outq_desc_set_proto_info() which setups descriptor
         * for offloading.
+        * in most of the checksum cases ipv4 must be set, so this is the
+        * default value
         */
-       if (ol_flags & PKT_TX_IPV4) {
-               *l3_type = PP2_OUTQ_L3_TYPE_IPV4;
-               *gen_l3_cksum = ol_flags & PKT_TX_IP_CKSUM ? 1 : 0;
-       } else if (ol_flags & PKT_TX_IPV6) {
+       *l3_type = PP2_OUTQ_L3_TYPE_IPV4;
+       *gen_l3_cksum = ol_flags & PKT_TX_IP_CKSUM ? 1 : 0;
+
+       if (ol_flags & PKT_TX_IPV6) {
                *l3_type = PP2_OUTQ_L3_TYPE_IPV6;
                /* no checksum for ipv6 header */
                *gen_l3_cksum = 0;
-       } else {
-               /* if something different then stop processing */
-               return -1;
        }
 
-       ol_flags &= PKT_TX_L4_MASK;
-       if ((packet_type & RTE_PTYPE_L4_TCP) &&
-           ol_flags == PKT_TX_TCP_CKSUM) {
+       if ((ol_flags & PKT_TX_L4_MASK) == PKT_TX_TCP_CKSUM) {
                *l4_type = PP2_OUTQ_L4_TYPE_TCP;
                *gen_l4_cksum = 1;
-       } else if ((packet_type & RTE_PTYPE_L4_UDP) &&
-                  ol_flags == PKT_TX_UDP_CKSUM) {
+       } else if ((ol_flags & PKT_TX_L4_MASK) ==  PKT_TX_UDP_CKSUM) {
                *l4_type = PP2_OUTQ_L4_TYPE_UDP;
                *gen_l4_cksum = 1;
        } else {
@@ -2388,8 +2578,6 @@ mrvl_prepare_proto_info(uint64_t ol_flags, uint32_t packet_type,
                /* no checksum for other type */
                *gen_l4_cksum = 0;
        }
-
-       return 0;
 }
 
 /**
@@ -2490,7 +2678,7 @@ mrvl_tx_pkt_burst(void *txq, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
        struct pp2_hif *hif;
        struct pp2_ppio_desc descs[nb_pkts];
        unsigned int core_id = rte_lcore_id();
-       int i, ret, bytes_sent = 0;
+       int i, bytes_sent = 0;
        uint16_t num, sq_free_size;
        uint64_t addr;
 
@@ -2530,11 +2718,10 @@ mrvl_tx_pkt_burst(void *txq, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
                 * in case unsupported ol_flags were passed
                 * do not update descriptor offload information
                 */
-               ret = mrvl_prepare_proto_info(mbuf->ol_flags, mbuf->packet_type,
-                                             &l3_type, &l4_type, &gen_l3_cksum,
-                                             &gen_l4_cksum);
-               if (unlikely(ret))
+               if (!(mbuf->ol_flags & MRVL_TX_PKT_OFFLOADS))
                        continue;
+               mrvl_prepare_proto_info(mbuf->ol_flags, &l3_type, &l4_type,
+                                       &gen_l3_cksum, &gen_l4_cksum);
 
                pp2_ppio_outq_desc_set_proto_info(&descs[i], l3_type, l4_type,
                                                  mbuf->l2_len,
@@ -2584,7 +2771,7 @@ mrvl_tx_sg_pkt_burst(void *txq, struct rte_mbuf **tx_pkts,
        struct pp2_ppio_sg_pkts pkts;
        uint8_t frags[nb_pkts];
        unsigned int core_id = rte_lcore_id();
-       int i, j, ret, bytes_sent = 0;
+       int i, j, bytes_sent = 0;
        int tail, tail_first;
        uint16_t num, sq_free_size;
        uint16_t nb_segs, total_descs = 0;
@@ -2667,11 +2854,10 @@ mrvl_tx_sg_pkt_burst(void *txq, struct rte_mbuf **tx_pkts,
                /* In case unsupported ol_flags were passed
                 * do not update descriptor offload information
                 */
-               ret = mrvl_prepare_proto_info(mbuf->ol_flags, mbuf->packet_type,
-                                             &l3_type, &l4_type, &gen_l3_cksum,
-                                             &gen_l4_cksum);
-               if (unlikely(ret))
+               if (!(mbuf->ol_flags & MRVL_TX_PKT_OFFLOADS))
                        continue;
+               mrvl_prepare_proto_info(mbuf->ol_flags, &l3_type, &l4_type,
+                                       &gen_l3_cksum, &gen_l4_cksum);
 
                pp2_ppio_outq_desc_set_proto_info(&descs[tail_first], l3_type,
                                                  l4_type, mbuf->l2_len,
@@ -2838,6 +3024,8 @@ mrvl_eth_dev_create(struct rte_vdev_device *vdev, const char *name)
        eth_dev->dev_ops = &mrvl_ops;
        eth_dev->data->dev_flags |= RTE_ETH_DEV_AUTOFILL_QUEUE_XSTATS;
 
+       eth_dev->data->dev_link.link_status = ETH_LINK_UP;
+
        rte_eth_dev_probing_finish(eth_dev);
        return 0;
 out_free: