stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net ] vmxnet3: correctly report csum_level for encapsulated packet
@ 2022-12-20 20:25 Ronak Doshi
  2022-12-21  2:37 ` kernel test robot
  2022-12-22  2:10 ` patchwork-bot+netdevbpf
  0 siblings, 2 replies; 3+ messages in thread
From: Ronak Doshi @ 2022-12-20 20:25 UTC (permalink / raw)
  To: netdev
  Cc: stable, Ronak Doshi, VMware PV-Drivers Reviewers, David S. Miller,
	Eric Dumazet, Jakub Kicinski, Paolo Abeni, open list

Commit dacce2be3312 ("vmxnet3: add geneve and vxlan tunnel offload
support") added support for encapsulation offload. However, the
pathc did not report correctly the csum_level for encapsulated packet.

This patch fixes this issue by reporting correct csum level for the
encapsulated packet.

Fixes: dacce2be3312 ("vmxnet3: add geneve and vxlan tunnel offload support")
Signed-off-by: Ronak Doshi <doshir@vmware.com>
Acked-by: Peng Li <lpeng@vmware.com>
---
 drivers/net/vmxnet3/vmxnet3_drv.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/drivers/net/vmxnet3/vmxnet3_drv.c b/drivers/net/vmxnet3/vmxnet3_drv.c
index 6f1e560fb15c..56267c327f0b 100644
--- a/drivers/net/vmxnet3/vmxnet3_drv.c
+++ b/drivers/net/vmxnet3/vmxnet3_drv.c
@@ -1288,6 +1288,10 @@ vmxnet3_rx_csum(struct vmxnet3_adapter *adapter,
 		    (le32_to_cpu(gdesc->dword[3]) &
 		     VMXNET3_RCD_CSUM_OK) == VMXNET3_RCD_CSUM_OK) {
 			skb->ip_summed = CHECKSUM_UNNECESSARY;
+			if ((le32_to_cpu(gdesc->dword[0]) &
+				     (1UL << VMXNET3_RCD_HDR_INNER_SHIFT))) {
+				skb->csum_level = 1;
+			}
 			WARN_ON_ONCE(!(gdesc->rcd.tcp || gdesc->rcd.udp) &&
 				     !(le32_to_cpu(gdesc->dword[0]) &
 				     (1UL << VMXNET3_RCD_HDR_INNER_SHIFT)));
@@ -1297,6 +1301,10 @@ vmxnet3_rx_csum(struct vmxnet3_adapter *adapter,
 		} else if (gdesc->rcd.v6 && (le32_to_cpu(gdesc->dword[3]) &
 					     (1 << VMXNET3_RCD_TUC_SHIFT))) {
 			skb->ip_summed = CHECKSUM_UNNECESSARY;
+			if ((le32_to_cpu(gdesc->dword[0]) &
+				     (1UL << VMXNET3_RCD_HDR_INNER_SHIFT))) {
+				skb->csum_level = 1;
+			}
 			WARN_ON_ONCE(!(gdesc->rcd.tcp || gdesc->rcd.udp) &&
 				     !(le32_to_cpu(gdesc->dword[0]) &
 				     (1UL << VMXNET3_RCD_HDR_INNER_SHIFT)));
-- 
2.11.0


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

* Re: [PATCH net ] vmxnet3: correctly report csum_level for encapsulated packet
  2022-12-20 20:25 [PATCH net ] vmxnet3: correctly report csum_level for encapsulated packet Ronak Doshi
@ 2022-12-21  2:37 ` kernel test robot
  2022-12-22  2:10 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 3+ messages in thread
From: kernel test robot @ 2022-12-21  2:37 UTC (permalink / raw)
  To: Ronak Doshi; +Cc: stable, oe-kbuild-all

Hi,

Thanks for your patch.

FYI: kernel test robot notices the stable kernel rule is not satisfied.

Rule: 'Cc: stable@vger.kernel.org' or 'commit <sha1> upstream.'
Subject: [PATCH net ] vmxnet3: correctly report csum_level for encapsulated packet
Link: https://lore.kernel.org/stable/20221220202556.24421-1-doshir%40vmware.com

The check is based on https://www.kernel.org/doc/html/latest/process/stable-kernel-rules.html

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp




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

* Re: [PATCH net ] vmxnet3: correctly report csum_level for encapsulated packet
  2022-12-20 20:25 [PATCH net ] vmxnet3: correctly report csum_level for encapsulated packet Ronak Doshi
  2022-12-21  2:37 ` kernel test robot
@ 2022-12-22  2:10 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2022-12-22  2:10 UTC (permalink / raw)
  To: Ronak Doshi
  Cc: netdev, stable, pv-drivers, davem, edumazet, kuba, pabeni,
	linux-kernel

Hello:

This patch was applied to netdev/net.git (master)
by Jakub Kicinski <kuba@kernel.org>:

On Tue, 20 Dec 2022 12:25:55 -0800 you wrote:
> Commit dacce2be3312 ("vmxnet3: add geneve and vxlan tunnel offload
> support") added support for encapsulation offload. However, the
> pathc did not report correctly the csum_level for encapsulated packet.
> 
> This patch fixes this issue by reporting correct csum level for the
> encapsulated packet.
> 
> [...]

Here is the summary with links:
  - [net] vmxnet3: correctly report csum_level for encapsulated packet
    https://git.kernel.org/netdev/net/c/3d8f2c4269d0

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] 3+ messages in thread

end of thread, other threads:[~2022-12-22  2:10 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-12-20 20:25 [PATCH net ] vmxnet3: correctly report csum_level for encapsulated packet Ronak Doshi
2022-12-21  2:37 ` kernel test robot
2022-12-22  2:10 ` patchwork-bot+netdevbpf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).