[PATCH v2 0/2][Bionic][SRU Artful] net: thunderx: Fix TCP/UDP checksum offload

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

[PATCH v2 0/2][Bionic][SRU Artful] net: thunderx: Fix TCP/UDP checksum offload

dann frazier-4
BugLink: https://bugs.launchpad.net/bugs/1736593

v2: Adds a follow-on fix for IPv4.

Florian Westphal (1):
  net: thunderx: Fix TCP/UDP checksum offload for IPv4 pkts

Sunil Goutham (1):
  net: thunderx: Fix TCP/UDP checksum offload for IPv6 pkts

 drivers/net/ethernet/cavium/thunder/nicvf_queues.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

--
2.15.1


--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team
Reply | Threaded
Open this post in threaded view
|

[PATCH v2 1/2][Bionic][SRU Artful] net: thunderx: Fix TCP/UDP checksum offload for IPv6 pkts

dann frazier-4
From: Sunil Goutham <[hidden email]>

BugLink: https://bugs.launchpad.net/bugs/1736593

Don't offload IP header checksum to NIC.

This fixes a previous patch which enabled checksum offloading
for both IPv4 and IPv6 packets.  So L3 checksum offload was
getting enabled for IPv6 pkts.  And HW is dropping these pkts
as it assumes the pkt is IPv4 when IP csum offload is set
in the SQ descriptor.

Fixes:  3a9024f52c2e ("net: thunderx: Enable TSO and checksum offloads for ipv6")
Signed-off-by: Sunil Goutham <[hidden email]>
Signed-off-by: Aleksey Makarov <[hidden email]>
Reviewed-by: Eric Dumazet <[hidden email]>
Signed-off-by: David S. Miller <[hidden email]>
(cherry picked from commit fa6d7cb5d76cf0467c61420fc9238045aedfd379)
Signed-off-by: dann frazier <[hidden email]>
---
 drivers/net/ethernet/cavium/thunder/nicvf_queues.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/net/ethernet/cavium/thunder/nicvf_queues.c b/drivers/net/ethernet/cavium/thunder/nicvf_queues.c
