Remove uses of PMD logtype
cover Remove uses of PMD logtype
While working on netvsc driver, noticed that there are still some places in some drivers using the old PMD static logtype. Would like to eradicate all of these and even mark it as deprecated in a future release.
Stephen Hemminger (7):
net/mvneta: do not use PMD logtype
net/virtio: do not use PMD logtype
net/tap: do not use PMD logtype
net/pfe: do not use PMD logtype
net/bnxt: don't use PMD logtype
net/dpaa: use dynamic logtype
net/thunderx: use dynamic logtype
drivers/net/bnxt/bnxt_ring.c | 2 +- drivers/net/dpaa/dpaa_ethdev.c | 24 +++++++++--------------- drivers/net/mvneta/mvneta_ethdev.c | 2 +- drivers/net/pfe/pfe_ethdev.c | 4 ++-- drivers/net/tap/rte_eth_tap.c | 6 ++++-- drivers/net/thunderx/nicvf_ethdev.c | 17 +++++++++-------- drivers/net/virtio/virtio_rxtx.c | 6 +++--- drivers/net/virtio/virtio_user_ethdev.c | 2 +- 8 files changed, 30 insertions(+), 33 deletions(-)
Signature · 1 line
2.20.1
PATCH 1/7 net/mvneta: do not use PMD logtype
The PMD logtype is legacy and should not be used.
--- drivers/net/mvneta/mvneta_ethdev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/mvneta/mvneta_ethdev.c +1 -1
@@ -751,7 +751,7 @@ mvneta_stats_reset(struct rte_eth_dev *dev) ret =mvneta_stats_get (dev, &priv->prev_stats);if (unlikely (ret)) -RTE_LOG (ERR ,PMD ,"Failed to reset port statistics" ); +MVNETA_LOG (ERR ,"Failed to reset port statistics" );return ret; }
Signature · 1 line
2.20.1
PATCH 2/7 net/virtio: do not use PMD logtype
In reply to Stephen HemmingerVirtio driver has its own logtype adn should not use legacy PMD logtype.
--- drivers/net/virtio/virtio_rxtx.c | 6 +++--- drivers/net/virtio/virtio_user_ethdev.c | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-)
drivers/net/virtio/virtio_rxtx.c +3 -3
@@ -1085,7 +1085,7 @@ virtio_dev_tx_queue_setup(struct rte_eth_dev *dev,RTE_MIN (vq->vq_nentries /4 ,DEFAULT_TX_FREE_THRESH );if (tx_free_thresh >= (vq->vq_nentries -3 )) { - RTE_LOG(ERR, PMD, "tx_free_thresh must be less than the " + PMD_DRV_LOG(ERR, "tx_free_thresh must be less than the " "number of TX entries minus 3 (%u)." " (tx_free_thresh=%u port=%u queue=%u)\n", vq->vq_nentries - 3,
@@ -1133,7 +1133,7 @@ virtio_discard_rxbuf(struct virtqueue *vq, struct rte_mbuf *m) error =virtqueue_enqueue_recv_refill (vq, &m,1 );if (unlikely (error)) { -RTE_LOG (ERR ,PMD ,"cannot requeue discarded mbuf" ); +PMD_DRV_LOG (ERR ,"cannot requeue discarded mbuf" );rte_pktmbuf_free (m); } }
@@ -1145,7 +1145,7 @@ virtio_discard_rxbuf_inorder(struct virtqueue *vq, struct rte_mbuf *m) error =virtqueue_enqueue_refill_inorder (vq, &m,1 );if (unlikely (error)) { -RTE_LOG (ERR ,PMD ,"cannot requeue discarded mbuf" ); +PMD_DRV_LOG (ERR ,"cannot requeue discarded mbuf" );rte_pktmbuf_free (m); } }
drivers/net/virtio/virtio_user_ethdev.c +1 -1
@@ -561,7 +561,7 @@ virtio_user_pmd_probe(struct rte_vdev_device *dev)const char *name =rte_vdev_device_name (dev); eth_dev =rte_eth_dev_attach_secondary (name);if (!eth_dev) { -RTE_LOG (ERR ,PMD ,"Failed to probe %s\n" , name); +PMD_INIT_LOG (ERR ,"Failed to probe %s" , name);return -1 ; }
Signature · 1 line
2.20.1
PATCH 3/7 net/tap: do not use PMD logtype
In reply to Stephen HemmingerThe PMD logtype is legacy and drivers should use their own logtype.
--- drivers/net/tap/rte_eth_tap.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
drivers/net/tap/rte_eth_tap.c +4 -2
@@ -778,7 +778,7 @@ tap_ioctl(struct pmd_internals *pmd, unsigned long request,case SIOCSIFMTU :break ;default : -RTE_LOG (WARNING ,PMD ,"%s: ioctl() called with wrong arg\n" , +TAP_LOG (WARNING ,"%s: ioctl() called with wrong arg" , pmd->name);return -EINVAL ; }
@@ -1301,7 +1301,9 @@ tap_gso_ctx_setup(struct rte_gso_ctx *gso_ctx, struct rte_eth_dev *dev) SOCKET_ID_ANY);if (!mp) {struct pmd_internals *pmd = dev->data->dev_private; -RTE_LOG (DEBUG ,PMD ,"%s: failed to create mbuf pool for device %s\n" , + +TAP_LOG (ERR , +"%s: failed to create mbuf pool for device %s\n" , pmd->name, dev->device->name);return -1 ; }
Signature · 1 line
2.20.1
PATCH 4/7 net/pfe: do not use PMD logtype
In reply to Stephen HemmingerThe PMD logtype is a legacy from original DPDK logging. All drivers must use their own dynamic log type.
--- drivers/net/pfe/pfe_ethdev.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/net/pfe/pfe_ethdev.c +2 -2
@@ -990,7 +990,7 @@ pmd_pfe_probe(struct rte_vdev_device *vdev)if (rc <0 )return -EINVAL ; -RTE_LOG (INFO ,PMD ,"Initializing pmd_pfe for %s Given gem-id %d\n" , +PFE_PMD_LOG (INFO ,"Initializing pmd_pfe for %s Given gem-id %d" , name, init_params.gem_id);if (g_pfe) {
@@ -1118,7 +1118,7 @@ pmd_pfe_probe(struct rte_vdev_device *vdev)else gem_id = init_params.gem_id; -RTE_LOG (INFO ,PMD ,"Init pmd_pfe for %s gem-id %d(given =%d)\n" , +PFE_PMD_LOG (INFO ,"Init pmd_pfe for %s gem-id %d(given =%d)" , name, gem_id, init_params.gem_id); rc =pfe_eth_init (vdev, g_pfe, gem_id);
Signature · 1 line
2.20.1
PATCH 5/7 net/bnxt: don't use PMD logtype
In reply to Stephen HemmingerAccidental use of PMD logtype rather than per-driver logtype.
--- drivers/net/bnxt/bnxt_ring.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/bnxt/bnxt_ring.c +1 -1
@@ -598,7 +598,7 @@ int bnxt_alloc_hwrm_rx_ring(struct bnxt *bp, int queue_index)if (rxq->rx_started) {if (bnxt_init_one_rx_ring (rxq)) { -RTE_LOG (ERR ,PMD , +PMD_DRV_LOG (ERR ,"bnxt_init_one_rx_ring failed!\n" );bnxt_rx_queue_release_op (rxq); rc = -ENOMEM ;
Signature · 1 line
2.20.1
Re: [dpdk-dev] [PATCH 5/7] net/bnxt: don't use PMD logtype
Quoted 24 lines · Stephen Hemminger
Accidental use of PMD logtype rather than per-driver logtype.
Fixes 14255b351537 ("net/bnxt: fix queue start/stop operations")Signed-off-by Stephen Hemminger <[email protected]>--- drivers/net/bnxt/bnxt_ring.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/net/bnxt/bnxt_ring.c +1
-2@@ -598,7 +598,7 @@ int bnxt_alloc_hwrm_rx_ring(struct bnxt *bp, int queue_index)if (rxq->rx_started) {if (bnxt_init_one_rx_ring (rxq)) { -RTE_LOG (ERR ,PMD , +PMD_DRV_LOG (ERR ,"bnxt_init_one_rx_ring failed!\n" );bnxt_rx_queue_release_op (rxq); rc = -ENOMEM ; --
Quoted 2 lines
2.20.1
PATCH 6/7 net/dpaa: use dynamic logtype
In reply to Stephen HemmingerThe static PMD logtype should not be used by drivers. Instead, use existing log macros in this driver.
Also use standard rte_ether routine to format ether address.
--- drivers/net/dpaa/dpaa_ethdev.c | 24 +++++++++--------------- 1 file changed, 9 insertions(+), 15 deletions(-)
drivers/net/dpaa/dpaa_ethdev.c +9 -15
@@ -881,8 +881,8 @@ dpaa_dev_rx_queue_count(struct rte_eth_dev *dev, uint16_t rx_queue_id)PMD_INIT_FUNC_TRACE ();if (qman_query_fq_frm_cnt (rxq, &frm_cnt) ==0 ) { -RTE_LOG (DEBUG ,PMD ,"RX frame count for q(%d) is %u\n" , - rx_queue_id, frm_cnt); +DPAA_PMD_DEBUG ("RX frame count for q(%d) is %u" , + rx_queue_id, frm_cnt); }return frm_cnt; }
@@ -996,8 +996,7 @@ dpaa_dev_add_mac_addr(struct rte_eth_dev *dev, ret =fman_if_add_mac_addr (dpaa_intf->fif, addr->addr_bytes, index);if (ret) -RTE_LOG (ERR ,PMD ,"error: Adding the MAC ADDR failed:" -" err = %d" , ret); +DPAA_PMD_ERR ("Adding the MAC ADDR failed: err = %d" , ret);return 0 ; }
@@ -1023,7 +1022,7 @@ dpaa_dev_set_mac_addr(struct rte_eth_dev *dev, ret =fman_if_add_mac_addr (dpaa_intf->fif, addr->addr_bytes,0 );if (ret) -RTE_LOG (ERR ,PMD ,"error: Setting the MAC ADDR failed %d" , ret); +DPAA_PMD_ERR ("Setting the MAC ADDR failed %d" , ret);return ret; }
@@ -1306,6 +1305,7 @@ dpaa_dev_init(struct rte_eth_dev *eth_dev)struct fman_if *fman_intf;struct fman_if_bpool *bp, *tmp_bp;uint32_t cgrid[DPAA_MAX_NUM_PCD_QUEUES ]; +char eth_buf[RTE_ETHER_ADDR_FMT_SIZE ];PMD_INIT_FUNC_TRACE ();
@@ -1457,15 +1457,9 @@ dpaa_dev_init(struct rte_eth_dev *eth_dev)/* copy the primary mac address */ rte_ether_addr_copy (&fman_intf->mac_addr, ð_dev->data->mac_addrs[0 ]); +rte_ether_format_addr (eth_buf,sizeof (eth_buf), &fman_intf->mac_addr); -RTE_LOG (INFO ,PMD ,"net: dpaa: %s: %02x:%02x:%02x:%02x:%02x:%02x\n" , - dpaa_device->name, - fman_intf->mac_addr.addr_bytes[0 ], - fman_intf->mac_addr.addr_bytes[1 ], - fman_intf->mac_addr.addr_bytes[2 ], - fman_intf->mac_addr.addr_bytes[3 ], - fman_intf->mac_addr.addr_bytes[4 ], - fman_intf->mac_addr.addr_bytes[5 ]); +DPAA_PMD_INFO ("net: dpaa: %s: %s" , dpaa_device->name, eth_buf);/* Disable RX mode */ fman_if_discard_rx_errors (fman_intf);
@@ -1578,8 +1572,8 @@ rte_dpaa_probe(struct rte_dpaa_driver *dpaa_drv __rte_unused,if (!is_global_init && (rte_eal_process_type () ==RTE_PROC_PRIMARY )) {if (access ("/tmp/fmc.bin" ,F_OK ) ==-1 ) { -RTE_LOG (INFO ,PMD , -"* FMC not configured.Enabling default mode\n" ); +DPAA_PMD_INFO ( +"* FMC not configured.Enabling default mode" ); default_q =1 ; }
Signature · 1 line
2.20.1
PATCH 7/7 net/thunderx: use dynamic logtype
In reply to Stephen HemmingerThe PMD static logtype is original DPDK legacy and should not be used.
--- drivers/net/thunderx/nicvf_ethdev.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-)
drivers/net/thunderx/nicvf_ethdev.c +9 -8
@@ -496,9 +496,10 @@ nicvf_dev_reta_query(struct rte_eth_dev *dev,int ret, i, j;if (reta_size !=NIC_MAX_RSS_IDR_TBL_SIZE ) { -RTE_LOG (ERR ,PMD ,"The size of hash lookup table configured " -"(%d) doesn't match the number hardware can supported " -"(%d)" , reta_size,NIC_MAX_RSS_IDR_TBL_SIZE ); +PMD_DRV_LOG (ERR , +"The size of hash lookup table configured " +"(%u) doesn't match the number hardware can supported " +"(%u)" , reta_size,NIC_MAX_RSS_IDR_TBL_SIZE );return -EINVAL ; }
@@ -526,9 +527,9 @@ nicvf_dev_reta_update(struct rte_eth_dev *dev,int ret, i, j;if (reta_size !=NIC_MAX_RSS_IDR_TBL_SIZE ) { -RTE_LOG (ERR ,PMD ,"The size of hash lookup table configured " -"(%d) doesn't match the number hardware can supported " -"(%d)" , reta_size,NIC_MAX_RSS_IDR_TBL_SIZE ); +PMD_DRV_LOG (ERR ,"The size of hash lookup table configured " +"(%u) doesn't match the number hardware can supported " +"(%u)" , reta_size,NIC_MAX_RSS_IDR_TBL_SIZE );return -EINVAL ; }
@@ -569,8 +570,8 @@ nicvf_dev_rss_hash_update(struct rte_eth_dev *dev,if (rss_conf->rss_key && rss_conf->rss_key_len !=RSS_HASH_KEY_BYTE_SIZE ) { -RTE_LOG (ERR ,PMD ,"Hash key size mismatch %d" , - rss_conf->rss_key_len); +PMD_DRV_LOG (ERR ,"Hash key size mismatch %u" , + rss_conf->rss_key_len);return -EINVAL ; }
Signature · 1 line
2.20.1
v2 cover Remove some uses of PMD logtype
In reply to Stephen HemmingerWhile working on netvsc driver, noticed that there are still some places in some drivers using the old PMD static logtype. Would like to eradicate all of these and even mark it as deprecated in a future release.
v2 - fix checkpatch whitespace complaints
Stephen Hemminger (7):
net/mvneta: do not use PMD logtype
net/virtio: do not use PMD logtype
net/tap: do not use PMD logtype
net/pfe: do not use PMD logtype
net/bnxt: don't use PMD logtype
net/dpaa: use dynamic logtype
net/thunderx: use dynamic logtype
drivers/net/bnxt/bnxt_ring.c | 2 +- drivers/net/dpaa/dpaa_ethdev.c | 23 ++++++++--------------- drivers/net/mvneta/mvneta_ethdev.c | 2 +- drivers/net/pfe/pfe_ethdev.c | 4 ++-- drivers/net/tap/rte_eth_tap.c | 6 ++++-- drivers/net/thunderx/nicvf_ethdev.c | 17 +++++++++-------- drivers/net/virtio/virtio_rxtx.c | 6 +++--- drivers/net/virtio/virtio_user_ethdev.c | 2 +- 8 files changed, 29 insertions(+), 33 deletions(-)
Signature · 1 line
2.20.1
PATCH v2 1/7 net/mvneta: do not use PMD logtype
The PMD logtype is legacy and should not be used.
--- drivers/net/mvneta/mvneta_ethdev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/mvneta/mvneta_ethdev.c +1 -1
@@ -751,7 +751,7 @@ mvneta_stats_reset(struct rte_eth_dev *dev) ret =mvneta_stats_get (dev, &priv->prev_stats);if (unlikely (ret)) -RTE_LOG (ERR ,PMD ,"Failed to reset port statistics" ); +MVNETA_LOG (ERR ,"Failed to reset port statistics" );return ret; }
Signature · 1 line
2.20.1
PATCH v2 2/7 net/virtio: do not use PMD logtype
In reply to Stephen HemmingerVirtio driver has its own logtype adn should not use legacy PMD logtype.
--- drivers/net/virtio/virtio_rxtx.c | 6 +++--- drivers/net/virtio/virtio_user_ethdev.c | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-)
drivers/net/virtio/virtio_rxtx.c +3 -3
@@ -1085,7 +1085,7 @@ virtio_dev_tx_queue_setup(struct rte_eth_dev *dev,RTE_MIN (vq->vq_nentries /4 ,DEFAULT_TX_FREE_THRESH );if (tx_free_thresh >= (vq->vq_nentries -3 )) { - RTE_LOG(ERR, PMD, "tx_free_thresh must be less than the " + PMD_DRV_LOG(ERR, "tx_free_thresh must be less than the " "number of TX entries minus 3 (%u)." " (tx_free_thresh=%u port=%u queue=%u)\n", vq->vq_nentries - 3,
@@ -1133,7 +1133,7 @@ virtio_discard_rxbuf(struct virtqueue *vq, struct rte_mbuf *m) error =virtqueue_enqueue_recv_refill (vq, &m,1 );if (unlikely (error)) { -RTE_LOG (ERR ,PMD ,"cannot requeue discarded mbuf" ); +PMD_DRV_LOG (ERR ,"cannot requeue discarded mbuf" );rte_pktmbuf_free (m); } }
@@ -1145,7 +1145,7 @@ virtio_discard_rxbuf_inorder(struct virtqueue *vq, struct rte_mbuf *m) error =virtqueue_enqueue_refill_inorder (vq, &m,1 );if (unlikely (error)) { -RTE_LOG (ERR ,PMD ,"cannot requeue discarded mbuf" ); +PMD_DRV_LOG (ERR ,"cannot requeue discarded mbuf" );rte_pktmbuf_free (m); } }
drivers/net/virtio/virtio_user_ethdev.c +1 -1
@@ -561,7 +561,7 @@ virtio_user_pmd_probe(struct rte_vdev_device *dev)const char *name =rte_vdev_device_name (dev); eth_dev =rte_eth_dev_attach_secondary (name);if (!eth_dev) { -RTE_LOG (ERR ,PMD ,"Failed to probe %s\n" , name); +PMD_INIT_LOG (ERR ,"Failed to probe %s" , name);return -1 ; }
Signature · 1 line
2.20.1
PATCH v2 3/7 net/tap: do not use PMD logtype
In reply to Stephen HemmingerThe PMD logtype is legacy and drivers should use their own logtype.
--- drivers/net/tap/rte_eth_tap.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
drivers/net/tap/rte_eth_tap.c +4 -2
@@ -778,7 +778,7 @@ tap_ioctl(struct pmd_internals *pmd, unsigned long request,case SIOCSIFMTU :break ;default : -RTE_LOG (WARNING ,PMD ,"%s: ioctl() called with wrong arg\n" , +TAP_LOG (WARNING ,"%s: ioctl() called with wrong arg" , pmd->name);return -EINVAL ; }
@@ -1301,7 +1301,9 @@ tap_gso_ctx_setup(struct rte_gso_ctx *gso_ctx, struct rte_eth_dev *dev) SOCKET_ID_ANY);if (!mp) {struct pmd_internals *pmd = dev->data->dev_private; -RTE_LOG (DEBUG ,PMD ,"%s: failed to create mbuf pool for device %s\n" , + +TAP_LOG (ERR , +"%s: failed to create mbuf pool for device %s\n" , pmd->name, dev->device->name);return -1 ; }
Signature · 1 line
2.20.1
PATCH v2 4/7 net/pfe: do not use PMD logtype
In reply to Stephen HemmingerThe PMD logtype is a legacy from original DPDK logging. All drivers must use their own dynamic log type.
--- drivers/net/pfe/pfe_ethdev.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/net/pfe/pfe_ethdev.c +2 -2
@@ -990,7 +990,7 @@ pmd_pfe_probe(struct rte_vdev_device *vdev)if (rc <0 )return -EINVAL ; -RTE_LOG (INFO ,PMD ,"Initializing pmd_pfe for %s Given gem-id %d\n" , +PFE_PMD_LOG (INFO ,"Initializing pmd_pfe for %s Given gem-id %d" , name, init_params.gem_id);if (g_pfe) {
@@ -1118,7 +1118,7 @@ pmd_pfe_probe(struct rte_vdev_device *vdev)else gem_id = init_params.gem_id; -RTE_LOG (INFO ,PMD ,"Init pmd_pfe for %s gem-id %d(given =%d)\n" , +PFE_PMD_LOG (INFO ,"Init pmd_pfe for %s gem-id %d(given =%d)" , name, gem_id, init_params.gem_id); rc =pfe_eth_init (vdev, g_pfe, gem_id);
Signature · 1 line
2.20.1
PATCH v2 5/7 net/bnxt: don't use PMD logtype
In reply to Stephen HemmingerAccidental use of PMD logtype rather than per-driver logtype.
--- drivers/net/bnxt/bnxt_ring.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/bnxt/bnxt_ring.c +1 -1
@@ -598,7 +598,7 @@ int bnxt_alloc_hwrm_rx_ring(struct bnxt *bp, int queue_index)if (rxq->rx_started) {if (bnxt_init_one_rx_ring (rxq)) { -RTE_LOG (ERR ,PMD , +PMD_DRV_LOG (ERR ,"bnxt_init_one_rx_ring failed!\n" );bnxt_rx_queue_release_op (rxq); rc = -ENOMEM ;
Signature · 1 line
2.20.1
PATCH v2 6/7 net/dpaa: use dynamic logtype
In reply to Stephen HemmingerThe static PMD logtype should not be used by drivers. Instead, use existing log macros in this driver.
Also use standard rte_ether routine to format ether address.
--- drivers/net/dpaa/dpaa_ethdev.c | 23 ++++++++--------------- 1 file changed, 8 insertions(+), 15 deletions(-)
drivers/net/dpaa/dpaa_ethdev.c +8 -15
@@ -881,8 +881,8 @@ dpaa_dev_rx_queue_count(struct rte_eth_dev *dev, uint16_t rx_queue_id)PMD_INIT_FUNC_TRACE ();if (qman_query_fq_frm_cnt (rxq, &frm_cnt) ==0 ) { -RTE_LOG (DEBUG ,PMD ,"RX frame count for q(%d) is %u\n" , - rx_queue_id, frm_cnt); +DPAA_PMD_DEBUG ("RX frame count for q(%d) is %u" , + rx_queue_id, frm_cnt); }return frm_cnt; }
@@ -996,8 +996,7 @@ dpaa_dev_add_mac_addr(struct rte_eth_dev *dev, ret =fman_if_add_mac_addr (dpaa_intf->fif, addr->addr_bytes, index);if (ret) -RTE_LOG (ERR ,PMD ,"error: Adding the MAC ADDR failed:" -" err = %d" , ret); +DPAA_PMD_ERR ("Adding the MAC ADDR failed: err = %d" , ret);return 0 ; }
@@ -1023,7 +1022,7 @@ dpaa_dev_set_mac_addr(struct rte_eth_dev *dev, ret =fman_if_add_mac_addr (dpaa_intf->fif, addr->addr_bytes,0 );if (ret) -RTE_LOG (ERR ,PMD ,"error: Setting the MAC ADDR failed %d" , ret); +DPAA_PMD_ERR ("Setting the MAC ADDR failed %d" , ret);return ret; }
@@ -1306,6 +1305,7 @@ dpaa_dev_init(struct rte_eth_dev *eth_dev)struct fman_if *fman_intf;struct fman_if_bpool *bp, *tmp_bp;uint32_t cgrid[DPAA_MAX_NUM_PCD_QUEUES ]; +char eth_buf[RTE_ETHER_ADDR_FMT_SIZE ];PMD_INIT_FUNC_TRACE ();
@@ -1457,15 +1457,9 @@ dpaa_dev_init(struct rte_eth_dev *eth_dev)/* copy the primary mac address */ rte_ether_addr_copy (&fman_intf->mac_addr, ð_dev->data->mac_addrs[0 ]); +rte_ether_format_addr (eth_buf,sizeof (eth_buf), &fman_intf->mac_addr); -RTE_LOG (INFO ,PMD ,"net: dpaa: %s: %02x:%02x:%02x:%02x:%02x:%02x\n" , - dpaa_device->name, - fman_intf->mac_addr.addr_bytes[0 ], - fman_intf->mac_addr.addr_bytes[1 ], - fman_intf->mac_addr.addr_bytes[2 ], - fman_intf->mac_addr.addr_bytes[3 ], - fman_intf->mac_addr.addr_bytes[4 ], - fman_intf->mac_addr.addr_bytes[5 ]); +DPAA_PMD_INFO ("net: dpaa: %s: %s" , dpaa_device->name, eth_buf);/* Disable RX mode */ fman_if_discard_rx_errors (fman_intf);
@@ -1578,8 +1572,7 @@ rte_dpaa_probe(struct rte_dpaa_driver *dpaa_drv __rte_unused,if (!is_global_init && (rte_eal_process_type () ==RTE_PROC_PRIMARY )) {if (access ("/tmp/fmc.bin" ,F_OK ) ==-1 ) { -RTE_LOG (INFO ,PMD , -"* FMC not configured.Enabling default mode\n" ); +DPAA_PMD_INFO ("* FMC not configured.Enabling default mode" ); default_q =1 ; }
Signature · 1 line
2.20.1
PATCH v2 7/7 net/thunderx: use dynamic logtype
In reply to Stephen HemmingerThe PMD static logtype is original DPDK legacy and should not be used.
--- drivers/net/thunderx/nicvf_ethdev.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-)
drivers/net/thunderx/nicvf_ethdev.c +9 -8
@@ -496,9 +496,10 @@ nicvf_dev_reta_query(struct rte_eth_dev *dev,int ret, i, j;if (reta_size !=NIC_MAX_RSS_IDR_TBL_SIZE ) { -RTE_LOG (ERR ,PMD ,"The size of hash lookup table configured " -"(%d) doesn't match the number hardware can supported " -"(%d)" , reta_size,NIC_MAX_RSS_IDR_TBL_SIZE ); +PMD_DRV_LOG (ERR , +"The size of hash lookup table configured " +"(%u) doesn't match the number hardware can supported " +"(%u)" , reta_size,NIC_MAX_RSS_IDR_TBL_SIZE );return -EINVAL ; }
@@ -526,9 +527,9 @@ nicvf_dev_reta_update(struct rte_eth_dev *dev,int ret, i, j;if (reta_size !=NIC_MAX_RSS_IDR_TBL_SIZE ) { -RTE_LOG (ERR ,PMD ,"The size of hash lookup table configured " -"(%d) doesn't match the number hardware can supported " -"(%d)" , reta_size,NIC_MAX_RSS_IDR_TBL_SIZE ); +PMD_DRV_LOG (ERR ,"The size of hash lookup table configured " +"(%u) doesn't match the number hardware can supported " +"(%u)" , reta_size,NIC_MAX_RSS_IDR_TBL_SIZE );return -EINVAL ; }
@@ -569,8 +570,8 @@ nicvf_dev_rss_hash_update(struct rte_eth_dev *dev,if (rss_conf->rss_key && rss_conf->rss_key_len !=RSS_HASH_KEY_BYTE_SIZE ) { -RTE_LOG (ERR ,PMD ,"Hash key size mismatch %d" , - rss_conf->rss_key_len); +PMD_DRV_LOG (ERR ,"Hash key size mismatch %u" , + rss_conf->rss_key_len);return -EINVAL ; }
Signature · 1 line
2.20.1
Re: [dpdk-dev] [PATCH v2 0/7] Remove some uses of PMD logtype
In reply to Stephen HemmingerQuoted 6 lines · Stephen Hemminger
While working on netvsc driver, noticed that there are still some places in some drivers using the old PMD static logtype. Would like to eradicate all of these and even mark it as deprecated in a future release.
v2 - fix checkpatch whitespace complaints
Hi Stephen,
I have applied the v1 and fixed the whitespace complaints while merging, is there anything else changed in v2?
Quoted 20 lines
Stephen Hemminger (7):
net/mvneta: do not use PMD logtype
net/virtio: do not use PMD logtype
net/tap: do not use PMD logtype
net/pfe: do not use PMD logtype
net/bnxt: don't use PMD logtype
net/dpaa: use dynamic logtype
net/thunderx: use dynamic logtypedrivers/net/bnxt/bnxt_ring.c | 2 +- drivers/net/dpaa/dpaa_ethdev.c | 23 ++++++++--------------- drivers/net/mvneta/mvneta_ethdev.c | 2 +- drivers/net/pfe/pfe_ethdev.c | 4 ++-- drivers/net/tap/rte_eth_tap.c | 6 ++++-- drivers/net/thunderx/nicvf_ethdev.c | 17 +++++++++-------- drivers/net/virtio/virtio_rxtx.c | 6 +++--- drivers/net/virtio/virtio_user_ethdev.c | 2 +- 8 files changed, 29 insertions(+), 33 deletions(-)
Re: [dpdk-dev] [PATCH v2 0/7] Remove some uses of PMD logtype
Quoted 6 lines · Ferruh Yigit
Quoted 5 lines · Stephen Hemminger
While working on netvsc driver, noticed that there are still some places in some drivers using the old PMD static logtype. Would like to eradicate all of these and even mark it as deprecated in a future release.
Quoted 6 lines
Quoted 1 line
v2 - fix checkpatch whitespace complaints
Hi Stephen,
I have applied the v1 and fixed the whitespace complaints while merging, is there anything else changed in v2?
I double checked, there was only one line merging diff in dpaa and applied that too, so practically v2 has been merged.
Quoted 22 lines
Quoted 21 lines
Stephen Hemminger (7):
net/mvneta: do not use PMD logtype
net/virtio: do not use PMD logtype
net/tap: do not use PMD logtype
net/pfe: do not use PMD logtype
net/bnxt: don't use PMD logtype
net/dpaa: use dynamic logtype
net/thunderx: use dynamic logtypedrivers/net/bnxt/bnxt_ring.c | 2 +- drivers/net/dpaa/dpaa_ethdev.c | 23 ++++++++--------------- drivers/net/mvneta/mvneta_ethdev.c | 2 +- drivers/net/pfe/pfe_ethdev.c | 4 ++-- drivers/net/tap/rte_eth_tap.c | 6 ++++-- drivers/net/thunderx/nicvf_ethdev.c | 17 +++++++++-------- drivers/net/virtio/virtio_rxtx.c | 6 +++--- drivers/net/virtio/virtio_user_ethdev.c | 2 +- 8 files changed, 29 insertions(+), 33 deletions(-)
Quoted 5 lines · Stephen Hemminger
While working on netvsc driver, noticed that there are still some places in some drivers using the old PMD static logtype. Would like to eradicate all of these and even mark it as deprecated in a future release.
Quoted 9 lines
Stephen Hemminger (7):
net/mvneta: do not use PMD logtype
net/virtio: do not use PMD logtype
net/tap: do not use PMD logtype
net/pfe: do not use PMD logtype
net/bnxt: don't use PMD logtype
net/dpaa: use dynamic logtype
net/thunderx: use dynamic logtype
For series,
Series applied to dpdk-next-net/master, thanks.