On 9/6/2019 2:20 PM, Ilya Maximets wrote:
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 <[email protected]>
Signed-off-by: Kevin Traynor <[email protected]>
---
  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

Seems minor enough to be done on commit, confirmed with pahole that its 36 as well, wasn't aware of the un-named struct adding 4 either so spent sometime re-calculating myself to confirm, good catch. Applied to 2.12.

Thanks
Ian

_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to