[PATCH net-next] net: lan966x: allow offloading timestamp operations to the PHY

Horatiu Vultur posted 1 patch 4 years, 3 months ago
drivers/net/ethernet/microchip/lan966x/lan966x_main.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
[PATCH net-next] net: lan966x: allow offloading timestamp operations to the PHY
Posted by Horatiu Vultur 4 years, 3 months ago
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>
---
 drivers/net/ethernet/microchip/lan966x/lan966x_main.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/microchip/lan966x/lan966x_main.c b/drivers/net/ethernet/microchip/lan966x/lan966x_main.c
index ad310c95bf5c..750f2cc2f695 100644
--- a/drivers/net/ethernet/microchip/lan966x/lan966x_main.c
+++ b/drivers/net/ethernet/microchip/lan966x/lan966x_main.c
@@ -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++;
 
-- 
2.33.0
Re: [PATCH net-next] net: lan966x: allow offloading timestamp operations to the PHY
Posted by patchwork-bot+netdevbpf@kernel.org 4 years, 3 months ago
Hello:

This patch was applied to netdev/net-next.git (master)
by Paolo Abeni <pabeni@redhat.com>:

On Mon, 7 Mar 2022 10:46:32 +0100 you wrote:
> 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>
> ---
>  drivers/net/ethernet/microchip/lan966x/lan966x_main.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)

Here is the summary with links:
  - [net-next] net: lan966x: allow offloading timestamp operations to the PHY
    https://git.kernel.org/netdev/net-next/c/328c621b95cd

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html