public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH iwl-net 1/1] igc: skip RX timestamp header for frame preemption verification
@ 2026-04-24  7:59 KhaiWenTan
  2026-04-24 15:27 ` [Intel-wired-lan] " Loktionov, Aleksandr
  0 siblings, 1 reply; 2+ messages in thread
From: KhaiWenTan @ 2026-04-24  7:59 UTC (permalink / raw)
  To: anthony.l.nguyen, przemyslaw.kitszel, andrew+netdev, davem,
	edumazet, kuba, pabeni, chwee.lin.choong, vladimir.oltean,
	vinicius.gomes
  Cc: faizal.abdul.rahim, intel-wired-lan, netdev, linux-kernel,
	khai.wen.tan, hong.aun.looi, faizal.abdul.rahim, KhaiWenTan

When RX hardware timestamping is enabled, a 16-byte inline timestamp header
is added to the start of the packet buffer, causing FPE handshake
verification to fail.

Because an incorrect packet buffer is passed to igc_fpe_handle_mpacket(),
the mem_is_zero() check inspects the timestamp metadata instead of the
actual mPacket payload. As a result, valid Verify/Response mPackets can be
missed when inline RX timestamps are present.

Pass pktbuf + pkt_offset to igc_fpe_handle_mpacket() so it inspects the
actual mPacket payload instead of the timestamp header.

Fixes: 5422570c0010 ("igc: add support for frame preemption verification")
Co-developed-by: Faizal Rahim <faizal.abdul.rahim@linux.intel.com>
Signed-off-by: Faizal Rahim <faizal.abdul.rahim@linux.intel.com>
Signed-off-by: KhaiWenTan <khai.wen.tan@linux.intel.com>
---
 drivers/net/ethernet/intel/igc/igc_main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/intel/igc/igc_main.c b/drivers/net/ethernet/intel/igc/igc_main.c
index 8ac16808023c..c470d2354ce8 100644
--- a/drivers/net/ethernet/intel/igc/igc_main.c
+++ b/drivers/net/ethernet/intel/igc/igc_main.c
@@ -2649,7 +2649,7 @@ static int igc_clean_rx_irq(struct igc_q_vector *q_vector, const int budget)
 		}
 
 		if (igc_fpe_is_pmac_enabled(adapter) &&
-		    igc_fpe_handle_mpacket(adapter, rx_desc, size, pktbuf)) {
+		    igc_fpe_handle_mpacket(adapter, rx_desc, size, pktbuf + pkt_offset)) {
 			/* Advance the ring next-to-clean */
 			igc_is_non_eop(rx_ring, rx_desc);
 			cleaned_count++;
-- 
2.43.0


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

* RE: [Intel-wired-lan] [PATCH iwl-net 1/1] igc: skip RX timestamp header for frame preemption verification
  2026-04-24  7:59 [PATCH iwl-net 1/1] igc: skip RX timestamp header for frame preemption verification KhaiWenTan
@ 2026-04-24 15:27 ` Loktionov, Aleksandr
  0 siblings, 0 replies; 2+ messages in thread
From: Loktionov, Aleksandr @ 2026-04-24 15:27 UTC (permalink / raw)
  To: KhaiWenTan, Nguyen, Anthony L, Kitszel, Przemyslaw,
	andrew+netdev@lunn.ch, davem@davemloft.net, edumazet@google.com,
	kuba@kernel.org, pabeni@redhat.com, Choong, Chwee Lin,
	vladimir.oltean@nxp.com, Gomes, Vinicius
  Cc: faizal.abdul.rahim@linux.intel.com,
	intel-wired-lan@lists.osuosl.org, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org, Tan, Khai Wen, Looi, Hong Aun,
	Abdul Rahim, Faizal



> -----Original Message-----
> From: Intel-wired-lan <intel-wired-lan-bounces@osuosl.org> On Behalf
> Of KhaiWenTan
> Sent: Friday, April 24, 2026 9:59 AM
> To: Nguyen, Anthony L <anthony.l.nguyen@intel.com>; Kitszel,
> Przemyslaw <przemyslaw.kitszel@intel.com>; andrew+netdev@lunn.ch;
> davem@davemloft.net; edumazet@google.com; kuba@kernel.org;
> pabeni@redhat.com; Choong, Chwee Lin <chwee.lin.choong@intel.com>;
> vladimir.oltean@nxp.com; Gomes, Vinicius <vinicius.gomes@intel.com>
> Cc: faizal.abdul.rahim@linux.intel.com; intel-wired-
> lan@lists.osuosl.org; netdev@vger.kernel.org; linux-
> kernel@vger.kernel.org; Tan, Khai Wen <khai.wen.tan@intel.com>; Looi,
> Hong Aun <hong.aun.looi@intel.com>; Abdul Rahim, Faizal
> <faizal.abdul.rahim@intel.com>; KhaiWenTan
> <khai.wen.tan@linux.intel.com>
> Subject: [Intel-wired-lan] [PATCH iwl-net 1/1] igc: skip RX timestamp
> header for frame preemption verification
> 
> When RX hardware timestamping is enabled, a 16-byte inline timestamp
> header is added to the start of the packet buffer, causing FPE
> handshake verification to fail.
> 
> Because an incorrect packet buffer is passed to
> igc_fpe_handle_mpacket(), the mem_is_zero() check inspects the
> timestamp metadata instead of the actual mPacket payload. As a result,
> valid Verify/Response mPackets can be missed when inline RX timestamps
> are present.
> 
> Pass pktbuf + pkt_offset to igc_fpe_handle_mpacket() so it inspects
> the actual mPacket payload instead of the timestamp header.
> 
> Fixes: 5422570c0010 ("igc: add support for frame preemption
> verification")
> Co-developed-by: Faizal Rahim <faizal.abdul.rahim@linux.intel.com>
> Signed-off-by: Faizal Rahim <faizal.abdul.rahim@linux.intel.com>
> Signed-off-by: KhaiWenTan <khai.wen.tan@linux.intel.com>
> ---
>  drivers/net/ethernet/intel/igc/igc_main.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/net/ethernet/intel/igc/igc_main.c
> b/drivers/net/ethernet/intel/igc/igc_main.c
> index 8ac16808023c..c470d2354ce8 100644
> --- a/drivers/net/ethernet/intel/igc/igc_main.c
> +++ b/drivers/net/ethernet/intel/igc/igc_main.c
> @@ -2649,7 +2649,7 @@ static int igc_clean_rx_irq(struct igc_q_vector
> *q_vector, const int budget)
>  		}
> 
>  		if (igc_fpe_is_pmac_enabled(adapter) &&
> -		    igc_fpe_handle_mpacket(adapter, rx_desc, size,
> pktbuf)) {
> +		    igc_fpe_handle_mpacket(adapter, rx_desc, size,
> pktbuf +
> +pkt_offset)) {
>  			/* Advance the ring next-to-clean */
>  			igc_is_non_eop(rx_ring, rx_desc);
>  			cleaned_count++;
> --
> 2.43.0

Reviewed-by: Aleksandr Loktionov <aleksandr.loktionov@intel.com>

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

end of thread, other threads:[~2026-04-24 15:27 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-24  7:59 [PATCH iwl-net 1/1] igc: skip RX timestamp header for frame preemption verification KhaiWenTan
2026-04-24 15:27 ` [Intel-wired-lan] " Loktionov, Aleksandr

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