[v2,07/26] net/ntnic: apply packing to the structure

Message ID 20250505071309.586015-8-okl-plv@napatech.com (mailing list archive)
State Awaiting Upstream
Delegated to: Stephen Hemminger
Headers
Series net/ntnic: fixes and improvements |

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Oleksandr Kolomeiets May 5, 2025, 7:12 a.m. UTC
The structure virtq_desc should not contain any paddings,
so it has been wrapped with __rte_packed_begin and __rte_packed_end macros.

Signed-off-by: Oleksandr Kolomeiets <okl-plv@napatech.com>
---
 drivers/net/ntnic/include/ntnic_virt_queue.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
  

Patch

diff --git a/drivers/net/ntnic/include/ntnic_virt_queue.h b/drivers/net/ntnic/include/ntnic_virt_queue.h
index b95efabf97..072365c946 100644
--- a/drivers/net/ntnic/include/ntnic_virt_queue.h
+++ b/drivers/net/ntnic/include/ntnic_virt_queue.h
@@ -34,7 +34,7 @@  struct nthw_virt_queue;
 /*
  * Split Ring virtq Descriptor
  */
-struct __rte_aligned(8) virtq_desc {
+struct __rte_packed_begin virtq_desc {
 	/* Address (guest-physical). */
 	uint64_t addr;
 	/* Length. */
@@ -43,7 +43,7 @@  struct __rte_aligned(8) virtq_desc {
 	uint16_t flags;
 	/* Next field if flags & NEXT */
 	uint16_t next;
-};
+} __rte_packed_end;
 
 
 /*