Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit bd4d95a5 authored by David S. Miller's avatar David S. Miller
Browse files

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: default avatarDavid S. Miller <davem@davemloft.net>
parents 4212b543 e7fcd543
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -610,7 +610,7 @@ static bool fm10k_clean_rx_irq(struct fm10k_q_vector *q_vector,
	unsigned int total_bytes = 0, total_packets = 0;
	u16 cleaned_count = fm10k_desc_unused(rx_ring);

	do {
	while (likely(total_packets < budget)) {
		union fm10k_rx_desc *rx_desc;

		/* 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 */
		total_packets++;
	} while (likely(total_packets < budget));
	}

	/* place incomplete frames back on ring for completion */
	rx_ring->skb = skb;
+1 −1
Original line number Diff line number Diff line
@@ -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);

	if (!dst_mac || is_link_local_ether_addr(dst_mac)) {
		dev_kfree_skb(skb);
		dev_kfree_skb_any(skb);
		return NETDEV_TX_OK;
	}

+2 −2
Original line number Diff line number Diff line
@@ -6884,7 +6884,7 @@ static void r8169_csum_workaround(struct rtl8169_private *tp,
			rtl8169_start_xmit(nskb, tp->dev);
		} while (segs);

		dev_kfree_skb(skb);
		dev_consume_skb_any(skb);
	} else if (skb->ip_summed == CHECKSUM_PARTIAL) {
		if (skb_checksum_help(skb) < 0)
			goto drop;
@@ -6896,7 +6896,7 @@ static void r8169_csum_workaround(struct rtl8169_private *tp,
drop:
		stats = &tp->dev->stats;
		stats->tx_dropped++;
		dev_kfree_skb(skb);
		dev_kfree_skb_any(skb);
	}
}