aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/mvebu/patches-5.4
diff options
context:
space:
mode:
Diffstat (limited to 'target/linux/mvebu/patches-5.4')
-rw-r--r--target/linux/mvebu/patches-5.4/010-net-mvneta-introduce-mvneta_update_stats-routine.patch10
-rw-r--r--target/linux/mvebu/patches-5.4/011-net-mvneta-introduce-page-pool-API-for-sw-buffer-man.patch12
-rw-r--r--target/linux/mvebu/patches-5.4/012-net-mvneta-rely-on-build_skb-in-mvneta_rx_swbm-poll-.patch16
-rw-r--r--target/linux/mvebu/patches-5.4/013-net-mvneta-add-basic-XDP-support.patch30
-rw-r--r--target/linux/mvebu/patches-5.4/014-net-mvneta-move-header-prefetch-in-mvneta_swbm_rx_fr.patch4
-rw-r--r--target/linux/mvebu/patches-5.4/015-net-mvneta-make-tx-buffer-array-agnostic.patch30
-rw-r--r--target/linux/mvebu/patches-5.4/016-net-mvneta-add-XDP_TX-support.patch8
-rw-r--r--target/linux/mvebu/patches-5.4/020-net-mvneta-fix-build-skb-for-bm-capable-devices.patch4
-rw-r--r--target/linux/mvebu/patches-5.4/021-net-mvneta-rely-on-page_pool_recycle_direct-in-mvnet.patch4
-rw-r--r--target/linux/mvebu/patches-5.4/022-mvneta-driver-disallow-XDP-program-on-hardware-buffe.patch2
-rw-r--r--target/linux/mvebu/patches-5.4/023-net-mvneta-fix-XDP-support-if-sw-bm-is-used-as-fallb.patch10
-rw-r--r--target/linux/mvebu/patches-5.4/300-mvneta-tx-queue-workaround.patch4
12 files changed, 67 insertions, 67 deletions
diff --git a/target/linux/mvebu/patches-5.4/010-net-mvneta-introduce-mvneta_update_stats-routine.patch b/target/linux/mvebu/patches-5.4/010-net-mvneta-introduce-mvneta_update_stats-routine.patch
index c6d6d55b29..2c8ed30e4a 100644
--- a/target/linux/mvebu/patches-5.4/010-net-mvneta-introduce-mvneta_update_stats-routine.patch
+++ b/target/linux/mvebu/patches-5.4/010-net-mvneta-introduce-mvneta_update_stats-routine.patch
@@ -15,7 +15,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
--- a/drivers/net/ethernet/marvell/mvneta.c
+++ b/drivers/net/ethernet/marvell/mvneta.c
-@@ -1911,6 +1911,23 @@ static void mvneta_rxq_drop_pkts(struct
+@@ -1913,6 +1913,23 @@ static void mvneta_rxq_drop_pkts(struct
}
}
@@ -39,7 +39,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
static inline
int mvneta_rx_refill_queue(struct mvneta_port *pp, struct mvneta_rx_queue *rxq)
{
-@@ -2091,14 +2108,8 @@ static int mvneta_rx_swbm(struct napi_st
+@@ -2093,14 +2110,8 @@ static int mvneta_rx_swbm(struct napi_st
rxq->left_size = 0;
}
@@ -56,7 +56,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
/* return some buffers to hardware queue, one at a time is too slow */
refill = mvneta_rx_refill_queue(pp, rxq);
-@@ -2221,14 +2232,8 @@ err_drop_frame:
+@@ -2223,14 +2234,8 @@ err_drop_frame:
napi_gro_receive(napi, skb);
}
@@ -73,7 +73,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
/* Update rxq management counters */
mvneta_rxq_desc_num_update(pp, rxq, rx_done, rx_done);
-@@ -2474,7 +2479,6 @@ static netdev_tx_t mvneta_tx(struct sk_b
+@@ -2476,7 +2481,6 @@ static netdev_tx_t mvneta_tx(struct sk_b
out:
if (frags > 0) {
@@ -81,7 +81,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
struct netdev_queue *nq = netdev_get_tx_queue(dev, txq_id);
netdev_tx_sent_queue(nq, len);
-@@ -2489,10 +2493,7 @@ out:
+@@ -2491,10 +2495,7 @@ out:
else
txq->pending += frags;
diff --git a/target/linux/mvebu/patches-5.4/011-net-mvneta-introduce-page-pool-API-for-sw-buffer-man.patch b/target/linux/mvebu/patches-5.4/011-net-mvneta-introduce-page-pool-API-for-sw-buffer-man.patch
index 24c446f578..dbed6df873 100644
--- a/target/linux/mvebu/patches-5.4/011-net-mvneta-introduce-page-pool-API-for-sw-buffer-man.patch
+++ b/target/linux/mvebu/patches-5.4/011-net-mvneta-introduce-page-pool-API-for-sw-buffer-man.patch
@@ -43,7 +43,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
/* Registers */
#define MVNETA_RXQ_CONFIG_REG(q) (0x1400 + ((q) << 2))
-@@ -605,6 +606,10 @@ struct mvneta_rx_queue {
+@@ -607,6 +608,10 @@ struct mvneta_rx_queue {
u32 pkts_coal;
u32 time_coal;
@@ -54,7 +54,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
/* Virtual address of the RX buffer */
void **buf_virt_addr;
-@@ -1823,23 +1828,21 @@ static int mvneta_rx_refill(struct mvnet
+@@ -1825,23 +1830,21 @@ static int mvneta_rx_refill(struct mvnet
struct mvneta_rx_queue *rxq,
gfp_t gfp_mask)
{
@@ -86,7 +86,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
return 0;
}
-@@ -1905,10 +1908,12 @@ static void mvneta_rxq_drop_pkts(struct
+@@ -1907,10 +1910,12 @@ static void mvneta_rxq_drop_pkts(struct
if (!data || !(rx_desc->buf_phys_addr))
continue;
@@ -102,7 +102,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
}
static void
-@@ -2045,8 +2050,7 @@ static int mvneta_rx_swbm(struct napi_st
+@@ -2047,8 +2052,7 @@ static int mvneta_rx_swbm(struct napi_st
skb_add_rx_frag(rxq->skb, frag_num, page,
frag_offset, frag_size,
PAGE_SIZE);
@@ -112,7 +112,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
rxq->left_size -= frag_size;
}
} else {
-@@ -2076,9 +2080,7 @@ static int mvneta_rx_swbm(struct napi_st
+@@ -2078,9 +2082,7 @@ static int mvneta_rx_swbm(struct napi_st
frag_offset, frag_size,
PAGE_SIZE);
@@ -123,7 +123,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
rxq->left_size -= frag_size;
}
} /* Middle or Last descriptor */
-@@ -2845,11 +2847,54 @@ static int mvneta_poll(struct napi_struc
+@@ -2847,11 +2849,54 @@ static int mvneta_poll(struct napi_struc
return rx_done;
}
diff --git a/target/linux/mvebu/patches-5.4/012-net-mvneta-rely-on-build_skb-in-mvneta_rx_swbm-poll-.patch b/target/linux/mvebu/patches-5.4/012-net-mvneta-rely-on-build_skb-in-mvneta_rx_swbm-poll-.patch
index 1a89c8476d..13ed9e4c8a 100644
--- a/target/linux/mvebu/patches-5.4/012-net-mvneta-rely-on-build_skb-in-mvneta_rx_swbm-poll-.patch
+++ b/target/linux/mvebu/patches-5.4/012-net-mvneta-rely-on-build_skb-in-mvneta_rx_swbm-poll-.patch
@@ -27,7 +27,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
--- a/drivers/net/ethernet/marvell/mvneta.c
+++ b/drivers/net/ethernet/marvell/mvneta.c
-@@ -323,6 +323,11 @@
+@@ -325,6 +325,11 @@
ETH_HLEN + ETH_FCS_LEN, \
cache_line_size())
@@ -39,7 +39,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
#define IS_TSO_HEADER(txq, addr) \
((addr >= txq->tso_hdrs_phys) && \
(addr < txq->tso_hdrs_phys + txq->size * TSO_HEADER_SIZE))
-@@ -648,7 +653,6 @@ static int txq_number = 8;
+@@ -650,7 +655,6 @@ static int txq_number = 8;
static int rxq_def;
static int rx_copybreak __read_mostly = 256;
@@ -47,7 +47,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
/* HW BM need that each port be identify by a unique ID */
static int global_port_id;
-@@ -1840,7 +1844,7 @@ static int mvneta_rx_refill(struct mvnet
+@@ -1842,7 +1846,7 @@ static int mvneta_rx_refill(struct mvnet
phys_addr = page_pool_get_dma_addr(page) + pp->rx_offset_correction;
dma_dir = page_pool_get_dma_dir(rxq->page_pool);
dma_sync_single_for_device(pp->dev->dev.parent, phys_addr,
@@ -56,7 +56,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
mvneta_rx_desc_fill(rx_desc, phys_addr, page, rxq);
return 0;
-@@ -1958,30 +1962,102 @@ int mvneta_rx_refill_queue(struct mvneta
+@@ -1960,30 +1964,102 @@ int mvneta_rx_refill_queue(struct mvneta
return i;
}
@@ -169,7 +169,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
index = rx_desc - rxq->descs;
page = (struct page *)rxq->buf_virt_addr[index];
-@@ -1989,100 +2065,30 @@ static int mvneta_rx_swbm(struct napi_st
+@@ -1991,100 +2067,30 @@ static int mvneta_rx_swbm(struct napi_st
/* Prefetch header */
prefetch(data);
@@ -275,7 +275,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
} /* Middle or Last descriptor */
if (!(rx_status & MVNETA_RXD_LAST_DESC))
-@@ -2107,7 +2113,6 @@ static int mvneta_rx_swbm(struct napi_st
+@@ -2109,7 +2115,6 @@ static int mvneta_rx_swbm(struct napi_st
/* clean uncomplete skb pointer in queue */
rxq->skb = NULL;
@@ -283,7 +283,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
}
if (rcvd_pkts)
-@@ -2968,7 +2973,7 @@ static void mvneta_rxq_hw_init(struct mv
+@@ -2970,7 +2975,7 @@ static void mvneta_rxq_hw_init(struct mv
/* Set Offset */
mvneta_rxq_offset_set(pp, rxq, 0);
mvneta_rxq_buf_size_set(pp, rxq, PAGE_SIZE < SZ_64K ?
@@ -292,7 +292,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
MVNETA_RX_BUF_SIZE(pp->pkt_size));
mvneta_rxq_bm_disable(pp, rxq);
mvneta_rxq_fill(pp, rxq, rxq->size);
-@@ -4678,7 +4683,7 @@ static int mvneta_probe(struct platform_
+@@ -4700,7 +4705,7 @@ static int mvneta_probe(struct platform_
SET_NETDEV_DEV(dev, &pdev->dev);
pp->id = global_port_id++;
diff --git a/target/linux/mvebu/patches-5.4/013-net-mvneta-add-basic-XDP-support.patch b/target/linux/mvebu/patches-5.4/013-net-mvneta-add-basic-XDP-support.patch
index e45eba3832..06968bdaef 100644
--- a/target/linux/mvebu/patches-5.4/013-net-mvneta-add-basic-XDP-support.patch
+++ b/target/linux/mvebu/patches-5.4/013-net-mvneta-add-basic-XDP-support.patch
@@ -42,7 +42,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
/* Registers */
#define MVNETA_RXQ_CONFIG_REG(q) (0x1400 + ((q) << 2))
-@@ -323,8 +324,10 @@
+@@ -325,8 +326,10 @@
ETH_HLEN + ETH_FCS_LEN, \
cache_line_size())
@@ -54,7 +54,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
#define MVNETA_SKB_SIZE(len) (SKB_DATA_ALIGN(len) + MVNETA_SKB_PAD)
#define MVNETA_MAX_RX_BUF_SIZE (PAGE_SIZE - MVNETA_SKB_PAD)
-@@ -352,6 +355,11 @@ struct mvneta_statistic {
+@@ -354,6 +357,11 @@ struct mvneta_statistic {
#define T_REG_64 64
#define T_SW 1
@@ -66,7 +66,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
static const struct mvneta_statistic mvneta_statistics[] = {
{ 0x3000, T_REG_64, "good_octets_received", },
{ 0x3010, T_REG_32, "good_frames_received", },
-@@ -433,6 +441,8 @@ struct mvneta_port {
+@@ -435,6 +443,8 @@ struct mvneta_port {
u32 cause_rx_tx;
struct napi_struct napi;
@@ -75,7 +75,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
/* Core clock */
struct clk *clk;
/* AXI clock */
-@@ -1963,10 +1973,50 @@ int mvneta_rx_refill_queue(struct mvneta
+@@ -1965,10 +1975,50 @@ int mvneta_rx_refill_queue(struct mvneta
}
static int
@@ -127,7 +127,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
{
unsigned char *data = page_address(page);
int data_len = -MVNETA_MH_SIZE, len;
-@@ -1986,7 +2036,26 @@ mvneta_swbm_rx_frame(struct mvneta_port
+@@ -1988,7 +2038,26 @@ mvneta_swbm_rx_frame(struct mvneta_port
rx_desc->buf_phys_addr,
len, dma_dir);
@@ -155,7 +155,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
if (unlikely(!rxq->skb)) {
netdev_err(dev,
"Can't allocate skb on queue %d\n",
-@@ -1997,8 +2066,9 @@ mvneta_swbm_rx_frame(struct mvneta_port
+@@ -1999,8 +2068,9 @@ mvneta_swbm_rx_frame(struct mvneta_port
}
page_pool_release_page(rxq->page_pool, page);
@@ -167,7 +167,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
mvneta_rx_csum(pp, rx_desc->status, rxq->skb);
rxq->left_size = rx_desc->data_size - len;
-@@ -2032,7 +2102,7 @@ mvneta_swbm_add_rx_fragment(struct mvnet
+@@ -2034,7 +2104,7 @@ mvneta_swbm_add_rx_fragment(struct mvnet
/* refill descriptor with new buffer later */
skb_add_rx_frag(rxq->skb,
skb_shinfo(rxq->skb)->nr_frags,
@@ -176,7 +176,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
PAGE_SIZE);
}
page_pool_release_page(rxq->page_pool, page);
-@@ -2047,11 +2117,18 @@ static int mvneta_rx_swbm(struct napi_st
+@@ -2049,11 +2119,18 @@ static int mvneta_rx_swbm(struct napi_st
{
int rcvd_pkts = 0, rcvd_bytes = 0, rx_proc = 0;
struct net_device *dev = pp->dev;
@@ -195,7 +195,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
/* Fairness NAPI loop */
while (rx_proc < budget && rx_proc < rx_todo) {
struct mvneta_rx_desc *rx_desc = mvneta_rxq_next_desc_get(rxq);
-@@ -2079,7 +2156,8 @@ static int mvneta_rx_swbm(struct napi_st
+@@ -2081,7 +2158,8 @@ static int mvneta_rx_swbm(struct napi_st
continue;
}
@@ -205,7 +205,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
if (err)
continue;
} else {
-@@ -2114,6 +2192,10 @@ static int mvneta_rx_swbm(struct napi_st
+@@ -2116,6 +2194,10 @@ static int mvneta_rx_swbm(struct napi_st
/* clean uncomplete skb pointer in queue */
rxq->skb = NULL;
}
@@ -216,7 +216,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
if (rcvd_pkts)
mvneta_update_stats(pp, rcvd_pkts, rcvd_bytes, false);
-@@ -2855,13 +2937,14 @@ static int mvneta_poll(struct napi_struc
+@@ -2857,13 +2939,14 @@ static int mvneta_poll(struct napi_struc
static int mvneta_create_page_pool(struct mvneta_port *pp,
struct mvneta_rx_queue *rxq, int size)
{
@@ -232,7 +232,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
};
int err;
-@@ -3328,6 +3411,11 @@ static int mvneta_change_mtu(struct net_
+@@ -3364,6 +3447,11 @@ static int mvneta_change_mtu(struct net_
mtu = ALIGN(MVNETA_RX_PKT_SIZE(mtu), 8);
}
@@ -244,7 +244,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
dev->mtu = mtu;
if (!netif_running(dev)) {
-@@ -3997,6 +4085,47 @@ static int mvneta_ioctl(struct net_devic
+@@ -4029,6 +4117,47 @@ static int mvneta_ioctl(struct net_devic
return phylink_mii_ioctl(pp->phylink, ifr, cmd);
}
@@ -292,7 +292,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
/* Ethtool methods */
/* Set link ksettings (phy address, speed) for ethtools */
-@@ -4393,6 +4522,7 @@ static const struct net_device_ops mvnet
+@@ -4425,6 +4554,7 @@ static const struct net_device_ops mvnet
.ndo_fix_features = mvneta_fix_features,
.ndo_get_stats64 = mvneta_get_stats64,
.ndo_do_ioctl = mvneta_ioctl,
@@ -300,7 +300,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
};
static const struct ethtool_ops mvneta_eth_tool_ops = {
-@@ -4683,7 +4813,7 @@ static int mvneta_probe(struct platform_
+@@ -4705,7 +4835,7 @@ static int mvneta_probe(struct platform_
SET_NETDEV_DEV(dev, &pdev->dev);
pp->id = global_port_id++;
diff --git a/target/linux/mvebu/patches-5.4/014-net-mvneta-move-header-prefetch-in-mvneta_swbm_rx_fr.patch b/target/linux/mvebu/patches-5.4/014-net-mvneta-move-header-prefetch-in-mvneta_swbm_rx_fr.patch
index f9d2702dbb..ecda482875 100644
--- a/target/linux/mvebu/patches-5.4/014-net-mvneta-move-header-prefetch-in-mvneta_swbm_rx_fr.patch
+++ b/target/linux/mvebu/patches-5.4/014-net-mvneta-move-header-prefetch-in-mvneta_swbm_rx_fr.patch
@@ -16,7 +16,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
--- a/drivers/net/ethernet/marvell/mvneta.c
+++ b/drivers/net/ethernet/marvell/mvneta.c
-@@ -2036,6 +2036,9 @@ mvneta_swbm_rx_frame(struct mvneta_port
+@@ -2038,6 +2038,9 @@ mvneta_swbm_rx_frame(struct mvneta_port
rx_desc->buf_phys_addr,
len, dma_dir);
@@ -26,7 +26,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
xdp->data_hard_start = data;
xdp->data = data + MVNETA_SKB_HEADROOM + MVNETA_MH_SIZE;
xdp->data_end = xdp->data + data_len;
-@@ -2133,14 +2136,10 @@ static int mvneta_rx_swbm(struct napi_st
+@@ -2135,14 +2138,10 @@ static int mvneta_rx_swbm(struct napi_st
while (rx_proc < budget && rx_proc < rx_todo) {
struct mvneta_rx_desc *rx_desc = mvneta_rxq_next_desc_get(rxq);
u32 rx_status, index;
diff --git a/target/linux/mvebu/patches-5.4/015-net-mvneta-make-tx-buffer-array-agnostic.patch b/target/linux/mvebu/patches-5.4/015-net-mvneta-make-tx-buffer-array-agnostic.patch
index d44a3f1a49..1146c1f2b8 100644
--- a/target/linux/mvebu/patches-5.4/015-net-mvneta-make-tx-buffer-array-agnostic.patch
+++ b/target/linux/mvebu/patches-5.4/015-net-mvneta-make-tx-buffer-array-agnostic.patch
@@ -14,7 +14,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
--- a/drivers/net/ethernet/marvell/mvneta.c
+++ b/drivers/net/ethernet/marvell/mvneta.c
-@@ -563,6 +563,20 @@ struct mvneta_rx_desc {
+@@ -565,6 +565,20 @@ struct mvneta_rx_desc {
};
#endif
@@ -35,7 +35,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
struct mvneta_tx_queue {
/* Number of this TX queue, in the range 0-7 */
u8 id;
-@@ -578,8 +592,8 @@ struct mvneta_tx_queue {
+@@ -580,8 +594,8 @@ struct mvneta_tx_queue {
int tx_stop_threshold;
int tx_wake_threshold;
@@ -46,7 +46,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
/* Index of last TX DMA descriptor that was inserted */
int txq_put_index;
-@@ -1791,14 +1805,9 @@ static void mvneta_txq_bufs_free(struct
+@@ -1793,14 +1807,9 @@ static void mvneta_txq_bufs_free(struct
int i;
for (i = 0; i < num; i++) {
@@ -62,7 +62,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
mvneta_txq_inc_get(txq);
-@@ -1806,9 +1815,12 @@ static void mvneta_txq_bufs_free(struct
+@@ -1808,9 +1817,12 @@ static void mvneta_txq_bufs_free(struct
dma_unmap_single(pp->dev->dev.parent,
tx_desc->buf_phys_addr,
tx_desc->data_size, DMA_TO_DEVICE);
@@ -77,7 +77,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
}
netdev_tx_completed_queue(nq, pkts_compl, bytes_compl);
-@@ -2333,16 +2345,19 @@ static inline void
+@@ -2335,16 +2347,19 @@ static inline void
mvneta_tso_put_hdr(struct sk_buff *skb,
struct mvneta_port *pp, struct mvneta_tx_queue *txq)
{
@@ -99,7 +99,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
mvneta_txq_inc_put(txq);
}
-@@ -2351,6 +2366,7 @@ mvneta_tso_put_data(struct net_device *d
+@@ -2353,6 +2368,7 @@ mvneta_tso_put_data(struct net_device *d
struct sk_buff *skb, char *data, int size,
bool last_tcp, bool is_last)
{
@@ -107,7 +107,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
struct mvneta_tx_desc *tx_desc;
tx_desc = mvneta_txq_next_desc_get(txq);
-@@ -2364,7 +2380,8 @@ mvneta_tso_put_data(struct net_device *d
+@@ -2366,7 +2382,8 @@ mvneta_tso_put_data(struct net_device *d
}
tx_desc->command = 0;
@@ -117,7 +117,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
if (last_tcp) {
/* last descriptor in the TCP packet */
-@@ -2372,7 +2389,7 @@ mvneta_tso_put_data(struct net_device *d
+@@ -2374,7 +2391,7 @@ mvneta_tso_put_data(struct net_device *d
/* last descriptor in SKB */
if (is_last)
@@ -126,7 +126,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
}
mvneta_txq_inc_put(txq);
return 0;
-@@ -2457,6 +2474,7 @@ static int mvneta_tx_frag_process(struct
+@@ -2459,6 +2476,7 @@ static int mvneta_tx_frag_process(struct
int i, nr_frags = skb_shinfo(skb)->nr_frags;
for (i = 0; i < nr_frags; i++) {
@@ -134,7 +134,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
skb_frag_t *frag = &skb_shinfo(skb)->frags[i];
void *addr = skb_frag_address(frag);
-@@ -2476,12 +2494,13 @@ static int mvneta_tx_frag_process(struct
+@@ -2478,12 +2496,13 @@ static int mvneta_tx_frag_process(struct
if (i == nr_frags - 1) {
/* Last descriptor */
tx_desc->command = MVNETA_TXD_L_DESC | MVNETA_TXD_Z_PAD;
@@ -150,7 +150,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
mvneta_txq_inc_put(txq);
}
-@@ -2509,6 +2528,7 @@ static netdev_tx_t mvneta_tx(struct sk_b
+@@ -2511,6 +2530,7 @@ static netdev_tx_t mvneta_tx(struct sk_b
struct mvneta_port *pp = netdev_priv(dev);
u16 txq_id = skb_get_queue_mapping(skb);
struct mvneta_tx_queue *txq = &pp->txqs[txq_id];
@@ -158,7 +158,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
struct mvneta_tx_desc *tx_desc;
int len = skb->len;
int frags = 0;
-@@ -2541,16 +2561,17 @@ static netdev_tx_t mvneta_tx(struct sk_b
+@@ -2543,16 +2563,17 @@ static netdev_tx_t mvneta_tx(struct sk_b
goto out;
}
@@ -178,7 +178,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
mvneta_txq_inc_put(txq);
tx_desc->command = tx_cmd;
/* Continue with other skb fragments */
-@@ -3136,9 +3157,8 @@ static int mvneta_txq_sw_init(struct mvn
+@@ -3138,9 +3159,8 @@ static int mvneta_txq_sw_init(struct mvn
txq->last_desc = txq->size - 1;
@@ -190,7 +190,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
dma_free_coherent(pp->dev->dev.parent,
txq->size * MVNETA_DESC_ALIGNED_SIZE,
txq->descs, txq->descs_phys);
-@@ -3150,7 +3170,7 @@ static int mvneta_txq_sw_init(struct mvn
+@@ -3152,7 +3172,7 @@ static int mvneta_txq_sw_init(struct mvn
txq->size * TSO_HEADER_SIZE,
&txq->tso_hdrs_phys, GFP_KERNEL);
if (!txq->tso_hdrs) {
@@ -199,7 +199,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
dma_free_coherent(pp->dev->dev.parent,
txq->size * MVNETA_DESC_ALIGNED_SIZE,
txq->descs, txq->descs_phys);
-@@ -3203,7 +3223,7 @@ static void mvneta_txq_sw_deinit(struct
+@@ -3205,7 +3225,7 @@ static void mvneta_txq_sw_deinit(struct
{
struct netdev_queue *nq = netdev_get_tx_queue(pp->dev, txq->id);
diff --git a/target/linux/mvebu/patches-5.4/016-net-mvneta-add-XDP_TX-support.patch b/target/linux/mvebu/patches-5.4/016-net-mvneta-add-XDP_TX-support.patch
index 9edf32ff6d..012bdee8bf 100644
--- a/target/linux/mvebu/patches-5.4/016-net-mvneta-add-XDP_TX-support.patch
+++ b/target/linux/mvebu/patches-5.4/016-net-mvneta-add-XDP_TX-support.patch
@@ -14,7 +14,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
--- a/drivers/net/ethernet/marvell/mvneta.c
+++ b/drivers/net/ethernet/marvell/mvneta.c
-@@ -1811,16 +1811,19 @@ static void mvneta_txq_bufs_free(struct
+@@ -1813,16 +1813,19 @@ static void mvneta_txq_bufs_free(struct
mvneta_txq_inc_get(txq);
@@ -41,7 +41,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
}
netdev_tx_completed_queue(nq, pkts_compl, bytes_compl);
-@@ -1985,6 +1988,111 @@ int mvneta_rx_refill_queue(struct mvneta
+@@ -1987,6 +1990,111 @@ int mvneta_rx_refill_queue(struct mvneta
}
static int
@@ -153,7 +153,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
mvneta_run_xdp(struct mvneta_port *pp, struct mvneta_rx_queue *rxq,
struct bpf_prog *prog, struct xdp_buff *xdp)
{
-@@ -2006,6 +2114,11 @@ mvneta_run_xdp(struct mvneta_port *pp, s
+@@ -2008,6 +2116,11 @@ mvneta_run_xdp(struct mvneta_port *pp, s
}
break;
}
@@ -165,7 +165,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
default:
bpf_warn_invalid_xdp_action(act);
/* fall through */
-@@ -4542,6 +4655,7 @@ static const struct net_device_ops mvnet
+@@ -4574,6 +4687,7 @@ static const struct net_device_ops mvnet
.ndo_get_stats64 = mvneta_get_stats64,
.ndo_do_ioctl = mvneta_ioctl,
.ndo_bpf = mvneta_xdp,
diff --git a/target/linux/mvebu/patches-5.4/020-net-mvneta-fix-build-skb-for-bm-capable-devices.patch b/target/linux/mvebu/patches-5.4/020-net-mvneta-fix-build-skb-for-bm-capable-devices.patch
index 94de008e76..adfa51e4e8 100644
--- a/target/linux/mvebu/patches-5.4/020-net-mvneta-fix-build-skb-for-bm-capable-devices.patch
+++ b/target/linux/mvebu/patches-5.4/020-net-mvneta-fix-build-skb-for-bm-capable-devices.patch
@@ -21,7 +21,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
--- a/drivers/net/ethernet/marvell/mvneta.c
+++ b/drivers/net/ethernet/marvell/mvneta.c
-@@ -2165,7 +2165,7 @@ mvneta_swbm_rx_frame(struct mvneta_port
+@@ -2167,7 +2167,7 @@ mvneta_swbm_rx_frame(struct mvneta_port
prefetch(data);
xdp->data_hard_start = data;
@@ -30,7 +30,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
xdp->data_end = xdp->data + data_len;
xdp_set_data_meta_invalid(xdp);
-@@ -2230,7 +2230,7 @@ mvneta_swbm_add_rx_fragment(struct mvnet
+@@ -2232,7 +2232,7 @@ mvneta_swbm_add_rx_fragment(struct mvnet
/* refill descriptor with new buffer later */
skb_add_rx_frag(rxq->skb,
skb_shinfo(rxq->skb)->nr_frags,
diff --git a/target/linux/mvebu/patches-5.4/021-net-mvneta-rely-on-page_pool_recycle_direct-in-mvnet.patch b/target/linux/mvebu/patches-5.4/021-net-mvneta-rely-on-page_pool_recycle_direct-in-mvnet.patch
index a4ee285b04..6e79aeb358 100644
--- a/target/linux/mvebu/patches-5.4/021-net-mvneta-rely-on-page_pool_recycle_direct-in-mvnet.patch
+++ b/target/linux/mvebu/patches-5.4/021-net-mvneta-rely-on-page_pool_recycle_direct-in-mvnet.patch
@@ -17,7 +17,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
--- a/drivers/net/ethernet/marvell/mvneta.c
+++ b/drivers/net/ethernet/marvell/mvneta.c
-@@ -2108,7 +2108,8 @@ mvneta_run_xdp(struct mvneta_port *pp, s
+@@ -2110,7 +2110,8 @@ mvneta_run_xdp(struct mvneta_port *pp, s
err = xdp_do_redirect(pp->dev, xdp, prog);
if (err) {
ret = MVNETA_XDP_DROPPED;
@@ -27,7 +27,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
} else {
ret = MVNETA_XDP_REDIR;
}
-@@ -2117,7 +2118,8 @@ mvneta_run_xdp(struct mvneta_port *pp, s
+@@ -2119,7 +2120,8 @@ mvneta_run_xdp(struct mvneta_port *pp, s
case XDP_TX:
ret = mvneta_xdp_xmit_back(pp, xdp);
if (ret != MVNETA_XDP_TX)
diff --git a/target/linux/mvebu/patches-5.4/022-mvneta-driver-disallow-XDP-program-on-hardware-buffe.patch b/target/linux/mvebu/patches-5.4/022-mvneta-driver-disallow-XDP-program-on-hardware-buffe.patch
index 57ad8b6958..e8a41d9eb2 100644
--- a/target/linux/mvebu/patches-5.4/022-mvneta-driver-disallow-XDP-program-on-hardware-buffe.patch
+++ b/target/linux/mvebu/patches-5.4/022-mvneta-driver-disallow-XDP-program-on-hardware-buffe.patch
@@ -38,7 +38,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
--- a/drivers/net/ethernet/marvell/mvneta.c
+++ b/drivers/net/ethernet/marvell/mvneta.c
-@@ -4231,6 +4231,12 @@ static int mvneta_xdp_setup(struct net_d
+@@ -4263,6 +4263,12 @@ static int mvneta_xdp_setup(struct net_d
return -EOPNOTSUPP;
}
diff --git a/target/linux/mvebu/patches-5.4/023-net-mvneta-fix-XDP-support-if-sw-bm-is-used-as-fallb.patch b/target/linux/mvebu/patches-5.4/023-net-mvneta-fix-XDP-support-if-sw-bm-is-used-as-fallb.patch
index 38b874cd49..f76b27a36d 100644
--- a/target/linux/mvebu/patches-5.4/023-net-mvneta-fix-XDP-support-if-sw-bm-is-used-as-fallb.patch
+++ b/target/linux/mvebu/patches-5.4/023-net-mvneta-fix-XDP-support-if-sw-bm-is-used-as-fallb.patch
@@ -20,7 +20,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
--- a/drivers/net/ethernet/marvell/mvneta.c
+++ b/drivers/net/ethernet/marvell/mvneta.c
-@@ -324,8 +324,7 @@
+@@ -326,8 +326,7 @@
ETH_HLEN + ETH_FCS_LEN, \
cache_line_size())
@@ -30,7 +30,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
#define MVNETA_SKB_PAD (SKB_DATA_ALIGN(sizeof(struct skb_shared_info) + \
MVNETA_SKB_HEADROOM))
#define MVNETA_SKB_SIZE(len) (SKB_DATA_ALIGN(len) + MVNETA_SKB_PAD)
-@@ -1172,6 +1171,7 @@ bm_mtu_err:
+@@ -1174,6 +1173,7 @@ bm_mtu_err:
mvneta_bm_pool_destroy(pp->bm_priv, pp->pool_short, 1 << pp->id);
pp->bm_priv = NULL;
@@ -38,7 +38,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
mvreg_write(pp, MVNETA_ACC_MODE, MVNETA_ACC_MODE_EXT1);
netdev_info(pp->dev, "fail to update MTU, fall back to software BM\n");
}
-@@ -4954,7 +4954,6 @@ static int mvneta_probe(struct platform_
+@@ -4976,7 +4976,6 @@ static int mvneta_probe(struct platform_
SET_NETDEV_DEV(dev, &pdev->dev);
pp->id = global_port_id++;
@@ -46,7 +46,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
/* Obtain access to BM resources if enabled and already initialized */
bm_node = of_parse_phandle(dn, "buffer-manager", 0);
-@@ -4979,6 +4978,10 @@ static int mvneta_probe(struct platform_
+@@ -5001,6 +5000,10 @@ static int mvneta_probe(struct platform_
}
of_node_put(bm_node);
@@ -57,7 +57,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
err = mvneta_init(&pdev->dev, pp);
if (err < 0)
goto err_netdev;
-@@ -5136,6 +5139,7 @@ static int mvneta_resume(struct device *
+@@ -5154,6 +5157,7 @@ static int mvneta_resume(struct device *
err = mvneta_bm_port_init(pdev, pp);
if (err < 0) {
dev_info(&pdev->dev, "use SW buffer management\n");
diff --git a/target/linux/mvebu/patches-5.4/300-mvneta-tx-queue-workaround.patch b/target/linux/mvebu/patches-5.4/300-mvneta-tx-queue-workaround.patch
index ff4be6006c..a82a4c0d62 100644
--- a/target/linux/mvebu/patches-5.4/300-mvneta-tx-queue-workaround.patch
+++ b/target/linux/mvebu/patches-5.4/300-mvneta-tx-queue-workaround.patch
@@ -9,7 +9,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
---
--- a/drivers/net/ethernet/marvell/mvneta.c
+++ b/drivers/net/ethernet/marvell/mvneta.c
-@@ -4652,6 +4652,14 @@ static int mvneta_ethtool_set_eee(struct
+@@ -4684,6 +4684,14 @@ static int mvneta_ethtool_set_eee(struct
return phylink_ethtool_set_eee(pp->phylink, eee);
}
@@ -24,7 +24,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
static const struct net_device_ops mvneta_netdev_ops = {
.ndo_open = mvneta_open,
.ndo_stop = mvneta_stop,
-@@ -4662,6 +4670,7 @@ static const struct net_device_ops mvnet
+@@ -4694,6 +4702,7 @@ static const struct net_device_ops mvnet
.ndo_fix_features = mvneta_fix_features,
.ndo_get_stats64 = mvneta_get_stats64,
.ndo_do_ioctl = mvneta_ioctl,