mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-24 07:46:48 +00:00
ac422c9788
Changelog: https://cdn.kernel.org/pub/linux/kernel/v5.x/ChangeLog-5.15.132 Removed upstreamed: bcm53xx/patches-5.15/037-v6.6-0006-ARM-dts-BCM53573-Add-cells-sizes-to-PCIe-node.patch[1] bcm53xx/patches-5.15/037-v6.6-0007-ARM-dts-BCM53573-Use-updated-spi-gpio-binding-proper.patch[2] bcm53xx/patches-5.15/037-v6.6-0008-ARM-dts-BCM5301X-Extend-RAM-to-full-256MB-for-Linksy.patch[3] All other patches automatically rebased. 1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.15.132&id=b35f3ca1877e024887df205ede952863d65dad36 2. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.15.132&id=2840d9b9c8750be270fb1153ccd5b983cbb5d592 3. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.15.132&id=f086e859ddc252c32f0438edff241859c0f022ce Build system: x86_64 Build-tested: ramips/tplink_archer-a6-v3 Run-tested: ramips/tplink_archer-a6-v3 Signed-off-by: John Audia <therealgraysky@proton.me>
41 lines
1.4 KiB
Diff
41 lines
1.4 KiB
Diff
From 7cda76d858a4e71ac4a04066c093679a12e1312c Mon Sep 17 00:00:00 2001
|
|
From: Lorenzo Bianconi <lorenzo@kernel.org>
|
|
Date: Fri, 11 Mar 2022 10:14:20 +0100
|
|
Subject: [PATCH] veth: Allow jumbo frames in xdp mode
|
|
MIME-Version: 1.0
|
|
Content-Type: text/plain; charset=UTF-8
|
|
Content-Transfer-Encoding: 8bit
|
|
|
|
Allow increasing the MTU over page boundaries on veth devices
|
|
if the attached xdp program declares to support xdp fragments.
|
|
|
|
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
|
|
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
|
|
Acked-by: Toke Høiland-Jørgensen <toke@redhat.com>
|
|
Acked-by: John Fastabend <john.fastabend@gmail.com>
|
|
Link: https://lore.kernel.org/bpf/d5dc039c3d4123426e7023a488c449181a7bc57f.1646989407.git.lorenzo@kernel.org
|
|
---
|
|
drivers/net/veth.c | 11 ++++++++---
|
|
1 file changed, 8 insertions(+), 3 deletions(-)
|
|
|
|
--- a/drivers/net/veth.c
|
|
+++ b/drivers/net/veth.c
|
|
@@ -1473,9 +1473,14 @@ static int veth_xdp_set(struct net_devic
|
|
goto err;
|
|
}
|
|
|
|
- max_mtu = PAGE_SIZE - VETH_XDP_HEADROOM -
|
|
- peer->hard_header_len -
|
|
- SKB_DATA_ALIGN(sizeof(struct skb_shared_info));
|
|
+ max_mtu = SKB_WITH_OVERHEAD(PAGE_SIZE - VETH_XDP_HEADROOM) -
|
|
+ peer->hard_header_len;
|
|
+ /* Allow increasing the max_mtu if the program supports
|
|
+ * XDP fragments.
|
|
+ */
|
|
+ //if (prog->aux->xdp_has_frags)
|
|
+ max_mtu += PAGE_SIZE * MAX_SKB_FRAGS;
|
|
+
|
|
if (peer->mtu > max_mtu) {
|
|
NL_SET_ERR_MSG_MOD(extack, "Peer MTU is too large to set XDP");
|
|
err = -ERANGE;
|