Netdev List
 help / color / mirror / Atom feed
* [PATCH iwl-net] idpf: add missing cpu_to_le32 in idpf_tx_splitq_build_flow_desc
@ 2026-07-31 10:31 Willem de Bruijn
  2026-08-02 14:31 ` Willem de Bruijn
  0 siblings, 1 reply; 4+ messages in thread
From: Willem de Bruijn @ 2026-07-31 10:31 UTC (permalink / raw)
  To: netdev; +Cc: anthony.l.nguyen, joshua.a.hay, przemyslaw.kitszel,
	Willem de Bruijn

From: Willem de Bruijn <willemb@google.com>

idpf_tx_splitq_build_flow_desc performs a 32-bit store to &cmd_dtype
to set the 8-bit cmd_dtype and zero the adjacent 3-byte timestamp
field in a single operation.

Descriptors are in little endian. Add missing cpu_to_le32 and cast to
__le32 to ensure the fields are written correctly also on big endian
platforms.

Signed-off-by: Willem de Bruijn <willemb@google.com>

---

A follow-up so_txtime patch will initialize ts[] from params. At that
point the 32-bit cast can be removed entirely and replaced with a
straightforward u8 store to cmd_dtype.

https://lore.kernel.org/netdev/20260726202902.760552-4-willemdebruijn.kernel@gmail.com/
---
 drivers/net/ethernet/intel/idpf/idpf_txrx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/intel/idpf/idpf_txrx.c b/drivers/net/ethernet/intel/idpf/idpf_txrx.c
index c724d429a7aa..91ca75e45463 100644
--- a/drivers/net/ethernet/intel/idpf/idpf_txrx.c
+++ b/drivers/net/ethernet/intel/idpf/idpf_txrx.c
@@ -2408,7 +2408,7 @@ void idpf_tx_splitq_build_flow_desc(union idpf_tx_flex_desc *desc,
 				    struct idpf_tx_splitq_params *params,
 				    u16 td_cmd, u16 size)
 {
-	*(u32 *)&desc->flow.qw1.cmd_dtype = (u8)(params->dtype | td_cmd);
+	*(__le32 *)&desc->flow.qw1.cmd_dtype = cpu_to_le32((u8)(params->dtype | td_cmd));
 	desc->flow.qw1.rxr_bufsize = cpu_to_le16((u16)size);
 	desc->flow.qw1.compl_tag = cpu_to_le16(params->compl_tag);
 }
-- 
2.55.0.508.g3f0d502094-goog


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH iwl-net] idpf: add missing cpu_to_le32 in idpf_tx_splitq_build_flow_desc
  2026-07-31 10:31 [PATCH iwl-net] idpf: add missing cpu_to_le32 in idpf_tx_splitq_build_flow_desc Willem de Bruijn
@ 2026-08-02 14:31 ` Willem de Bruijn
  2026-08-03 20:37   ` Tony Nguyen
  0 siblings, 1 reply; 4+ messages in thread
From: Willem de Bruijn @ 2026-08-02 14:31 UTC (permalink / raw)
  To: Willem de Bruijn, netdev
  Cc: anthony.l.nguyen, joshua.a.hay, przemyslaw.kitszel,
	Willem de Bruijn

Willem de Bruijn wrote:
> From: Willem de Bruijn <willemb@google.com>
> 
> idpf_tx_splitq_build_flow_desc performs a 32-bit store to &cmd_dtype
> to set the 8-bit cmd_dtype and zero the adjacent 3-byte timestamp
> field in a single operation.
> 
> Descriptors are in little endian. Add missing cpu_to_le32 and cast to
> __le32 to ensure the fields are written correctly also on big endian
> platforms.
> 
> Signed-off-by: Willem de Bruijn <willemb@google.com>

Fixes: 1a49cf814fe1 ("idpf: add Tx timestamp flows")

Forgot the tag. Apologies.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH iwl-net] idpf: add missing cpu_to_le32 in idpf_tx_splitq_build_flow_desc
  2026-08-02 14:31 ` Willem de Bruijn
