net: lan966x: allow offloading timestamp operations to the PHY
authorHoratiu Vultur <horatiu.vultur@microchip.com>
Mon, 7 Mar 2022 09:46:32 +0000 (10:46 +0100)
committerPaolo Abeni <pabeni@redhat.com>
Tue, 8 Mar 2022 09:44:33 +0000 (10:44 +0100)
In case the MAC is using 'netif_rx()' to deliver the skb up the network
stack, it needs to check whether 'skb_defer_rx_timestmap()' is necessary
or not. In case is needed then don't call 'netif_rx()'

Signed-off-by: Horatiu Vultur <horatiu.vultur@microchip.com>
Link: https://lore.kernel.org/r/20220307094632.3764266-1-horatiu.vultur@microchip.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
drivers/net/ethernet/microchip/lan966x/lan966x_main.c

index ad310c95bf5c93ec92803c340af8d880cbcd9d68..750f2cc2f69563a25a084fc641bba6b05d3a7322 100644 (file)
@@ -600,7 +600,9 @@ static irqreturn_t lan966x_xtr_irq_handler(int irq, void *args)
                                skb->offload_fwd_mark = 0;
                }
 
-               netif_rx(skb);
+               if (!skb_defer_rx_timestamp(skb))
+                       netif_rx(skb);
+
                dev->stats.rx_bytes += len;
                dev->stats.rx_packets++;