WARN_ON(tx_q->tx_skbuff[tx_q->cur_tx]);
}
-@@ -4183,7 +4183,7 @@ static netdev_tx_t stmmac_tso_xmit(struc
+@@ -4195,7 +4195,7 @@ static netdev_tx_t stmmac_tso_xmit(struc
* ndo_start_xmit will fill this descriptor the next time it's
* called and stmmac_tx_clean may clean up to this descriptor.
*/
if (unlikely(stmmac_tx_avail(priv, queue) <= (MAX_SKB_FRAGS + 1))) {
netif_dbg(priv, hw, priv->dev, "%s: stop transmitted packets\n",
-@@ -4271,7 +4271,7 @@ static netdev_tx_t stmmac_xmit(struct sk
+@@ -4283,7 +4283,7 @@ static netdev_tx_t stmmac_xmit(struct sk
int entry, first_tx;
dma_addr_t des;
first_tx = tx_q->cur_tx;
if (priv->tx_path_in_lpi_mode && priv->eee_sw_timer_en)
-@@ -4334,7 +4334,7 @@ static netdev_tx_t stmmac_xmit(struct sk
+@@ -4346,7 +4346,7 @@ static netdev_tx_t stmmac_xmit(struct sk
int len = skb_frag_size(frag);
bool last_segment = (i == (nfrags - 1));
WARN_ON(tx_q->tx_skbuff[entry]);
if (likely(priv->extend_desc))
-@@ -4405,7 +4405,7 @@ static netdev_tx_t stmmac_xmit(struct sk
+@@ -4417,7 +4417,7 @@ static netdev_tx_t stmmac_xmit(struct sk
* ndo_start_xmit will fill this descriptor the next time it's
* called and stmmac_tx_clean may clean up to this descriptor.
*/
tx_q->cur_tx = entry;
if (netif_msg_pktdata(priv)) {
-@@ -4517,7 +4517,7 @@ static void stmmac_rx_vlan(struct net_de
+@@ -4529,7 +4529,7 @@ static void stmmac_rx_vlan(struct net_de
*/
static inline void stmmac_rx_refill(struct stmmac_priv *priv, u32 queue)
{
int dirty = stmmac_rx_dirty(priv, queue);
unsigned int entry = rx_q->dirty_rx;
-@@ -4567,7 +4567,7 @@ static inline void stmmac_rx_refill(stru
+@@ -4579,7 +4579,7 @@ static inline void stmmac_rx_refill(stru
dma_wmb();
stmmac_set_rx_owner(priv, p, use_rx_wd);
}
rx_q->dirty_rx = entry;
rx_q->rx_tail_addr = rx_q->dma_rx_phy +
-@@ -4595,12 +4595,12 @@ static unsigned int stmmac_rx_buf1_len(s
+@@ -4607,12 +4607,12 @@ static unsigned int stmmac_rx_buf1_len(s
/* First descriptor, not last descriptor and not split header */
if (status & rx_not_ls)
}
static unsigned int stmmac_rx_buf2_len(struct stmmac_priv *priv,
-@@ -4616,7 +4616,7 @@ static unsigned int stmmac_rx_buf2_len(s
+@@ -4628,7 +4628,7 @@ static unsigned int stmmac_rx_buf2_len(s
/* Not last descriptor */
if (status & rx_not_ls)
plen = stmmac_get_rx_frame_len(priv, p, coe);
-@@ -4627,7 +4627,7 @@ static unsigned int stmmac_rx_buf2_len(s
+@@ -4639,7 +4639,7 @@ static unsigned int stmmac_rx_buf2_len(s
static int stmmac_xdp_xmit_xdpf(struct stmmac_priv *priv, int queue,
struct xdp_frame *xdpf, bool dma_map)
{
unsigned int entry = tx_q->cur_tx;
struct dma_desc *tx_desc;
dma_addr_t dma_addr;
-@@ -4690,7 +4690,7 @@ static int stmmac_xdp_xmit_xdpf(struct s
+@@ -4702,7 +4702,7 @@ static int stmmac_xdp_xmit_xdpf(struct s
stmmac_enable_dma_transmission(priv, priv->ioaddr);
tx_q->cur_tx = entry;
return STMMAC_XDP_TX;
-@@ -4864,7 +4864,7 @@ static void stmmac_dispatch_skb_zc(struc
+@@ -4876,7 +4876,7 @@ static void stmmac_dispatch_skb_zc(struc
static bool stmmac_rx_refill_zc(struct stmmac_priv *priv, u32 queue, u32 budget)
{
unsigned int entry = rx_q->dirty_rx;
struct dma_desc *rx_desc = NULL;
bool ret = true;
-@@ -4907,7 +4907,7 @@ static bool stmmac_rx_refill_zc(struct s
+@@ -4919,7 +4919,7 @@ static bool stmmac_rx_refill_zc(struct s
dma_wmb();
stmmac_set_rx_owner(priv, rx_desc, use_rx_wd);
}
if (rx_desc) {
-@@ -4922,7 +4922,7 @@ static bool stmmac_rx_refill_zc(struct s
+@@ -4934,7 +4934,7 @@ static bool stmmac_rx_refill_zc(struct s
static int stmmac_rx_zc(struct stmmac_priv *priv, int limit, u32 queue)
{
unsigned int count = 0, error = 0, len = 0;
int dirty = stmmac_rx_dirty(priv, queue);
unsigned int next_entry = rx_q->cur_rx;
-@@ -4944,7 +4944,7 @@ static int stmmac_rx_zc(struct stmmac_pr
+@@ -4956,7 +4956,7 @@ static int stmmac_rx_zc(struct stmmac_pr
desc_size = sizeof(struct dma_desc);
}
rx_q->dma_rx_phy, desc_size);
}
while (count < limit) {
-@@ -4991,7 +4991,7 @@ read_again:
+@@ -5003,7 +5003,7 @@ read_again:
/* Prefetch the next RX descriptor */
rx_q->cur_rx = STMMAC_GET_ENTRY(rx_q->cur_rx,
next_entry = rx_q->cur_rx;
if (priv->extend_desc)
-@@ -5104,7 +5104,7 @@ read_again:
+@@ -5116,7 +5116,7 @@ read_again:
*/
static int stmmac_rx(struct stmmac_priv *priv, int limit, u32 queue)
{
struct stmmac_channel *ch = &priv->channel[queue];
unsigned int count = 0, error = 0, len = 0;
int status = 0, coe = priv->hw->rx_csum;
-@@ -5117,7 +5117,7 @@ static int stmmac_rx(struct stmmac_priv
+@@ -5129,7 +5129,7 @@ static int stmmac_rx(struct stmmac_priv
int buf_sz;
dma_dir = page_pool_get_dma_dir(rx_q->page_pool);
if (netif_msg_rx_status(priv)) {
void *rx_head;
-@@ -5131,7 +5131,7 @@ static int stmmac_rx(struct stmmac_priv
+@@ -5143,7 +5143,7 @@ static int stmmac_rx(struct stmmac_priv
desc_size = sizeof(struct dma_desc);
}
rx_q->dma_rx_phy, desc_size);
}
while (count < limit) {
-@@ -5175,7 +5175,7 @@ read_again:
+@@ -5187,7 +5187,7 @@ read_again:
break;
rx_q->cur_rx = STMMAC_GET_ENTRY(rx_q->cur_rx,
next_entry = rx_q->cur_rx;
if (priv->extend_desc)
-@@ -5302,7 +5302,7 @@ read_again:
+@@ -5314,7 +5314,7 @@ read_again:
buf1_len, dma_dir);
skb_add_rx_frag(skb, skb_shinfo(skb)->nr_frags,
buf->page, buf->page_offset, buf1_len,
/* Data payload appended into SKB */
page_pool_release_page(rx_q->page_pool, buf->page);
-@@ -5314,7 +5314,7 @@ read_again:
+@@ -5326,7 +5326,7 @@ read_again:
buf2_len, dma_dir);
skb_add_rx_frag(skb, skb_shinfo(skb)->nr_frags,
buf->sec_page, 0, buf2_len,
/* Data payload appended into SKB */
page_pool_release_page(rx_q->page_pool, buf->sec_page);
-@@ -5747,11 +5747,13 @@ static irqreturn_t stmmac_safety_interru
+@@ -5759,11 +5759,13 @@ static irqreturn_t stmmac_safety_interru
static irqreturn_t stmmac_msi_intr_tx(int irq, void *data)
{
struct stmmac_tx_queue *tx_q = (struct stmmac_tx_queue *)data;
/* Check if adapter is up */
if (test_bit(STMMAC_DOWN, &priv->state))
-@@ -5786,10 +5788,12 @@ static irqreturn_t stmmac_msi_intr_tx(in
+@@ -5798,10 +5800,12 @@ static irqreturn_t stmmac_msi_intr_tx(in
static irqreturn_t stmmac_msi_intr_rx(int irq, void *data)
{
struct stmmac_rx_queue *rx_q = (struct stmmac_rx_queue *)data;
/* Check if adapter is up */
if (test_bit(STMMAC_DOWN, &priv->state))
-@@ -5815,10 +5819,10 @@ static void stmmac_poll_controller(struc
+@@ -5827,10 +5831,10 @@ static void stmmac_poll_controller(struc
if (priv->plat->multi_msi_en) {
for (i = 0; i < priv->plat->rx_queues_to_use; i++)
} else {
disable_irq(dev->irq);
stmmac_interrupt(dev->irq, dev);
-@@ -5999,34 +6003,34 @@ static int stmmac_rings_status_show(stru
+@@ -6011,34 +6015,34 @@ static int stmmac_rings_status_show(stru
return 0;
for (queue = 0; queue < rx_count; queue++) {
}
}
-@@ -6373,7 +6377,7 @@ void stmmac_disable_rx_queue(struct stmm
+@@ -6385,7 +6389,7 @@ void stmmac_disable_rx_queue(struct stmm
void stmmac_enable_rx_queue(struct stmmac_priv *priv, u32 queue)
{
struct stmmac_channel *ch = &priv->channel[queue];
unsigned long flags;
u32 buf_size;
-@@ -6410,7 +6414,7 @@ void stmmac_enable_rx_queue(struct stmma
+@@ -6422,7 +6426,7 @@ void stmmac_enable_rx_queue(struct stmma
rx_q->queue_index);
} else {
stmmac_set_dma_bfsize(priv, priv->ioaddr,
rx_q->queue_index);
}
-@@ -6436,7 +6440,7 @@ void stmmac_disable_tx_queue(struct stmm
+@@ -6448,7 +6452,7 @@ void stmmac_disable_tx_queue(struct stmm
void stmmac_enable_tx_queue(struct stmmac_priv *priv, u32 queue)
{
struct stmmac_channel *ch = &priv->channel[queue];
unsigned long flags;
int ret;
-@@ -6486,7 +6490,7 @@ void stmmac_xdp_release(struct net_devic
+@@ -6498,7 +6502,7 @@ void stmmac_xdp_release(struct net_devic
stmmac_disable_all_queues(priv);
for (chan = 0; chan < priv->plat->tx_queues_to_use; chan++)
/* Free the IRQ lines */
stmmac_free_irq(dev, REQ_IRQ_ERR_ALL, 0);
-@@ -6545,7 +6549,7 @@ int stmmac_xdp_open(struct net_device *d
+@@ -6557,7 +6561,7 @@ int stmmac_xdp_open(struct net_device *d
/* DMA RX Channel Configuration */
for (chan = 0; chan < rx_cnt; chan++) {
stmmac_init_rx_chan(priv, priv->ioaddr, priv->plat->dma_cfg,
rx_q->dma_rx_phy, chan);
-@@ -6563,7 +6567,7 @@ int stmmac_xdp_open(struct net_device *d
+@@ -6575,7 +6579,7 @@ int stmmac_xdp_open(struct net_device *d
rx_q->queue_index);
} else {
stmmac_set_dma_bfsize(priv, priv->ioaddr,
rx_q->queue_index);
}
-@@ -6572,7 +6576,7 @@ int stmmac_xdp_open(struct net_device *d
+@@ -6584,7 +6588,7 @@ int stmmac_xdp_open(struct net_device *d
/* DMA TX Channel Configuration */
for (chan = 0; chan < tx_cnt; chan++) {
stmmac_init_tx_chan(priv, priv->ioaddr, priv->plat->dma_cfg,
tx_q->dma_tx_phy, chan);
-@@ -6605,7 +6609,7 @@ int stmmac_xdp_open(struct net_device *d
+@@ -6617,7 +6621,7 @@ int stmmac_xdp_open(struct net_device *d
irq_error:
for (chan = 0; chan < priv->plat->tx_queues_to_use; chan++)
stmmac_hw_teardown(dev);
init_error:
-@@ -6632,8 +6636,8 @@ int stmmac_xsk_wakeup(struct net_device
+@@ -6644,8 +6648,8 @@ int stmmac_xsk_wakeup(struct net_device
queue >= priv->plat->tx_queues_to_use)
return -EINVAL;
ch = &priv->channel[queue];
if (!rx_q->xsk_pool && !tx_q->xsk_pool)
-@@ -6893,8 +6897,8 @@ int stmmac_reinit_ringparam(struct net_d
+@@ -6905,8 +6909,8 @@ int stmmac_reinit_ringparam(struct net_d
if (netif_running(dev))
stmmac_release(dev);
if (netif_running(dev))
ret = stmmac_open(dev);
-@@ -7332,7 +7336,7 @@ int stmmac_suspend(struct device *dev)
+@@ -7344,7 +7348,7 @@ int stmmac_suspend(struct device *dev)
stmmac_disable_all_queues(priv);
for (chan = 0; chan < priv->plat->tx_queues_to_use; chan++)
if (priv->eee_enabled) {
priv->tx_path_in_lpi_mode = false;
-@@ -7384,7 +7388,7 @@ EXPORT_SYMBOL_GPL(stmmac_suspend);
+@@ -7396,7 +7400,7 @@ EXPORT_SYMBOL_GPL(stmmac_suspend);
static void stmmac_reset_rx_queue(struct stmmac_priv *priv, u32 queue)
{
rx_q->cur_rx = 0;
rx_q->dirty_rx = 0;
-@@ -7392,7 +7396,7 @@ static void stmmac_reset_rx_queue(struct
+@@ -7404,7 +7408,7 @@ static void stmmac_reset_rx_queue(struct
static void stmmac_reset_tx_queue(struct stmmac_priv *priv, u32 queue)
{
/* Disable the MAC Rx/Tx */
stmmac_mac_set(priv, priv->ioaddr, false);
-@@ -6372,7 +6488,7 @@ void stmmac_disable_rx_queue(struct stmm
+@@ -6384,7 +6500,7 @@ void stmmac_disable_rx_queue(struct stmm
spin_unlock_irqrestore(&ch->lock, flags);
stmmac_stop_rx_dma(priv, queue);
}
void stmmac_enable_rx_queue(struct stmmac_priv *priv, u32 queue)
-@@ -6383,21 +6499,21 @@ void stmmac_enable_rx_queue(struct stmma
+@@ -6395,21 +6511,21 @@ void stmmac_enable_rx_queue(struct stmma
u32 buf_size;
int ret;
stmmac_init_rx_chan(priv, priv->ioaddr, priv->plat->dma_cfg,
rx_q->dma_rx_phy, rx_q->queue_index);
-@@ -6435,7 +6551,7 @@ void stmmac_disable_tx_queue(struct stmm
+@@ -6447,7 +6563,7 @@ void stmmac_disable_tx_queue(struct stmm
spin_unlock_irqrestore(&ch->lock, flags);
stmmac_stop_tx_dma(priv, queue);
}
void stmmac_enable_tx_queue(struct stmmac_priv *priv, u32 queue)
-@@ -6445,21 +6561,21 @@ void stmmac_enable_tx_queue(struct stmma
+@@ -6457,21 +6573,21 @@ void stmmac_enable_tx_queue(struct stmma
unsigned long flags;
int ret;
stmmac_init_tx_chan(priv, priv->ioaddr, priv->plat->dma_cfg,
tx_q->dma_tx_phy, tx_q->queue_index);
-@@ -6499,7 +6615,7 @@ void stmmac_xdp_release(struct net_devic
+@@ -6511,7 +6627,7 @@ void stmmac_xdp_release(struct net_devic
stmmac_stop_all_dma(priv);
/* Release and free the Rx/Tx resources */
/* Disable the MAC Rx/Tx */
stmmac_mac_set(priv, priv->ioaddr, false);
-@@ -6524,14 +6640,14 @@ int stmmac_xdp_open(struct net_device *d
+@@ -6536,14 +6652,14 @@ int stmmac_xdp_open(struct net_device *d
u32 chan;
int ret;
if (ret < 0) {
netdev_err(dev, "%s: DMA descriptors initialization failed\n",
__func__);
-@@ -6613,7 +6729,7 @@ irq_error:
+@@ -6625,7 +6741,7 @@ irq_error:
stmmac_hw_teardown(dev);
init_error:
dma_desc_error:
return ret;
}
-@@ -7479,7 +7595,7 @@ int stmmac_resume(struct device *dev)
+@@ -7491,7 +7607,7 @@ int stmmac_resume(struct device *dev)
stmmac_reset_queues_param(priv);
stmmac_free_tx_skbufs(priv);
#endif
--- a/net/core/dev.c
+++ b/net/core/dev.c
-@@ -4590,7 +4590,7 @@ static int rps_ipi_queued(struct softnet
+@@ -4594,7 +4594,7 @@ static int rps_ipi_queued(struct softnet
#ifdef CONFIG_RPS
struct softnet_data *mysd = this_cpu_ptr(&softnet_data);
sd->rps_ipi_next = mysd->rps_ipi_list;
mysd->rps_ipi_list = sd;
-@@ -5771,6 +5771,8 @@ static DEFINE_PER_CPU(struct work_struct
+@@ -5775,6 +5775,8 @@ static DEFINE_PER_CPU(struct work_struct
/* Network device is going away, flush any packets still pending */
static void flush_backlog(struct work_struct *work)
{
struct sk_buff *skb, *tmp;
struct softnet_data *sd;
-@@ -5786,9 +5788,18 @@ static void flush_backlog(struct work_st
+@@ -5790,9 +5792,18 @@ static void flush_backlog(struct work_st
input_queue_head_incr(sd);
}
}
skb_queue_walk_safe(&sd->process_queue, skb, tmp) {
if (skb->dev->reg_state == NETREG_UNREGISTERING) {
__skb_unlink(skb, &sd->process_queue);
-@@ -5796,7 +5807,18 @@ static void flush_backlog(struct work_st
+@@ -5800,7 +5811,18 @@ static void flush_backlog(struct work_st
input_queue_head_incr(sd);
}
}
}
static bool flush_required(int cpu)
-@@ -6479,6 +6501,7 @@ static int process_backlog(struct napi_s
+@@ -6483,6 +6505,7 @@ static int process_backlog(struct napi_s
local_irq_disable();
rps_lock(sd);
if (skb_queue_empty(&sd->input_pkt_queue)) {
/*
* Inline a custom version of __napi_complete().
-@@ -6488,7 +6511,8 @@ static int process_backlog(struct napi_s
+@@ -6492,7 +6515,8 @@ static int process_backlog(struct napi_s
* We can use a plain write instead of clear_bit(),
* and we dont need an smp_mb() memory barrier.
*/
again = false;
} else {
skb_queue_splice_tail_init(&sd->input_pkt_queue,
-@@ -6905,6 +6929,57 @@ int dev_set_threaded(struct net_device *
+@@ -6909,6 +6933,57 @@ int dev_set_threaded(struct net_device *
}
EXPORT_SYMBOL(dev_set_threaded);
void netif_napi_add(struct net_device *dev, struct napi_struct *napi,
int (*poll)(struct napi_struct *, int), int weight)
{
-@@ -11389,6 +11464,9 @@ static int dev_cpu_dead(unsigned int old
+@@ -11393,6 +11468,9 @@ static int dev_cpu_dead(unsigned int old
raise_softirq_irqoff(NET_TX_SOFTIRQ);
local_irq_enable();
#ifdef CONFIG_RPS
remsd = oldsd->rps_ipi_list;
oldsd->rps_ipi_list = NULL;
-@@ -11728,6 +11806,7 @@ static int __init net_dev_init(void)
+@@ -11732,6 +11810,7 @@ static int __init net_dev_init(void)
sd->cpu = i;
#endif