net/virtio: fix coding style
PATCH 1/1 net/virtio: fix coding style
Make the code more readable. No functional change.
Signed-off-by Tiwei Bie <[email protected]>
--- drivers/net/virtio/virtio_rxtx.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
drivers/net/virtio/virtio_rxtx.c +3 -2
@@ -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 );
Signature · 1 line
2.7.4
Ferruh Yigit
AppliedQuoted 3 lines · Tiwei Bie
Make the code more readable. No functional change.
Signed-off-by Tiwei Bie <[email protected]>
Applied to dpdk-next-net/master, thanks.
Quoted 6 lines · Ferruh Yigit
Quoted 3 lines · Tiwei Bie
Make the code more readable. No functional change.
Signed-off-by Tiwei Bie <[email protected]>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
Quoted 6 lines · Ferruh Yigit
Quoted 5 lines · Ferruh Yigit
Quoted 3 lines · Tiwei Bie
Make the code more readable. No functional change.
Signed-off-by Tiwei Bie <[email protected]>
Quoted 7 lines
Quoted 1 line
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