@ 2026-08-03 20:37   ` Tony Nguyen
  2026-08-03 21:11     ` Willem de Bruijn
  0 siblings, 1 reply; 4+ messages in thread
From: Tony Nguyen @ 2026-08-03 20:37 UTC (permalink / raw)
  To: Willem de Bruijn, netdev
  Cc: joshua.a.hay, przemyslaw.kitszel, Willem de Bruijn



On 8/2/2026 7:31 AM, Willem de Bruijn wrote:
> Willem de Bruijn wrote:
>> From: Willem de Bruijn <willemb@google.com>
>>
>> idpf_tx_splitq_build_flow_desc performs a 32-bit store to &cmd_dtype
>> to set the 8-bit cmd_dtype and zero the adjacent 3-byte timestamp
>> field in a single operation.
>>
>> Descriptors are in little endian. Add missing cpu_to_le32 and cast to
>> __le32 to ensure the fields are written correctly also on big endian
>> platforms.
>>
>> Signed-off-by: Willem de Bruijn <willemb@google.com>
> 
> Fixes: 1a49cf814fe1 ("idpf: add Tx timestamp flows")
> 
> Forgot the tag. Apologies.

I see it's for 'iwl-net' but IWL isn't on the send list. Seems 
straightforward enough that if netdev wants to take it directly, it's ok 
with me. If yes,

Reviewed-by: Tony Nguyen <anthony.l.nguyen@intel.com>

Otherwise, could you add the Fixes and include IWL 
(intel-wired-lan@lists.osuosl.org) on the send?

Thanks,
Tony


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH iwl-net] idpf: add missing cpu_to_le32 in idpf_tx_splitq_build_flow_desc
  2026-08-03 20:37   ` Tony Nguyen
@ 2026-08-03 21:11     ` Willem de Bruijn
  0 siblings, 0 replies; 4+ messages in thread
From: Willem de Bruijn @ 2026-08-03 21:11 UTC (permalink / raw)
  To: Tony Nguyen, Willem de Bruijn, netdev
  Cc: joshua.a.hay, przemyslaw.kitszel, Willem de Bruijn

Tony Nguyen wrote:
> 
> 
> On 8/2/2026 7:31 AM, Willem de Bruijn wrote:
> > Willem de Bruijn wrote:
> >> From: Willem de Bruijn <willemb@google.com>
> >>
> >> idpf_tx_splitq_build_flow_desc performs a 32-bit store to &cmd_dtype
> >> to set the 8-bit cmd_dtype and zero the adjacent 3-byte timestamp
> >> field in a single operation.
> >>
> >> Descriptors are in little endian. Add missing cpu_to_le32 and cast to
> >> __le32 to ensure the fields are written correctly also on big endian
> >> platforms.
> >>
> >> Signed-off-by: Willem de Bruijn <willemb@google.com>
> > 
> > Fixes: 1a49cf814fe1 ("idpf: add Tx timestamp flows")
> > 
> > Forgot the tag. Apologies.
> 
> I see it's for 'iwl-net' but IWL isn't on the send list. Seems 
> straightforward enough that if netdev wants to take it directly, it's ok 
> with me. If yes,
> 
> Reviewed-by: Tony Nguyen <anthony.l.nguyen@intel.com>
> 
> Otherwise, could you add the Fixes and include IWL 
> (intel-wired-lan@lists.osuosl.org) on the send?
> 
> Thanks,
> Tony
> 

Oops. Resent with both and your Reviewed-by. Thanks Tony.

https://lore.kernel.org/netdev/20260803210707.1912217-1-willemdebruijn.kernel@gmail.com/


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-08-03 21:11 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-31 10:31 [PATCH iwl-net] idpf: add missing cpu_to_le32 in idpf_tx_splitq_build_flow_desc Willem de Bruijn
2026-08-02 14:31 ` Willem de Bruijn
2026-08-03 20:37   ` Tony Nguyen
2026-08-03 21:11     ` Willem de Bruijn

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox