* [dpdk-dev] [PATCH 1/3] net/virtio: remove unnecessary assignments
@ 2018-07-25 7:42 Tiwei Bie
2018-07-25 7:42 ` [dpdk-dev] [PATCH 2/3] vhost: remove an unused variable Tiwei Bie
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Tiwei Bie @ 2018-07-25 7:42 UTC (permalink / raw)
To: maxime.coquelin, zhihong.wang, dev
Remove the unnecessary assignments in Rx functions
as they are useless and misleading.
Signed-off-by: Tiwei Bie <tiwei.bie@intel.com>
---
drivers/net/virtio/virtio_rxtx.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/net/virtio/virtio_rxtx.c b/drivers/net/virtio/virtio_rxtx.c
index 7c105229e..eb891433e 100644
--- a/drivers/net/virtio/virtio_rxtx.c
+++ b/drivers/net/virtio/virtio_rxtx.c
@@ -960,7 +960,6 @@ virtio_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts, uint16_t nb_pkts)
rxvq->stats.packets += nb_rx;
/* Allocate new mbuf for the used descriptor */
- error = ENOSPC;
while (likely(!virtqueue_full(vq))) {
new_mbuf = rte_mbuf_raw_alloc(rxvq->mpool);
if (unlikely(new_mbuf == NULL)) {
@@ -1319,7 +1318,6 @@ virtio_recv_mergeable_pkts(void *rx_queue,
rxvq->stats.packets += nb_rx;
/* Allocate new mbuf for the used descriptor */
- error = ENOSPC;
while (likely(!virtqueue_full(vq))) {
new_mbuf = rte_mbuf_raw_alloc(rxvq->mpool);
if (unlikely(new_mbuf == NULL)) {
--
2.18.0
^ permalink raw reply [flat|nested] 4+ messages in thread
* [dpdk-dev] [PATCH 2/3] vhost: remove an unused variable
2018-07-25 7:42 [dpdk-dev] [PATCH 1/3] net/virtio: remove unnecessary assignments Tiwei Bie
@ 2018-07-25 7:42 ` Tiwei Bie
2018-07-25 7:42 ` [dpdk-dev] [PATCH 3/3] net/virtio: remove an unused macro Tiwei Bie
2018-07-30 6:05 ` [dpdk-dev] [PATCH 1/3] net/virtio: remove unnecessary assignments Tiwei Bie
2 siblings, 0 replies; 4+ messages in thread
From: Tiwei Bie @ 2018-07-25 7:42 UTC (permalink / raw)
To: maxime.coquelin, zhihong.wang, dev
The nr_updated is just increased and not really used.
Signed-off-by: Tiwei Bie <tiwei.bie@intel.com>
---
lib/librte_vhost/virtio_net.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/lib/librte_vhost/virtio_net.c b/lib/librte_vhost/virtio_net.c
index 2b7ffcf92..b17c3e907 100644
--- a/lib/librte_vhost/virtio_net.c
+++ b/lib/librte_vhost/virtio_net.c
@@ -1343,7 +1343,6 @@ virtio_dev_tx_split(struct virtio_net *dev, struct vhost_virtqueue *vq,
if (unlikely(dev->dequeue_zero_copy)) {
struct zcopy_mbuf *zmbuf, *next;
- int nr_updated = 0;
for (zmbuf = TAILQ_FIRST(&vq->zmbuf_list);
zmbuf != NULL; zmbuf = next) {
@@ -1352,8 +1351,6 @@ virtio_dev_tx_split(struct virtio_net *dev, struct vhost_virtqueue *vq,
if (mbuf_is_consumed(zmbuf->mbuf)) {
update_shadow_used_ring_split(vq,
zmbuf->desc_idx, 0);
- nr_updated += 1;
-
TAILQ_REMOVE(&vq->zmbuf_list, zmbuf, next);
restore_mbuf(zmbuf->mbuf);
rte_pktmbuf_free(zmbuf->mbuf);
--
2.18.0
^ permalink raw reply [flat|nested] 4+ messages in thread
* [dpdk-dev] [PATCH 3/3] net/virtio: remove an unused macro
2018-07-25 7:42 [dpdk-dev] [PATCH 1/3] net/virtio: remove unnecessary assignments Tiwei Bie
2018-07-25 7:42 ` [dpdk-dev] [PATCH 2/3] vhost: remove an unused variable Tiwei Bie
@ 2018-07-25 7:42 ` Tiwei Bie
2018-07-30 6:05 ` [dpdk-dev] [PATCH 1/3] net/virtio: remove unnecessary assignments Tiwei Bie
2 siblings, 0 replies; 4+ messages in thread
From: Tiwei Bie @ 2018-07-25 7:42 UTC (permalink / raw)
To: maxime.coquelin, zhihong.wang, dev
This macro isn't used any more after below commit:
commit a4996bd89c42 ("ethdev: new Rx/Tx offloads API")
Signed-off-by: Tiwei Bie <tiwei.bie@intel.com>
---
drivers/net/virtio/virtio_ethdev.h | 7 -------
1 file changed, 7 deletions(-)
diff --git a/drivers/net/virtio/virtio_ethdev.h b/drivers/net/virtio/virtio_ethdev.h
index f4d09df71..b726ad108 100644
--- a/drivers/net/virtio/virtio_ethdev.h
+++ b/drivers/net/virtio/virtio_ethdev.h
@@ -42,13 +42,6 @@
1u << VIRTIO_NET_F_GUEST_TSO4 | \
1u << VIRTIO_NET_F_GUEST_TSO6)
-#define VIRTIO_PMD_PER_DEVICE_RX_OFFLOADS \
- (DEV_RX_OFFLOAD_TCP_CKSUM | \
- DEV_RX_OFFLOAD_UDP_CKSUM | \
- DEV_RX_OFFLOAD_TCP_LRO | \
- DEV_RX_OFFLOAD_VLAN_FILTER | \
- DEV_RX_OFFLOAD_VLAN_STRIP)
-
/*
* CQ function prototype
*/
--
2.18.0
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [dpdk-dev] [PATCH 1/3] net/virtio: remove unnecessary assignments
2018-07-25 7:42 [dpdk-dev] [PATCH 1/3] net/virtio: remove unnecessary assignments Tiwei Bie
2018-07-25 7:42 ` [dpdk-dev] [PATCH 2/3] vhost: remove an unused variable Tiwei Bie
2018-07-25 7:42 ` [dpdk-dev] [PATCH 3/3] net/virtio: remove an unused macro Tiwei Bie
@ 2018-07-30 6:05 ` Tiwei Bie
2 siblings, 0 replies; 4+ messages in thread
From: Tiwei Bie @ 2018-07-30 6:05 UTC (permalink / raw)
To: tiwei.bie; +Cc: maxime.coquelin, zhihong.wang, dev
On Wed, Jul 25, 2018 at 03:42:06PM +0800, Tiwei Bie wrote:
> Remove the unnecessary assignments in Rx functions
> as they are useless and misleading.
>
> Signed-off-by: Tiwei Bie <tiwei.bie@intel.com>
> ---
> drivers/net/virtio/virtio_rxtx.c | 2 --
> 1 file changed, 2 deletions(-)
Series applied to dpdk-next-virtio/master
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2018-07-30 6:06 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-25 7:42 [dpdk-dev] [PATCH 1/3] net/virtio: remove unnecessary assignments Tiwei Bie
2018-07-25 7:42 ` [dpdk-dev] [PATCH 2/3] vhost: remove an unused variable Tiwei Bie
2018-07-25 7:42 ` [dpdk-dev] [PATCH 3/3] net/virtio: remove an unused macro Tiwei Bie
2018-07-30 6:05 ` [dpdk-dev] [PATCH 1/3] net/virtio: remove unnecessary assignments Tiwei Bie
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).