Skip to content

Commit

Permalink
Merge branch 'dev_kfree_skb'
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
David S. Miller committed May 4, 2015
2 parents 4212b54 + e7fcd54 commit bd4d95a
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions drivers/net/ethernet/intel/fm10k/fm10k_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down
4 changes: 2 additions & 2 deletions drivers/net/ethernet/realtek/r8169.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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);
}
}

Expand Down

0 comments on commit bd4d95a

Please sign in to comment.