All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] net: ethernet: rmnet: Always subtract MAP header
@ 2021-06-09 14:32 Kristian Evensen
  2021-06-09 22:40 ` patchwork-bot+netdevbpf
  0 siblings, 1 reply; 2+ messages in thread
From: Kristian Evensen @ 2021-06-09 14:32 UTC (permalink / raw)
  To: netdev, sharathv, stranche, subashab; +Cc: Kristian Evensen

Commit e1d9a90a9bfd ("net: ethernet: rmnet: Support for ingress MAPv5
checksum offload") broke ingress handling for devices where
RMNET_FLAGS_INGRESS_MAP_CKSUMV5 or RMNET_FLAGS_INGRESS_MAP_CKSUMV4 are
not set. Unless either of these flags are set, the MAP header is not
removed. This commit restores the original logic by ensuring that the
MAP header is removed for all MAP packets.

Fixes: e1d9a90a9bfd ("net: ethernet: rmnet: Support for ingress MAPv5 checksum offload")
Signed-off-by: Kristian Evensen <kristian.evensen@gmail.com>
---
 drivers/net/ethernet/qualcomm/rmnet/rmnet_handlers.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/qualcomm/rmnet/rmnet_handlers.c b/drivers/net/ethernet/qualcomm/rmnet/rmnet_handlers.c
index 2504d0363b6b..bfbd7847f946 100644
--- a/drivers/net/ethernet/qualcomm/rmnet/rmnet_handlers.c
+++ b/drivers/net/ethernet/qualcomm/rmnet/rmnet_handlers.c
@@ -88,11 +88,12 @@ __rmnet_map_ingress_handler(struct sk_buff *skb,
 			goto free_skb;
 		skb_pull(skb, sizeof(*map_header));
 		rmnet_set_skb_proto(skb);
-	} else if (port->data_format & RMNET_FLAGS_INGRESS_MAP_CKSUMV4) {
+	} else {
 		/* Subtract MAP header */
 		skb_pull(skb, sizeof(*map_header));
 		rmnet_set_skb_proto(skb);
-		if (!rmnet_map_checksum_downlink_packet(skb, len + pad))
+		if (port->data_format & RMNET_FLAGS_INGRESS_MAP_CKSUMV4 &&
+		    !rmnet_map_checksum_downlink_packet(skb, len + pad))
 			skb->ip_summed = CHECKSUM_UNNECESSARY;
 	}
 
-- 
2.25.1


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

* Re: [PATCH] net: ethernet: rmnet: Always subtract MAP header
  2021-06-09 14:32 [PATCH] net: ethernet: rmnet: Always subtract MAP header Kristian Evensen
@ 2021-06-09 22:40 ` patchwork-bot+netdevbpf
  0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+netdevbpf @ 2021-06-09 22:40 UTC (permalink / raw)
  To: Kristian Evensen; +Cc: netdev, sharathv, stranche, subashab

Hello:

This patch was applied to netdev/net-next.git (refs/heads/master):

On Wed,  9 Jun 2021 16:32:49 +0200 you wrote:
> Commit e1d9a90a9bfd ("net: ethernet: rmnet: Support for ingress MAPv5
> checksum offload") broke ingress handling for devices where
> RMNET_FLAGS_INGRESS_MAP_CKSUMV5 or RMNET_FLAGS_INGRESS_MAP_CKSUMV4 are
> not set. Unless either of these flags are set, the MAP header is not
> removed. This commit restores the original logic by ensuring that the
> MAP header is removed for all MAP packets.
> 
> [...]

Here is the summary with links:
  - net: ethernet: rmnet: Always subtract MAP header
    https://git.kernel.org/netdev/net-next/c/8b8701d0b492

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



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

end of thread, other threads:[~2021-06-09 22:40 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-09 14:32 [PATCH] net: ethernet: rmnet: Always subtract MAP header Kristian Evensen
2021-06-09 22:40 ` patchwork-bot+netdevbpf

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.