Merge branch 'dev_kfree_skb'
Alexander Duyck says: ==================== Clean-up some bits related to netpoll This patch set cleans up some minor items related to netpoll. The first patch addresses an Rx clean-up bug that is triggered due to an assumption that napi->poll wouldn't be called with a budget of 0. The other two patches address dev_kfree_skb being called in the xmit path which isn't valid since netpoll will call ndo_start_xmit with IRQs disabled. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
commit
bd4d95a5c9
3 changed files with 5 additions and 5 deletions
|
@ -610,7 +610,7 @@ static bool fm10k_clean_rx_irq(struct fm10k_q_vector *q_vector,
|
||||||
unsigned int total_bytes = 0, total_packets = 0;
|
unsigned int total_bytes = 0, total_packets = 0;
|
||||||
u16 cleaned_count = fm10k_desc_unused(rx_ring);
|
u16 cleaned_count = fm10k_desc_unused(rx_ring);
|
||||||
|
|
||||||
do {
|
while (likely(total_packets < budget)) {
|
||||||
union fm10k_rx_desc *rx_desc;
|
union fm10k_rx_desc *rx_desc;
|
||||||
|
|
||||||
/* return some buffers to hardware, one at a time is too slow */
|
/* return some buffers to hardware, one at a time is too slow */
|
||||||
|
@ -659,7 +659,7 @@ static bool fm10k_clean_rx_irq(struct fm10k_q_vector *q_vector,
|
||||||
|
|
||||||
/* update budget accounting */
|
/* update budget accounting */
|
||||||
total_packets++;
|
total_packets++;
|
||||||
} while (likely(total_packets < budget));
|
}
|
||||||
|
|
||||||
/* place incomplete frames back on ring for completion */
|
/* place incomplete frames back on ring for completion */
|
||||||
rx_ring->skb = skb;
|
rx_ring->skb = skb;
|
||||||
|
|
|
@ -3612,7 +3612,7 @@ static int ixgbevf_xmit_frame(struct sk_buff *skb, struct net_device *netdev)
|
||||||
u8 *dst_mac = skb_header_pointer(skb, 0, 0, NULL);
|
u8 *dst_mac = skb_header_pointer(skb, 0, 0, NULL);
|
||||||
|
|
||||||
if (!dst_mac || is_link_local_ether_addr(dst_mac)) {
|
if (!dst_mac || is_link_local_ether_addr(dst_mac)) {
|
||||||
dev_kfree_skb(skb);
|
dev_kfree_skb_any(skb);
|
||||||
return NETDEV_TX_OK;
|
return NETDEV_TX_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -6884,7 +6884,7 @@ static void r8169_csum_workaround(struct rtl8169_private *tp,
|
||||||
rtl8169_start_xmit(nskb, tp->dev);
|
rtl8169_start_xmit(nskb, tp->dev);
|
||||||
} while (segs);
|
} while (segs);
|
||||||
|
|
||||||
dev_kfree_skb(skb);
|
dev_consume_skb_any(skb);
|
||||||
} else if (skb->ip_summed == CHECKSUM_PARTIAL) {
|
} else if (skb->ip_summed == CHECKSUM_PARTIAL) {
|
||||||
if (skb_checksum_help(skb) < 0)
|
if (skb_checksum_help(skb) < 0)
|
||||||
goto drop;
|
goto drop;
|
||||||
|
@ -6896,7 +6896,7 @@ static void r8169_csum_workaround(struct rtl8169_private *tp,
|
||||||
drop:
|
drop:
|
||||||
stats = &tp->dev->stats;
|
stats = &tp->dev->stats;
|
||||||
stats->tx_dropped++;
|
stats->tx_dropped++;
|
||||||
dev_kfree_skb(skb);
|
dev_kfree_skb_any(skb);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue