more dynamic logging
Subsystems (2)
cover more dynamic logging
This set of patches converts more virtual drivers to use the dynamic log type, rather than PMD log type.
Marking these for next since there is no urgency to get these into 18.05 and they are compile tested only.
Stephen Hemminger (10):
net/tap: convert to dynamic logging
net/af_packet: convert to dynamic log level
net/null: convert to dynamic logging
net/ring: convert to dynamic logging
net/softnic: convert to dynamic logging
net/failsafe: convert to dynamic logging
net/kni: support dynamic logging
net/pcap: support dynamic logging
net/vhost: implement dynamic logging
net/bond: convert to dynamic logging
drivers/net/af_packet/rte_eth_af_packet.c | 132 +++++---- drivers/net/bonding/rte_eth_bond_8023ad.c | 126 +++++---- drivers/net/bonding/rte_eth_bond_alb.c | 4 +- drivers/net/bonding/rte_eth_bond_args.c | 5 +- drivers/net/bonding/rte_eth_bond_pmd.c | 303 ++++++++++----------- drivers/net/bonding/rte_eth_bond_private.h | 5 +- drivers/net/failsafe/failsafe.c | 13 +- drivers/net/failsafe/failsafe_private.h | 8 +- drivers/net/kni/rte_eth_kni.c | 34 ++- drivers/net/null/rte_eth_null.c | 27 +- drivers/net/pcap/rte_eth_pcap.c | 41 ++- drivers/net/ring/rte_eth_ring.c | 46 +++- drivers/net/softnic/rte_eth_softnic.c | 25 +- drivers/net/tap/rte_eth_tap.c | 168 ++++++------ drivers/net/tap/rte_eth_tap.h | 1 + drivers/net/tap/tap_flow.c | 51 ++-- drivers/net/tap/tap_intr.c | 2 +- drivers/net/tap/tap_log.h | 10 + drivers/net/tap/tap_netlink.c | 18 +- drivers/net/tap/tap_tcmsgs.c | 9 +- drivers/net/vhost/rte_eth_vhost.c | 82 +++--- 21 files changed, 628 insertions(+), 482 deletions(-) create mode 100644 drivers/net/tap/tap_log.h
Signature · 1 line
2.17.0
PATCH 1/10 net/tap: convert to dynamic logging
Use new logging macro to convert all calls to RTE_LOG() into new dynamic log type.
Also fix whitespace.
--- drivers/net/tap/rte_eth_tap.c | 168 ++++++++++++++++++---------------- drivers/net/tap/rte_eth_tap.h | 1 + drivers/net/tap/tap_flow.c | 51 +++++------ drivers/net/tap/tap_intr.c | 2 +- drivers/net/tap/tap_log.h | 10 ++ drivers/net/tap/tap_netlink.c | 18 ++-- drivers/net/tap/tap_tcmsgs.c | 9 +- 7 files changed, 138 insertions(+), 121 deletions(-) create mode 100644 drivers/net/tap/tap_log.h
drivers/net/tap/rte_eth_tap.c +87 -81
@@ -118,50 +118,46 @@ tun_alloc(struct pmd_internals *pmd) ifr.ifr_flags = (tap_type) ?IFF_TAP :IFF_TUN |IFF_POINTOPOINT ;snprintf (ifr.ifr_name,IFNAMSIZ ,"%s" , pmd->name); -RTE_LOG (DEBUG ,PMD ,"ifr_name '%s'\n" , ifr.ifr_name); +TAP_LOG (DEBUG ,"ifr_name '%s'" , ifr.ifr_name); fd =open (TUN_TAP_DEV_PATH ,O_RDWR );if (fd <0 ) { -RTE_LOG (ERR ,PMD ,"Unable to create %s interface\n" , - tuntap_name); +TAP_LOG (ERR ,"Unable to create %s interface" , tuntap_name); goto error; }#ifdef IFF_MULTI_QUEUE /* Grab the TUN features to verify we can work multi-queue */ if (ioctl (fd,TUNGETFEATURES , &features) <0 ) { -RTE_LOG (ERR ,PMD ,"%s unable to get TUN/TAP features\n" , - tuntap_name); +TAP_LOG (ERR ,"%s unable to get TUN/TAP features" , + tuntap_name); goto error; } -RTE_LOG (DEBUG ,PMD ,"%s Features %08x\n" , tuntap_name, features); +TAP_LOG (DEBUG ,"%s Features %08x" , tuntap_name, features);if (features &IFF_MULTI_QUEUE ) { -RTE_LOG (DEBUG ,PMD ," Multi-queue support for %d queues\n" , +TAP_LOG (DEBUG ," Multi-queue support for %d queues" ,RTE_PMD_TAP_MAX_QUEUES ); ifr.ifr_flags |=IFF_MULTI_QUEUE ; } else#endif { ifr.ifr_flags |=IFF_ONE_QUEUE ; -RTE_LOG (DEBUG ,PMD ," Single queue only support\n" ); +TAP_LOG (DEBUG ," Single queue only support" ); }/* Set the TUN/TAP configuration and set the name if needed */ if (ioctl (fd,TUNSETIFF , (void *)&ifr) <0 ) { -RTE_LOG (WARNING ,PMD , -"Unable to set TUNSETIFF for %s\n" , - ifr.ifr_name); -perror ("TUNSETIFF" ); +TAP_LOG (WARNING ,"Unable to set TUNSETIFF for %s: %s" , + ifr.ifr_name,strerror (errno)); goto error; }/* Always set the file descriptor to non-blocking */ if (fcntl (fd,F_SETFL ,O_NONBLOCK ) <0 ) { -RTE_LOG (WARNING ,PMD , -"Unable to set %s to nonblocking\n" , - ifr.ifr_name); -perror ("F_SETFL, NONBLOCK" ); +TAP_LOG (WARNING , +"Unable to set %s to nonblocking: %s" , + ifr.ifr_name,strerror (errno)); goto error; }
@@ -195,10 +191,11 @@ tun_alloc(struct pmd_internals *pmd)fcntl (fd,F_SETFL , flags |O_ASYNC );fcntl (fd,F_SETOWN ,getpid ()); }while (0 ); +if (errno) {/* Disable trigger globally in case of error */ tap_trigger =0 ; -RTE_LOG (WARNING ,PMD ,"Rx trigger disabled: %s\n" , +TAP_LOG (WARNING ,"Rx trigger disabled: %s" ,strerror (errno)); }
@@ -630,8 +627,8 @@ tap_ioctl(struct pmd_internals *pmd, unsigned long request,return 0 ; error: -RTE_LOG (DEBUG ,PMD ,"%s: %s(%s) failed: %s(%d)\n" , ifr->ifr_name, - __func__,tap_ioctl_req2str (request),strerror (errno), errno); +TAP_LOG (DEBUG ,"%s(%s) failed: %s(%d)" , ifr->ifr_name, +tap_ioctl_req2str (request),strerror (errno), errno);return -errno; }
@@ -683,34 +680,34 @@ tap_dev_configure(struct rte_eth_dev *dev)if ((tx_offloads & supp_tx_offloads) != tx_offloads) { rte_errno =ENOTSUP ; -RTE_LOG (ERR ,PMD , +TAP_LOG (ERR ,"Some Tx offloads are not supported " -"requested 0x%" PRIx64" supported 0x%" PRIx64"\n" , +"requested 0x%" PRIx64" supported 0x%" PRIx64, tx_offloads, supp_tx_offloads);return -rte_errno; }if (dev->data->nb_rx_queues >RTE_PMD_TAP_MAX_QUEUES ) { -RTE_LOG (ERR ,PMD , -"%s: number of rx queues %d exceeds max num of queues %d\n" , +TAP_LOG (ERR , +"%s: number of rx queues %d exceeds max num of queues %d" , dev->device->name, dev->data->nb_rx_queues,RTE_PMD_TAP_MAX_QUEUES );return -1 ; }if (dev->data->nb_tx_queues >RTE_PMD_TAP_MAX_QUEUES ) { -RTE_LOG (ERR ,PMD , -"%s: number of tx queues %d exceeds max num of queues %d\n" , +TAP_LOG (ERR , +"%s: number of tx queues %d exceeds max num of queues %d" , dev->device->name, dev->data->nb_tx_queues,RTE_PMD_TAP_MAX_QUEUES );return -1 ; } -RTE_LOG (INFO ,PMD ,"%s: %p: TX configured queues number: %u\n" , - dev->device->name, (void *)dev, dev->data->nb_tx_queues); +TAP_LOG (INFO ,"%s: %p: TX configured queues number: %u" , + dev->device->name, (void *)dev, dev->data->nb_tx_queues); -RTE_LOG (INFO ,PMD ,"%s: %p: RX configured queues number: %u\n" , - dev->device->name, (void *)dev, dev->data->nb_rx_queues); +TAP_LOG (INFO ,"%s: %p: RX configured queues number: %u" , + dev->device->name, (void *)dev, dev->data->nb_rx_queues);return 0 ; }
@@ -965,7 +962,7 @@ tap_mac_set(struct rte_eth_dev *dev, struct ether_addr *mac_addr)int ret;if (is_zero_ether_addr (mac_addr)) { -RTE_LOG (ERR ,PMD ,"%s: can't set an empty MAC address\n" , +TAP_LOG (ERR ,"%s: can't set an empty MAC address" , dev->device->name);return -EINVAL ; }
@@ -993,15 +990,15 @@ tap_mac_set(struct rte_eth_dev *dev, struct ether_addr *mac_addr)/* Replace MAC redirection rule after a MAC change */ ret =tap_flow_implicit_destroy (pmd,TAP_REMOTE_LOCAL_MAC );if (ret <0 ) { -RTE_LOG (ERR ,PMD , -"%s: Couldn't delete MAC redirection rule\n" , +TAP_LOG (ERR , +"%s: Couldn't delete MAC redirection rule" , dev->device->name);return ret; } ret =tap_flow_implicit_create (pmd,TAP_REMOTE_LOCAL_MAC );if (ret <0 ) { -RTE_LOG (ERR ,PMD , -"%s: Couldn't add MAC redirection rule\n" , +TAP_LOG (ERR , +"%s: Couldn't add MAC redirection rule" , dev->device->name);return ret; }
@@ -1034,29 +1031,27 @@ tap_setup_queue(struct rte_eth_dev *dev, }if (*fd !=-1 ) {/* fd for this queue already exists */ -RTE_LOG (DEBUG ,PMD ,"%s: fd %d for %s queue qid %d exists\n" , +TAP_LOG (DEBUG ,"%s: fd %d for %s queue qid %d exists" , pmd->name, *fd, dir, qid); }else if (*other_fd !=-1 ) {/* Only other_fd exists. dup it */ *fd =dup (*other_fd);if (*fd <0 ) { *fd =-1 ; -RTE_LOG (ERR ,PMD ,"%s: dup() failed.\n" , - pmd->name); +TAP_LOG (ERR ,"%s: dup() failed." , pmd->name);return -1 ; } -RTE_LOG (DEBUG ,PMD ,"%s: dup fd %d for %s queue qid %d (%d)\n" , +TAP_LOG (DEBUG ,"%s: dup fd %d for %s queue qid %d (%d)" , pmd->name, *other_fd, dir, qid, *fd); }else {/* Both RX and TX fds do not exist (equal -1). Create fd */ *fd =tun_alloc (pmd);if (*fd <0 ) { *fd =-1 ;/* restore original value */ -RTE_LOG (ERR ,PMD ,"%s: tun_alloc() failed.\n" , - pmd->name); +TAP_LOG (ERR ,"%s: tun_alloc() failed." , pmd->name);return -1 ; } -RTE_LOG (DEBUG ,PMD ,"%s: add %s queue for qid %d fd %d\n" , +TAP_LOG (DEBUG ,"%s: add %s queue for qid %d fd %d" , pmd->name, dir, qid, *fd); }
@@ -1086,8 +1081,8 @@ tap_rx_queue_setup(struct rte_eth_dev *dev,int i;if (rx_queue_id >= dev->data->nb_rx_queues || !mp) { -RTE_LOG (WARNING ,PMD , -"nb_rx_queues %d too small or mempool NULL\n" , +TAP_LOG (WARNING , +"nb_rx_queues %d too small or mempool NULL" , dev->data->nb_rx_queues);return -1 ; }
@@ -1095,10 +1090,10 @@ tap_rx_queue_setup(struct rte_eth_dev *dev,/* Verify application offloads are valid for our port and queue. */ if (!tap_rxq_are_offloads_valid (dev, rx_conf->offloads)) { rte_errno =ENOTSUP ; - RTE_LOG(ERR, PMD, + TAP_LOG(ERR, "%p: Rx queue offloads 0x%" PRIx64 " don't match port offloads 0x%" PRIx64 - " or supported offloads 0x%" PRIx64 "\n", + " or supported offloads 0x%" PRIx64, (void *)dev, rx_conf->offloads, dev->data->dev_conf.rxmode.offloads, (tap_rx_offload_get_port_capa() |
@@ -1112,8 +1107,8 @@ tap_rx_queue_setup(struct rte_eth_dev *dev, iovecs =rte_zmalloc_socket (dev->device->name,sizeof (*iovecs),0 , socket_id);if (!iovecs) { -RTE_LOG (WARNING ,PMD , -"%s: Couldn't allocate %d RX descriptors\n" , +TAP_LOG (WARNING , +"%s: Couldn't allocate %d RX descriptors" , dev->device->name, nb_desc);return -ENOMEM ; }
@@ -1132,8 +1127,8 @@ tap_rx_queue_setup(struct rte_eth_dev *dev,for (i =1 ; i <= nb_desc; i++) { *tmp =rte_pktmbuf_alloc (rxq->mp);if (!*tmp) { -RTE_LOG (WARNING ,PMD , -"%s: couldn't allocate memory for queue %d\n" , +TAP_LOG (WARNING , +"%s: couldn't allocate memory for queue %d" , dev->device->name, rx_queue_id); ret = -ENOMEM ; goto error;
@@ -1145,7 +1140,7 @@ tap_rx_queue_setup(struct rte_eth_dev *dev, tmp = &(*tmp)->next; } -RTE_LOG (DEBUG ,PMD ," RX TUNTAP device name %s, qid %d on fd %d\n" , +TAP_LOG (DEBUG ," RX TUNTAP device name %s, qid %d on fd %d" , internals->name, rx_queue_id, internals->rxq[rx_queue_id].fd);return 0 ;
@@ -1186,7 +1181,7 @@ tap_tx_queue_setup(struct rte_eth_dev *dev, DEV_TX_OFFLOAD_TCP_CKSUM)); }else { rte_errno =ENOTSUP ; - RTE_LOG(ERR, PMD, + TAP_LOG(ERR, "%p: Tx queue offloads 0x%" PRIx64 " don't match port offloads 0x%" PRIx64 " or supported offloads 0x%" PRIx64,
@@ -1199,8 +1194,8 @@ tap_tx_queue_setup(struct rte_eth_dev *dev, ret =tap_setup_queue (dev, internals, tx_queue_id,0 );if (ret ==-1 )return -1 ; -RTE_LOG (DEBUG ,PMD , -" TX TUNTAP device name %s, qid %d on fd %d csum %s\n" , +TAP_LOG (DEBUG , +" TX TUNTAP device name %s, qid %d on fd %d csum %s" , internals->name, tx_queue_id, internals->txq[tx_queue_id].fd, txq->csum ?"on" :"off" );
@@ -1383,12 +1378,12 @@ eth_dev_tap_create(struct rte_vdev_device *vdev, char *tap_name,struct ifreq ifr;int i; -RTE_LOG (DEBUG ,PMD ,"%s device on numa %u\n" , +TAP_LOG (DEBUG ,"%s device on numa %u" , tuntap_name,rte_socket_id ()); dev =rte_eth_vdev_allocate (vdev,sizeof (*pmd));if (!dev) { -RTE_LOG (ERR ,PMD ,"%s Unable to allocate device struct\n" , +TAP_LOG (ERR ,"%s Unable to allocate device struct" , tuntap_name); goto error_exit_nodev; }
@@ -1399,8 +1394,8 @@ eth_dev_tap_create(struct rte_vdev_device *vdev, char *tap_name, pmd->ioctl_sock =socket (AF_INET ,SOCK_DGRAM ,0 );if (pmd->ioctl_sock ==-1 ) { -RTE_LOG (ERR ,PMD , -"%s Unable to get a socket for management: %s\n" , +TAP_LOG (ERR , +"%s Unable to get a socket for management: %s" , tuntap_name,strerror (errno)); goto error_exit; }
@@ -1469,22 +1464,22 @@ eth_dev_tap_create(struct rte_vdev_device *vdev, char *tap_name,*/ pmd->nlsk_fd =tap_nl_init (0 );if (pmd->nlsk_fd ==-1 ) { -RTE_LOG (WARNING ,PMD ,"%s: failed to create netlink socket.\n" , +TAP_LOG (WARNING ,"%s: failed to create netlink socket." , pmd->name); goto disable_rte_flow; } pmd->if_index =if_nametoindex (pmd->name);if (!pmd->if_index) { -RTE_LOG (ERR ,PMD ,"%s: failed to get if_index.\n" , pmd->name); +TAP_LOG (ERR ,"%s: failed to get if_index." , pmd->name); goto disable_rte_flow; }if (qdisc_create_multiq (pmd->nlsk_fd, pmd->if_index) <0 ) { -RTE_LOG (ERR ,PMD ,"%s: failed to create multiq qdisc.\n" , +TAP_LOG (ERR ,"%s: failed to create multiq qdisc." , pmd->name); goto disable_rte_flow; }if (qdisc_create_ingress (pmd->nlsk_fd, pmd->if_index) <0 ) { -RTE_LOG (ERR ,PMD ,"%s: failed to create ingress qdisc.\n" , +TAP_LOG (ERR ,"%s: failed to create ingress qdisc." , pmd->name); goto disable_rte_flow; }
@@ -1493,7 +1488,7 @@ eth_dev_tap_create(struct rte_vdev_device *vdev, char *tap_name,if (strlen (remote_iface)) { pmd->remote_if_index =if_nametoindex (remote_iface);if (!pmd->remote_if_index) { -RTE_LOG (ERR ,PMD ,"%s: failed to get %s if_index.\n" , +TAP_LOG (ERR ,"%s: failed to get %s if_index." , pmd->name, remote_iface); goto error_remote; }
@@ -1505,7 +1500,7 @@ eth_dev_tap_create(struct rte_vdev_device *vdev, char *tap_name,/* Replicate remote MAC address */ if (tap_ioctl (pmd,SIOCGIFHWADDR , &ifr,0 ,REMOTE_ONLY ) <0 ) { -RTE_LOG (ERR ,PMD ,"%s: failed to get %s MAC address.\n" , +TAP_LOG (ERR ,"%s: failed to get %s MAC address." , pmd->name, pmd->remote_iface); goto error_remote; }
@@ -1513,7 +1508,7 @@ eth_dev_tap_create(struct rte_vdev_device *vdev, char *tap_name, ETHER_ADDR_LEN);/* The desired MAC is already in ifreq after SIOCGIFHWADDR. */ if (tap_ioctl (pmd,SIOCSIFHWADDR , &ifr,0 ,LOCAL_ONLY ) <0 ) { -RTE_LOG (ERR ,PMD ,"%s: failed to get %s MAC address.\n" , +TAP_LOG (ERR ,"%s: failed to get %s MAC address." , pmd->name, remote_iface); goto error_remote; }
@@ -1526,7 +1521,7 @@ eth_dev_tap_create(struct rte_vdev_device *vdev, char *tap_name,qdisc_flush (pmd->nlsk_fd, pmd->remote_if_index);if (qdisc_create_ingress (pmd->nlsk_fd, pmd->remote_if_index) <0 ) { -RTE_LOG (ERR ,PMD ,"%s: failed to create ingress qdisc.\n" , +TAP_LOG (ERR ,"%s: failed to create ingress qdisc." , pmd->remote_iface); goto error_remote; }
@@ -1535,8 +1530,8 @@ eth_dev_tap_create(struct rte_vdev_device *vdev, char *tap_name, tap_flow_implicit_create(pmd, TAP_REMOTE_LOCAL_MAC) < 0 || tap_flow_implicit_create(pmd, TAP_REMOTE_BROADCAST) < 0 || tap_flow_implicit_create(pmd, TAP_REMOTE_BROADCASTV6) < 0) { -RTE_LOG (ERR ,PMD , -"%s: failed to create implicit rules.\n" , +TAP_LOG (ERR , +"%s: failed to create implicit rules." , pmd->name); goto error_remote; }
@@ -1545,16 +1540,16 @@ eth_dev_tap_create(struct rte_vdev_device *vdev, char *tap_name,return 0 ; disable_rte_flow: -RTE_LOG (ERR ,PMD ," Disabling rte flow support: %s(%d)\n" , +TAP_LOG (ERR ," Disabling rte flow support: %s(%d)" ,strerror (errno), errno);if (strlen (remote_iface)) { -RTE_LOG (ERR ,PMD ,"Remote feature requires flow support.\n" ); +TAP_LOG (ERR ,"Remote feature requires flow support." ); goto error_exit; }return 0 ; error_remote: -RTE_LOG (ERR ,PMD ," Can't set up remote feature: %s(%d)\n" , +TAP_LOG (ERR ," Can't set up remote feature: %s(%d)" ,strerror (errno), errno);tap_flow_implicit_flush (pmd,NULL );
@@ -1564,7 +1559,7 @@ eth_dev_tap_create(struct rte_vdev_device *vdev, char *tap_name,rte_eth_dev_release_port (dev); error_exit_nodev: -RTE_LOG (ERR ,PMD ,"%s Unable to initialize %s\n" , +TAP_LOG (ERR ,"%s Unable to initialize %s" , tuntap_name,rte_vdev_device_name (vdev));return -EINVAL ;
@@ -1644,11 +1639,11 @@ set_mac_type(const char *key __rte_unused,if (parse_user_mac (user_mac, value) !=6 ) goto error; success: -RTE_LOG (DEBUG ,PMD ,"TAP user MAC param (%s)\n" , value); +TAP_LOG (DEBUG ,"TAP user MAC param (%s)" , value);return 0 ; error: -RTE_LOG (ERR ,PMD ,"TAP user MAC (%s) is not in format (%s|%s)\n" , +TAP_LOG (ERR ,"TAP user MAC (%s) is not in format (%s|%s)" , value,ETH_TAP_MAC_FIXED ,ETH_TAP_USR_MAC_FMT );return -1 ; }
@@ -1676,7 +1671,7 @@ rte_pmd_tun_probe(struct rte_vdev_device *dev)memset (remote_iface,0 ,RTE_ETH_NAME_MAX_LEN );if (params && (params[0 ] !='\0' )) { -RTE_LOG (DEBUG ,PMD ,"parameters (%s)\n" , params); +TAP_LOG (DEBUG ,"parameters (%s)" , params); kvlist =rte_kvargs_parse (params, valid_arguments);if (kvlist) {
@@ -1693,14 +1688,14 @@ rte_pmd_tun_probe(struct rte_vdev_device *dev) } pmd_link.link_speed =ETH_SPEED_NUM_10G ; -RTE_LOG (NOTICE ,PMD ,"Initializing pmd_tun for %s as %s\n" , +TAP_LOG (NOTICE ,"Initializing pmd_tun for %s as %s" , name, tun_name); ret =eth_dev_tap_create (dev, tun_name, remote_iface,0 ); leave:if (ret ==-1 ) { -RTE_LOG (ERR ,PMD ,"Failed to create pmd for %s as %s\n" , +TAP_LOG (ERR ,"Failed to create pmd for %s as %s" , name, tun_name); tun_unit--;/* Restore the unit number */ }
@@ -1733,7 +1728,7 @@ rte_pmd_tap_probe(struct rte_vdev_device *dev) strlen(params) == 0) { eth_dev =rte_eth_dev_attach_secondary (name);if (!eth_dev) { -RTE_LOG (ERR ,PMD ,"Failed to probe %s\n" , name); +TAP_LOG (ERR ,"Failed to probe %s" , name);return -1 ; }/* TODO: request info from primary to set up Rx and Tx */
@@ -1747,7 +1742,7 @@ rte_pmd_tap_probe(struct rte_vdev_device *dev)memset (remote_iface,0 ,RTE_ETH_NAME_MAX_LEN );if (params && (params[0 ] !='\0' )) { -RTE_LOG (DEBUG ,PMD ,"parameters (%s)\n" , params); +TAP_LOG (DEBUG ,"parameters (%s)" , params); kvlist =rte_kvargs_parse (params, valid_arguments);if (kvlist) {
@@ -1781,14 +1776,14 @@ rte_pmd_tap_probe(struct rte_vdev_device *dev) } pmd_link.link_speed = speed; -RTE_LOG (NOTICE ,PMD ,"Initializing pmd_tap for %s as %s\n" , +TAP_LOG (NOTICE ,"Initializing pmd_tap for %s as %s" , name, tap_name); ret =eth_dev_tap_create (dev, tap_name, remote_iface, &user_mac); leave:if (ret ==-1 ) { -RTE_LOG (ERR ,PMD ,"Failed to create pmd for %s as %s\n" , +TAP_LOG (ERR ,"Failed to create pmd for %s as %s" , name, tap_name); tap_unit--;/* Restore the unit number */ }
@@ -1806,7 +1801,7 @@ rte_pmd_tap_remove(struct rte_vdev_device *dev)struct pmd_internals *internals;int i; -RTE_LOG (DEBUG ,PMD ,"Closing TUN/TAP Ethernet device on numa %u\n" , +TAP_LOG (DEBUG ,"Closing TUN/TAP Ethernet device on numa %u" ,rte_socket_id ());/* find the ethdev entry */
@@ -1848,6 +1843,7 @@ static struct rte_vdev_driver pmd_tap_drv = { .probe = rte_pmd_tap_probe, .remove = rte_pmd_tap_remove, }; +RTE_PMD_REGISTER_VDEV (net_tap, pmd_tap_drv);RTE_PMD_REGISTER_VDEV (net_tun, pmd_tun_drv);RTE_PMD_REGISTER_ALIAS (net_tap, eth_tap);
@@ -1857,3 +1853,13 @@ RTE_PMD_REGISTER_PARAM_STRING(net_tap,ETH_TAP_IFACE_ARG "=<string> " ETH_TAP_MAC_ARG "=" ETH_TAP_MAC_ARG_FMT " " ETH_TAP_REMOTE_ARG "=<string>"); +int tap_logtype; + +RTE_INIT (tap_init_log); +static void +tap_init_log (void ) +{ + tap_logtype =rte_log_register ("pmd.net.tap" ); +if (tap_logtype >=0 ) +rte_log_set_level (tap_logtype,RTE_LOG_NOTICE ); +}
drivers/net/tap/rte_eth_tap.h +1 -0
@@ -15,6 +15,7 @@#include <rte_ethdev_driver.h> #include <rte_ether.h> +#include "tap_log.h" #ifdef IFF_MULTI_QUEUE #define RTE_PMD_TAP_MAX_QUEUES TAP_MAX_QUEUES
drivers/net/tap/tap_flow.c +25 -26
139 lines not on this page · raw message
drivers/net/tap/tap_intr.c +1 -1
@@ -62,7 +62,7 @@ tap_rx_intr_vec_install(struct rte_eth_dev *dev) intr_handle->intr_vec =malloc (sizeof (intr_handle->intr_vec[rxqs_n]));if (intr_handle->intr_vec ==NULL ) { rte_errno =ENOMEM ; -RTE_LOG (ERR ,PMD , +TAP_LOG (ERR ,"failed to allocate memory for interrupt vector," " Rx interrupts will not be supported" );return -rte_errno;
drivers/net/tap/tap_log.h new file +10 -0
@@ -0,0 +1,10 @@ +/* SPDX-License-Identifier: BSD-3-Clause +* Copyright 2017 6WIND S.A. +* Copyright 2017 Mellanox Technologies, Ltd +*/ + +extern int tap_logtype; + +#define TAP_LOG(level, fmt, args...) \ + rte_log(RTE_LOG_ ## level, tap_logtype, "%s(): " fmt "\n", \ + __func__, ## args)
drivers/net/tap/tap_netlink.c +9 -9
@@ -13,6 +13,7 @@#include <rte_malloc.h> #include <tap_netlink.h> #include <rte_random.h> +#include "tap_log.h" /* Must be quite large to support dumping a huge list of QDISC or filters. */ #define BUF_SIZE (32 * 1024)/* Size of the buffer to receive kernel messages */
@@ -45,19 +46,19 @@ tap_nl_init(uint32_t nl_groups) fd =socket (AF_NETLINK ,SOCK_RAW |SOCK_CLOEXEC ,NETLINK_ROUTE );if (fd <0 ) { -RTE_LOG (ERR ,PMD ,"Unable to create a netlink socket\n" ); +TAP_LOG (ERR ,"Unable to create a netlink socket" );return -1 ; }if (setsockopt (fd,SOL_SOCKET ,SO_SNDBUF , &sndbuf_size,sizeof (int ))) { -RTE_LOG (ERR ,PMD ,"Unable to set socket buffer send size\n" ); +TAP_LOG (ERR ,"Unable to set socket buffer send size" );return -1 ; }if (setsockopt (fd,SOL_SOCKET ,SO_RCVBUF , &rcvbuf_size,sizeof (int ))) { -RTE_LOG (ERR ,PMD ,"Unable to set socket buffer receive size\n" ); +TAP_LOG (ERR ,"Unable to set socket buffer receive size" );return -1 ; }if (bind (fd, (struct sockaddr *)&local,sizeof (local)) <0 ) { -RTE_LOG (ERR ,PMD ,"Unable to bind to the netlink socket\n" ); +TAP_LOG (ERR ,"Unable to bind to the netlink socket" );return -1 ; }return fd;
@@ -76,7 +77,7 @@ int tap_nl_final(int nlsk_fd) {if (close (nlsk_fd)) { -RTE_LOG (ERR ,PMD ,"Failed to close netlink socket: %s (%d)\n" , +TAP_LOG (ERR ,"Failed to close netlink socket: %s (%d)" ,strerror (errno), errno);return -1 ; }
@@ -117,7 +118,7 @@ tap_nl_send(int nlsk_fd, struct nlmsghdr *nh) nh->nlmsg_seq = (uint32_t )rte_rand (); send_bytes =sendmsg (nlsk_fd, &msg,0 );if (send_bytes <0 ) { -RTE_LOG (ERR ,PMD ,"Failed to send netlink message: %s (%d)\n" , +TAP_LOG (ERR ,"Failed to send netlink message: %s (%d)" ,strerror (errno), errno);return -1 ; }
@@ -300,9 +301,8 @@ tap_nlattr_nested_start(struct nlmsg *msg, uint16_t type) tail =rte_zmalloc (NULL ,sizeof (struct nested_tail ),0 );if (!tail) { -RTE_LOG (ERR ,PMD , -"Couldn't allocate memory for nested netlink" -" attribute\n" ); +TAP_LOG (ERR , +"Couldn't allocate memory for nested netlink attribute" );return -1 ; }
drivers/net/tap/tap_tcmsgs.c +5 -4
@@ -10,6 +10,7 @@#include <rte_log.h> #include <tap_tcmsgs.h> +#include "tap_log.h" struct qdisc {uint32_t handle;
@@ -81,8 +82,8 @@ qdisc_del(int nlsk_fd, uint16_t ifindex, struct qdisc *qinfo)if (!nlsk_fd) { fd =tap_nl_init (0 );if (fd <0 ) { -RTE_LOG (ERR ,PMD , -"Could not delete QDISC: null netlink socket\n" ); +TAP_LOG (ERR , +"Could not delete QDISC: null netlink socket" );return -1 ; } }else {
@@ -261,7 +262,7 @@ qdisc_create_multiq(int nlsk_fd, uint16_t ifindex) err =qdisc_add_multiq (nlsk_fd, ifindex);if (err <0 && errno != -EEXIST ) { -RTE_LOG (ERR ,PMD ,"Could not add multiq qdisc (%d): %s\n" , +TAP_LOG (ERR ,"Could not add multiq qdisc (%d): %s" , errno,strerror (errno));return -1 ; }
@@ -287,7 +288,7 @@ qdisc_create_ingress(int nlsk_fd, uint16_t ifindex) err =qdisc_add_ingress (nlsk_fd, ifindex);if (err <0 && errno != -EEXIST ) { -RTE_LOG (ERR ,PMD ,"Could not add ingress qdisc (%d): %s\n" , +TAP_LOG (ERR ,"Could not add ingress qdisc (%d): %s" , errno,strerror (errno));return -1 ; }
Signature · 1 line
2.17.0
PATCH 2/10 net/af_packet: convert to dynamic log level
In reply to Stephen HemmingerConvert this driver to use dynamic log level support.
--- drivers/net/af_packet/rte_eth_af_packet.c | 132 ++++++++++++---------- 1 file changed, 73 insertions(+), 59 deletions(-)
drivers/net/af_packet/rte_eth_af_packet.c +73 -59
@@ -97,6 +97,12 @@ static struct rte_eth_link pmd_link = { .link_autoneg = ETH_LINK_AUTONEG }; +static int af_packet_logtype; + +#define PMD_LOG(level, fmt, args...) \ + rte_log(RTE_LOG_ ## level, af_packet_logtype, \ + "%s(): " fmt "\n", __func__, ##args) +static uint16_t eth_af_packet_rx (void *queue,struct rte_mbuf **bufs,uint16_t nb_pkts) {
@@ -393,8 +399,8 @@ eth_rx_queue_setup(struct rte_eth_dev *dev, data_size -=TPACKET2_HDRLEN -sizeof (struct sockaddr_ll );if (data_size > buf_size) { -RTE_LOG (ERR ,PMD , -"%s: %d bytes will not fit in mbuf (%d bytes)\n" , +PMD_LOG (ERR , +"%s: %d bytes will not fit in mbuf (%d bytes)" , dev->device->name, data_size, buf_size);return -ENOMEM ; }
@@ -515,7 +521,7 @@ open_packet_iface(const char *key __rte_unused,/* Open an AF_PACKET socket... */ *sockfd =socket (AF_PACKET ,SOCK_RAW ,htons (ETH_P_ALL ));if (*sockfd ==-1 ) { -RTE_LOG (ERR ,PMD ,"Could not open AF_PACKET socket\n" ); +PMD_LOG (ERR ,"Could not open AF_PACKET socket" );return -1 ; }
@@ -561,14 +567,14 @@ rte_pmd_init_internals(struct rte_vdev_device *dev,break ; }if (pair ==NULL ) { -RTE_LOG (ERR ,PMD , -"%s: no interface specified for AF_PACKET ethdev\n" , +PMD_LOG (ERR , +"%s: no interface specified for AF_PACKET ethdev" , name);return -1 ; } -RTE_LOG (INFO ,PMD , -"%s: creating AF_PACKET-backed ethdev on numa socket %u\n" , +PMD_LOG (INFO , +"%s: creating AF_PACKET-backed ethdev on numa socket %u" , name, numa_node); *internals = rte_zmalloc_socket(name, sizeof(**internals),
@@ -593,14 +599,14 @@ rte_pmd_init_internals(struct rte_vdev_device *dev,memcpy (ifr.ifr_name, pair->value, ifnamelen); ifr.ifr_name[ifnamelen] ='\0' ; }else { -RTE_LOG (ERR ,PMD , -"%s: I/F name too long (%s)\n" , +PMD_LOG (ERR , +"%s: I/F name too long (%s)" , name, pair->value);return -1 ; }if (ioctl (sockfd,SIOCGIFINDEX , &ifr) ==-1 ) { -RTE_LOG (ERR ,PMD , -"%s: ioctl failed (SIOCGIFINDEX)\n" , +PMD_LOG (ERR , +"%s: ioctl failed (SIOCGIFINDEX)" , name);return -1 ; }
@@ -610,8 +616,8 @@ rte_pmd_init_internals(struct rte_vdev_device *dev, (*internals)->if_index = ifr.ifr_ifindex;if (ioctl (sockfd,SIOCGIFHWADDR , &ifr) ==-1 ) { -RTE_LOG (ERR ,PMD , -"%s: ioctl failed (SIOCGIFHWADDR)\n" , +PMD_LOG (ERR , +"%s: ioctl failed (SIOCGIFHWADDR)" , name);return -1 ; }
@@ -634,8 +640,8 @@ rte_pmd_init_internals(struct rte_vdev_device *dev,/* Open an AF_PACKET socket for this queue... */ qsockfd =socket (AF_PACKET ,SOCK_RAW ,htons (ETH_P_ALL ));if (qsockfd ==-1 ) { -RTE_LOG (ERR ,PMD , -"%s: could not open AF_PACKET socket\n" , +PMD_LOG (ERR , +"%s: could not open AF_PACKET socket" , name);return -1 ; }
@@ -644,9 +650,9 @@ rte_pmd_init_internals(struct rte_vdev_device *dev, rc =setsockopt (qsockfd,SOL_PACKET ,PACKET_VERSION , &tpver,sizeof (tpver));if (rc ==-1 ) { -RTE_LOG (ERR ,PMD , -"%s: could not set PACKET_VERSION on AF_PACKET " -"socket for %s\n" , name, pair->value); +PMD_LOG (ERR , +"%s: could not set PACKET_VERSION on AF_PACKET socket for %s" , + name, pair->value); goto error; }
@@ -654,9 +660,9 @@ rte_pmd_init_internals(struct rte_vdev_device *dev, rc =setsockopt (qsockfd,SOL_PACKET ,PACKET_LOSS , &discard,sizeof (discard));if (rc ==-1 ) { -RTE_LOG (ERR ,PMD , -"%s: could not set PACKET_LOSS on " -"AF_PACKET socket for %s\n" , name, pair->value); +PMD_LOG (ERR , +"%s: could not set PACKET_LOSS on AF_PACKET socket for %s" , + name, pair->value); goto error; }
@@ -664,10 +670,9 @@ rte_pmd_init_internals(struct rte_vdev_device *dev, rc =setsockopt (qsockfd,SOL_PACKET ,PACKET_QDISC_BYPASS , &qdisc_bypass,sizeof (qdisc_bypass));if (rc ==-1 ) { -RTE_LOG (ERR ,PMD , -"%s: could not set PACKET_QDISC_BYPASS " -"on AF_PACKET socket for %s\n" , name, - pair->value); +PMD_LOG (ERR , +"%s: could not set PACKET_QDISC_BYPASS on AF_PACKET socket for %s" , + name, pair->value); goto error; }#else
@@ -676,17 +681,17 @@ rte_pmd_init_internals(struct rte_vdev_device *dev, rc =setsockopt (qsockfd,SOL_PACKET ,PACKET_RX_RING , req,sizeof (*req));if (rc ==-1 ) { -RTE_LOG (ERR ,PMD , -"%s: could not set PACKET_RX_RING on AF_PACKET " -"socket for %s\n" , name, pair->value); +PMD_LOG (ERR , +"%s: could not set PACKET_RX_RING on AF_PACKET socket for %s" , + name, pair->value); goto error; } rc =setsockopt (qsockfd,SOL_PACKET ,PACKET_TX_RING , req,sizeof (*req));if (rc ==-1 ) { -RTE_LOG (ERR ,PMD , +PMD_LOG (ERR ,"%s: could not set PACKET_TX_RING on AF_PACKET " -"socket for %s\n" , name, pair->value); +"socket for %s" , name, pair->value); goto error; }
@@ -697,8 +702,8 @@ rte_pmd_init_internals(struct rte_vdev_device *dev,PROT_READ |PROT_WRITE ,MAP_SHARED |MAP_LOCKED , qsockfd, 0);if (rx_queue->map ==MAP_FAILED ) { -RTE_LOG (ERR ,PMD , -"%s: call to mmap failed on AF_PACKET socket for %s\n" , +PMD_LOG (ERR , +"%s: call to mmap failed on AF_PACKET socket for %s" , name, pair->value); goto error; }
@@ -734,8 +739,8 @@ rte_pmd_init_internals(struct rte_vdev_device *dev, rc =bind (qsockfd, (const struct sockaddr *)&sockaddr,sizeof (sockaddr));if (rc ==-1 ) { -RTE_LOG (ERR ,PMD , -"%s: could not bind AF_PACKET socket to %s\n" , +PMD_LOG (ERR , +"%s: could not bind AF_PACKET socket to %s" , name, pair->value); goto error; }
@@ -744,9 +749,9 @@ rte_pmd_init_internals(struct rte_vdev_device *dev, rc =setsockopt (qsockfd,SOL_PACKET ,PACKET_FANOUT , &fanout_arg,sizeof (fanout_arg));if (rc ==-1 ) { -RTE_LOG (ERR ,PMD , +PMD_LOG (ERR ,"%s: could not set PACKET_FANOUT on AF_PACKET socket " -"for %s\n" , name, pair->value); +"for %s" , name, pair->value); goto error; }#endif
@@ -826,8 +831,8 @@ rte_eth_from_packet(struct rte_vdev_device *dev, qpairs =atoi (pair->value);if (qpairs <1 || qpairs >RTE_PMD_AF_PACKET_MAX_RINGS ) { -RTE_LOG (ERR ,PMD , -"%s: invalid qpairs value\n" , +PMD_LOG (ERR , +"%s: invalid qpairs value" , name);return -1 ; }
@@ -836,8 +841,8 @@ rte_eth_from_packet(struct rte_vdev_device *dev,if (strstr (pair->key,ETH_AF_PACKET_BLOCKSIZE_ARG ) !=NULL ) { blocksize =atoi (pair->value);if (!blocksize) { -RTE_LOG (ERR ,PMD , -"%s: invalid blocksize value\n" , +PMD_LOG (ERR , +"%s: invalid blocksize value" , name);return -1 ; }
@@ -846,8 +851,8 @@ rte_eth_from_packet(struct rte_vdev_device *dev,if (strstr (pair->key,ETH_AF_PACKET_FRAMESIZE_ARG ) !=NULL ) { framesize =atoi (pair->value);if (!framesize) { -RTE_LOG (ERR ,PMD , -"%s: invalid framesize value\n" , +PMD_LOG (ERR , +"%s: invalid framesize value" , name);return -1 ; }
@@ -856,8 +861,8 @@ rte_eth_from_packet(struct rte_vdev_device *dev,if (strstr (pair->key,ETH_AF_PACKET_FRAMECOUNT_ARG ) !=NULL ) { framecount =atoi (pair->value);if (!framecount) { -RTE_LOG (ERR ,PMD , -"%s: invalid framecount value\n" , +PMD_LOG (ERR , +"%s: invalid framecount value" , name);return -1 ; }
@@ -866,8 +871,8 @@ rte_eth_from_packet(struct rte_vdev_device *dev,if (strstr (pair->key,ETH_AF_PACKET_QDISC_BYPASS_ARG ) !=NULL ) { qdisc_bypass =atoi (pair->value);if (qdisc_bypass >1 ) { -RTE_LOG (ERR ,PMD , -"%s: invalid bypass value\n" , +PMD_LOG (ERR , +"%s: invalid bypass value" , name);return -1 ; }
@@ -876,24 +881,24 @@ rte_eth_from_packet(struct rte_vdev_device *dev, }if (framesize > blocksize) { -RTE_LOG (ERR ,PMD , -"%s: AF_PACKET MMAP frame size exceeds block size!\n" , +PMD_LOG (ERR , +"%s: AF_PACKET MMAP frame size exceeds block size!" , name);return -1 ; } blockcount = framecount / (blocksize / framesize);if (!blockcount) { -RTE_LOG (ERR ,PMD , -"%s: invalid AF_PACKET MMAP parameters\n" , name); +PMD_LOG (ERR , +"%s: invalid AF_PACKET MMAP parameters" , name);return -1 ; } -RTE_LOG (INFO ,PMD ,"%s: AF_PACKET MMAP parameters:\n" , name); -RTE_LOG (INFO ,PMD ,"%s:\tblock size %d\n" , name, blocksize); -RTE_LOG (INFO ,PMD ,"%s:\tblock count %d\n" , name, blockcount); -RTE_LOG (INFO ,PMD ,"%s:\tframe size %d\n" , name, framesize); -RTE_LOG (INFO ,PMD ,"%s:\tframe count %d\n" , name, framecount); +PMD_LOG (INFO ,"%s: AF_PACKET MMAP parameters:" , name); +PMD_LOG (INFO ,"%s:\tblock size %d" , name, blocksize); +PMD_LOG (INFO ,"%s:\tblock count %d" , name, blockcount); +PMD_LOG (INFO ,"%s:\tframe size %d" , name, framesize); +PMD_LOG (INFO ,"%s:\tframe count %d" , name, framecount); if (rte_pmd_init_internals(dev, *sockfd, qpairs, blocksize, blockcount,
@@ -918,13 +923,13 @@ rte_pmd_af_packet_probe(struct rte_vdev_device *dev)struct rte_eth_dev *eth_dev;const char *name =rte_vdev_device_name (dev); -RTE_LOG (INFO ,PMD ,"Initializing pmd_af_packet for %s\n" , name); +PMD_LOG (INFO ,"Initializing pmd_af_packet for %s" , name);if (rte_eal_process_type () ==RTE_PROC_SECONDARY &&strlen (rte_vdev_device_args (dev)) ==0 ) { eth_dev =rte_eth_dev_attach_secondary (name);if (!eth_dev) { -RTE_LOG (ERR ,PMD ,"Failed to probe %s\n" , name); +PMD_LOG (ERR ,"Failed to probe %s" , name);return -1 ; }/* TODO: request info from primary to set up Rx and Tx */
@@ -968,8 +973,8 @@ rte_pmd_af_packet_remove(struct rte_vdev_device *dev)struct pmd_internals *internals;unsigned q; -RTE_LOG (INFO ,PMD ,"Closing AF_PACKET ethdev on numa socket %u\n" , -rte_socket_id ()); +PMD_LOG (INFO ,"Closing AF_PACKET ethdev on numa socket %u" , +rte_socket_id ());if (dev ==NULL )return -1 ;
@@ -1007,3 +1012,12 @@ RTE_PMD_REGISTER_PARAM_STRING(net_af_packet,"framesz=<int> " "framecnt=<int> " "qdisc_bypass=<0|1>"); + +RTE_INIT (af_packet_init_log); +static void +af_packet_init_log (void ) +{ + af_packet_logtype =rte_log_register ("pmd.net.packet" ); +if (af_packet_logtype >=0 ) +rte_log_set_level (af_packet_logtype,RTE_LOG_NOTICE ); +}
Signature · 1 line
2.17.0
PATCH 3/10 net/null: convert to dynamic logging
In reply to Stephen HemmingerConvert null device to use dynamic logging.
--- drivers/net/null/rte_eth_null.c | 27 +++++++++++++++++++++------ 1 file changed, 21 insertions(+), 6 deletions(-)
drivers/net/null/rte_eth_null.c +21 -6
@@ -92,6 +92,12 @@ static struct rte_eth_link pmd_link = { .link_autoneg = ETH_LINK_AUTONEG, }; +static int eth_null_logtype; + +#define PMD_LOG(level, fmt, args...) \ + rte_log(RTE_LOG_ ## level, eth_null_logtype, \ + "%s(): " fmt "\n", __func__, ##args) +static uint16_t eth_null_rx (void *q,struct rte_mbuf **bufs,uint16_t nb_bufs) {
@@ -509,7 +515,7 @@ eth_dev_null_create(struct rte_vdev_device *dev,if (dev->device.numa_node ==SOCKET_ID_ANY ) dev->device.numa_node =rte_socket_id (); -RTE_LOG (INFO ,PMD ,"Creating null ethdev on numa socket %u\n" , +PMD_LOG (INFO ,"Creating null ethdev on numa socket %u" , dev->device.numa_node); eth_dev =rte_eth_vdev_allocate (dev,sizeof (*internals));
@@ -605,13 +611,13 @@ rte_pmd_null_probe(struct rte_vdev_device *dev) name =rte_vdev_device_name (dev); params =rte_vdev_device_args (dev); -RTE_LOG (INFO ,PMD ,"Initializing pmd_null for %s\n" , name); +PMD_LOG (INFO ,"Initializing pmd_null for %s" , name);if (rte_eal_process_type () ==RTE_PROC_SECONDARY &&strlen (params) ==0 ) { eth_dev =rte_eth_dev_attach_secondary (name);if (!eth_dev) { -RTE_LOG (ERR ,PMD ,"Failed to probe %s\n" , name); +PMD_LOG (ERR ,"Failed to probe %s" , name);return -1 ; }/* TODO: request info from primary to set up Rx and Tx */
@@ -643,8 +649,8 @@ rte_pmd_null_probe(struct rte_vdev_device *dev) } } -RTE_LOG (INFO ,PMD ,"Configure pmd_null: packet size is %d, " -"packet copy is %s\n" , packet_size, +PMD_LOG (INFO ,"Configure pmd_null: packet size is %d, " +"packet copy is %s" , packet_size, packet_copy ?"enabled" :"disabled" ); ret =eth_dev_null_create (dev, packet_size, packet_copy);
@@ -663,7 +669,7 @@ rte_pmd_null_remove(struct rte_vdev_device *dev)if (!dev)return -EINVAL ; -RTE_LOG (INFO ,PMD ,"Closing null ethdev on numa socket %u\n" , +PMD_LOG (INFO ,"Closing null ethdev on numa socket %u" ,rte_socket_id ());/* find the ethdev entry */
@@ -688,3 +694,12 @@ RTE_PMD_REGISTER_ALIAS(net_null, eth_null);RTE_PMD_REGISTER_PARAM_STRING (net_null,"size=<int> " "copy=<int>" ); + +RTE_INIT (eth_null_init_log); +static void +eth_null_init_log (void ) +{ + eth_null_logtype =rte_log_register ("pmd.net.null" ); +if (eth_null_logtype >=0 ) +rte_log_set_level (eth_null_logtype,RTE_LOG_NOTICE ); +}
Signature · 1 line
2.17.0
PATCH 4/10 net/ring: convert to dynamic logging
In reply to Stephen Hemminger--- drivers/net/ring/rte_eth_ring.c | 46 ++++++++++++++++++++++----------- 1 file changed, 31 insertions(+), 15 deletions(-)
drivers/net/ring/rte_eth_ring.c +31 -15
@@ -63,6 +63,12 @@ static struct rte_eth_link pmd_link = { .link_autoneg = ETH_LINK_AUTONEG }; +static int eth_ring_logtype; + +#define PMD_LOG(level, fmt, args...) \ + rte_log(RTE_LOG_ ## level, eth_ring_logtype, \ + "%s(): " fmt "\n", __func__, ##args) +static uint16_t eth_ring_rx (void *q,struct rte_mbuf **bufs,uint16_t nb_bufs) {
@@ -256,7 +262,7 @@ do_eth_dev_ring_create(const char *name,void **tx_queues_local =NULL ;unsigned i; -RTE_LOG (INFO ,PMD ,"Creating rings-backed ethdev on numa socket %u\n" , +PMD_LOG (INFO ,"Creating rings-backed ethdev on numa socket %u" , numa_node); rx_queues_local = rte_zmalloc_socket(name,
@@ -446,13 +452,13 @@ static int parse_kvlist (const char *key __rte_unused, const char *value, void * ret = -EINVAL ;if (!name) { -RTE_LOG (WARNING ,PMD ,"command line parameter is empty for ring pmd!\n" ); +PMD_LOG (WARNING ,"command line parameter is empty for ring pmd!" ); goto out; } node =strchr (name,':' );if (!node) { -RTE_LOG (WARNING ,PMD ,"could not parse node value from %s\n" , +PMD_LOG (WARNING ,"could not parse node value from %s" , name); goto out; }
@@ -462,7 +468,7 @@ static int parse_kvlist (const char *key __rte_unused, const char *value, void * action =strchr (node,':' );if (!action) { -RTE_LOG (WARNING ,PMD ,"could not parse action value from %s\n" , +PMD_LOG (WARNING ,"could not parse action value from %s" , node); goto out; }
@@ -485,7 +491,8 @@ static int parse_kvlist (const char *key __rte_unused, const char *value, void * info->list[info->count].node =strtol (node, &end,10 );if ((errno !=0 ) || (*end !='\0' )) { -RTE_LOG (WARNING ,PMD ,"node value %s is unparseable as a number\n" , node); +PMD_LOG (WARNING , +"node value %s is unparseable as a number" , node); goto out; }
@@ -529,14 +536,14 @@ rte_pmd_ring_probe(struct rte_vdev_device *dev) name =rte_vdev_device_name (dev); params =rte_vdev_device_args (dev); -RTE_LOG (INFO ,PMD ,"Initializing pmd_ring for %s\n" , name); +PMD_LOG (INFO ,"Initializing pmd_ring for %s" , name);if (params ==NULL || params[0 ] =='\0' ) { ret =eth_dev_ring_create (name,rte_socket_id (),DEV_CREATE , ð_dev);if (ret ==-1 ) { -RTE_LOG (INFO ,PMD , -"Attach to pmd_ring for %s\n" , name); +PMD_LOG (INFO , +"Attach to pmd_ring for %s" , name); ret =eth_dev_ring_create (name,rte_socket_id (),DEV_ATTACH , ð_dev); }
@@ -544,13 +551,13 @@ rte_pmd_ring_probe(struct rte_vdev_device *dev) kvlist =rte_kvargs_parse (params, valid_arguments);if (!kvlist) { -RTE_LOG (INFO ,PMD ,"Ignoring unsupported parameters when creating" -" rings-backed ethernet device\n" ); +PMD_LOG (INFO ,"Ignoring unsupported parameters when creating" +" rings-backed ethernet device" ); ret =eth_dev_ring_create (name,rte_socket_id (),DEV_CREATE , ð_dev);if (ret ==-1 ) { -RTE_LOG (INFO ,PMD , -"Attach to pmd_ring for %s\n" , +PMD_LOG (INFO , +"Attach to pmd_ring for %s" , name); ret =eth_dev_ring_create (name,rte_socket_id (),DEV_ATTACH , ð_dev);
@@ -604,8 +611,8 @@ rte_pmd_ring_probe(struct rte_vdev_device *dev) ð_dev);if ((ret ==-1 ) && (info->list[info->count].action ==DEV_CREATE )) { -RTE_LOG (INFO ,PMD , -"Attach to pmd_ring for %s\n" , +PMD_LOG (INFO , +"Attach to pmd_ring for %s" , name); ret = eth_dev_ring_create(name, info->list[info->count].node,
@@ -634,7 +641,7 @@ rte_pmd_ring_remove(struct rte_vdev_device *dev)struct ring_queue *r =NULL ;uint16_t i; -RTE_LOG (INFO ,PMD ,"Un-Initializing pmd_ring for %s\n" , name); +PMD_LOG (INFO ,"Un-Initializing pmd_ring for %s" , name);if (name ==NULL )return -EINVAL ;
@@ -675,3 +682,12 @@ RTE_PMD_REGISTER_VDEV(net_ring, pmd_ring_drv);RTE_PMD_REGISTER_ALIAS (net_ring, eth_ring);RTE_PMD_REGISTER_PARAM_STRING (net_ring,ETH_RING_NUMA_NODE_ACTION_ARG "=name:node:action(ATTACH|CREATE)" ); + +RTE_INIT (eth_ring_init_log); +static void +eth_ring_init_log (void ) +{ + eth_ring_logtype =rte_log_register ("pmd.net.ring" ); +if (eth_ring_logtype >=0 ) +rte_log_set_level (eth_ring_logtype,RTE_LOG_NOTICE ); +}
Signature · 1 line
2.17.0
PATCH 5/10 net/softnic: convert to dynamic logging
In reply to Stephen Hemminger--- drivers/net/softnic/rte_eth_softnic.c | 25 ++++++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-)
drivers/net/softnic/rte_eth_softnic.c +20 -5
@@ -67,6 +67,12 @@ static const struct rte_eth_dev_info pmd_dev_info = { }, }; +static int pmd_softnic_logtype; + +#define PMD_LOG(level, fmt, args...) \ + rte_log(RTE_LOG_ ## level, pmd_softnic_logtype, \ + "%s(): " fmt "\n", __func__, ##args) +static void pmd_dev_infos_get(struct rte_eth_dev *dev __rte_unused,struct rte_eth_dev_info *dev_info)
@@ -728,7 +734,7 @@ pmd_probe(struct rte_vdev_device *vdev)struct rte_eth_dev *eth_dev;const char *name =rte_vdev_device_name (vdev); -RTE_LOG (INFO ,PMD ,"Probing device \"%s\"\n" , name); +PMD_LOG (INFO ,"Probing device \"%s\"" , name);/* Parse input arguments */ params =rte_vdev_device_args (vdev);
@@ -737,7 +743,7 @@ pmd_probe(struct rte_vdev_device *vdev) strlen(params) == 0) { eth_dev =rte_eth_dev_attach_secondary (name);if (!eth_dev) { -RTE_LOG (ERR ,PMD ,"Failed to probe %s\n" , name); +PMD_LOG (ERR ,"Failed to probe %s" , name);return -1 ; }/* TODO: request info from primary to set up Rx and Tx */
@@ -776,8 +782,8 @@ pmd_probe(struct rte_vdev_device *vdev)return -ENOMEM ;/* Register soft ethdev */ -RTE_LOG (INFO ,PMD , -"Creating soft ethdev \"%s\" for hard ethdev \"%s\"\n" , +PMD_LOG (INFO , +"Creating soft ethdev \"%s\" for hard ethdev \"%s\"" , p.soft.name, p.hard.name); status =pmd_ethdev_register (vdev, &p, dev_private);
@@ -798,7 +804,7 @@ pmd_remove(struct rte_vdev_device *vdev)if (!vdev)return -EINVAL ; -RTE_LOG (INFO ,PMD ,"Removing device \"%s\"\n" , +PMD_LOG (INFO ,"Removing device \"%s\"" ,rte_vdev_device_name (vdev));/* Find the ethdev entry */
@@ -833,3 +839,12 @@ RTE_PMD_REGISTER_PARAM_STRING(net_softnic,PMD_PARAM_SOFT_TM_DEQ_BSZ "=<int> " PMD_PARAM_HARD_NAME "=<string> " PMD_PARAM_HARD_TX_QUEUE_ID "=<int>"); + +RTE_INIT (pmd_softnic_init_log); +static void +pmd_softnic_init_log (void ) +{ + pmd_softnic_logtype =rte_log_register ("pmd.net.softnic" ); +if (pmd_softnic_logtype >=0 ) +rte_log_set_level (pmd_softnic_logtype,RTE_LOG_NOTICE ); +}
Signature · 1 line
2.17.0
PATCH 6/10 net/failsafe: convert to dynamic logging
In reply to Stephen Hemminger--- drivers/net/failsafe/failsafe.c | 13 ++++++++++++- drivers/net/failsafe/failsafe_private.h | 8 ++++++-- 2 files changed, 18 insertions(+), 3 deletions(-)
drivers/net/failsafe/failsafe.c +12 -1
@@ -13,6 +13,8 @@#include "failsafe_private.h" +int failsafe_logtype; +const char pmd_failsafe_driver_name[] =FAILSAFE_DRIVER_NAME ;static const struct rte_eth_link eth_link = { .link_speed =ETH_SPEED_NUM_10G ,
@@ -304,7 +306,7 @@ rte_pmd_failsafe_probe(struct rte_vdev_device *vdev) strlen(rte_vdev_device_args(vdev)) == 0) { eth_dev =rte_eth_dev_attach_secondary (name);if (!eth_dev) { -RTE_LOG (ERR ,PMD ,"Failed to probe %s\n" , name); +ERROR ("Failed to probe %s" , name);return -1 ; }/* TODO: request info from primary to set up Rx and Tx */
@@ -332,3 +334,12 @@ static struct rte_vdev_driver failsafe_drv = {RTE_PMD_REGISTER_VDEV (net_failsafe, failsafe_drv);RTE_PMD_REGISTER_PARAM_STRING (net_failsafe,PMD_FAILSAFE_PARAM_STRING ); + +RTE_INIT (failsafe_init_log); +static void +failsafe_init_log (void ) +{ + failsafe_logtype =rte_log_register ("pmd.net.failsafe" ); +if (failsafe_logtype >=0 ) +rte_log_set_level (failsafe_logtype,RTE_LOG_NOTICE ); +}
drivers/net/failsafe/failsafe_private.h +6 -2
@@ -326,8 +326,12 @@ extern int mac_from_arg;#define FS_THREADID_FMT "lu"#endif -#define LOG__ (level, m, ...) \ - RTE_LOG(level, PMD, "net_failsafe: " m "%c", __VA_ARGS__) +extern int failsafe_logtype; + +#define LOG__ (l, m, ...) \ + rte_log(RTE_LOG_ ## l, failsafe_logtype, \ + "net_failsafe: " m "%c", __VA_ARGS__) +#define LOG_ (level, ...) LOG__(level, __VA_ARGS__, '\n')#define DEBUG (...) LOG_(DEBUG, __VA_ARGS__)#define INFO (...) LOG_(INFO, __VA_ARGS__)
Signature · 1 line
2.17.0
PATCH 7/10 net/kni: support dynamic logging
In reply to Stephen Hemminger--- drivers/net/kni/rte_eth_kni.c | 34 ++++++++++++++++++++++++---------- 1 file changed, 24 insertions(+), 10 deletions(-)
drivers/net/kni/rte_eth_kni.c +24 -10
@@ -65,6 +65,11 @@ static const struct rte_eth_link pmd_link = { };static int is_kni_initialized; +static int eth_kni_logtype; + +#define PMD_LOG(level, fmt, args...) \ + rte_log(RTE_LOG_ ## level, eth_kni_logtype, \ + "%s(): " fmt "\n", __func__, ##args)static uint16_t eth_kni_rx (void *q,struct rte_mbuf **bufs,uint16_t nb_bufs) {
@@ -126,8 +131,8 @@ eth_kni_start(struct rte_eth_dev *dev) internals->kni =rte_kni_alloc (mb_pool, &conf,NULL );if (internals->kni ==NULL ) { -RTE_LOG (ERR ,PMD , -"Fail to create kni interface for port: %d\n" , +PMD_LOG (ERR , +"Fail to create kni interface for port: %d" , port_id);return -1 ; }
@@ -153,8 +158,8 @@ eth_kni_dev_start(struct rte_eth_dev *dev)"kni_handle_req" ,NULL , kni_handle_request, internals);if (ret) { -RTE_LOG (ERR ,PMD , -"Fail to create kni request thread\n" ); +PMD_LOG (ERR , +"Fail to create kni request thread" );return -1 ; } }
@@ -175,11 +180,11 @@ eth_kni_dev_stop(struct rte_eth_dev *dev) ret =pthread_cancel (internals->thread);if (ret) -RTE_LOG (ERR ,PMD ,"Can't cancel the thread\n" ); +PMD_LOG (ERR ,"Can't cancel the thread" ); ret =pthread_join (internals->thread,NULL );if (ret) -RTE_LOG (ERR ,PMD ,"Can't join the thread\n" ); +PMD_LOG (ERR ,"Can't join the thread" ); internals->stop_thread =0 ; }
@@ -338,7 +343,7 @@ eth_kni_create(struct rte_vdev_device *vdev,struct rte_eth_dev_data *data;struct rte_eth_dev *eth_dev; -RTE_LOG (INFO ,PMD ,"Creating kni ethdev on numa socket %u\n" , +PMD_LOG (INFO ,"Creating kni ethdev on numa socket %u" , numa_node);/* reserve an ethdev entry */
@@ -403,13 +408,13 @@ eth_kni_probe(struct rte_vdev_device *vdev) name =rte_vdev_device_name (vdev); params =rte_vdev_device_args (vdev); -RTE_LOG (INFO ,PMD ,"Initializing eth_kni for %s\n" , name); +PMD_LOG (INFO ,"Initializing eth_kni for %s" , name);if (rte_eal_process_type () ==RTE_PROC_SECONDARY &&strlen (params) ==0 ) { eth_dev =rte_eth_dev_attach_secondary (name);if (!eth_dev) { -RTE_LOG (ERR ,PMD ,"Failed to probe %s\n" , name); +PMD_LOG (ERR ,"Failed to probe %s" , name);return -1 ; }/* TODO: request info from primary to set up Rx and Tx */
@@ -449,7 +454,7 @@ eth_kni_remove(struct rte_vdev_device *vdev)const char *name; name =rte_vdev_device_name (vdev); -RTE_LOG (INFO ,PMD ,"Un-Initializing eth_kni for %s\n" , name); +PMD_LOG (INFO ,"Un-Initializing eth_kni for %s" , name);/* find the ethdev entry */ eth_dev =rte_eth_dev_allocated (name);
@@ -479,3 +484,12 @@ static struct rte_vdev_driver eth_kni_drv = {RTE_PMD_REGISTER_VDEV (net_kni, eth_kni_drv);RTE_PMD_REGISTER_PARAM_STRING (net_kni,ETH_KNI_NO_REQUEST_THREAD_ARG "=<int>" ); + +RTE_INIT (eth_kni_init_log); +static void +eth_kni_init_log (void ) +{ + eth_kni_logtype =rte_log_register ("pmd.net.kni" ); +if (eth_kni_logtype >=0 ) +rte_log_set_level (eth_kni_logtype,RTE_LOG_NOTICE ); +}
Signature · 1 line
2.17.0
PATCH 8/10 net/pcap: support dynamic logging
In reply to Stephen Hemminger--- drivers/net/pcap/rte_eth_pcap.c | 41 ++++++++++++++++++++++----------- 1 file changed, 28 insertions(+), 13 deletions(-)
drivers/net/pcap/rte_eth_pcap.c +28 -13
@@ -99,6 +99,12 @@ static struct rte_eth_link pmd_link = { .link_autoneg = ETH_LINK_AUTONEG, }; +static int eth_pcap_logtype; + +#define PMD_LOG(level, fmt, args...) \ + rte_log(RTE_LOG_ ## level, eth_pcap_logtype, \ + "%s(): " fmt "\n", __func__, ##args) +static int eth_pcap_rx_jumbo (struct rte_mempool *mb_pool,struct rte_mbuf *mbuf,const u_char *data,uint16_t data_len)
@@ -256,8 +262,8 @@ eth_pcap_tx_dumper(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)pcap_dump ((u_char *)dumper_q->dumper, &header, tx_pcap_data); }else { -RTE_LOG (ERR ,PMD , -"Dropping PCAP packet. Size (%d) > max jumbo size (%d).\n" , +PMD_LOG (ERR , +"Dropping PCAP packet. Size (%d) > max jumbo size (%d)." , mbuf->pkt_len,ETHER_MAX_JUMBO_FRAME_LEN );
@@ -313,8 +319,8 @@ eth_pcap_tx(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts) ret =pcap_sendpacket (tx_queue->pcap, tx_pcap_data, mbuf->pkt_len); }else { -RTE_LOG (ERR ,PMD , -"Dropping PCAP packet. Size (%d) > max jumbo size (%d).\n" , +PMD_LOG (ERR , +"Dropping PCAP packet. Size (%d) > max jumbo size (%d)." , mbuf->pkt_len,ETHER_MAX_JUMBO_FRAME_LEN );
@@ -346,7 +352,7 @@ open_iface_live(const char *iface, pcap_t **pcap) { RTE_ETH_PCAP_PROMISC, RTE_ETH_PCAP_TIMEOUT, errbuf);if (*pcap ==NULL ) { -RTE_LOG (ERR ,PMD ,"Couldn't open %s: %s\n" , iface, errbuf); +PMD_LOG (ERR ,"Couldn't open %s: %s" , iface, errbuf);return -1 ; }
@@ -357,7 +363,7 @@ static int open_single_iface(const char *iface, pcap_t **pcap) { if (open_iface_live(iface, pcap) < 0) { - RTE_LOG(ERR, PMD, "Couldn't open interface %s\n", iface); + PMD_LOG(ERR, "Couldn't open interface %s", iface); return -1; }
@@ -376,7 +382,7 @@ open_single_tx_pcap(const char *pcap_filename, pcap_dumper_t **dumper)*/ tx_pcap =pcap_open_dead (DLT_EN10MB ,RTE_ETH_PCAP_SNAPSHOT_LEN );if (tx_pcap ==NULL ) { -RTE_LOG (ERR ,PMD ,"Couldn't create dead pcap\n" ); +PMD_LOG (ERR ,"Couldn't create dead pcap" );return -1 ; }
@@ -384,7 +390,7 @@ open_single_tx_pcap(const char *pcap_filename, pcap_dumper_t **dumper) *dumper =pcap_dump_open (tx_pcap, pcap_filename);if (*dumper ==NULL ) {pcap_close (tx_pcap); -RTE_LOG (ERR ,PMD ,"Couldn't open %s for writing.\n" , +PMD_LOG (ERR ,"Couldn't open %s for writing." , pcap_filename);return -1 ; }
@@ -398,7 +404,7 @@ open_single_rx_pcap(const char *pcap_filename, pcap_t **pcap) { *pcap =pcap_open_offline (pcap_filename, errbuf);if (*pcap ==NULL ) { -RTE_LOG (ERR ,PMD ,"Couldn't open %s: %s\n" , pcap_filename, +PMD_LOG (ERR ,"Couldn't open %s: %s" , pcap_filename, errbuf);return -1 ; }
@@ -776,7 +782,7 @@ pmd_init_internals(struct rte_vdev_device *vdev,struct rte_eth_dev_data *data;unsigned int numa_node = vdev->device.numa_node; -RTE_LOG (INFO ,PMD ,"Creating pcap-backed ethdev on numa socket %d\n" , +PMD_LOG (INFO ,"Creating pcap-backed ethdev on numa socket %d" , numa_node);/* reserve an ethdev entry */
@@ -903,7 +909,7 @@ pmd_pcap_probe(struct rte_vdev_device *dev)int ret; name =rte_vdev_device_name (dev); -RTE_LOG (INFO ,PMD ,"Initializing pmd_pcap for %s\n" , name); +PMD_LOG (INFO ,"Initializing pmd_pcap for %s" , name);gettimeofday (&start_time,NULL ); start_cycles =rte_get_timer_cycles ();
@@ -913,7 +919,7 @@ pmd_pcap_probe(struct rte_vdev_device *dev) strlen(rte_vdev_device_args(dev)) == 0) { eth_dev =rte_eth_dev_attach_secondary (name);if (!eth_dev) { -RTE_LOG (ERR ,PMD ,"Failed to probe %s\n" , name); +PMD_LOG (ERR ,"Failed to probe %s" , name);return -1 ; }/* TODO: request info from primary to set up Rx and Tx */
@@ -1009,7 +1015,7 @@ pmd_pcap_remove(struct rte_vdev_device *dev) {struct rte_eth_dev *eth_dev =NULL ; -RTE_LOG (INFO ,PMD ,"Closing pcap ethdev on numa socket %d\n" , +PMD_LOG (INFO ,"Closing pcap ethdev on numa socket %d" ,rte_socket_id ());if (!dev)
@@ -1040,3 +1046,12 @@ RTE_PMD_REGISTER_PARAM_STRING(net_pcap,ETH_PCAP_RX_IFACE_ARG "=<ifc> " ETH_PCAP_TX_IFACE_ARG "=<ifc> " ETH_PCAP_IFACE_ARG "=<ifc>"); + +RTE_INIT (eth_pcap_init_log); +static void +eth_pcap_init_log (void ) +{ + eth_pcap_logtype =rte_log_register ("pmd.net.pcap" ); +if (eth_pcap_logtype >=0 ) +rte_log_set_level (eth_pcap_logtype,RTE_LOG_NOTICE ); +}
Signature · 1 line
2.17.0
PATCH 9/10 net/vhost: implement dynamic logging
In reply to Stephen HemmingerUse dynamic log type (instead of PMD) in vhost.
--- drivers/net/vhost/rte_eth_vhost.c | 82 ++++++++++++++++++------------- 1 file changed, 48 insertions(+), 34 deletions(-)
drivers/net/vhost/rte_eth_vhost.c +48 -34
@@ -46,6 +46,11 @@#include "rte_eth_vhost.h" +static int vhost_logtype; + +#define VHOST_LOG (level, ...) \ + rte_log(RTE_LOG_ ## level, vhost_logtype, __VA_ARGS__) +enum {VIRTIO_RXQ ,VIRTIO_TXQ ,VIRTIO_QNUM };#define ETH_VHOST_IFACE_ARG "iface"
@@ -518,7 +523,7 @@ eth_dev_configure(struct rte_eth_dev *dev __rte_unused) internal->vlan_strip = rxmode->hw_vlan_strip;if (rxmode->hw_vlan_filter) -RTE_LOG (WARNING ,PMD , +VHOST_LOG (WARNING ,"vhost(%s): vlan filtering not available\n" , internal->dev_name);
@@ -562,16 +567,16 @@ eth_rxq_intr_enable(struct rte_eth_dev *dev, uint16_t qid) vq = dev->data->rx_queues[qid];if (!vq) { -RTE_LOG (ERR ,PMD ,"rxq%d is not setup yet\n" , qid); +VHOST_LOG (ERR ,"rxq%d is not setup yet\n" , qid);return -1 ; } ret =rte_vhost_get_vhost_vring (vq->vid, (qid <<1 ) +1 , &vring);if (ret <0 ) { -RTE_LOG (ERR ,PMD ,"Failed to get rxq%d's vring\n" , qid); +VHOST_LOG (ERR ,"Failed to get rxq%d's vring\n" , qid);return ret; } -RTE_LOG (INFO ,PMD ,"Enable interrupt for rxq%d\n" , qid); +VHOST_LOG (INFO ,"Enable interrupt for rxq%d\n" , qid);rte_vhost_enable_guest_notification (vq->vid, (qid <<1 ) +1 ,1 );rte_wmb ();
@@ -587,16 +592,16 @@ eth_rxq_intr_disable(struct rte_eth_dev *dev, uint16_t qid) vq = dev->data->rx_queues[qid];if (!vq) { -RTE_LOG (ERR ,PMD ,"rxq%d is not setup yet\n" , qid); +VHOST_LOG (ERR ,"rxq%d is not setup yet\n" , qid);return -1 ; } ret =rte_vhost_get_vhost_vring (vq->vid, (qid <<1 ) +1 , &vring);if (ret <0 ) { -RTE_LOG (ERR ,PMD ,"Failed to get rxq%d's vring" , qid); +VHOST_LOG (ERR ,"Failed to get rxq%d's vring" , qid);return ret; } -RTE_LOG (INFO ,PMD ,"Disable interrupt for rxq%d\n" , qid); +VHOST_LOG (INFO ,"Disable interrupt for rxq%d\n" , qid);rte_vhost_enable_guest_notification (vq->vid, (qid <<1 ) +1 ,0 );rte_wmb ();
@@ -633,7 +638,7 @@ eth_vhost_install_intr(struct rte_eth_dev *dev) dev->intr_handle =malloc (sizeof (*dev->intr_handle));if (!dev->intr_handle) { -RTE_LOG (ERR ,PMD ,"Fail to allocate intr_handle\n" ); +VHOST_LOG (ERR ,"Fail to allocate intr_handle\n" );return -ENOMEM ; }memset (dev->intr_handle,0 ,sizeof (*dev->intr_handle));
@@ -644,36 +649,36 @@ eth_vhost_install_intr(struct rte_eth_dev *dev)malloc (nb_rxq *sizeof (dev->intr_handle->intr_vec[0 ]));if (!dev->intr_handle->intr_vec) { -RTE_LOG (ERR ,PMD , +VHOST_LOG (ERR ,"Failed to allocate memory for interrupt vector\n" );free (dev->intr_handle);return -ENOMEM ; } -RTE_LOG (INFO ,PMD ,"Prepare intr vec\n" ); +VHOST_LOG (INFO ,"Prepare intr vec\n" );for (i =0 ; i < nb_rxq; i++) { vq = dev->data->rx_queues[i];if (!vq) { -RTE_LOG (INFO ,PMD ,"rxq-%d not setup yet, skip!\n" , i); +VHOST_LOG (INFO ,"rxq-%d not setup yet, skip!\n" , i);continue ; } ret =rte_vhost_get_vhost_vring (vq->vid, (i <<1 ) +1 , &vring);if (ret <0 ) { -RTE_LOG (INFO ,PMD , +VHOST_LOG (INFO ,"Failed to get rxq-%d's vring, skip!\n" , i);continue ; }if (vring.kickfd <0 ) { -RTE_LOG (INFO ,PMD , +VHOST_LOG (INFO ,"rxq-%d's kickfd is invalid, skip!\n" , i);continue ; } dev->intr_handle->intr_vec[i] =RTE_INTR_VEC_RXTX_OFFSET + i; dev->intr_handle->efds[i] = vring.kickfd; count++; -RTE_LOG (INFO ,PMD ,"Installed intr vec for rxq-%d\n" , i); +VHOST_LOG (INFO ,"Installed intr vec for rxq-%d\n" , i); } dev->intr_handle->nb_efd = count;
@@ -758,7 +763,7 @@ new_device(int vid)rte_vhost_get_ifname (vid, ifname,sizeof (ifname)); list =find_internal_resource (ifname);if (list ==NULL ) { -RTE_LOG (INFO ,PMD ,"Invalid device name: %s\n" , ifname); +VHOST_LOG (INFO ,"Invalid device name: %s\n" , ifname);return -1 ; }
@@ -778,13 +783,13 @@ new_device(int vid)if (dev_conf->intr_conf.rxq) {if (eth_vhost_install_intr (eth_dev) <0 ) { -RTE_LOG (INFO ,PMD , +VHOST_LOG (INFO ,"Failed to install interrupt handler." );return -1 ; } } }else { -RTE_LOG (INFO ,PMD ,"RX/TX queues not exist yet\n" ); +VHOST_LOG (INFO ,"RX/TX queues not exist yet\n" ); }for (i =0 ; i <rte_vhost_get_vring_num (vid); i++)
@@ -797,7 +802,7 @@ new_device(int vid)rte_atomic32_set (&internal->dev_attached,1 );update_queuing_status (eth_dev); -RTE_LOG (INFO ,PMD ,"Vhost device %d created\n" , vid); +VHOST_LOG (INFO ,"Vhost device %d created\n" , vid);_rte_eth_dev_callback_process (eth_dev,RTE_ETH_EVENT_INTR_LSC ,NULL );
@@ -818,7 +823,7 @@ destroy_device(int vid)rte_vhost_get_ifname (vid, ifname,sizeof (ifname)); list =find_internal_resource (ifname);if (list ==NULL ) { -RTE_LOG (ERR ,PMD ,"Invalid interface name: %s\n" , ifname); +VHOST_LOG (ERR ,"Invalid interface name: %s\n" , ifname);return ; } eth_dev = list->eth_dev;
@@ -853,7 +858,7 @@ destroy_device(int vid) state->max_vring =0 ;rte_spinlock_unlock (&state->lock); -RTE_LOG (INFO ,PMD ,"Vhost device %d destroyed\n" , vid); +VHOST_LOG (INFO ,"Vhost device %d destroyed\n" , vid);eth_vhost_uninstall_intr (eth_dev);_rte_eth_dev_callback_process (eth_dev,RTE_ETH_EVENT_INTR_LSC ,NULL );
@@ -870,7 +875,7 @@ vring_state_changed(int vid, uint16_t vring, int enable)rte_vhost_get_ifname (vid, ifname,sizeof (ifname)); list =find_internal_resource (ifname);if (list ==NULL ) { -RTE_LOG (ERR ,PMD ,"Invalid interface name: %s\n" , ifname); +VHOST_LOG (ERR ,"Invalid interface name: %s\n" , ifname);return -1 ; }
@@ -882,7 +887,7 @@ vring_state_changed(int vid, uint16_t vring, int enable) state->max_vring =RTE_MAX (vring, state->max_vring);rte_spinlock_unlock (&state->lock); -RTE_LOG (INFO ,PMD ,"vring%u is %s\n" , +VHOST_LOG (INFO ,"vring%u is %s\n" , vring, enable ?"enabled" :"disabled" );_rte_eth_dev_callback_process (eth_dev,RTE_ETH_EVENT_QUEUE_STATE ,NULL );
@@ -905,13 +910,13 @@ rte_eth_vhost_get_queue_event(uint16_t port_id,int idx;if (port_id >=RTE_MAX_ETHPORTS ) { -RTE_LOG (ERR ,PMD ,"Invalid port id\n" ); +VHOST_LOG (ERR ,"Invalid port id\n" );return -1 ; } state = vring_states[port_id];if (!state) { -RTE_LOG (ERR ,PMD ,"Unused port\n" ); +VHOST_LOG (ERR ,"Unused port\n" );return -1 ; }
@@ -973,7 +978,7 @@ eth_dev_start(struct rte_eth_dev *eth_dev)if (rte_atomic32_read (&internal->dev_attached) ==1 ) {if (dev_conf->intr_conf.rxq) {if (eth_vhost_install_intr (eth_dev) <0 ) { -RTE_LOG (INFO ,PMD , +VHOST_LOG (INFO ,"Failed to install interrupt handler." );return -1 ; }
@@ -1047,7 +1052,7 @@ eth_rx_queue_setup(struct rte_eth_dev *dev, uint16_t rx_queue_id, vq =rte_zmalloc_socket (NULL ,sizeof (struct vhost_queue ),RTE_CACHE_LINE_SIZE , socket_id);if (vq ==NULL ) { -RTE_LOG (ERR ,PMD ,"Failed to allocate memory for rx queue\n" ); +VHOST_LOG (ERR ,"Failed to allocate memory for rx queue\n" );return -ENOMEM ; }
@@ -1069,7 +1074,7 @@ eth_tx_queue_setup(struct rte_eth_dev *dev, uint16_t tx_queue_id, vq =rte_zmalloc_socket (NULL ,sizeof (struct vhost_queue ),RTE_CACHE_LINE_SIZE , socket_id);if (vq ==NULL ) { -RTE_LOG (ERR ,PMD ,"Failed to allocate memory for tx queue\n" ); +VHOST_LOG (ERR ,"Failed to allocate memory for tx queue\n" );return -ENOMEM ; }
@@ -1087,7 +1092,7 @@ eth_dev_info(struct rte_eth_dev *dev, internal = dev->data->dev_private;if (internal ==NULL ) { -RTE_LOG (ERR ,PMD ,"Invalid device specified\n" ); +VHOST_LOG (ERR ,"Invalid device specified\n" );return ; }
@@ -1234,7 +1239,7 @@ eth_dev_vhost_create(struct rte_vdev_device *dev, char *iface_name,struct rte_vhost_vring_state *vring_state =NULL ;struct internal_list *list =NULL ; -RTE_LOG (INFO ,PMD ,"Creating VHOST-USER backend on numa socket %u\n" , +VHOST_LOG (INFO ,"Creating VHOST-USER backend on numa socket %u\n" , numa_node); list =rte_zmalloc_socket (name,sizeof (*list),0 , numa_node);
@@ -1296,12 +1301,12 @@ eth_dev_vhost_create(struct rte_vdev_device *dev, char *iface_name, goto error;if (rte_vhost_driver_callback_register (iface_name, &vhost_ops) <0 ) { -RTE_LOG (ERR ,PMD ,"Can't register callbacks\n" ); +VHOST_LOG (ERR ,"Can't register callbacks\n" ); goto error; }if (rte_vhost_driver_start (iface_name) <0 ) { -RTE_LOG (ERR ,PMD ,"Failed to start driver for %s\n" , +VHOST_LOG (ERR ,"Failed to start driver for %s\n" , iface_name); goto error; }
@@ -1365,13 +1370,13 @@ rte_pmd_vhost_probe(struct rte_vdev_device *dev)struct rte_eth_dev *eth_dev;const char *name =rte_vdev_device_name (dev); -RTE_LOG (INFO ,PMD ,"Initializing pmd_vhost for %s\n" , name); +VHOST_LOG (INFO ,"Initializing pmd_vhost for %s\n" , name);if (rte_eal_process_type () ==RTE_PROC_SECONDARY &&strlen (rte_vdev_device_args (dev)) ==0 ) { eth_dev =rte_eth_dev_attach_secondary (name);if (!eth_dev) { -RTE_LOG (ERR ,PMD ,"Failed to probe %s\n" , name); +VHOST_LOG (ERR ,"Failed to probe %s\n" , name);return -1 ; }/* TODO: request info from primary to set up Rx and Tx */
@@ -1450,7 +1455,7 @@ rte_pmd_vhost_remove(struct rte_vdev_device *dev)struct rte_eth_dev *eth_dev =NULL ; name =rte_vdev_device_name (dev); -RTE_LOG (INFO ,PMD ,"Un-Initializing pmd_vhost for %s\n" , name); +VHOST_LOG (INFO ,"Un-Initializing pmd_vhost for %s\n" , name);/* find an ethdev entry */ eth_dev =rte_eth_dev_allocated (name);
@@ -1477,3 +1482,12 @@ RTE_PMD_REGISTER_ALIAS(net_vhost, eth_vhost);RTE_PMD_REGISTER_PARAM_STRING (net_vhost,"iface=<ifc> " "queues=<int>" ); + +RTE_INIT (vhost_init_log); +static void +vhost_init_log (void ) +{ + vhost_logtype =rte_log_register ("pmd.net.vhost" ); +if (vhost_logtype >=0 ) +rte_log_set_level (vhost_logtype,RTE_LOG_NOTICE ); +}
Signature · 1 line
2.17.0
PATCH 10/10 net/bond: convert to dynamic logging
In reply to Stephen Hemminger--- drivers/net/bonding/rte_eth_bond_8023ad.c | 126 +++++---- drivers/net/bonding/rte_eth_bond_alb.c | 4 +- drivers/net/bonding/rte_eth_bond_args.c | 5 +- drivers/net/bonding/rte_eth_bond_pmd.c | 303 ++++++++++----------- drivers/net/bonding/rte_eth_bond_private.h | 5 +- 5 files changed, 227 insertions(+), 216 deletions(-)
drivers/net/bonding/rte_eth_bond_8023ad.c +67 -59
@@ -16,9 +16,12 @@static void bond_mode_8023ad_ext_periodic_cb (void *arg);#ifdef RTE_LIBRTE_BOND_DEBUG_8023AD -#define MODE4_DEBUG (fmt, ...) RTE_LOG(DEBUG, PMD, "%6u [Port %u: %s] " fmt, \ - bond_dbg_get_time_diff_ms(), slave_id, \ - __func__, ##__VA_ARGS__) + +#define MODE4_DEBUG (fmt, ...) \ + rte_log(RTE_LOG_DEBUG, bond_logtype, \ + "%6u [Port %u: %s] " fmt, \ + bond_dbg_get_time_diff_ms(), slave_id, \ + __func__, ##__VA_ARGS__)static uint64_t start_time;
@@ -77,44 +80,46 @@ bond_print_lacp(struct lacpdu *l)if (p_len && p_state[p_len-1 ] ==' ' ) p_state[p_len-1 ] ='\0' ; -RTE_LOG (DEBUG ,PMD ,"LACP: {\n" \ -" subtype= %02X\n" \ -" ver_num=%02X\n" \ -" actor={ tlv=%02X, len=%02X\n" \ -" pri=%04X, system=%s, key=%04X, p_pri=%04X p_num=%04X\n" \ -" state={ %s }\n" \ -" }\n" \ -" partner={ tlv=%02X, len=%02X\n" \ -" pri=%04X, system=%s, key=%04X, p_pri=%04X p_num=%04X\n" \ -" state={ %s }\n" \ -" }\n" \ -" collector={info=%02X, length=%02X, max_delay=%04X\n, " \ -"type_term=%02X, terminator_length = %02X}\n" ,\ - l->subtype,\ - l->version_number,\ - l->actor.tlv_type_info,\ - l->actor.info_length,\ - l->actor.port_params.system_priority,\ - a_address,\ - l->actor.port_params.key,\ - l->actor.port_params.port_priority,\ - l->actor.port_params.port_number,\ - a_state,\ - l->partner.tlv_type_info,\ - l->partner.info_length,\ - l->partner.port_params.system_priority,\ - p_address,\ - l->partner.port_params.key,\ - l->partner.port_params.port_priority,\ - l->partner.port_params.port_number,\ - p_state,\ - l->tlv_type_collector_info,\ - l->collector_info_length,\ - l->collector_max_delay,\ - l->tlv_type_terminator,\ - l->terminator_length); +RTE_BOND_LOG (DEBUG , +"LACP: {\n" +" subtype= %02X\n" +" ver_num=%02X\n" +" actor={ tlv=%02X, len=%02X\n" +" pri=%04X, system=%s, key=%04X, p_pri=%04X p_num=%04X\n" +" state={ %s }\n" +" }\n" +" partner={ tlv=%02X, len=%02X\n" +" pri=%04X, system=%s, key=%04X, p_pri=%04X p_num=%04X\n" +" state={ %s }\n" +" }\n" +" collector={info=%02X, length=%02X, max_delay=%04X\n, " +"type_term=%02X, terminator_length = %02X }" , + l->subtype, + l->version_number, + l->actor.tlv_type_info, + l->actor.info_length, + l->actor.port_params.system_priority, + a_address, + l->actor.port_params.key, + l->actor.port_params.port_priority, + l->actor.port_params.port_number, + a_state, + l->partner.tlv_type_info, + l->partner.info_length, + l->partner.port_params.system_priority, + p_address, + l->partner.port_params.key, + l->partner.port_params.port_priority, + l->partner.port_params.port_number, + p_state, + l->tlv_type_collector_info, + l->collector_info_length, + l->collector_max_delay, + l->tlv_type_terminator, + l->terminator_length); } +#define BOND_PRINT_LACP (lacpdu) bond_print_lacp(lacpdu)#else #define BOND_PRINT_LACP (lacpdu) do { } while (0)
@@ -200,31 +205,34 @@ show_warnings(uint16_t slave_id) rte_get_tsc_hz() / 1000);if (warnings &WRN_RX_QUEUE_FULL ) { -RTE_LOG (DEBUG ,PMD , -"Slave %u: failed to enqueue LACP packet into RX ring.\n" -"Receive and transmit functions must be invoked on bonded\n" -"interface at least 10 times per second or LACP will not\n" -"work correctly\n" , slave_id); +RTE_BOND_LOG (DEBUG , +"Slave %u: failed to enqueue LACP packet into RX ring.\n" +"Receive and transmit functions must be invoked on bonded" +"interface at least 10 times per second or LACP will notwork correctly" , + slave_id); }if (warnings &WRN_TX_QUEUE_FULL ) { -RTE_LOG (DEBUG ,PMD , -"Slave %u: failed to enqueue LACP packet into TX ring.\n" -"Receive and transmit functions must be invoked on bonded\n" -"interface at least 10 times per second or LACP will not\n" -"work correctly\n" , slave_id); +RTE_BOND_LOG (DEBUG , +"Slave %u: failed to enqueue LACP packet into TX ring.\n" +"Receive and transmit functions must be invoked on bonded" +"interface at least 10 times per second or LACP will not work correctly" , + slave_id); }if (warnings &WRN_RX_MARKER_TO_FAST ) -RTE_LOG (INFO ,PMD ,"Slave %u: marker to early - ignoring.\n" , slave_id); +RTE_BOND_LOG (INFO ,"Slave %u: marker to early - ignoring." , + slave_id);if (warnings &WRN_UNKNOWN_SLOW_TYPE ) { -RTE_LOG (INFO ,PMD , -"Slave %u: ignoring unknown slow protocol frame type" , slave_id); +RTE_BOND_LOG (INFO , +"Slave %u: ignoring unknown slow protocol frame type" , + slave_id); }if (warnings &WRN_UNKNOWN_MARKER_TYPE ) -RTE_LOG (INFO ,PMD ,"Slave %u: ignoring unknown marker type" , slave_id); +RTE_BOND_LOG (INFO ,"Slave %u: ignoring unknown marker type" , + slave_id);if (warnings &WRN_NOT_LACP_CAPABLE )MODE4_DEBUG ("Port %u is not LACP capable!\n" , slave_id);
@@ -507,8 +515,8 @@ mux_machine(struct bond_dev_private *internals, uint16_t slave_id)ACTOR_STATE_SET (port,DISTRIBUTING );SM_FLAG_SET (port,NTT );MODE4_DEBUG ("COLLECTING -> DISTRIBUTING\n" ); -RTE_LOG (INFO ,PMD , -"Bond %u: slave id %u distributing started.\n" , +RTE_BOND_LOG (INFO , +"Bond %u: slave id %u distributing started." , internals->port_id, slave_id); } }else {
@@ -518,8 +526,8 @@ mux_machine(struct bond_dev_private *internals, uint16_t slave_id)ACTOR_STATE_CLR (port,DISTRIBUTING );SM_FLAG_SET (port,NTT );MODE4_DEBUG ("DISTRIBUTING -> COLLECTING\n" ); -RTE_LOG (INFO ,PMD , -"Bond %u: slave id %u distributing stopped.\n" , +RTE_BOND_LOG (INFO , +"Bond %u: slave id %u distributing stopped." , internals->port_id, slave_id); } }
@@ -557,7 +565,7 @@ tx_machine(struct bond_dev_private *internals, uint16_t slave_id) lacp_pkt =rte_pktmbuf_alloc (port->mbuf_pool);if (lacp_pkt ==NULL ) { -RTE_LOG (ERR ,PMD ,"Failed to allocate LACP packet from pool\n" ); +RTE_BOND_LOG (ERR ,"Failed to allocate LACP packet from pool" );return ; }
@@ -1337,7 +1345,7 @@ bond_8023ad_setup_validate(uint16_t port_id, conf->tx_period_ms == 0 || conf->rx_marker_period_ms == 0 || conf->update_timeout_ms == 0) { -RTE_LOG (ERR ,PMD ,"given mode 4 configuration is invalid\n" ); +RTE_BOND_LOG (ERR ,"given mode 4 configuration is invalid" );return -EINVAL ; } }
drivers/net/bonding/rte_eth_bond_alb.c +2 -2
@@ -60,8 +60,8 @@ bond_mode_alb_enable(struct rte_eth_dev *bond_dev) 0, data_size, socket_id);if (internals->mode6.mempool ==NULL ) { -RTE_LOG (ERR ,PMD ,"%s: Failed to initialize ALB mempool.\n" , - bond_dev->device->name); +RTE_BOND_LOG (ERR ,"%s: Failed to initialize ALB mempool.\n" , + bond_dev->device->name); goto mempool_alloc_error; } }
drivers/net/bonding/rte_eth_bond_args.c +3 -2
@@ -92,7 +92,7 @@ parse_port_id(const char *port_str)if (pci_bus->parse (port_str, &dev_addr) ==0 ) { dev = pci_bus->find_device (NULL , bond_pci_addr_cmp, &dev_addr);if (dev ==NULL ) { -RTE_LOG (ERR ,PMD ,"unable to find PCI device\n" ); +RTE_BOND_LOG (ERR ,"unable to find PCI device" );return -1 ; } port_id =find_port_id_by_pci_addr (&dev_addr);
@@ -134,7 +134,8 @@ bond_ethdev_parse_slave_port_kvarg(const char *key,if (strcmp (key,PMD_BOND_SLAVE_PORT_KVARG ) ==0 ) {int port_id =parse_port_id (value);if (port_id <0 ) { -RTE_BOND_LOG (ERR ,"Invalid slave port value (%s) specified" , value); +RTE_BOND_LOG (ERR ,"Invalid slave port value (%s) specified" , + value);return -1 ; }else slave_ports->slaves[slave_ports->slave_count++] =
drivers/net/bonding/rte_eth_bond_pmd.c +151 -152
542 lines not on this page · raw message
drivers/net/bonding/rte_eth_bond_private.h +4 -1
@@ -28,8 +28,11 @@#define PMD_BOND_XMIT_POLICY_LAYER23_KVARG ("l23")#define PMD_BOND_XMIT_POLICY_LAYER34_KVARG ("l34") +extern int bond_logtype; +#define RTE_BOND_LOG (lvl, msg, ...) \ - RTE_LOG(lvl, PMD, "%s(%d) - " msg "\n", __func__, __LINE__, ##__VA_ARGS__) + rte_log(RTE_LOG_ ## lvl, bond_logtype, \ + "%s(%d) - " msg "\n", __func__, __LINE__, ##__VA_ARGS__)#define BONDING_MODE_INVALID 0xFF
Signature · 1 line
2.17.0
Re: [PATCH next 10/10] net/bond: convert to dynamic logging
Quoted 1 line · Stephen Hemminger
Signed-off-by Stephen Hemminger <[email protected]>
<...>
drivers/net/bonding/rte_eth_bond_pmd.c update_client_stats(uint32_t addr, uint16_t port, uint32_t *TXorRXindicator) · line 575
Quoted 2 lines
drivers/net/bonding/rte_eth_bond_pmd.c +2
-0+#define MODE6_DEBUG (info, src_ip, dst_ip, eth_h, arp_op, port, burstnumber) \ + rte_log(RTE_LOG_DEBUG, logtype_bond, \
Variable is "bond_logtype", will fix while applying
<...>
Quoted 10 lines
drivers/net/bonding/rte_eth_bond_pmd.c +10
-0+int bond_logtype; + +RTE_INIT (bond_init_log); +static void +bond_init_log (void ) +{ + bond_logtype =rte_log_register ("pmd.net.bon" ); +if (bond_logtype >=0 ) +rte_log_set_level (bond_logtype,RTE_LOG_NOTICE ); +}
<...>
Quoted 6 lines · Stephen Hemminger
This set of patches converts more virtual drivers to use the dynamic log type, rather than PMD log type.
Marking these for next since there is no urgency to get these into 18.05 and they are compile tested only.
Quoted 11 lines
Stephen Hemminger (10):
net/tap: convert to dynamic logging
net/af_packet: convert to dynamic log level
net/null: convert to dynamic logging
net/ring: convert to dynamic logging
net/softnic: convert to dynamic logging
net/failsafe: convert to dynamic logging
net/kni: support dynamic logging
net/pcap: support dynamic logging
net/vhost: implement dynamic logging
net/bond: convert to dynamic logging
For series,
Quoted 21 lines · Ferruh Yigit
Quoted 6 lines · Stephen Hemminger
This set of patches converts more virtual drivers to use the dynamic log type, rather than PMD log type.
Marking these for next since there is no urgency to get these into 18.05 and they are compile tested only.
Quoted 11 lines
Stephen Hemminger (10):
net/tap: convert to dynamic logging
net/af_packet: convert to dynamic log level
net/null: convert to dynamic logging
net/ring: convert to dynamic logging
net/softnic: convert to dynamic logging
net/failsafe: convert to dynamic logging
net/kni: support dynamic logging
net/pcap: support dynamic logging
net/vhost: implement dynamic logging
net/bond: convert to dynamic loggingFor series,
Reviewed-by Ferruh Yigit <[email protected]>
Quoted 19 lines · Ferruh Yigit
Quoted 6 lines · Stephen Hemminger
This set of patches converts more virtual drivers to use the dynamic log type, rather than PMD log type.
Marking these for next since there is no urgency to get these into 18.05 and they are compile tested only.
Quoted 11 lines
Stephen Hemminger (10):
net/tap: convert to dynamic logging
net/af_packet: convert to dynamic log level
net/null: convert to dynamic logging
net/ring: convert to dynamic logging
net/softnic: convert to dynamic logging
net/failsafe: convert to dynamic logging
net/kni: support dynamic logging
net/pcap: support dynamic logging
net/vhost: implement dynamic logging
net/bond: convert to dynamic logging
Quoted 2 lines
For series,
Reviewed-by Ferruh Yigit <[email protected]>
Series applied to dpdk-next-net/master, thanks.