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;
60 static void mvneta_stats_reset(struct rte_eth_dev *dev);
63 * Deinitialize packet processor.
66 mvneta_neta_deinit(void)
72 * Initialize packet processor.
75 * 0 on success, negative error value otherwise.
78 mvneta_neta_init(void)
84 * Callback used by rte_kvargs_process() during argument parsing.
87 * Pointer to the parsed key (unused).
89 * Pointer to the parsed value.
91 * Pointer to the extra arguments which contains address of the
92 * table of pointers to parsed interface names.
98 mvneta_ifnames_get(const char *key __rte_unused, const char *value,
101 struct mvneta_ifnames *ifnames = extra_args;
103 ifnames->names[ifnames->idx++] = value;
109 * Ethernet device configuration.
111 * Prepare the driver for a given number of TX and RX queues and
112 * configure RSS if supported.
115 * Pointer to Ethernet device structure.
118 * 0 on success, negative error value otherwise.
121 mvneta_dev_configure(struct rte_eth_dev *dev)
123 struct mvneta_priv *priv = dev->data->dev_private;
124 struct neta_ppio_params *ppio_params;
126 if (dev->data->dev_conf.rxmode.mq_mode != ETH_MQ_RX_NONE) {
127 MVNETA_LOG(INFO, "Unsupported RSS and rx multi queue mode %d",
128 dev->data->dev_conf.rxmode.mq_mode);
129 if (dev->data->nb_rx_queues > 1)
133 if (dev->data->dev_conf.rxmode.split_hdr_size) {
134 MVNETA_LOG(INFO, "Split headers not supported");
138 if (dev->data->dev_conf.rxmode.offloads & DEV_RX_OFFLOAD_JUMBO_FRAME)
139 dev->data->mtu = dev->data->dev_conf.rxmode.max_rx_pkt_len -
140 MRVL_NETA_ETH_HDRS_LEN;
142 if (dev->data->dev_conf.txmode.offloads & DEV_TX_OFFLOAD_MULTI_SEGS)
145 ppio_params = &priv->ppio_params;
146 ppio_params->outqs_params.num_outqs = dev->data->nb_tx_queues;
147 /* Default: 1 TC, no QoS supported. */
148 ppio_params->inqs_params.num_tcs = 1;
149 ppio_params->inqs_params.tcs_params[0].pkt_offset = MRVL_NETA_PKT_OFFS;
150 priv->ppio_id = dev->data->port_id;
156 * DPDK callback to get information about the device.
159 * Pointer to Ethernet device structure (unused).
161 * Info structure output buffer.
164 mvneta_dev_infos_get(struct rte_eth_dev *dev __rte_unused,
165 struct rte_eth_dev_info *info)
167 info->speed_capa = ETH_LINK_SPEED_10M |
168 ETH_LINK_SPEED_100M |
172 info->max_rx_queues = MRVL_NETA_RXQ_MAX;
173 info->max_tx_queues = MRVL_NETA_TXQ_MAX;
174 info->max_mac_addrs = MVNETA_MAC_ADDRS_MAX;
176 info->rx_desc_lim.nb_max = MRVL_NETA_RXD_MAX;
177 info->rx_desc_lim.nb_min = MRVL_NETA_RXD_MIN;
178 info->rx_desc_lim.nb_align = MRVL_NETA_RXD_ALIGN;
180 info->tx_desc_lim.nb_max = MRVL_NETA_TXD_MAX;
181 info->tx_desc_lim.nb_min = MRVL_NETA_TXD_MIN;
182 info->tx_desc_lim.nb_align = MRVL_NETA_TXD_ALIGN;
184 info->rx_offload_capa = MVNETA_RX_OFFLOADS;
185 info->rx_queue_offload_capa = MVNETA_RX_OFFLOADS;
187 info->tx_offload_capa = MVNETA_TX_OFFLOADS;
188 info->tx_queue_offload_capa = MVNETA_TX_OFFLOADS;
190 /* By default packets are dropped if no descriptors are available */
191 info->default_rxconf.rx_drop_en = 1;
192 /* Deferred tx queue start is not supported */
193 info->default_txconf.tx_deferred_start = 0;
194 info->default_txconf.offloads = 0;
196 info->max_rx_pktlen = MVNETA_PKT_SIZE_MAX;
200 * Return supported packet types.
203 * Pointer to Ethernet device structure (unused).
206 * Const pointer to the table with supported packet types.
208 static const uint32_t *
209 mvneta_dev_supported_ptypes_get(struct rte_eth_dev *dev __rte_unused)
211 static const uint32_t ptypes[] = {
213 RTE_PTYPE_L2_ETHER_VLAN,
224 * DPDK callback to change the MTU.
226 * Setting the MTU affects hardware MRU (packets larger than the MRU
230 * Pointer to Ethernet device structure.
235 * 0 on success, negative error value otherwise.
238 mvneta_mtu_set(struct rte_eth_dev *dev, uint16_t mtu)
240 struct mvneta_priv *priv = dev->data->dev_private;
241 uint16_t mbuf_data_size = 0; /* SW buffer size */
245 mru = MRVL_NETA_MTU_TO_MRU(mtu);
247 * min_rx_buf_size is equal to mbuf data size
248 * if pmd didn't set it differently
250 mbuf_data_size = dev->data->min_rx_buf_size - RTE_PKTMBUF_HEADROOM;
252 * - setting mru greater than the mbuf size resulting in
253 * hw and sw buffer size mismatch
254 * - setting mtu that requires the support of scattered packets
255 * when this feature has not been enabled/supported so far.
257 if (!dev->data->scattered_rx &&
258 (mru + MRVL_NETA_PKT_OFFS > mbuf_data_size)) {
259 mru = mbuf_data_size - MRVL_NETA_PKT_OFFS;
260 mtu = MRVL_NETA_MRU_TO_MTU(mru);
261 MVNETA_LOG(WARNING, "MTU too big, max MTU possible limitted by"
262 " current mbuf size: %u. Set MTU to %u, MRU to %u",
263 mbuf_data_size, mtu, mru);
266 if (mtu < RTE_ETHER_MIN_MTU || mru > MVNETA_PKT_SIZE_MAX) {
267 MVNETA_LOG(ERR, "Invalid MTU [%u] or MRU [%u]", mtu, mru);
271 dev->data->mtu = mtu;
272 dev->data->dev_conf.rxmode.max_rx_pkt_len = mru - MV_MH_SIZE;
275 /* It is OK. New MTU will be set later on mvneta_dev_start */
278 ret = neta_ppio_set_mru(priv->ppio, mru);
280 MVNETA_LOG(ERR, "Failed to change MRU");
284 ret = neta_ppio_set_mtu(priv->ppio, mtu);
286 MVNETA_LOG(ERR, "Failed to change MTU");
289 MVNETA_LOG(INFO, "MTU changed to %u, MRU = %u", mtu, mru);
295 * DPDK callback to bring the link up.
298 * Pointer to Ethernet device structure.
301 * 0 on success, negative error value otherwise.
304 mvneta_dev_set_link_up(struct rte_eth_dev *dev)
306 struct mvneta_priv *priv = dev->data->dev_private;
311 return neta_ppio_enable(priv->ppio);
315 * DPDK callback to bring the link down.
318 * Pointer to Ethernet device structure.
321 * 0 on success, negative error value otherwise.
324 mvneta_dev_set_link_down(struct rte_eth_dev *dev)
326 struct mvneta_priv *priv = dev->data->dev_private;
331 return neta_ppio_disable(priv->ppio);
335 * DPDK callback to start the device.
338 * Pointer to Ethernet device structure.
341 * 0 on success, negative errno value on failure.
344 mvneta_dev_start(struct rte_eth_dev *dev)
346 struct mvneta_priv *priv = dev->data->dev_private;
347 char match[MVNETA_MATCH_LEN];
351 return mvneta_dev_set_link_up(dev);
353 strlcpy(match, dev->data->name, sizeof(match));
354 priv->ppio_params.match = match;
355 priv->ppio_params.inqs_params.mtu = dev->data->mtu;
357 ret = neta_ppio_init(&priv->ppio_params, &priv->ppio);
359 MVNETA_LOG(ERR, "Failed to init ppio");
362 priv->ppio_id = priv->ppio->port_id;
364 mvneta_stats_reset(dev);
367 * In case there are some some stale uc/mc mac addresses flush them
368 * here. It cannot be done during mvneta_dev_close() as port information
369 * is already gone at that point (due to neta_ppio_deinit() in
370 * mvneta_dev_stop()).
372 if (!priv->uc_mc_flushed) {
373 ret = neta_ppio_flush_mac_addrs(priv->ppio, 0, 1);
376 "Failed to flush uc/mc filter list");
379 priv->uc_mc_flushed = 1;
382 ret = mvneta_alloc_rx_bufs(dev);
386 ret = mvneta_mtu_set(dev, dev->data->mtu);
388 MVNETA_LOG(ERR, "Failed to set MTU %d", dev->data->mtu);
392 ret = mvneta_dev_set_link_up(dev);
394 MVNETA_LOG(ERR, "Failed to set link up");
398 /* start tx queues */
399 for (i = 0; i < dev->data->nb_tx_queues; i++)
400 dev->data->tx_queue_state[i] = RTE_ETH_QUEUE_STATE_STARTED;
402 mvneta_set_tx_function(dev);
407 MVNETA_LOG(ERR, "Failed to start device");
408 neta_ppio_deinit(priv->ppio);
413 * DPDK callback to stop the device.
416 * Pointer to Ethernet device structure.
419 mvneta_dev_stop(struct rte_eth_dev *dev)
421 struct mvneta_priv *priv = dev->data->dev_private;
426 mvneta_dev_set_link_down(dev);
427 mvneta_flush_queues(dev);
428 neta_ppio_deinit(priv->ppio);
434 * DPDK callback to close the device.
437 * Pointer to Ethernet device structure.
440 mvneta_dev_close(struct rte_eth_dev *dev)
442 struct mvneta_priv *priv = dev->data->dev_private;
446 mvneta_dev_stop(dev);
448 for (i = 0; i < dev->data->nb_rx_queues; i++) {
449 mvneta_rx_queue_release(dev->data->rx_queues[i]);
450 dev->data->rx_queues[i] = NULL;
453 for (i = 0; i < dev->data->nb_tx_queues; i++) {
454 mvneta_tx_queue_release(dev->data->tx_queues[i]);
455 dev->data->tx_queues[i] = NULL;
460 * DPDK callback to retrieve physical link information.
463 * Pointer to Ethernet device structure.
464 * @param wait_to_complete
465 * Wait for request completion (ignored).
468 * 0 on success, negative error value otherwise.
471 mvneta_link_update(struct rte_eth_dev *dev, int wait_to_complete __rte_unused)
475 * once MUSDK provides necessary API use it here
477 struct mvneta_priv *priv = dev->data->dev_private;
478 struct ethtool_cmd edata;
480 int ret, fd, link_up;
485 edata.cmd = ETHTOOL_GSET;
487 strcpy(req.ifr_name, dev->data->name);
488 req.ifr_data = (void *)&edata;
490 fd = socket(AF_INET, SOCK_DGRAM, 0);
493 ret = ioctl(fd, SIOCETHTOOL, &req);
501 switch (ethtool_cmd_speed(&edata)) {
503 dev->data->dev_link.link_speed = ETH_SPEED_NUM_10M;
506 dev->data->dev_link.link_speed = ETH_SPEED_NUM_100M;
509 dev->data->dev_link.link_speed = ETH_SPEED_NUM_1G;
512 dev->data->dev_link.link_speed = ETH_SPEED_NUM_2_5G;
515 dev->data->dev_link.link_speed = ETH_SPEED_NUM_NONE;
518 dev->data->dev_link.link_duplex = edata.duplex ? ETH_LINK_FULL_DUPLEX :
519 ETH_LINK_HALF_DUPLEX;
520 dev->data->dev_link.link_autoneg = edata.autoneg ? ETH_LINK_AUTONEG :
523 neta_ppio_get_link_state(priv->ppio, &link_up);
524 dev->data->dev_link.link_status = link_up ? ETH_LINK_UP : ETH_LINK_DOWN;
530 * DPDK callback to enable promiscuous mode.
533 * Pointer to Ethernet device structure.
536 mvneta_promiscuous_enable(struct rte_eth_dev *dev)
538 struct mvneta_priv *priv = dev->data->dev_private;
544 neta_ppio_get_promisc(priv->ppio, &en);
546 MVNETA_LOG(INFO, "Promiscuous already enabled");
550 ret = neta_ppio_set_promisc(priv->ppio, 1);
552 MVNETA_LOG(ERR, "Failed to enable promiscuous mode");
556 * DPDK callback to disable allmulticast mode.
559 * Pointer to Ethernet device structure.
562 mvneta_promiscuous_disable(struct rte_eth_dev *dev)
564 struct mvneta_priv *priv = dev->data->dev_private;
570 neta_ppio_get_promisc(priv->ppio, &en);
572 MVNETA_LOG(INFO, "Promiscuous already disabled");
576 ret = neta_ppio_set_promisc(priv->ppio, 0);
578 MVNETA_LOG(ERR, "Failed to disable promiscuous mode");
582 * DPDK callback to remove a MAC address.
585 * Pointer to Ethernet device structure.
590 mvneta_mac_addr_remove(struct rte_eth_dev *dev, uint32_t index)
592 struct mvneta_priv *priv = dev->data->dev_private;
593 char buf[RTE_ETHER_ADDR_FMT_SIZE];
599 ret = neta_ppio_remove_mac_addr(priv->ppio,
600 dev->data->mac_addrs[index].addr_bytes);
602 rte_ether_format_addr(buf, sizeof(buf),
603 &dev->data->mac_addrs[index]);
604 MVNETA_LOG(ERR, "Failed to remove mac %s", buf);
609 * DPDK callback to add a MAC address.
612 * Pointer to Ethernet device structure.
614 * MAC address to register.
618 * VMDq pool index to associate address with (unused).
621 * 0 on success, negative error value otherwise.
624 mvneta_mac_addr_add(struct rte_eth_dev *dev, struct rte_ether_addr *mac_addr,
625 uint32_t index, uint32_t vmdq __rte_unused)
627 struct mvneta_priv *priv = dev->data->dev_private;
628 char buf[RTE_ETHER_ADDR_FMT_SIZE];
632 /* For setting index 0, mrvl_mac_addr_set() should be used.*/
638 ret = neta_ppio_add_mac_addr(priv->ppio, mac_addr->addr_bytes);
640 rte_ether_format_addr(buf, sizeof(buf), mac_addr);
641 MVNETA_LOG(ERR, "Failed to add mac %s", buf);
649 * DPDK callback to set the primary MAC address.
652 * Pointer to Ethernet device structure.
654 * MAC address to register.
657 mvneta_mac_addr_set(struct rte_eth_dev *dev, struct rte_ether_addr *mac_addr)
659 struct mvneta_priv *priv = dev->data->dev_private;
665 ret = neta_ppio_set_mac_addr(priv->ppio, mac_addr->addr_bytes);
667 char buf[RTE_ETHER_ADDR_FMT_SIZE];
668 rte_ether_format_addr(buf, sizeof(buf), mac_addr);
669 MVNETA_LOG(ERR, "Failed to set mac to %s", buf);
675 * DPDK callback to get device statistics.
678 * Pointer to Ethernet device structure.
680 * Stats structure output buffer.
683 * 0 on success, negative error value otherwise.
686 mvneta_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)
688 struct mvneta_priv *priv = dev->data->dev_private;
689 struct neta_ppio_statistics ppio_stats;
695 ret = neta_ppio_get_statistics(priv->ppio, &ppio_stats);
697 MVNETA_LOG(ERR, "Failed to update port statistics");
701 stats->ipackets += ppio_stats.rx_packets +
702 ppio_stats.rx_broadcast_packets +
703 ppio_stats.rx_multicast_packets -
704 priv->prev_stats.ipackets;
705 stats->opackets += ppio_stats.tx_packets +
706 ppio_stats.tx_broadcast_packets +
707 ppio_stats.tx_multicast_packets -
708 priv->prev_stats.opackets;
709 stats->ibytes += ppio_stats.rx_bytes - priv->prev_stats.ibytes;
710 stats->obytes += ppio_stats.tx_bytes - priv->prev_stats.obytes;
711 stats->imissed += ppio_stats.rx_discard +
712 ppio_stats.rx_overrun -
713 priv->prev_stats.imissed;
714 stats->ierrors = ppio_stats.rx_packets_err -
715 priv->prev_stats.ierrors;
716 stats->oerrors = ppio_stats.tx_errors - priv->prev_stats.oerrors;
722 * DPDK callback to clear device statistics.
725 * Pointer to Ethernet device structure.
728 mvneta_stats_reset(struct rte_eth_dev *dev)
730 struct mvneta_priv *priv = dev->data->dev_private;
736 ret = mvneta_stats_get(dev, &priv->prev_stats);
738 RTE_LOG(ERR, PMD, "Failed to reset port statistics");
742 static const struct eth_dev_ops mvneta_ops = {
743 .dev_configure = mvneta_dev_configure,
744 .dev_start = mvneta_dev_start,
745 .dev_stop = mvneta_dev_stop,
746 .dev_set_link_up = mvneta_dev_set_link_up,
747 .dev_set_link_down = mvneta_dev_set_link_down,
748 .dev_close = mvneta_dev_close,
749 .link_update = mvneta_link_update,
750 .promiscuous_enable = mvneta_promiscuous_enable,
751 .promiscuous_disable = mvneta_promiscuous_disable,
752 .mac_addr_remove = mvneta_mac_addr_remove,
753 .mac_addr_add = mvneta_mac_addr_add,
754 .mac_addr_set = mvneta_mac_addr_set,
755 .mtu_set = mvneta_mtu_set,
756 .stats_get = mvneta_stats_get,
757 .stats_reset = mvneta_stats_reset,
758 .dev_infos_get = mvneta_dev_infos_get,
759 .dev_supported_ptypes_get = mvneta_dev_supported_ptypes_get,
760 .rxq_info_get = mvneta_rxq_info_get,
761 .txq_info_get = mvneta_txq_info_get,
762 .rx_queue_setup = mvneta_rx_queue_setup,
763 .rx_queue_release = mvneta_rx_queue_release,
764 .tx_queue_setup = mvneta_tx_queue_setup,
765 .tx_queue_release = mvneta_tx_queue_release,
769 * Create device representing Ethernet port.
772 * Pointer to the port's name.
775 * 0 on success, negative error value otherwise.
778 mvneta_eth_dev_create(struct rte_vdev_device *vdev, const char *name)
780 int ret, fd = socket(AF_INET, SOCK_DGRAM, 0);
781 struct rte_eth_dev *eth_dev;
782 struct mvneta_priv *priv;
785 eth_dev = rte_eth_dev_allocate(name);
789 priv = rte_zmalloc_socket(name, sizeof(*priv), 0, rte_socket_id());
794 eth_dev->data->dev_private = priv;
796 eth_dev->data->mac_addrs =
797 rte_zmalloc("mac_addrs",
798 RTE_ETHER_ADDR_LEN * MVNETA_MAC_ADDRS_MAX, 0);
799 if (!eth_dev->data->mac_addrs) {
800 MVNETA_LOG(ERR, "Failed to allocate space for eth addrs");
805 memset(&req, 0, sizeof(req));
806 strcpy(req.ifr_name, name);
807 ret = ioctl(fd, SIOCGIFHWADDR, &req);
811 memcpy(eth_dev->data->mac_addrs[0].addr_bytes,
812 req.ifr_addr.sa_data, RTE_ETHER_ADDR_LEN);
814 eth_dev->data->kdrv = RTE_KDRV_NONE;
815 eth_dev->device = &vdev->device;
816 eth_dev->rx_pkt_burst = mvneta_rx_pkt_burst;
817 mvneta_set_tx_function(eth_dev);
818 eth_dev->dev_ops = &mvneta_ops;
820 rte_eth_dev_probing_finish(eth_dev);
823 rte_eth_dev_release_port(eth_dev);
829 * Cleanup previously created device representing Ethernet port.
832 * Pointer to the corresponding rte_eth_dev structure.
835 mvneta_eth_dev_destroy(struct rte_eth_dev *eth_dev)
837 rte_eth_dev_release_port(eth_dev);
841 * Cleanup previously created device representing Ethernet port.
844 * Pointer to the port name.
847 mvneta_eth_dev_destroy_name(const char *name)
849 struct rte_eth_dev *eth_dev;
851 eth_dev = rte_eth_dev_allocated(name);
855 mvneta_eth_dev_destroy(eth_dev);
859 * DPDK callback to register the virtual device.
862 * Pointer to the virtual device.
865 * 0 on success, negative error value otherwise.
868 rte_pmd_mvneta_probe(struct rte_vdev_device *vdev)
870 struct rte_kvargs *kvlist;
871 struct mvneta_ifnames ifnames;
876 params = rte_vdev_device_args(vdev);
880 kvlist = rte_kvargs_parse(params, valid_args);
884 ifnum = rte_kvargs_count(kvlist, MVNETA_IFACE_NAME_ARG);
885 if (ifnum > RTE_DIM(ifnames.names))
886 goto out_free_kvlist;
889 rte_kvargs_process(kvlist, MVNETA_IFACE_NAME_ARG,
890 mvneta_ifnames_get, &ifnames);
893 * The below system initialization should be done only once,
894 * on the first provided configuration file
899 MVNETA_LOG(INFO, "Perform MUSDK initializations");
901 ret = rte_mvep_init(MVEP_MOD_T_NETA, kvlist);
903 goto out_free_kvlist;
905 ret = mvneta_neta_init();
907 MVNETA_LOG(ERR, "Failed to init NETA!");
908 rte_mvep_deinit(MVEP_MOD_T_NETA);
909 goto out_free_kvlist;
913 for (i = 0; i < ifnum; i++) {
914 MVNETA_LOG(INFO, "Creating %s", ifnames.names[i]);
915 ret = mvneta_eth_dev_create(vdev, ifnames.names[i]);
919 mvneta_dev_num += ifnum;
921 rte_kvargs_free(kvlist);
926 mvneta_eth_dev_destroy_name(ifnames.names[i]);
928 if (mvneta_dev_num == 0) {
929 mvneta_neta_deinit();
930 rte_mvep_deinit(MVEP_MOD_T_NETA);
933 rte_kvargs_free(kvlist);
939 * DPDK callback to remove virtual device.
942 * Pointer to the removed virtual device.
945 * 0 on success, negative error value otherwise.
948 rte_pmd_mvneta_remove(struct rte_vdev_device *vdev)
953 name = rte_vdev_device_name(vdev);
957 MVNETA_LOG(INFO, "Removing %s", name);
959 RTE_ETH_FOREACH_DEV(i) {
960 if (rte_eth_devices[i].device != &vdev->device)
963 mvneta_eth_dev_destroy(&rte_eth_devices[i]);
967 if (mvneta_dev_num == 0) {
968 MVNETA_LOG(INFO, "Perform MUSDK deinit");
969 mvneta_neta_deinit();
970 rte_mvep_deinit(MVEP_MOD_T_NETA);
976 static struct rte_vdev_driver pmd_mvneta_drv = {
977 .probe = rte_pmd_mvneta_probe,
978 .remove = rte_pmd_mvneta_remove,
981 RTE_PMD_REGISTER_VDEV(net_mvneta, pmd_mvneta_drv);
982 RTE_PMD_REGISTER_PARAM_STRING(net_mvneta, "iface=<ifc>");
984 RTE_INIT(mvneta_init_log)
986 mvneta_logtype = rte_log_register("pmd.net.mvneta");
987 if (mvneta_logtype >= 0)
988 rte_log_set_level(mvneta_logtype, RTE_LOG_NOTICE);