DPDK patches and discussions
 help / color / mirror / Atom feed
From: Thomas Monjalon <thomas@monjalon.net>
To: Andre Muezerie <andremue@linux.microsoft.com>
Cc: dev@dpdk.org, bingz@nvidia.com, matan@nvidia.com,
	orika@nvidia.com, suanmingm@nvidia.com, viacheslavo@nvidia.com,
	mkashani@nvidia.com, Dariusz Sosnowski <dsosnowski@nvidia.com>,
	David Marchand <david.marchand@redhat.com>
Subject: Re: [PATCH v3] net/mlx5: remove use of sizeof(rte_v128u32_t)
Date: Sun, 20 Jul 2025 23:43:25 +0200	[thread overview]
Message-ID: <2444510.NG923GbCHz@thomas> (raw)
In-Reply-To: <20250709072609.an5o3r423bqqapmj@ds-vm-debian.local>

09/07/2025 09:26, Dariusz Sosnowski:
> Thank you for addressing the comments.
> 
> On Tue, Jul 08, 2025 at 08:11:56AM -0700, Andre Muezerie wrote:
> > When compiling with MSVC the error below is hit:
> > 
> > drivers\net\mlx5\mlx5_tx.h(1148): error C2065: 'rte_v128u32_t':
> >     undeclared identifier
> > 
> > The reference to rte_v128u32_t (in code and in names) can be removed,
> > because the code which relies on MLX5_ESEG_MIN_INLINE_SIZE does not
> > really use rte_v128u32_t type. The relevant code e.g.,
> > in mlx5_tx_eseg_dmin(), always copies first 2 bytes of the packet
> > (through uint16_t pointer, these would be first 2 bytes of destination
> > MAC address) and then does one of the two:
> > 
> > 1. Copies following 16 bytes using rte_mov16().
> >    (Corresponds to first static_assert for MLX5_ESEG_MIN_INLINE_SIZE).
> > 2. If there is a VLAN defined in mbuf, then:
> >    - the rest of destination MAC address is copied,
> >    - source MAC address is copied,
> >    - VLAN is inserted,
> >    - 2 bytes appearing after VLAN header are copied.
> >    (Corresponds to 2nd static_assert for MLX5_ESEG_MIN_INLINE_SIZE).
> > 
> > The amount of data copied is inferred from HW arch and packet descriptor
> > layout, not rte_v128u32_t.
> > 
> > Since rte_mov16() is used in real code and rte_v128u32_t is only used to
> > carry over the length of the copy, this patch replaces instances of
> > sizeof(rte_v128u32_t) with a macro named MLX5_SIZE_MOV16 to better
> > reflect the real usage in mlx5 PMD.
> > 
> > Signed-off-by: Andre Muezerie <andremue@linux.microsoft.com>
> 
> Acked-by: Dariusz Sosnowski <dsosnowski@nvidia.com>

Applied, thanks.

Looks like the generic vector types rte_v*_t are useless,
and not compatible with MSVC.
We may think whether we really want to keep them.



      reply	other threads:[~2025-07-20 21:43 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-05 15:10 [PATCH] net/mlx5: declare size of rte_v128u32_t Andre Muezerie
2025-05-25  8:47 ` Maayan Kashani
2025-05-31  0:20   ` Andre Muezerie
2025-05-31  0:21 ` [PATCH v2] " Andre Muezerie
2025-06-04 15:28   ` Dariusz Sosnowski
2025-07-08 15:08     ` Andre Muezerie
2025-07-08 15:11 ` [PATCH v3] net/mlx5: remove use of sizeof(rte_v128u32_t) Andre Muezerie
2025-07-09  7:26   ` Dariusz Sosnowski
2025-07-20 21:43     ` Thomas Monjalon [this message]

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=2444510.NG923GbCHz@thomas \
    --to=thomas@monjalon.net \
    --cc=andremue@linux.microsoft.com \
    --cc=bingz@nvidia.com \
    --cc=david.marchand@redhat.com \
    --cc=dev@dpdk.org \
    --cc=dsosnowski@nvidia.com \
    --cc=matan@nvidia.com \
    --cc=mkashani@nvidia.com \
    --cc=orika@nvidia.com \
    --cc=suanmingm@nvidia.com \
    --cc=viacheslavo@nvidia.com \
    /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).