From: Alexander Duyck <alexander.h.duyck@redhat.com>
To: netdev@vger.kernel.org, nic_swsd@realtek.com
Cc: intel-wired-lan@lists.osuosl.org, davem@davemloft.net
Subject: [net PATCH 2/3] r8169: Do not use dev_kfree_skb in xmit path
Date: Fri, 01 May 2015 10:34:44 -0700 [thread overview]
Message-ID: <20150501173444.1029.11465.stgit@ahduyck-vm-fedora22> (raw)
In-Reply-To: <20150501173049.1029.54421.stgit@ahduyck-vm-fedora22>
The function r8169_csum_workaround is called in the ndo_start_xmit path of
the r8169 driver. As such it should not be using dev_kfree_skb as it is
not irq safe, so instead we should be using dev_kfree_skb_any for freeing
in the dropped path, and dev_consume_skb_any for any frames that were
transmitted.
Signed-off-by: Alexander Duyck <alexander.h.duyck@redhat.com>
---
drivers/net/ethernet/realtek/r8169.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/realtek/r8169.c b/drivers/net/ethernet/realtek/r8169.c
index c70ab40d8698..3df51faf18ae 100644
--- a/drivers/net/ethernet/realtek/r8169.c
+++ b/drivers/net/ethernet/realtek/r8169.c
@@ -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);
}
}
next prev parent reply other threads:[~2015-05-01 17:35 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-01 17:34 [net PATCH 0/3] Clean-up some bits related to netpoll Alexander Duyck
2015-05-01 17:34 ` [net PATCH 1/3] fm10k: Do not assume budget will never be 0 for NAPI Alexander Duyck
2015-05-01 17:34 ` Alexander Duyck [this message]
2015-05-01 17:34 ` [net PATCH 3/3] ixgbevf: Use dev_kfree_skb_any in xmit path, not dev_kfree_skb Alexander Duyck
2015-05-04 4:07 ` [net PATCH 0/3] Clean-up some bits related to netpoll David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20150501173444.1029.11465.stgit@ahduyck-vm-fedora22 \
--to=alexander.h.duyck@redhat.com \
--cc=davem@davemloft.net \
--cc=intel-wired-lan@lists.osuosl.org \
--cc=netdev@vger.kernel.org \
--cc=nic_swsd@realtek.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox