Skip to content

Commit

Permalink
kernel: bump 5.15 to 5.15.115
Browse files Browse the repository at this point in the history
Manually rebased:
	backport-5.15/603-v5.19-page_pool-Add-recycle-stats-to-page_pool_put_page_bu.patch
	pending-5.15/723-net-mt7531-ensure-all-MACs-are-powered-down-before-r.patch*

Removed upstreamed:
	generic-backport/610-v6.3-net-page_pool-use-in_softirq-instead.patch[1]
	backport-5.15/705-12-v6.0-net-dsa-mt7530-rework-mt753-01-_setup.patch[2]
	backport-5.15/790-v6.4-0010-net-dsa-mt7530-split-off-common-parts-from-mt7531_se.patch[3]
	backport-5.15/703-10-v5.16-net-dsa-introduce-helpers-for-iterating-through-port.patch[4]

All other patches automatically rebased.

* Modified to define the variable i as suggested by DragonBluep in PR discussion.
  See: openwrt#12823 (comment)

1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.15.115&id=3af319d5147454dc63665ef451229c674b538377
2. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.15.115&id=0753c1ef24194580f7165ae6e259b59a851392f2
3. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.15.115&id=5a7266feaa6d708fc6880a161786eaa884ef3c8e
4. gregkh/linux@9902f91

Build system: x86_64
Build-tested: bcm2711/RPi4B, ramips/tplink_archer-a6-v3, filogic/xiaomi_redmi-router-ax6000-ubootmod
Run-tested: bcm2711/RPi4B, ramips/tplink_archer-a6-v3, filogic/xiaomi_redmi-router-ax6000-ubootmod

Signed-off-by: John Audia <therealgraysky@proton.me>
  • Loading branch information
graysky2 authored and Vladdrako committed Jun 27, 2023
1 parent 4cffabe commit 94fd4fb
Show file tree
Hide file tree
Showing 37 changed files with 141 additions and 474 deletions.
4 changes: 2 additions & 2 deletions include/kernel-5.15
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
LINUX_VERSION-5.15 = .114
LINUX_KERNEL_HASH-5.15.114 = e981ea5d219f77735bf5a3f7e84a8af578df8ac3e1c4ff1b0649e2b0795277d2
LINUX_VERSION-5.15 = .115
LINUX_KERNEL_HASH-5.15.115 = 1b076860779235e90519e867c1ec78c7a34d1125d8fdba787ff495c7c14f1214
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,9 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
help
--- a/net/core/page_pool.c
+++ b/net/core/page_pool.c
@@ -26,6 +26,13 @@

#define BIAS_MAX LONG_MAX
@@ -49,6 +49,13 @@ static void page_pool_producer_unlock(st
spin_unlock_bh(&pool->ring.producer_lock);
}

+#ifdef CONFIG_PAGE_POOL_STATS
+/* alloc_stat_inc is intended to be used in softirq context */
Expand All @@ -101,7 +101,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
static int page_pool_init(struct page_pool *pool,
const struct page_pool_params *params)
{
@@ -117,8 +124,10 @@ static struct page *page_pool_refill_all
@@ -140,8 +147,10 @@ static struct page *page_pool_refill_all
int pref_nid; /* preferred NUMA node */

/* Quicker fallback, avoid locks when ring is empty */
Expand All @@ -113,7 +113,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>

/* Softirq guarantee CPU and thus NUMA node is stable. This,
* assumes CPU refilling driver RX-ring will also run RX-NAPI.
@@ -148,14 +157,17 @@ static struct page *page_pool_refill_all
@@ -171,14 +180,17 @@ static struct page *page_pool_refill_all
* This limit stress on page buddy alloactor.
*/
page_pool_return_page(pool, page);
Expand All @@ -132,23 +132,23 @@ Signed-off-by: David S. Miller <davem@davemloft.net>

spin_unlock(&r->consumer_lock);
return page;
@@ -170,6 +182,7 @@ static struct page *__page_pool_get_cach
@@ -193,6 +205,7 @@ static struct page *__page_pool_get_cach
if (likely(pool->alloc.count)) {
/* Fast-path */
page = pool->alloc.cache[--pool->alloc.count];
+ alloc_stat_inc(pool, fast);
} else {
page = page_pool_refill_alloc_cache(pool);
}
@@ -241,6 +254,7 @@ static struct page *__page_pool_alloc_pa
@@ -264,6 +277,7 @@ static struct page *__page_pool_alloc_pa
return NULL;
}

