> -----Original Message-----
> From: Maxime Coquelin <maxime.coque...@redhat.com>
> Sent: Tuesday, March 16, 2021 5:38 PM
> To: dev@dpdk.org; Xia, Chenbo <chenbo....@intel.com>; amore...@redhat.com;
> david.march...@redhat.com; olivier.m...@6wind.com; bnem...@redhat.com
> Cc: Maxime Coquelin <maxime.coque...@redhat.com>
> Subject: [PATCH v4 0/4] net/virtio: make virtqueue struct cache-friendly
> 
> This series optimizes the cache usage of virtqueue struct,
> by making a "fake" mbuf being dynamically allocated in Rx
> virtnet struct, by removing a useless virtuque pointer
> into the virtnet structs and by moving a few fields
> to pack holes.
> 
>  drivers/net/virtio/virtio_ethdev.c            | 64 +++++++++++--------
>  drivers/net/virtio/virtio_rxtx.c              | 37 +++++------
>  drivers/net/virtio/virtio_rxtx.h              |  5 +-
>  drivers/net/virtio/virtio_rxtx_packed.c       |  4 +-
>  drivers/net/virtio/virtio_rxtx_packed.h       |  6 +-
>  drivers/net/virtio/virtio_rxtx_packed_avx.h   |  4 +-
>  drivers/net/virtio/virtio_rxtx_packed_neon.h  |  4 +-
>  drivers/net/virtio/virtio_rxtx_simple.h       |  2 +-
>  .../net/virtio/virtio_rxtx_simple_altivec.c   |  2 +-
>  drivers/net/virtio/virtio_rxtx_simple_neon.c  |  2 +-
>  drivers/net/virtio/virtio_rxtx_simple_sse.c   |  2 +-
>  .../net/virtio/virtio_user/virtio_user_dev.c  |  4 +-
>  drivers/net/virtio/virtio_user_ethdev.c       |  2 +-
>  drivers/net/virtio/virtqueue.h                | 24 ++++---
>  14 files changed, 87 insertions(+), 75 deletions(-)
> 
> --
> 2.29.2

With below commit log change(because of commit log line too long)

    net/virtio: allocate fake mbuf in Rx queue
    [...]
    struct virtnet_rx {
     struct virtqueue *vq; /*0 8*/

     /* XXX 56 bytes hole, try to pack */

     /* --- cacheline 1 boundary (64 bytes) --- */
     struct rte_mbuf fake_mbuf __attribute__((__aligned__(64))); /*64 128*/
     /* --- cacheline 3 boundary (192 bytes) --- */

Series applied to next-virtio/main.

Thanks!
Chenbo

Reply via email to