[ovs-dev,branch-2.12] netdev-dpdk: Fix padding info comment.
diff mbox series

Message ID 20190905132109.24678-1-ktraynor@redhat.com
State New
Headers show
Series
  • [ovs-dev,branch-2.12] netdev-dpdk: Fix padding info comment.
Related show

Commit Message

Kevin Traynor Sept. 5, 2019, 1:21 p.m. UTC
The comment was incorrectly updated. Fix it to the
correct value of 32 pad bytes.

/* --- cacheline 5 boundary (320 bytes) --- */
union {
        struct {
                struct netdev_stats stats;       /*   320   336 */
                /* --- cacheline 5 boundary (320 bytes) was 16 bytes ago --- */
                uint64_t   tx_retries;           /*   656     8 */
                rte_spinlock_t stats_lock;       /*   664     4 */
        };                                       /*         352 */
        uint8_t            pad52[384];           /*         384 */
};                                               /*   320   384 */

Fixes: c161357d5d96 ("netdev-dpdk: Add custom stat for vhost tx retries.")
Reported-by: Ilya Maximets <i.maximets@samsung.com>
Signed-off-by: Kevin Traynor <ktraynor@redhat.com>
---
 lib/netdev-dpdk.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Ilya Maximets Sept. 6, 2019, 1:20 p.m. UTC | #1
On 05.09.2019 16:21, Kevin Traynor wrote:
> The comment was incorrectly updated. Fix it to the
> correct value of 32 pad bytes.
> 
> /* --- cacheline 5 boundary (320 bytes) --- */
> union {
>         struct {
>                 struct netdev_stats stats;       /*   320   336 */
>                 /* --- cacheline 5 boundary (320 bytes) was 16 bytes ago --- */
>                 uint64_t   tx_retries;           /*   656     8 */
>                 rte_spinlock_t stats_lock;       /*   664     4 */
>         };                                       /*         352 */
>         uint8_t            pad52[384];           /*         384 */
> };                                               /*   320   384 */
> 
> Fixes: c161357d5d96 ("netdev-dpdk: Add custom stat for vhost tx retries.")
> Reported-by: Ilya Maximets <i.maximets@samsung.com>
> Signed-off-by: Kevin Traynor <ktraynor@redhat.com>
> ---
>  lib/netdev-dpdk.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/lib/netdev-dpdk.c b/lib/netdev-dpdk.c
> index 48057835f..a53db0eed 100644
> --- a/lib/netdev-dpdk.c
> +++ b/lib/netdev-dpdk.c
> @@ -452,5 +452,5 @@ struct netdev_dpdk {
>          /* Protects stats */
>          rte_spinlock_t stats_lock;
> -        /* 4 pad bytes here. */
> +        /* 32 pad bytes here. */

Should be 36.
See my comment here:
https://mail.openvswitch.org/pipermail/ovs-dev/2019-September/362427.html

Best regards, Ilya Maximets.

Patch
diff mbox series

diff --git a/lib/netdev-dpdk.c b/lib/netdev-dpdk.c
index 48057835f..a53db0eed 100644
--- a/lib/netdev-dpdk.c
+++ b/lib/netdev-dpdk.c
@@ -452,5 +452,5 @@  struct netdev_dpdk {
         /* Protects stats */
         rte_spinlock_t stats_lock;
-        /* 4 pad bytes here. */
+        /* 32 pad bytes here. */
     );