1 /* SPDX-License-Identifier: BSD-3-Clause
2 * Copyright(c) 2018 Marvell International Ltd.
3 * Copyright(c) 2018 Semihalf.
7 #include <rte_string_fns.h>
8 #include <rte_ethdev_driver.h>
9 #include <rte_kvargs.h>
10 #include <rte_bus_vdev.h>
14 #include <linux/ethtool.h>
15 #include <linux/sockios.h>
17 #include <net/if_arp.h>
18 #include <sys/ioctl.h>
19 #include <sys/socket.h>
21 #include <sys/types.h>
23 #include <rte_mvep_common.h>
25 #include "mvneta_rxtx.h"
28 #define MVNETA_IFACE_NAME_ARG "iface"
30 #define MVNETA_RX_OFFLOADS (DEV_RX_OFFLOAD_JUMBO_FRAME | \
31 DEV_RX_OFFLOAD_CHECKSUM)
33 /** Port Tx offloads capabilities */
34 #define MVNETA_TX_OFFLOADS (DEV_TX_OFFLOAD_IPV4_CKSUM | \
35 DEV_TX_OFFLOAD_UDP_CKSUM | \
36 DEV_TX_OFFLOAD_TCP_CKSUM | \
37 DEV_TX_OFFLOAD_MULTI_SEGS)
39 #define MVNETA_PKT_SIZE_MAX (16382 - MV_MH_SIZE) /* 9700B */
40 #define MVNETA_DEFAULT_MTU 1500
42 #define MVNETA_MAC_ADDRS_MAX 256 /*16 UC, 256 IP, 256 MC/BC */
43 /** Maximum length of a match string */
44 #define MVNETA_MATCH_LEN 16
48 static const char * const valid_args[] = {
49 MVNETA_IFACE_NAME_ARG,
53 struct mvneta_ifnames {
54 const char *names[NETA_NUM_ETH_PPIO];
58 static int mvneta_dev_num;
61 * Deinitialize packet processor.
64 mvneta_neta_deinit(void)
70 * Initialize packet processor.
73 * 0 on success, negative error value otherwise.
76 mvneta_neta_init(void)
82 * Callback used by rte_kvargs_process() during argument parsing.
85 * Pointer to the parsed key (unused).
87 * Pointer to the parsed value.
89 * Pointer to the extra arguments which contains address of the
90 * table of pointers to parsed interface names.
96 mvneta_ifnames_get(const char *key __rte_unused, const char *value,
99 struct mvneta_ifnames *ifnames = extra_args;
101 ifnames->names[ifnames->idx++] = value;
107 * Ethernet device configuration.
109 * Prepare the driver for a given number of TX and RX queues and
110 * configure RSS if supported.
113 * Pointer to Ethernet device structure.
116 * 0 on success, negative error value otherwise.
119 mvneta_dev_configure(struct rte_eth_dev *dev)
121 struct mvneta_priv *priv = dev->data->dev_private;
122 struct neta_ppio_params *ppio_params;
124 if (dev->data->dev_conf.rxmode.mq_mode != ETH_MQ_RX_NONE) {
125 MVNETA_LOG(INFO, "Unsupported RSS and rx multi queue mode %d",
126 dev->data->dev_conf.rxmode.mq_mode);
127 if (dev->data->nb_rx_queues > 1)
131 if (dev->data->dev_conf.rxmode.split_hdr_size) {
132 MVNETA_LOG(INFO, "Split headers not supported");
136 if (dev->data->dev_conf.rxmode.offloads & DEV_RX_OFFLOAD_JUMBO_FRAME)
137 dev->data->mtu = dev->data->dev_conf.rxmode.max_rx_pkt_len -
138 MRVL_NETA_ETH_HDRS_LEN;
140 if (dev->data->dev_conf.txmode.offloads & DEV_TX_OFFLOAD_MULTI_SEGS)
143 ppio_params = &priv->ppio_params;
144 ppio_params->outqs_params.num_outqs = dev->data->nb_tx_queues;
145 /* Default: 1 TC, no QoS supported. */
146 ppio_params->inqs_params.num_tcs = 1;
147 ppio_params->inqs_params.tcs_params[0].pkt_offset = MRVL_NETA_PKT_OFFS;
148 priv->ppio_id = dev->data->port_id;
154 * DPDK callback to get information about the device.
157 * Pointer to Ethernet device structure (unused).
159 * Info structure output buffer.
162 mvneta_dev_infos_get(struct rte_eth_dev *dev __rte_unused,
163 struct rte_eth_dev_info *info)
165 info->speed_capa = ETH_LINK_SPEED_10M |
166 ETH_LINK_SPEED_100M |
170 info->max_rx_queues = MRVL_NETA_RXQ_MAX;
171 info->max_tx_queues = MRVL_NETA_TXQ_MAX;
172 info->max_mac_addrs = MVNETA_MAC_ADDRS_MAX;
174 info->rx_desc_lim.nb_max = MRVL_NETA_RXD_MAX;
175 info->rx_desc_lim.nb_min = MRVL_NETA_RXD_MIN;
176 info->rx_desc_lim.nb_align = MRVL_NETA_RXD_ALIGN;
178 info->tx_desc_lim.nb_max = MRVL_NETA_TXD_MAX;
179 info->tx_desc_lim.nb_min = MRVL_NETA_TXD_MIN;
180 info->tx_desc_lim.nb_align = MRVL_NETA_TXD_ALIGN;
182 info->rx_offload_capa = MVNETA_RX_OFFLOADS;
183 info->rx_queue_offload_capa = MVNETA_RX_OFFLOADS;
185 info->tx_offload_capa = MVNETA_TX_OFFLOADS;
186 info->tx_queue_offload_capa = MVNETA_TX_OFFLOADS;
188 /* By default packets are dropped if no descriptors are available */
189 info->default_rxconf.rx_drop_en = 1;
190 /* Deferred tx queue start is not supported */
191 info->default_txconf.tx_deferred_start = 0;
192 info->default_txconf.offloads = 0;
194 info->max_rx_pktlen = MVNETA_PKT_SIZE_MAX;
198 * Return supported packet types.
201 * Pointer to Ethernet device structure (unused).
204 * Const pointer to the table with supported packet types.
206 static const uint32_t *
207 mvneta_dev_supported_ptypes_get(struct rte_eth_dev *dev __rte_unused)
209 static const uint32_t ptypes[] = {
211 RTE_PTYPE_L2_ETHER_VLAN,
222 * DPDK callback to change the MTU.
224 * Setting the MTU affects hardware MRU (packets larger than the MRU
228 * Pointer to Ethernet device structure.
233 * 0 on success, negative error value otherwise.
236 mvneta_mtu_set(struct rte_eth_dev *dev, uint16_t mtu)
238 struct mvneta_priv *priv = dev->data->dev_private;
239 uint16_t mbuf_data_size = 0; /* SW buffer size */
243 mru = MRVL_NETA_MTU_TO_MRU(mtu);
245 * min_rx_buf_size is equal to mbuf data size
246 * if pmd didn't set it differently
248 mbuf_data_size = dev->data->min_rx_buf_size - RTE_PKTMBUF_HEADROOM;
250 * - setting mru greater than the mbuf size resulting in
251 * hw and sw buffer size mismatch
252 * - setting mtu that requires the support of scattered packets
253 * when this feature has not been enabled/supported so far.
255 if (!dev->data->scattered_rx &&
256 (mru + MRVL_NETA_PKT_OFFS > mbuf_data_size)) {
257 mru = mbuf_data_size - MRVL_NETA_PKT_OFFS;
258 mtu = MRVL_NETA_MRU_TO_MTU(mru);
259 MVNETA_LOG(WARNING, "MTU too big, max MTU possible limitted by"
260 " current mbuf size: %u. Set MTU to %u, MRU to %u",
261 mbuf_data_size, mtu, mru);
264 if (mtu < RTE_ETHER_MIN_MTU || mru > MVNETA_PKT_SIZE_MAX) {
265 MVNETA_LOG(ERR, "Invalid MTU [%u] or MRU [%u]", mtu, mru);
269 dev->data->mtu = mtu;
270 dev->data->dev_conf.rxmode.max_rx_pkt_len = mru - MV_MH_SIZE;
273 /* It is OK. New MTU will be set later on mvneta_dev_start */
276 ret = neta_ppio_set_mru(priv->ppio, mru);
278 MVNETA_LOG(ERR, "Failed to change MRU");
282 ret = neta_ppio_set_mtu(priv->ppio, mtu);
284 MVNETA_LOG(ERR, "Failed to change MTU");
287 MVNETA_LOG(INFO, "MTU changed to %u, MRU = %u", mtu, mru);
293 * DPDK callback to bring the link up.
296 * Pointer to Ethernet device structure.
299 * 0 on success, negative error value otherwise.
302 mvneta_dev_set_link_up(struct rte_eth_dev *dev)
304 struct mvneta_priv *priv = dev->data->dev_private;
309 return neta_ppio_enable(priv->ppio);
313 * DPDK callback to bring the link down.
316 * Pointer to Ethernet device structure.
319 * 0 on success, negative error value otherwise.
322 mvneta_dev_set_link_down(struct rte_eth_dev *dev)
324 struct mvneta_priv *priv = dev->data->dev_private;
329 return neta_ppio_disable(priv->ppio);
333 * DPDK callback to start the device.
336 * Pointer to Ethernet device structure.
339 * 0 on success, negative errno value on failure.
342 mvneta_dev_start(struct rte_eth_dev *dev)
344 struct mvneta_priv *priv = dev->data->dev_private;
345 char match[MVNETA_MATCH_LEN];
349 return mvneta_dev_set_link_up(dev);
351 strlcpy(match, dev->data->name, sizeof(match));
352 priv->ppio_params.match = match;
353 priv->ppio_params.inqs_params.mtu = dev->data->mtu;
355 ret = neta_ppio_init(&priv->ppio_params, &priv->ppio);
357 MVNETA_LOG(ERR, "Failed to init ppio");
360 priv->ppio_id = priv->ppio->port_id;
363 * In case there are some some stale uc/mc mac addresses flush them
364 * here. It cannot be done during mvneta_dev_close() as port information
365 * is already gone at that point (due to neta_ppio_deinit() in
366 * mvneta_dev_stop()).
368 if (!priv->uc_mc_flushed) {
369 ret = neta_ppio_flush_mac_addrs(priv->ppio, 0, 1);
372 "Failed to flush uc/mc filter list");
375 priv->uc_mc_flushed = 1;
378 ret = mvneta_alloc_rx_bufs(dev);
382 ret = mvneta_mtu_set(dev, dev->data->mtu);
384 MVNETA_LOG(ERR, "Failed to set MTU %d", dev->data->mtu);
388 ret = mvneta_dev_set_link_up(dev);
390 MVNETA_LOG(ERR, "Failed to set link up");
394 /* start tx queues */
395 for (i = 0; i < dev->data->nb_tx_queues; i++)
396 dev->data->tx_queue_state[i] = RTE_ETH_QUEUE_STATE_STARTED;
398 mvneta_set_tx_function(dev);
403 MVNETA_LOG(ERR, "Failed to start device");
404 neta_ppio_deinit(priv->ppio);
409 * DPDK callback to stop the device.
412 * Pointer to Ethernet device structure.
415 mvneta_dev_stop(struct rte_eth_dev *dev)
417 struct mvneta_priv *priv = dev->data->dev_private;
422 mvneta_dev_set_link_down(dev);
423 mvneta_flush_queues(dev);
424 neta_ppio_deinit(priv->ppio);
430 * DPDK callback to close the device.
433 * Pointer to Ethernet device structure.
436 mvneta_dev_close(struct rte_eth_dev *dev)
438 struct mvneta_priv *priv = dev->data->dev_private;
442 mvneta_dev_stop(dev);
444 for (i = 0; i < dev->data->nb_rx_queues; i++) {
445 mvneta_rx_queue_release(dev->data->rx_queues[i]);
446 dev->data->rx_queues[i] = NULL;
449 for (i = 0; i < dev->data->nb_tx_queues; i++) {
450 mvneta_tx_queue_release(dev->data->tx_queues[i]);
451 dev->data->tx_queues[i] = NULL;
456 * DPDK callback to retrieve physical link information.
459 * Pointer to Ethernet device structure.
460 * @param wait_to_complete
461 * Wait for request completion (ignored).
464 * 0 on success, negative error value otherwise.
467 mvneta_link_update(struct rte_eth_dev *dev, int wait_to_complete __rte_unused)
471 * once MUSDK provides necessary API use it here
473 struct mvneta_priv *priv = dev->data->dev_private;
474 struct ethtool_cmd edata;
476 int ret, fd, link_up;
481 edata.cmd = ETHTOOL_GSET;
483 strcpy(req.ifr_name, dev->data->name);
484 req.ifr_data = (void *)&edata;
486 fd = socket(AF_INET, SOCK_DGRAM, 0);
489 ret = ioctl(fd, SIOCETHTOOL, &req);
497 switch (ethtool_cmd_speed(&edata)) {
499 dev->data->dev_link.link_speed = ETH_SPEED_NUM_10M;
502 dev->data->dev_link.link_speed = ETH_SPEED_NUM_100M;
505 dev->data->dev_link.link_speed = ETH_SPEED_NUM_1G;
508 dev->data->dev_link.link_speed = ETH_SPEED_NUM_2_5G;
511 dev->data->dev_link.link_speed = ETH_SPEED_NUM_NONE;
514 dev->data->dev_link.link_duplex = edata.duplex ? ETH_LINK_FULL_DUPLEX :
515 ETH_LINK_HALF_DUPLEX;
516 dev->data->dev_link.link_autoneg = edata.autoneg ? ETH_LINK_AUTONEG :
519 neta_ppio_get_link_state(priv->ppio, &link_up);
520 dev->data->dev_link.link_status = link_up ? ETH_LINK_UP : ETH_LINK_DOWN;
526 * DPDK callback to enable promiscuous mode.
529 * Pointer to Ethernet device structure.
532 mvneta_promiscuous_enable(struct rte_eth_dev *dev)
534 struct mvneta_priv *priv = dev->data->dev_private;
540 neta_ppio_get_promisc(priv->ppio, &en);
542 MVNETA_LOG(INFO, "Promiscuous already enabled");
546 ret = neta_ppio_set_promisc(priv->ppio, 1);
548 MVNETA_LOG(ERR, "Failed to enable promiscuous mode");
552 * DPDK callback to disable allmulticast mode.
555 * Pointer to Ethernet device structure.
558 mvneta_promiscuous_disable(struct rte_eth_dev *dev)
560 struct mvneta_priv *priv = dev->data->dev_private;
566 neta_ppio_get_promisc(priv->ppio, &en);
568 MVNETA_LOG(INFO, "Promiscuous already disabled");
572 ret = neta_ppio_set_promisc(priv->ppio, 0);
574 MVNETA_LOG(ERR, "Failed to disable promiscuous mode");
578 * DPDK callback to remove a MAC address.
581 * Pointer to Ethernet device structure.
586 mvneta_mac_addr_remove(struct rte_eth_dev *dev, uint32_t index)
588 struct mvneta_priv *priv = dev->data->dev_private;
589 char buf[RTE_ETHER_ADDR_FMT_SIZE];
595 ret = neta_ppio_remove_mac_addr(priv->ppio,
596 dev->data->mac_addrs[index].addr_bytes);
598 rte_ether_format_addr(buf, sizeof(buf),
599 &dev->data->mac_addrs[index]);
600 MVNETA_LOG(ERR, "Failed to remove mac %s", buf);
605 * DPDK callback to add a MAC address.
608 * Pointer to Ethernet device structure.
610 * MAC address to register.
614 * VMDq pool index to associate address with (unused).
617 * 0 on success, negative error value otherwise.
620 mvneta_mac_addr_add(struct rte_eth_dev *dev, struct rte_ether_addr *mac_addr,
621 uint32_t index, uint32_t vmdq __rte_unused)
623 struct mvneta_priv *priv = dev->data->dev_private;
624 char buf[RTE_ETHER_ADDR_FMT_SIZE];
628 /* For setting index 0, mrvl_mac_addr_set() should be used.*/
634 ret = neta_ppio_add_mac_addr(priv->ppio, mac_addr->addr_bytes);
636 rte_ether_format_addr(buf, sizeof(buf), mac_addr);
637 MVNETA_LOG(ERR, "Failed to add mac %s", buf);
645 * DPDK callback to set the primary MAC address.
648 * Pointer to Ethernet device structure.
650 * MAC address to register.
653 mvneta_mac_addr_set(struct rte_eth_dev *dev, struct rte_ether_addr *mac_addr)
655 struct mvneta_priv *priv = dev->data->dev_private;
661 ret = neta_ppio_set_mac_addr(priv->ppio, mac_addr->addr_bytes);
663 char buf[RTE_ETHER_ADDR_FMT_SIZE];
664 rte_ether_format_addr(buf, sizeof(buf), mac_addr);
665 MVNETA_LOG(ERR, "Failed to set mac to %s", buf);
671 * DPDK callback to get device statistics.
674 * Pointer to Ethernet device structure.
676 * Stats structure output buffer.
679 * 0 on success, negative error value otherwise.
682 mvneta_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)
684 struct mvneta_priv *priv = dev->data->dev_private;
685 struct neta_ppio_statistics ppio_stats;
691 ret = neta_ppio_get_statistics(priv->ppio, &ppio_stats);
693 MVNETA_LOG(ERR, "Failed to update port statistics");
697 stats->ipackets += ppio_stats.rx_packets +
698 ppio_stats.rx_broadcast_packets +
699 ppio_stats.rx_multicast_packets -
700 priv->prev_stats.ipackets;
701 stats->opackets += ppio_stats.tx_packets +
702 ppio_stats.tx_broadcast_packets +
703 ppio_stats.tx_multicast_packets -
704 priv->prev_stats.opackets;
705 stats->ibytes += ppio_stats.rx_bytes - priv->prev_stats.ibytes;
706 stats->obytes += ppio_stats.tx_bytes - priv->prev_stats.obytes;
707 stats->imissed += ppio_stats.rx_discard +
708 ppio_stats.rx_overrun -
709 priv->prev_stats.imissed;
711 stats->ierrors = ppio_stats.rx_packets_err +
712 ppio_stats.rx_errors +
713 ppio_stats.rx_crc_error -
714 priv->prev_stats.ierrors;
715 stats->oerrors = ppio_stats.tx_errors - priv->prev_stats.oerrors;
721 * DPDK callback to clear device statistics.
724 * Pointer to Ethernet device structure.
727 mvneta_stats_reset(struct rte_eth_dev *dev)
729 struct mvneta_priv *priv = dev->data->dev_private;
735 ret = mvneta_stats_get(dev, &priv->prev_stats);
737 RTE_LOG(ERR, PMD, "Failed to reset port statistics");
741 static const struct eth_dev_ops mvneta_ops = {
742 .dev_configure = mvneta_dev_configure,
743 .dev_start = mvneta_dev_start,
744 .dev_stop = mvneta_dev_stop,
745 .dev_set_link_up = mvneta_dev_set_link_up,
746 .dev_set_link_down = mvneta_dev_set_link_down,
747 .dev_close = mvneta_dev_close,
748 .link_update = mvneta_link_update,
749 .promiscuous_enable = mvneta_promiscuous_enable,
750 .promiscuous_disable = mvneta_promiscuous_disable,
751 .mac_addr_remove = mvneta_mac_addr_remove,
752 .mac_addr_add = mvneta_mac_addr_add,
753 .mac_addr_set = mvneta_mac_addr_set,
754 .mtu_set = mvneta_mtu_set,
755 .stats_get = mvneta_stats_get,
756 .stats_reset = mvneta_stats_reset,
757 .dev_infos_get = mvneta_dev_infos_get,
758 .dev_supported_ptypes_get = mvneta_dev_supported_ptypes_get,
759 .rxq_info_get = mvneta_rxq_info_get,
760 .txq_info_get = mvneta_txq_info_get,
761 .rx_queue_setup = mvneta_rx_queue_setup,
762 .rx_queue_release = mvneta_rx_queue_release,
763 .tx_queue_setup = mvneta_tx_queue_setup,
764 .tx_queue_release = mvneta_tx_queue_release,
768 * Create device representing Ethernet port.
771 * Pointer to the port's name.
774 * 0 on success, negative error value otherwise.
777 mvneta_eth_dev_create(struct rte_vdev_device *vdev, const char *name)
779 int ret, fd = socket(AF_INET, SOCK_DGRAM, 0);
780 struct rte_eth_dev *eth_dev;
781 struct mvneta_priv *priv;
784 eth_dev = rte_eth_dev_allocate(name);
788 priv = rte_zmalloc_socket(name, sizeof(*priv), 0, rte_socket_id());
793 eth_dev->data->dev_private = priv;
795 eth_dev->data->mac_addrs =
796 rte_zmalloc("mac_addrs",
797 RTE_ETHER_ADDR_LEN * MVNETA_MAC_ADDRS_MAX, 0);
798 if (!eth_dev->data->mac_addrs) {
799 MVNETA_LOG(ERR, "Failed to allocate space for eth addrs");
804 memset(&req, 0, sizeof(req));
805 strcpy(req.ifr_name, name);
806 ret = ioctl(fd, SIOCGIFHWADDR, &req);
810 memcpy(eth_dev->data->mac_addrs[0].addr_bytes,
811 req.ifr_addr.sa_data, RTE_ETHER_ADDR_LEN);
813 eth_dev->data->kdrv = RTE_KDRV_NONE;
814 eth_dev->device = &vdev->device;
815 eth_dev->rx_pkt_burst = mvneta_rx_pkt_burst;
816 mvneta_set_tx_function(eth_dev);
817 eth_dev->dev_ops = &mvneta_ops;
819 rte_eth_dev_probing_finish(eth_dev);
822 rte_eth_dev_release_port(eth_dev);
828 * Cleanup previously created device representing Ethernet port.
831 * Pointer to the corresponding rte_eth_dev structure.
834 mvneta_eth_dev_destroy(struct rte_eth_dev *eth_dev)
836 rte_eth_dev_release_port(eth_dev);
840 * Cleanup previously created device representing Ethernet port.
843 * Pointer to the port name.
846 mvneta_eth_dev_destroy_name(const char *name)
848 struct rte_eth_dev *eth_dev;
850 eth_dev = rte_eth_dev_allocated(name);
854 mvneta_eth_dev_destroy(eth_dev);
858 * DPDK callback to register the virtual device.
861 * Pointer to the virtual device.
864 * 0 on success, negative error value otherwise.
867 rte_pmd_mvneta_probe(struct rte_vdev_device *vdev)
869 struct rte_kvargs *kvlist;
870 struct mvneta_ifnames ifnames;
875 params = rte_vdev_device_args(vdev);
879 kvlist = rte_kvargs_parse(params, valid_args);
883 ifnum = rte_kvargs_count(kvlist, MVNETA_IFACE_NAME_ARG);
884 if (ifnum > RTE_DIM(ifnames.names))
885 goto out_free_kvlist;
888 rte_kvargs_process(kvlist, MVNETA_IFACE_NAME_ARG,
889 mvneta_ifnames_get, &ifnames);
892 * The below system initialization should be done only once,
893 * on the first provided configuration file
898 MVNETA_LOG(INFO, "Perform MUSDK initializations");
900 ret = rte_mvep_init(MVEP_MOD_T_NETA, kvlist);
902 goto out_free_kvlist;
904 ret = mvneta_neta_init();
906 MVNETA_LOG(ERR, "Failed to init NETA!");
907 rte_mvep_deinit(MVEP_MOD_T_NETA);
908 goto out_free_kvlist;
912 for (i = 0; i < ifnum; i++) {
913 MVNETA_LOG(INFO, "Creating %s", ifnames.names[i]);
914 ret = mvneta_eth_dev_create(vdev, ifnames.names[i]);
918 mvneta_dev_num += ifnum;
920 rte_kvargs_free(kvlist);
925 mvneta_eth_dev_destroy_name(ifnames.names[i]);
927 if (mvneta_dev_num == 0) {
928 mvneta_neta_deinit();
929 rte_mvep_deinit(MVEP_MOD_T_NETA);
932 rte_kvargs_free(kvlist);
938 * DPDK callback to remove virtual device.
941 * Pointer to the removed virtual device.
944 * 0 on success, negative error value otherwise.
947 rte_pmd_mvneta_remove(struct rte_vdev_device *vdev)
952 name = rte_vdev_device_name(vdev);
956 MVNETA_LOG(INFO, "Removing %s", name);
958 RTE_ETH_FOREACH_DEV(i) {
959 if (rte_eth_devices[i].device != &vdev->device)
962 mvneta_eth_dev_destroy(&rte_eth_devices[i]);
966 if (mvneta_dev_num == 0) {
967 MVNETA_LOG(INFO, "Perform MUSDK deinit");
968 mvneta_neta_deinit();
969 rte_mvep_deinit(MVEP_MOD_T_NETA);
975 static struct rte_vdev_driver pmd_mvneta_drv = {
976 .probe = rte_pmd_mvneta_probe,
977 .remove = rte_pmd_mvneta_remove,
980 RTE_PMD_REGISTER_VDEV(net_mvneta, pmd_mvneta_drv);
981 RTE_PMD_REGISTER_PARAM_STRING(net_mvneta, "iface=<ifc>");
983 RTE_INIT(mvneta_init_log)
985 mvneta_logtype = rte_log_register("pmd.net.mvneta");
986 if (mvneta_logtype >= 0)
987 rte_log_set_level(mvneta_logtype, RTE_LOG_NOTICE);