From: Tiwei Bie <tiwei.bie@intel.com>
To: Thierry Herbelot <thierry.herbelot@6wind.com>
Cc: dev@dpdk.org, Thibaut Collet <thibaut.collet@6wind.com>,
stable@dpdk.org, Thomas Monjalon <thomas@monjalon.net>
Subject: Re: [dpdk-stable] [PATCH 19.11 V2 08/12] virtio: fix rx stats with vectorized functions
Date: Thu, 8 Aug 2019 13:15:47 +0800 [thread overview]
Message-ID: <20190808051547.GA16478@___> (raw)
In-Reply-To: <b639ae62e0f4be8864cb3969b1cbd26bfaf19c69.1565190405.git.thierry.herbelot@6wind.com>
On Wed, Aug 07, 2019 at 05:09:17PM +0200, Thierry Herbelot wrote:
> From: Thibaut Collet <thibaut.collet@6wind.com>
>
> With vectorized functions, only the rx stats for number of packets is
> incremented.
> Update also the other statistics.
> Performance impact is about 2%
Could you share some details about your performance test?
> diff --git a/drivers/net/virtio/virtio_rxtx_simple_sse.c b/drivers/net/virtio/virtio_rxtx_simple_sse.c
> index af76708d66ae..c757e8c9d601 100644
> --- a/drivers/net/virtio/virtio_rxtx_simple_sse.c
> +++ b/drivers/net/virtio/virtio_rxtx_simple_sse.c
> @@ -48,6 +48,7 @@ virtio_recv_pkts_vec(void *rx_queue, struct rte_mbuf **rx_pkts,
> struct vring_used_elem *rused;
> struct rte_mbuf **sw_ring;
> struct rte_mbuf **sw_ring_end;
> + struct rte_mbuf **ref_rx_pkts;
> uint16_t nb_pkts_received = 0;
> __m128i shuf_msk1, shuf_msk2, len_adjust;
>
> @@ -107,6 +108,7 @@ virtio_recv_pkts_vec(void *rx_queue, struct rte_mbuf **rx_pkts,
> virtqueue_notify(vq);
> }
>
> + ref_rx_pkts = rx_pkts;
> for (nb_pkts_received = 0;
> nb_pkts_received < nb_used;) {
> __m128i desc[RTE_VIRTIO_DESC_PER_LOOP / 2];
> @@ -190,5 +192,9 @@ virtio_recv_pkts_vec(void *rx_queue, struct rte_mbuf **rx_pkts,
> vq->vq_used_cons_idx += nb_pkts_received;
> vq->vq_free_cnt += nb_pkts_received;
> rxvq->stats.packets += nb_pkts_received;
> + for (nb_used = 0; nb_used < nb_pkts_received; nb_used++) {
> + rxvq->stats.bytes += ref_rx_pkts[nb_used]->pkt_len;
> + virtio_update_packet_stats(&rxvq->stats, ref_rx_pkts[nb_used]);
The stats.bytes was updated twice by above code.
> + }
> return nb_pkts_received;
> }
> --
> 2.11.0
>
next prev parent reply other threads:[~2019-08-08 5:17 UTC|newest]
Thread overview: 46+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-07 14:37 [dpdk-stable] [PATCH 19.11 00/12] Miscellaneous fixes Thierry Herbelot
2019-08-07 14:37 ` [dpdk-stable] [PATCH 19.11 01/12] net/ixgbevf: fix stats update after a PF reset Thierry Herbelot
2019-08-07 14:37 ` [dpdk-stable] [PATCH 19.11 02/12] ethdev: fix description of tx descriptor status Thierry Herbelot
2019-08-07 14:37 ` [dpdk-stable] [PATCH 19.11 03/12] net/e1000: fix Tx descriptor status api (igb) Thierry Herbelot
2019-08-07 14:37 ` [dpdk-stable] [PATCH 19.11 04/12] net/e1000: fix Tx descriptor status api (em) Thierry Herbelot
2019-08-07 14:37 ` [dpdk-stable] [PATCH 19.11 05/12] net/ixgbe: fix Tx descriptor status api Thierry Herbelot
2019-08-07 14:37 ` [dpdk-stable] [PATCH 19.11 06/12] net/i40e: " Thierry Herbelot
2019-08-07 14:37 ` [dpdk-stable] [PATCH 19.11 07/12] net/i40e: set speed to undefined for default case in link update Thierry Herbelot
2019-08-07 14:37 ` [dpdk-stable] [PATCH 19.11 08/12] virtio: fix rx stats with vectorized functions Thierry Herbelot
2019-08-07 14:37 ` [dpdk-stable] [PATCH 19.11 09/12] virtio: get all pending rx packets " Thierry Herbelot
2019-08-07 14:37 ` [dpdk-stable] [PATCH 19.11 10/12] drivers/crypto/openssl: use a local copy for the session contexts Thierry Herbelot
2019-08-07 14:37 ` [dpdk-stable] [PATCH 19.11 11/12] drivers/crypto/dpaa_sec: update DPAA iova table in dpaa_mem_vtop Thierry Herbelot
2019-08-07 14:37 ` [dpdk-stable] [PATCH 19.11 12/12] drivers/crypto/octeontx: enable unbinding for the OcteonTx crypto engines Thierry Herbelot
2019-08-07 15:09 ` [dpdk-stable] [PATCH 19.11 V2 00/12] Miscellaneous fixes Thierry Herbelot
2019-08-08 8:22 ` [dpdk-stable] [PATCH 19.11 V3 " Thierry Herbelot
2019-08-08 13:19 ` Thierry Herbelot
2019-08-08 14:34 ` Thomas Monjalon
2019-10-10 13:01 ` [dpdk-stable] [dpdk-dev] " David Marchand
2019-10-10 13:12 ` Thierry Herbelot
2019-08-08 8:22 ` [dpdk-stable] [PATCH 19.11 V3 01/12] net/ixgbevf: fix stats update after a PF reset Thierry Herbelot
2019-08-08 8:22 ` [dpdk-stable] [PATCH 19.11 V3 02/12] ethdev: fix description of tx descriptor status Thierry Herbelot
2019-08-08 10:37 ` [dpdk-stable] [dpdk-dev] " Andrew Rybchenko
2019-08-08 8:22 ` [dpdk-stable] [PATCH 19.11 V3 03/12] net/e1000: fix Tx descriptor status api (igb) Thierry Herbelot
2019-08-08 8:22 ` [dpdk-stable] [PATCH 19.11 V3 04/12] net/e1000: fix Tx descriptor status api (em) Thierry Herbelot
2019-08-08 8:22 ` [dpdk-stable] [PATCH 19.11 V3 05/12] net/ixgbe: fix Tx descriptor status api Thierry Herbelot
2019-08-08 8:22 ` [dpdk-stable] [PATCH 19.11 V3 06/12] net/i40e: " Thierry Herbelot
2019-08-08 8:22 ` [dpdk-stable] [PATCH 19.11 V3 07/12] net/i40e: set speed to undefined for default case in link update Thierry Herbelot
2019-08-08 8:22 ` [dpdk-stable] [PATCH 19.11 V3 08/12] virtio: fix rx stats with vectorized functions Thierry Herbelot
2019-08-08 8:22 ` [dpdk-stable] [PATCH 19.11 V3 09/12] virtio: get all pending rx packets " Thierry Herbelot
2019-08-08 8:22 ` [dpdk-stable] [PATCH 19.11 V3 10/12] drivers/crypto/openssl: use a local copy for the session contexts Thierry Herbelot
2019-08-08 8:22 ` [dpdk-stable] [PATCH 19.11 V3 11/12] drivers/crypto/dpaa_sec: update DPAA iova table in dpaa_mem_vtop Thierry Herbelot
2019-08-08 8:22 ` [dpdk-stable] [PATCH 19.11 V3 12/12] drivers/crypto/octeontx: enable unbinding for the OcteonTx crypto engines Thierry Herbelot
2019-08-07 15:09 ` [dpdk-stable] [PATCH 19.11 V2 01/12] net/ixgbevf: fix stats update after a PF reset Thierry Herbelot
2019-08-07 15:09 ` [dpdk-stable] [PATCH 19.11 V2 02/12] ethdev: fix description of tx descriptor status Thierry Herbelot
2019-08-07 15:09 ` [dpdk-stable] [PATCH 19.11 V2 03/12] net/e1000: fix Tx descriptor status api (igb) Thierry Herbelot
2019-08-07 15:09 ` [dpdk-stable] [PATCH 19.11 V2 04/12] net/e1000: fix Tx descriptor status api (em) Thierry Herbelot
2019-08-07 15:09 ` [dpdk-stable] [PATCH 19.11 V2 05/12] net/ixgbe: fix Tx descriptor status api Thierry Herbelot
2019-08-07 15:09 ` [dpdk-stable] [PATCH 19.11 V2 06/12] net/i40e: " Thierry Herbelot
2019-08-07 15:09 ` [dpdk-stable] [PATCH 19.11 V2 07/12] net/i40e: set speed to undefined for default case in link update Thierry Herbelot
2019-08-07 15:09 ` [dpdk-stable] [PATCH 19.11 V2 08/12] virtio: fix rx stats with vectorized functions Thierry Herbelot
2019-08-08 5:15 ` Tiwei Bie [this message]
2019-08-08 7:35 ` Thibaut Collet
2019-08-07 15:09 ` [dpdk-stable] [PATCH 19.11 V2 09/12] virtio: get all pending rx packets " Thierry Herbelot
2019-08-07 15:09 ` [dpdk-stable] [PATCH 19.11 V2 10/12] drivers/crypto/openssl: use a local copy for the session contexts Thierry Herbelot
2019-08-07 15:09 ` [dpdk-stable] [PATCH 19.11 V2 11/12] drivers/crypto/dpaa_sec: update DPAA iova table in dpaa_mem_vtop Thierry Herbelot
2019-08-07 15:09 ` [dpdk-stable] [PATCH 19.11 V2 12/12] drivers/crypto/octeontx: enable unbinding for the OcteonTx crypto engines Thierry Herbelot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190808051547.GA16478@___ \
--to=tiwei.bie@intel.com \
--cc=dev@dpdk.org \
--cc=stable@dpdk.org \
--cc=thibaut.collet@6wind.com \
--cc=thierry.herbelot@6wind.com \
--cc=thomas@monjalon.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).