+ alloc_stat_inc(pool, slow_high_order);
page_pool_set_pp_info(pool, page);

/* Track how many pages are held 'in-flight' */
@@ -295,10 +309,12 @@ static struct page *__page_pool_alloc_pa
@@ -318,10 +332,12 @@ static struct page *__page_pool_alloc_pa
}

/* Return last page */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
/* A page_pool is strictly tied to a single RX-queue being
--- a/net/core/page_pool.c
+++ b/net/core/page_pool.c
@@ -29,8 +29,15 @@
@@ -52,8 +52,15 @@ static void page_pool_producer_unlock(st
#ifdef CONFIG_PAGE_POOL_STATS
/* alloc_stat_inc is intended to be used in softirq context */
#define alloc_stat_inc(pool, __stat) (pool->alloc_stats.__stat++)
Expand All @@ -69,7 +69,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
#endif

static int page_pool_init(struct page_pool *pool,
@@ -80,6 +87,12 @@ static int page_pool_init(struct page_po
@@ -103,6 +110,12 @@ static int page_pool_init(struct page_po
pool->p.flags & PP_FLAG_PAGE_FRAG)
return -EINVAL;

Expand All @@ -82,7 +82,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
if (ptr_ring_init(&pool->ring, ring_qsize, GFP_KERNEL) < 0)
return -ENOMEM;

@@ -412,7 +425,12 @@ static bool page_pool_recycle_in_ring(st
@@ -435,7 +448,12 @@ static bool page_pool_recycle_in_ring(st
else
ret = ptr_ring_produce_bh(&pool->ring, page);

Expand All @@ -96,7 +96,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
}

/* Only allow direct recycling in special circumstances, into the
@@ -423,11 +441,14 @@ static bool page_pool_recycle_in_ring(st
@@ -446,11 +464,14 @@ static bool page_pool_recycle_in_ring(st
static bool page_pool_recycle_in_cache(struct page *page,
struct page_pool *pool)
{
Expand All @@ -112,23 +112,23 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
return true;
}

@@ -482,6 +503,7 @@ __page_pool_put_page(struct page_pool *p
@@ -505,6 +526,7 @@ __page_pool_put_page(struct page_pool *p
* doing refcnt based recycle tricks, meaning another process
* will be invoking put_page.
*/
+ recycle_stat_inc(pool, released_refcnt);
/* Do not replace this with page_pool_return_page() */
page_pool_release_page(pool, page);
put_page(page);
@@ -495,6 +517,7 @@ void page_pool_put_page(struct page_pool
@@ -518,6 +540,7 @@ void page_pool_put_page(struct page_pool
page = __page_pool_put_page(pool, page, dma_sync_size, allow_direct);
if (page && !page_pool_recycle_in_ring(pool, page)) {
/* Cache full, fallback to free pages */
+ recycle_stat_inc(pool, ring_full);
page_pool_return_page(pool, page);
}
}
@@ -641,6 +664,9 @@ static void page_pool_free(struct page_p
@@ -665,6 +688,9 @@ static void page_pool_free(struct page_p
if (pool->p.flags & PP_FLAG_DMA_MAP)
put_device(pool->p.dev);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
struct page_pool {
--- a/net/core/page_pool.c
+++ b/net/core/page_pool.c
@@ -35,6 +35,31 @@
@@ -58,6 +58,31 @@ static void page_pool_producer_unlock(st
struct page_pool_recycle_stats __percpu *s = pool->recycle_stats; \
this_cpu_inc(s->__stat); \
} while (0)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>

--- a/net/core/page_pool.c
+++ b/net/core/page_pool.c
@@ -36,6 +36,12 @@
@@ -59,6 +59,12 @@ static void page_pool_producer_unlock(st
this_cpu_inc(s->__stat); \
} while (0)

Expand All @@ -29,17 +29,17 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
bool page_pool_get_stats(struct page_pool *pool,
struct page_pool_stats *stats)
{
@@ -63,6 +69,7 @@ EXPORT_SYMBOL(page_pool_get_stats);
@@ -86,6 +92,7 @@ EXPORT_SYMBOL(page_pool_get_stats);
#else
#define alloc_stat_inc(pool, __stat)
#define recycle_stat_inc(pool, __stat)
+#define recycle_stat_add(pool, __stat, val)
#endif

static int page_pool_init(struct page_pool *pool,
@@ -569,9 +576,13 @@ void page_pool_put_page_bulk(struct page
@@ -593,9 +600,13 @@ void page_pool_put_page_bulk(struct page
/* Bulk producer into ptr_ring page_pool cache */
page_pool_ring_lock(pool);
in_softirq = page_pool_producer_lock(pool);
for (i = 0; i < bulk_len; i++) {
- if (__ptr_ring_produce(&pool->ring, data[i]))
- break; /* ring full */
Expand All @@ -50,6 +50,6 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
+ }
}
+ recycle_stat_add(pool, ring, i);
page_pool_ring_unlock(pool);
page_pool_producer_unlock(pool, in_softirq);

/* Hopefully all pages was return into ptr_ring */
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>

#include <trace/events/page_pool.h>

@@ -42,6 +43,20 @@
@@ -65,6 +66,20 @@ static void page_pool_producer_unlock(st
this_cpu_add(s->__stat, val); \
} while (0)

Expand All @@ -83,7 +83,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
bool page_pool_get_stats(struct page_pool *pool,
struct page_pool_stats *stats)
{
@@ -50,7 +65,13 @@ bool page_pool_get_stats(struct page_poo
@@ -73,7 +88,13 @@ bool page_pool_get_stats(struct page_poo
if (!stats)
return false;

Expand All @@ -98,7 +98,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>

for_each_possible_cpu(cpu) {
const struct page_pool_recycle_stats *pcpu =
@@ -66,6 +87,46 @@ bool page_pool_get_stats(struct page_poo
@@ -89,6 +110,46 @@ bool page_pool_get_stats(struct page_poo
return true;
}
EXPORT_SYMBOL(page_pool_get_stats);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ Signed-off-by: Alexei Starovoitov <ast@kernel.org>
int xdp_rxq_info_reg(struct xdp_rxq_info *xdp_rxq,
--- a/net/core/xdp.c
+++ b/net/core/xdp.c
@@ -376,12 +376,38 @@ static void __xdp_return(void *data, str
@@ -409,12 +409,38 @@ static void __xdp_return(void *data, str

void xdp_return_frame(struct xdp_frame *xdpf)
{
Expand Down Expand Up @@ -87,7 +87,7 @@ Signed-off-by: Alexei Starovoitov <ast@kernel.org>
__xdp_return(xdpf->data, &xdpf->mem, true, NULL);
}
EXPORT_SYMBOL_GPL(xdp_return_frame_rx_napi);
@@ -417,7 +443,7 @@ void xdp_return_frame_bulk(struct xdp_fr
@@ -450,7 +476,7 @@ void xdp_return_frame_bulk(struct xdp_fr
struct xdp_mem_allocator *xa;

if (mem->type != MEM_TYPE_PAGE_POOL) {
Expand All @@ -96,7 +96,7 @@ Signed-off-by: Alexei Starovoitov <ast@kernel.org>
return;
}

@@ -436,12 +462,38 @@ void xdp_return_frame_bulk(struct xdp_fr
@@ -469,12 +495,38 @@ void xdp_return_frame_bulk(struct xdp_fr
bq->xa = rhashtable_lookup(mem_id_ht, &mem->id, mem_id_rht_params);
}

Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
/*
* Configuration data for this switch.
*/
@@ -584,6 +589,13 @@ struct dsa_switch_ops {
@@ -612,6 +617,13 @@ struct dsa_switch_ops {
enum dsa_tag_protocol mprot);
int (*change_tag_protocol)(struct dsa_switch *ds, int port,
enum dsa_tag_protocol proto);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>

--- a/include/net/dsa.h
+++ b/include/net/dsa.h
@@ -626,6 +626,8 @@ struct dsa_switch_ops {
@@ -654,6 +654,8 @@ struct dsa_switch_ops {
/*
* PHYLINK integration
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>

--- a/include/net/dsa.h
+++ b/include/net/dsa.h
@@ -626,8 +626,8 @@ struct dsa_switch_ops {
@@ -654,8 +654,8 @@ struct dsa_switch_ops {
/*
* PHYLINK integration
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>

--- a/include/net/dsa.h
+++ b/include/net/dsa.h
@@ -631,6 +631,9 @@ struct dsa_switch_ops {
@@ -659,6 +659,9 @@ struct dsa_switch_ops {
void (*phylink_validate)(struct dsa_switch *ds, int port,
unsigned long *supported,
struct phylink_link_state *state);
Expand Down

This file was deleted.

0 comments on commit 94fd4fb

Please sign in to comment.