net/memif: add dev_link info

Message ID CAP=P++AXsmkgaMKZ_EGSgWkDTqg9a+ueJm=D04cM54AxmXbz9A@mail.gmail.com (mailing list archive)
State Superseded, archived
Delegated to: Ferruh Yigit
Headers
Series net/memif: add dev_link info |

Checks

Context Check Description
ci/checkpatch warning coding style issues
ci/Intel-compilation fail apply issues

Commit Message

Július Milan Feb. 4, 2020, 10:47 a.m. UTC
  This information is useful or needed for user applications as t-rex.

Signed-off-by: Július Milan <jmilan.dev@gmail.com>
---
 drivers/net/memif/rte_eth_memif.c | 8 ++++++++
 1 file changed, 8 insertions(+)

     eth_dev->dev_ops = &ops;
  

Patch

diff --git a/drivers/net/memif/rte_eth_memif.c
b/drivers/net/memif/rte_eth_memif.c
index 8dd1d0d63..27c0f0924 100644
--- a/drivers/net/memif/rte_eth_memif.c
+++ b/drivers/net/memif/rte_eth_memif.c
@@ -52,6 +52,13 @@  static const char * const valid_arguments[] = {
     NULL
 };

+static const struct rte_eth_link pmd_link = {
+    .link_speed = ETH_SPEED_NUM_10G,
+    .link_duplex = ETH_LINK_FULL_DUPLEX,
+    .link_status = ETH_LINK_DOWN,
+    .link_autoneg = ETH_LINK_AUTONEG
+};
+
 #define MEMIF_MP_SEND_REGION        "memif_mp_send_region"


@@ -1488,6 +1495,7 @@  memif_create(struct rte_vdev_device *vdev, enum
memif_role_t role,
     data = eth_dev->data;
     data->dev_private = pmd;
     data->numa_node = numa_node;
+    data->dev_link = pmd_link;
     data->mac_addrs = ether_addr;