* [dpdk-dev] [PATCH] remove redundant __func__ in PMD_INIT_LOG and PMD_RX_LOG
@ 2015-12-27 17:28 Huawei Xie
2015-12-27 17:28 ` Huawei Xie
2015-12-29 1:17 ` Yuanhan Liu
0 siblings, 2 replies; 5+ messages in thread
From: Huawei Xie @ 2015-12-27 17:28 UTC (permalink / raw)
To: dev
Signed-off-by: Huawei Xie <huawei.xie@intel.com>
---
drivers/net/virtio/virtio_ethdev.c | 12 +++++-------
drivers/net/vmxnet3/vmxnet3_ethdev.c | 6 +++---
drivers/net/vmxnet3/vmxnet3_rxtx.c | 2 +-
3 files changed, 9 insertions(+), 11 deletions(-)
diff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net/virtio/virtio_ethdev.c
index d928339..f19306f 100644
--- a/drivers/net/virtio/virtio_ethdev.c
+++ b/drivers/net/virtio/virtio_ethdev.c
@@ -150,9 +150,7 @@ virtio_send_command(struct virtqueue *vq, struct virtio_pmd_ctrl *ctrl,
ctrl->status = status;
if (!(vq && vq->hw->cvq)) {
- PMD_INIT_LOG(ERR,
- "%s(): Control queue is not supported.",
- __func__);
+ PMD_INIT_LOG(ERR, "Control queue is not supported.");
return -1;
}
head = vq->vq_desc_head_idx;
@@ -306,12 +304,12 @@ int virtio_dev_queue_setup(struct rte_eth_dev *dev,
vq_size = VIRTIO_READ_REG_2(hw, VIRTIO_PCI_QUEUE_NUM);
PMD_INIT_LOG(DEBUG, "vq_size: %u nb_desc:%u", vq_size, nb_desc);
if (vq_size == 0) {
- PMD_INIT_LOG(ERR, "%s: virtqueue does not exist", __func__);
+ PMD_INIT_LOG(ERR, "virtqueue does not exist");
return -EINVAL;
}
if (!rte_is_power_of_2(vq_size)) {
- PMD_INIT_LOG(ERR, "%s: virtqueue size is not powerof 2", __func__);
+ PMD_INIT_LOG(ERR, "virtqueue size is not powerof 2");
return -EINVAL;
}
@@ -336,7 +334,7 @@ int virtio_dev_queue_setup(struct rte_eth_dev *dev,
RTE_CACHE_LINE_SIZE);
}
if (vq == NULL) {
- PMD_INIT_LOG(ERR, "%s: Can not allocate virtqueue", __func__);
+ PMD_INIT_LOG(ERR, "Can not allocate virtqueue");
return (-ENOMEM);
}
if (queue_type == VTNET_RQ && vq->sw_ring == NULL) {
@@ -1146,7 +1144,7 @@ static int virtio_resource_init_by_ioports(struct rte_pci_device *pci_dev)
fp = fopen("/proc/ioports", "r");
if (fp == NULL) {
- PMD_INIT_LOG(ERR, "%s(): can't open ioports", __func__);
+ PMD_INIT_LOG(ERR, "can't open ioports");
return -1;
}
diff --git a/drivers/net/vmxnet3/vmxnet3_ethdev.c b/drivers/net/vmxnet3/vmxnet3_ethdev.c
index c363bf6..f5834d6 100644
--- a/drivers/net/vmxnet3/vmxnet3_ethdev.c
+++ b/drivers/net/vmxnet3/vmxnet3_ethdev.c
@@ -564,7 +564,7 @@ vmxnet3_dev_start(struct rte_eth_dev *dev)
status = VMXNET3_READ_BAR1_REG(hw, VMXNET3_REG_CMD);
if (status != 0) {
- PMD_INIT_LOG(ERR, "Device activation in %s(): UNSUCCESSFUL", __func__);
+ PMD_INIT_LOG(ERR, "Device activation: UNSUCCESSFUL");
return -1;
}
@@ -577,7 +577,7 @@ vmxnet3_dev_start(struct rte_eth_dev *dev)
*/
ret = vmxnet3_dev_rxtx_init(dev);
if (ret != VMXNET3_SUCCESS) {
- PMD_INIT_LOG(ERR, "Device receive init in %s: UNSUCCESSFUL", __func__);
+ PMD_INIT_LOG(ERR, "Device receive init: UNSUCCESSFUL");
return ret;
}
@@ -882,7 +882,7 @@ vmxnet3_process_events(struct vmxnet3_hw *hw)
uint32_t events = hw->shared->ecr;
if (!events) {
- PMD_INIT_LOG(ERR, "No events to process in %s()", __func__);
+ PMD_INIT_LOG(ERR, "No events to process");
return;
}
diff --git a/drivers/net/vmxnet3/vmxnet3_rxtx.c b/drivers/net/vmxnet3/vmxnet3_rxtx.c
index 4de5d89..e592010 100644
--- a/drivers/net/vmxnet3/vmxnet3_rxtx.c
+++ b/drivers/net/vmxnet3/vmxnet3_rxtx.c
@@ -462,7 +462,7 @@ vmxnet3_post_rx_bufs(vmxnet3_rx_queue_t *rxq, uint8_t ring_id)
/* Allocate blank mbuf for the current Rx Descriptor */
mbuf = rte_rxmbuf_alloc(rxq->mp);
if (unlikely(mbuf == NULL)) {
- PMD_RX_LOG(ERR, "Error allocating mbuf in %s", __func__);
+ PMD_RX_LOG(ERR, "Error allocating mbuf");
rxq->stats.rx_buf_alloc_failure++;
err = ENOMEM;
break;
--
1.8.1.4
^ permalink raw reply [flat|nested] 5+ messages in thread
* [dpdk-dev] [PATCH] remove redundant __func__ in PMD_INIT_LOG and PMD_RX_LOG
2015-12-27 17:28 [dpdk-dev] [PATCH] remove redundant __func__ in PMD_INIT_LOG and PMD_RX_LOG Huawei Xie
@ 2015-12-27 17:28 ` Huawei Xie
2015-12-28 17:39 ` Stephen Hemminger
2015-12-29 1:17 ` Yuanhan Liu
1 sibling, 1 reply; 5+ messages in thread
From: Huawei Xie @ 2015-12-27 17:28 UTC (permalink / raw)
To: dev
Signed-off-by: Huawei Xie <huawei.xie@intel.com>
---
drivers/net/virtio/virtio_ethdev.c | 12 +++++-------
drivers/net/vmxnet3/vmxnet3_ethdev.c | 6 +++---
drivers/net/vmxnet3/vmxnet3_rxtx.c | 2 +-
3 files changed, 9 insertions(+), 11 deletions(-)
diff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net/virtio/virtio_ethdev.c
index d928339..f19306f 100644
--- a/drivers/net/virtio/virtio_ethdev.c
+++ b/drivers/net/virtio/virtio_ethdev.c
@@ -150,9 +150,7 @@ virtio_send_command(struct virtqueue *vq, struct virtio_pmd_ctrl *ctrl,
ctrl->status = status;
if (!(vq && vq->hw->cvq)) {
- PMD_INIT_LOG(ERR,
- "%s(): Control queue is not supported.",
- __func__);
+ PMD_INIT_LOG(ERR, "Control queue is not supported.");
return -1;
}
head = vq->vq_desc_head_idx;
@@ -306,12 +304,12 @@ int virtio_dev_queue_setup(struct rte_eth_dev *dev,
vq_size = VIRTIO_READ_REG_2(hw, VIRTIO_PCI_QUEUE_NUM);
PMD_INIT_LOG(DEBUG, "vq_size: %u nb_desc:%u", vq_size, nb_desc);
if (vq_size == 0) {
- PMD_INIT_LOG(ERR, "%s: virtqueue does not exist", __func__);
+ PMD_INIT_LOG(ERR, "virtqueue does not exist");
return -EINVAL;
}
if (!rte_is_power_of_2(vq_size)) {
- PMD_INIT_LOG(ERR, "%s: virtqueue size is not powerof 2", __func__);
+ PMD_INIT_LOG(ERR, "virtqueue size is not powerof 2");
return -EINVAL;
}
@@ -336,7 +334,7 @@ int virtio_dev_queue_setup(struct rte_eth_dev *dev,
RTE_CACHE_LINE_SIZE);
}
if (vq == NULL) {
- PMD_INIT_LOG(ERR, "%s: Can not allocate virtqueue", __func__);
+ PMD_INIT_LOG(ERR, "Can not allocate virtqueue");
return (-ENOMEM);
}
if (queue_type == VTNET_RQ && vq->sw_ring == NULL) {
@@ -1146,7 +1144,7 @@ static int virtio_resource_init_by_ioports(struct rte_pci_device *pci_dev)
fp = fopen("/proc/ioports", "r");
if (fp == NULL) {
- PMD_INIT_LOG(ERR, "%s(): can't open ioports", __func__);
+ PMD_INIT_LOG(ERR, "can't open ioports");
return -1;
}
diff --git a/drivers/net/vmxnet3/vmxnet3_ethdev.c b/drivers/net/vmxnet3/vmxnet3_ethdev.c
index c363bf6..f5834d6 100644
--- a/drivers/net/vmxnet3/vmxnet3_ethdev.c
+++ b/drivers/net/vmxnet3/vmxnet3_ethdev.c
@@ -564,7 +564,7 @@ vmxnet3_dev_start(struct rte_eth_dev *dev)
status = VMXNET3_READ_BAR1_REG(hw, VMXNET3_REG_CMD);
if (status != 0) {
- PMD_INIT_LOG(ERR, "Device activation in %s(): UNSUCCESSFUL", __func__);
+ PMD_INIT_LOG(ERR, "Device activation: UNSUCCESSFUL");
return -1;
}
@@ -577,7 +577,7 @@ vmxnet3_dev_start(struct rte_eth_dev *dev)
*/
ret = vmxnet3_dev_rxtx_init(dev);
if (ret != VMXNET3_SUCCESS) {
- PMD_INIT_LOG(ERR, "Device receive init in %s: UNSUCCESSFUL", __func__);
+ PMD_INIT_LOG(ERR, "Device receive init: UNSUCCESSFUL");
return ret;
}
@@ -882,7 +882,7 @@ vmxnet3_process_events(struct vmxnet3_hw *hw)
uint32_t events = hw->shared->ecr;
if (!events) {
- PMD_INIT_LOG(ERR, "No events to process in %s()", __func__);
+ PMD_INIT_LOG(ERR, "No events to process");
return;
}
diff --git a/drivers/net/vmxnet3/vmxnet3_rxtx.c b/drivers/net/vmxnet3/vmxnet3_rxtx.c
index 4de5d89..e592010 100644
--- a/drivers/net/vmxnet3/vmxnet3_rxtx.c
+++ b/drivers/net/vmxnet3/vmxnet3_rxtx.c
@@ -462,7 +462,7 @@ vmxnet3_post_rx_bufs(vmxnet3_rx_queue_t *rxq, uint8_t ring_id)
/* Allocate blank mbuf for the current Rx Descriptor */
mbuf = rte_rxmbuf_alloc(rxq->mp);
if (unlikely(mbuf == NULL)) {
- PMD_RX_LOG(ERR, "Error allocating mbuf in %s", __func__);
+ PMD_RX_LOG(ERR, "Error allocating mbuf");
rxq->stats.rx_buf_alloc_failure++;
err = ENOMEM;
break;
--
1.8.1.4
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [dpdk-dev] [PATCH] remove redundant __func__ in PMD_INIT_LOG and PMD_RX_LOG
2015-12-27 17:28 ` Huawei Xie
@ 2015-12-28 17:39 ` Stephen Hemminger
2016-02-10 16:17 ` Bruce Richardson
0 siblings, 1 reply; 5+ messages in thread
From: Stephen Hemminger @ 2015-12-28 17:39 UTC (permalink / raw)
To: Huawei Xie; +Cc: dev
On Mon, 28 Dec 2015 01:28:28 +0800
Huawei Xie <huawei.xie@intel.com> wrote:
>
> Signed-off-by: Huawei Xie <huawei.xie@intel.com>
> ---
> drivers/net/virtio/virtio_ethdev.c | 12 +++++-------
> drivers/net/vmxnet3/vmxnet3_ethdev.c | 6 +++---
> drivers/net/vmxnet3/vmxnet3_rxtx.c | 2 +-
> 3 files changed, 9 insertions(+), 11 deletions(-)
>
Looks good, probably worth auditing the code for extra newlines as well at some point.
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [dpdk-dev] [PATCH] remove redundant __func__ in PMD_INIT_LOG and PMD_RX_LOG
2015-12-27 17:28 [dpdk-dev] [PATCH] remove redundant __func__ in PMD_INIT_LOG and PMD_RX_LOG Huawei Xie
2015-12-27 17:28 ` Huawei Xie
@ 2015-12-29 1:17 ` Yuanhan Liu
1 sibling, 0 replies; 5+ messages in thread
From: Yuanhan Liu @ 2015-12-29 1:17 UTC (permalink / raw)
To: Huawei Xie; +Cc: dev
Acked-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
--yliu
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [dpdk-dev] [PATCH] remove redundant __func__ in PMD_INIT_LOG and PMD_RX_LOG
2015-12-28 17:39 ` Stephen Hemminger
@ 2016-02-10 16:17 ` Bruce Richardson
0 siblings, 0 replies; 5+ messages in thread
From: Bruce Richardson @ 2016-02-10 16:17 UTC (permalink / raw)
To: Stephen Hemminger; +Cc: dev
On Mon, Dec 28, 2015 at 09:39:44AM -0800, Stephen Hemminger wrote:
> On Mon, 28 Dec 2015 01:28:28 +0800
> Huawei Xie <huawei.xie@intel.com> wrote:
>
> >
> > Signed-off-by: Huawei Xie <huawei.xie@intel.com>
> > ---
> > drivers/net/virtio/virtio_ethdev.c | 12 +++++-------
> > drivers/net/vmxnet3/vmxnet3_ethdev.c | 6 +++---
> > drivers/net/vmxnet3/vmxnet3_rxtx.c | 2 +-
> > 3 files changed, 9 insertions(+), 11 deletions(-)
> >
>
> Looks good, probably worth auditing the code for extra newlines as well at some point.
>
> Acked-by: Stephen Hemminger <stephen@networkplumber.org>
Patch split into 2 - one for virtio and one for vmxnet3 - and applied to
dpdk-next-net/rel_16_04
/Bruce
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2016-02-10 16:17 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-12-27 17:28 [dpdk-dev] [PATCH] remove redundant __func__ in PMD_INIT_LOG and PMD_RX_LOG Huawei Xie
2015-12-27 17:28 ` Huawei Xie
2015-12-28 17:39 ` Stephen Hemminger
2016-02-10 16:17 ` Bruce Richardson
2015-12-29 1:17 ` Yuanhan Liu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).