]> git.proxmox.com Git - pve-kernel.git/commitdiff
revert two stable patches that have reports about regressions
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Sat, 7 Jan 2023 12:52:34 +0000 (13:52 +0100)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Sat, 7 Jan 2023 12:52:36 +0000 (13:52 +0100)
we never released them yet (only introduced after 6.1.0), but there
are upstream reports about regressions for them at:
https://lore.kernel.org/netdev/CAK8fFZ5pzMaw3U1KXgC_OK4shKGsN=HDcR62cfPOuL0umXE1Ww@mail.gmail.com/
https://lore.kernel.org/netdev/CAK8fFZ6A_Gphw_3-QMGKEFQk=sfCw1Qmq0TVZK3rtAi7vb621A@mail.gmail.com/

So do a preventive revert.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
patches/kernel/0016-Revert-RDMA-irdma-Report-the-correct-link-speed.patch [new file with mode: 0644]
patches/kernel/0017-Revert-gro-add-support-of-hw-gro-packets-to-gro-stac.patch [new file with mode: 0644]

diff --git a/patches/kernel/0016-Revert-RDMA-irdma-Report-the-correct-link-speed.patch b/patches/kernel/0016-Revert-RDMA-irdma-Report-the-correct-link-speed.patch
new file mode 100644 (file)
index 0000000..accfb6c
--- /dev/null
@@ -0,0 +1,68 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: Thomas Lamprecht <t.lamprecht@proxmox.com>
+Date: Sat, 7 Jan 2023 13:48:41 +0100
+Subject: [PATCH] Revert "RDMA/irdma: Report the correct link speed"
+
+seem to cause a regression with some NICs:
+https://lore.kernel.org/netdev/CAK8fFZ6A_Gphw_3-QMGKEFQk=sfCw1Qmq0TVZK3rtAi7vb621A@mail.gmail.com/
+
+This reverts commit e8553504e366c8a47d1f6156c30d6eb9778cda13.
+
+Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
+---
+ drivers/infiniband/hw/irdma/verbs.c | 35 ++++++++++++++++++++++++++---
+ 1 file changed, 32 insertions(+), 3 deletions(-)
+
+diff --git a/drivers/infiniband/hw/irdma/verbs.c b/drivers/infiniband/hw/irdma/verbs.c
+index f6973ea55eda..132fe91bb799 100644
+--- a/drivers/infiniband/hw/irdma/verbs.c
++++ b/drivers/infiniband/hw/irdma/verbs.c
+@@ -63,6 +63,36 @@ static int irdma_query_device(struct ib_device *ibdev,
+       return 0;
+ }
++/**
++ * irdma_get_eth_speed_and_width - Get IB port speed and width from netdev speed
++ * @link_speed: netdev phy link speed
++ * @active_speed: IB port speed
++ * @active_width: IB port width
++ */
++static void irdma_get_eth_speed_and_width(u32 link_speed, u16 *active_speed,
++                                        u8 *active_width)
++{
++      if (link_speed <= SPEED_1000) {
++              *active_width = IB_WIDTH_1X;
++              *active_speed = IB_SPEED_SDR;
++      } else if (link_speed <= SPEED_10000) {
++              *active_width = IB_WIDTH_1X;
++              *active_speed = IB_SPEED_FDR10;
++      } else if (link_speed <= SPEED_20000) {
++              *active_width = IB_WIDTH_4X;
++              *active_speed = IB_SPEED_DDR;
++      } else if (link_speed <= SPEED_25000) {
++              *active_width = IB_WIDTH_1X;
++              *active_speed = IB_SPEED_EDR;
++      } else if (link_speed <= SPEED_40000) {
++              *active_width = IB_WIDTH_4X;
++              *active_speed = IB_SPEED_FDR10;
++      } else {
++              *active_width = IB_WIDTH_4X;
++              *active_speed = IB_SPEED_EDR;
++      }
++}
++
+ /**
+  * irdma_query_port - get port attributes
+  * @ibdev: device pointer from stack
+@@ -90,9 +120,8 @@ static int irdma_query_port(struct ib_device *ibdev, u32 port,
+               props->state = IB_PORT_DOWN;
+               props->phys_state = IB_PORT_PHYS_STATE_DISABLED;
+       }
+-
+-      ib_get_eth_speed(ibdev, port, &props->active_speed,
+-                       &props->active_width);
++      irdma_get_eth_speed_and_width(SPEED_100000, &props->active_speed,
++                                    &props->active_width);
+       if (rdma_protocol_roce(ibdev, 1)) {
+               props->gid_tbl_len = 32;
diff --git a/patches/kernel/0017-Revert-gro-add-support-of-hw-gro-packets-to-gro-stac.patch b/patches/kernel/0017-Revert-gro-add-support-of-hw-gro-packets-to-gro-stac.patch
new file mode 100644 (file)
index 0000000..da34516
--- /dev/null
@@ -0,0 +1,118 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: Thomas Lamprecht <t.lamprecht@proxmox.com>
+Date: Sat, 7 Jan 2023 13:50:22 +0100
+Subject: [PATCH] Revert "gro: add support of (hw)gro packets to gro stack"
+
+Seems to be the cause of a regression in network performance:
+https://lore.kernel.org/netdev/CAK8fFZ5pzMaw3U1KXgC_OK4shKGsN=HDcR62cfPOuL0umXE1Ww@mail.gmail.com/
+
+This reverts commit 5eddb24901ee49eee23c0bfce6af2e83fd5679bd.
+
+Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
+---
+ net/core/gro.c         | 18 ++++--------------
+ net/ipv4/tcp_offload.c | 17 ++---------------
+ 2 files changed, 6 insertions(+), 29 deletions(-)
+
+diff --git a/net/core/gro.c b/net/core/gro.c
+index bc9451743307..b4190eb08467 100644
+--- a/net/core/gro.c
++++ b/net/core/gro.c
+@@ -160,7 +160,6 @@ int skb_gro_receive(struct sk_buff *p, struct sk_buff *skb)
+       unsigned int gro_max_size;
+       unsigned int new_truesize;
+       struct sk_buff *lp;
+-      int segs;
+       /* pairs with WRITE_ONCE() in netif_set_gro_max_size() */
+       gro_max_size = READ_ONCE(p->dev->gro_max_size);
+@@ -176,7 +175,6 @@ int skb_gro_receive(struct sk_buff *p, struct sk_buff *skb)
+                       return -E2BIG;
+       }
+-      segs = NAPI_GRO_CB(skb)->count;
+       lp = NAPI_GRO_CB(p)->last;
+       pinfo = skb_shinfo(lp);
+@@ -267,7 +265,7 @@ int skb_gro_receive(struct sk_buff *p, struct sk_buff *skb)
+       lp = p;
+ done:
+-      NAPI_GRO_CB(p)->count += segs;
++      NAPI_GRO_CB(p)->count++;
+       p->data_len += len;
+       p->truesize += delta_truesize;
+       p->len += len;
+@@ -498,15 +496,8 @@ static enum gro_result dev_gro_receive(struct napi_struct *napi, struct sk_buff
+               BUILD_BUG_ON(!IS_ALIGNED(offsetof(struct napi_gro_cb, zeroed),
+                                        sizeof(u32))); /* Avoid slow unaligned acc */
+               *(u32 *)&NAPI_GRO_CB(skb)->zeroed = 0;
+-              NAPI_GRO_CB(skb)->flush = skb_has_frag_list(skb);
++              NAPI_GRO_CB(skb)->flush = skb_is_gso(skb) || skb_has_frag_list(skb);
+               NAPI_GRO_CB(skb)->is_atomic = 1;
+-              NAPI_GRO_CB(skb)->count = 1;
+-              if (unlikely(skb_is_gso(skb))) {
+-                      NAPI_GRO_CB(skb)->count = skb_shinfo(skb)->gso_segs;
+-                      /* Only support TCP at the moment. */
+-                      if (!skb_is_gso_tcp(skb))
+-                              NAPI_GRO_CB(skb)->flush = 1;
+-              }
+               /* Setup for GRO checksum validation */
+               switch (skb->ip_summed) {
+@@ -554,10 +545,10 @@ static enum gro_result dev_gro_receive(struct napi_struct *napi, struct sk_buff
+       else
+               gro_list->count++;
++      NAPI_GRO_CB(skb)->count = 1;
+       NAPI_GRO_CB(skb)->age = jiffies;
+       NAPI_GRO_CB(skb)->last = skb;
+-      if (!skb_is_gso(skb))
+-              skb_shinfo(skb)->gso_size = skb_gro_len(skb);
++      skb_shinfo(skb)->gso_size = skb_gro_len(skb);
+       list_add(&skb->list, &gro_list->list);
+       ret = GRO_HELD;
+@@ -669,7 +660,6 @@ static void napi_reuse_skb(struct napi_struct *napi, struct sk_buff *skb)
+       skb->encapsulation = 0;
+       skb_shinfo(skb)->gso_type = 0;
+-      skb_shinfo(skb)->gso_size = 0;
+       if (unlikely(skb->slow_gro)) {
+               skb_orphan(skb);
+               skb_ext_reset(skb);
+diff --git a/net/ipv4/tcp_offload.c b/net/ipv4/tcp_offload.c
+index 45dda7889387..a844a0d38482 100644
+--- a/net/ipv4/tcp_offload.c
++++ b/net/ipv4/tcp_offload.c
+@@ -255,15 +255,7 @@ struct sk_buff *tcp_gro_receive(struct list_head *head, struct sk_buff *skb)
+       mss = skb_shinfo(p)->gso_size;
+-      /* If skb is a GRO packet, make sure its gso_size matches prior packet mss.
+-       * If it is a single frame, do not aggregate it if its length
+-       * is bigger than our mss.
+-       */
+-      if (unlikely(skb_is_gso(skb)))
+-              flush |= (mss != skb_shinfo(skb)->gso_size);
+-      else
+-              flush |= (len - 1) >= mss;
+-
++      flush |= (len - 1) >= mss;
+       flush |= (ntohl(th2->seq) + skb_gro_len(p)) ^ ntohl(th->seq);
+ #ifdef CONFIG_TLS_DEVICE
+       flush |= p->decrypted ^ skb->decrypted;
+@@ -277,12 +269,7 @@ struct sk_buff *tcp_gro_receive(struct list_head *head, struct sk_buff *skb)
+       tcp_flag_word(th2) |= flags & (TCP_FLAG_FIN | TCP_FLAG_PSH);
+ out_check_final:
+-      /* Force a flush if last segment is smaller than mss. */
+-      if (unlikely(skb_is_gso(skb)))
+-              flush = len != NAPI_GRO_CB(skb)->count * skb_shinfo(skb)->gso_size;
+-      else
+-              flush = len < mss;
+-
++      flush = len < mss;
+       flush |= (__force int)(flags & (TCP_FLAG_URG | TCP_FLAG_PSH |
+                                       TCP_FLAG_RST | TCP_FLAG_SYN |
+                                       TCP_FLAG_FIN));