* [dpdk-dev] [PATCH] net/virtio: fix coding style
@ 2017-07-17 6:35 Tiwei Bie
2017-07-18 11:04 ` Ferruh Yigit
0 siblings, 1 reply; 4+ messages in thread
From: Tiwei Bie @ 2017-07-17 6:35 UTC (permalink / raw)
To: yliu, maxime.coquelin, dev
Make the code more readable. No functional change.
Signed-off-by: Tiwei Bie <tiwei.bie@intel.com>
---
drivers/net/virtio/virtio_rxtx.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/net/virtio/virtio_rxtx.c b/drivers/net/virtio/virtio_rxtx.c
index fbc96df..e30377c 100644
--- a/drivers/net/virtio/virtio_rxtx.c
+++ b/drivers/net/virtio/virtio_rxtx.c
@@ -744,8 +744,9 @@ virtio_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts, uint16_t nb_pkts)
virtio_rmb();
- num = (uint16_t)(likely(nb_used <= nb_pkts) ? nb_used : nb_pkts);
- num = (uint16_t)(likely(num <= VIRTIO_MBUF_BURST_SZ) ? num : VIRTIO_MBUF_BURST_SZ);
+ num = likely(nb_used <= nb_pkts) ? nb_used : nb_pkts;
+ if (unlikely(num > VIRTIO_MBUF_BURST_SZ))
+ num = VIRTIO_MBUF_BURST_SZ;
if (likely(num > DESC_PER_CACHELINE))
num = num - ((vq->vq_used_cons_idx + num) % DESC_PER_CACHELINE);
--
2.7.4
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [dpdk-dev] [PATCH] net/virtio: fix coding style
2017-07-17 6:35 [dpdk-dev] [PATCH] net/virtio: fix coding style Tiwei Bie
@ 2017-07-18 11:04 ` Ferruh Yigit
2017-07-18 12:29 ` Ferruh Yigit
0 siblings, 1 reply; 4+ messages in thread
From: Ferruh Yigit @ 2017-07-18 11:04 UTC (permalink / raw)
To: Tiwei Bie, yliu, maxime.coquelin, dev
On 7/17/2017 7:35 AM, Tiwei Bie wrote:
> Make the code more readable. No functional change.
>
> Signed-off-by: Tiwei Bie <tiwei.bie@intel.com>
Applied to dpdk-next-net/master, thanks.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [dpdk-dev] [PATCH] net/virtio: fix coding style
2017-07-18 11:04 ` Ferruh Yigit
@ 2017-07-18 12:29 ` Ferruh Yigit
2017-07-18 12:32 ` Yuanhan Liu
0 siblings, 1 reply; 4+ messages in thread
From: Ferruh Yigit @ 2017-07-18 12:29 UTC (permalink / raw)
To: Tiwei Bie, yliu, maxime.coquelin, dev
On 7/18/2017 12:04 PM, Ferruh Yigit wrote:
> On 7/17/2017 7:35 AM, Tiwei Bie wrote:
>> Make the code more readable. No functional change.
>>
>> Signed-off-by: Tiwei Bie <tiwei.bie@intel.com>
>
> Applied to dpdk-next-net/master, thanks.
And indeed this should go in via next-virtio, I confused it.
Yuanhan,
Please let me know if you want me drop this from next-net.
Thanks,
ferruh
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [dpdk-dev] [PATCH] net/virtio: fix coding style
2017-07-18 12:29 ` Ferruh Yigit
@ 2017-07-18 12:32 ` Yuanhan Liu
0 siblings, 0 replies; 4+ messages in thread
From: Yuanhan Liu @ 2017-07-18 12:32 UTC (permalink / raw)
To: Ferruh Yigit; +Cc: Tiwei Bie, maxime.coquelin, dev
On Tue, Jul 18, 2017 at 01:29:48PM +0100, Ferruh Yigit wrote:
> On 7/18/2017 12:04 PM, Ferruh Yigit wrote:
> > On 7/17/2017 7:35 AM, Tiwei Bie wrote:
> >> Make the code more readable. No functional change.
> >>
> >> Signed-off-by: Tiwei Bie <tiwei.bie@intel.com>
> >
> > Applied to dpdk-next-net/master, thanks.
>
> And indeed this should go in via next-virtio, I confused it.
>
> Yuanhan,
>
> Please let me know if you want me drop this from next-net.
Nope, it's okay.
--yliu
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2017-07-18 12:32 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-07-17 6:35 [dpdk-dev] [PATCH] net/virtio: fix coding style Tiwei Bie
2017-07-18 11:04 ` Ferruh Yigit
2017-07-18 12:29 ` Ferruh Yigit
2017-07-18 12:32 ` 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).