index d4496e9afcdf..8b2c31e2a2b0 100644
--- a/drivers/net/ethernet/cavium/thunder/nicvf_queues.c
+++ b/drivers/net/ethernet/cavium/thunder/nicvf_queues.c
@@ -1355,7 +1355,6 @@ nicvf_sq_add_hdr_subdesc(struct nicvf *nic, struct snd_queue *sq, int qentry,
 
  /* Offload checksum calculation to HW */
  if (skb->ip_summed == CHECKSUM_PARTIAL) {
- hdr->csum_l3 = 1; /* Enable IP csum calculation */
  hdr->l3_offset = skb_network_offset(skb);
  hdr->l4_offset = skb_transport_offset(skb);
 
--
2.15.1


--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team
Reply | Threaded
Open this post in threaded view
|

[PATCH v2 2/2][Bionic][SRU Artful] net: thunderx: Fix TCP/UDP checksum offload for IPv4 pkts

dann frazier-4
In reply to this post by dann frazier-4
From: Florian Westphal <[hidden email]>

BugLink: https://bugs.launchpad.net/bugs/1736593

Offload IP header checksum to NIC.

This fixes a previous patch which disabled checksum offloading
for both IPv4 and IPv6 packets.  So L3 checksum offload was
getting disabled for IPv4 pkts.  And HW is dropping these pkts
for some reason.

Without this patch, IPv4 TSO appears to be broken:

WIthout this patch I get ~16kbyte/s, with patch close to 2mbyte/s
when copying files via scp from test box to my home workstation.

Looking at tcpdump on sender it looks like hardware drops IPv4 TSO skbs.
This patch restores performance for me, ipv6 looks good too.

Fixes: fa6d7cb5d76c ("net: thunderx: Fix TCP/UDP checksum offload for IPv6 pkts")
Cc: Sunil Goutham <[hidden email]>
Cc: Aleksey Makarov <[hidden email]>
Cc: Eric Dumazet <[hidden email]>
Signed-off-by: Florian Westphal <[hidden email]>
Signed-off-by: David S. Miller <[hidden email]>
(cherry picked from commit 134059fd2775be79e26c2dff87d25cc2f6ea5626)
Signed-off-by: dann frazier <[hidden email]>
---
 drivers/net/ethernet/cavium/thunder/nicvf_queues.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/net/ethernet/cavium/thunder/nicvf_queues.c b/drivers/net/ethernet/cavium/thunder/nicvf_queues.c
index 8b2c31e2a2b0..a3d12dbde95b 100644
--- a/drivers/net/ethernet/cavium/thunder/nicvf_queues.c
+++ b/drivers/net/ethernet/cavium/thunder/nicvf_queues.c
@@ -1355,6 +1355,8 @@ nicvf_sq_add_hdr_subdesc(struct nicvf *nic, struct snd_queue *sq, int qentry,
 
  /* Offload checksum calculation to HW */
  if (skb->ip_summed == CHECKSUM_PARTIAL) {
+ if (ip.v4->version == 4)
+ hdr->csum_l3 = 1; /* Enable IP csum calculation */
  hdr->l3_offset = skb_network_offset(skb);
  hdr->l4_offset = skb_transport_offset(skb);
 
--
2.15.1


--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team
Reply | Threaded
Open this post in threaded view
|

ACK/APPLIED[B]: [PATCH v2 0/2][Bionic][SRU Artful] net: thunderx: Fix TCP/UDP checksum offload

Seth Forshee
In reply to this post by dann frazier-4
On Tue, Dec 12, 2017 at 01:16:54PM -0700, dann frazier wrote:
> BugLink: https://bugs.launchpad.net/bugs/1736593

Clean cherry picks, straightforward patches.

Acked-by: Seth Forshee <[hidden email]>

Applied to bionic/master-next. Thanks!

--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team
Reply | Threaded
Open this post in threaded view
|

[RESEND][PATCH v2 1/2][SRU Artful] net: thunderx: Fix TCP/UDP checksum offload for IPv6 pkts

dann frazier-4
In reply to this post by dann frazier-4
From: Sunil Goutham <[hidden email]>

BugLink: https://bugs.launchpad.net/bugs/1736593

Don't offload IP header checksum to NIC.

This fixes a previous patch which enabled checksum offloading
for both IPv4 and IPv6 packets.  So L3 checksum offload was
getting enabled for IPv6 pkts.  And HW is dropping these pkts
as it assumes the pkt is IPv4 when IP csum offload is set
in the SQ descriptor.

Fixes:  3a9024f52c2e ("net: thunderx: Enable TSO and checksum offloads for ipv6")
Signed-off-by: Sunil Goutham <[hidden email]>
Signed-off-by: Aleksey Makarov <[hidden email]>
Reviewed-by: Eric Dumazet <[hidden email]>
Signed-off-by: David S. Miller <[hidden email]>
(cherry picked from commit fa6d7cb5d76cf0467c61420fc9238045aedfd379)
Signed-off-by: dann frazier <[hidden email]>
---
 drivers/net/ethernet/cavium/thunder/nicvf_queues.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/net/ethernet/cavium/thunder/nicvf_queues.c b/drivers/net/ethernet/cavium/thunder/nicvf_queues.c
index d4496e9afcdf..8b2c31e2a2b0 100644
--- a/drivers/net/ethernet/cavium/thunder/nicvf_queues.c
+++ b/drivers/net/ethernet/cavium/thunder/nicvf_queues.c
@@ -1355,7 +1355,6 @@ nicvf_sq_add_hdr_subdesc(struct nicvf *nic, struct snd_queue *sq, int qentry,
 
  /* Offload checksum calculation to HW */
  if (skb->ip_summed == CHECKSUM_PARTIAL) {
- hdr->csum_l3 = 1; /* Enable IP csum calculation */
  hdr->l3_offset = skb_network_offset(skb);
  hdr->l4_offset = skb_transport_offset(skb);
 
--
2.15.1


--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team

--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team
Reply | Threaded
Open this post in threaded view
|

[RESEND][PATCH v2 2/2][SRU Artful] net: thunderx: Fix TCP/UDP checksum offload for IPv4 pkts

dann frazier-4
In reply to this post by dann frazier-4
From: Florian Westphal <[hidden email]>

BugLink: https://bugs.launchpad.net/bugs/1736593

Offload IP header checksum to NIC.

This fixes a previous patch which disabled checksum offloading
for both IPv4 and IPv6 packets.  So L3 checksum offload was
getting disabled for IPv4 pkts.  And HW is dropping these pkts
for some reason.

Without this patch, IPv4 TSO appears to be broken:

WIthout this patch I get ~16kbyte/s, with patch close to 2mbyte/s
when copying files via scp from test box to my home workstation.

Looking at tcpdump on sender it looks like hardware drops IPv4 TSO skbs.
This patch restores performance for me, ipv6 looks good too.

Fixes: fa6d7cb5d76c ("net: thunderx: Fix TCP/UDP checksum offload for IPv6 pkts")
Cc: Sunil Goutham <[hidden email]>
Cc: Aleksey Makarov <[hidden email]>
Cc: Eric Dumazet <[hidden email]>
Signed-off-by: Florian Westphal <[hidden email]>
Signed-off-by: David S. Miller <[hidden email]>
(cherry picked from commit 134059fd2775be79e26c2dff87d25cc2f6ea5626)
Signed-off-by: dann frazier <[hidden email]>
---
 drivers/net/ethernet/cavium/thunder/nicvf_queues.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/net/ethernet/cavium/thunder/nicvf_queues.c b/drivers/net/ethernet/cavium/thunder/nicvf_queues.c
index 8b2c31e2a2b0..a3d12dbde95b 100644
--- a/drivers/net/ethernet/cavium/thunder/nicvf_queues.c
+++ b/drivers/net/ethernet/cavium/thunder/nicvf_queues.c
@@ -1355,6 +1355,8 @@ nicvf_sq_add_hdr_subdesc(struct nicvf *nic, struct snd_queue *sq, int qentry,
 
  /* Offload checksum calculation to HW */
  if (skb->ip_summed == CHECKSUM_PARTIAL) {
+ if (ip.v4->version == 4)
+ hdr->csum_l3 = 1; /* Enable IP csum calculation */
  hdr->l3_offset = skb_network_offset(skb);
  hdr->l4_offset = skb_transport_offset(skb);
 
--
2.15.1


--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team

--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team
Reply | Threaded
Open this post in threaded view
|

ACK: [PATCH v2 0/2][SRU Artful] net: thunderx: Fix TCP/UDP checksum offload

Stefan Bader-2
In reply to this post by dann frazier-4
On 12.12.2017 21:16, dann frazier wrote:

> BugLink: https://bugs.launchpad.net/bugs/1736593
>
> v2: Adds a follow-on fix for IPv4.
>
> Florian Westphal (1):
>   net: thunderx: Fix TCP/UDP checksum offload for IPv4 pkts
>
> Sunil Goutham (1):
>   net: thunderx: Fix TCP/UDP checksum offload for IPv6 pkts
>
>  drivers/net/ethernet/cavium/thunder/nicvf_queues.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
Acked-by: Stefan Bader <[hidden email]>



--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team

signature.asc (836 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

ACK: [PATCH v2 0/2][Bionic][SRU Artful] net: thunderx: Fix TCP/UDP checksum offload

Khalid Elmously
In reply to this post by dann frazier-4


On 2017-12-12 13:16:54 , dann frazier wrote:

> BugLink: https://bugs.launchpad.net/bugs/1736593
>
> v2: Adds a follow-on fix for IPv4.
>
> Florian Westphal (1):
>   net: thunderx: Fix TCP/UDP checksum offload for IPv4 pkts
>
> Sunil Goutham (1):
>   net: thunderx: Fix TCP/UDP checksum offload for IPv6 pkts
>
>  drivers/net/ethernet/cavium/thunder/nicvf_queues.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
Acked-by: Khalid Elmously <[hidden email]>


--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team