From: David Miller <davem@davemloft.net>
To: vapier@gentoo.org
Cc: netdev@vger.kernel.org, uclinux-dist-devel@blackfin.uclinux.org,
sonic.zhang@analog.com
Subject: Re: [PATCH 06/11] netdev: bfin_mac: avoid tx skb overflows in the tx DMA ring
Date: Mon, 10 May 2010 04:40:35 -0700 (PDT) [thread overview]
Message-ID: <20100510.044035.199023238.davem@davemloft.net> (raw)
In-Reply-To: <1273400337-26501-6-git-send-email-vapier@gentoo.org>
From: Mike Frysinger <vapier@gentoo.org>
Date: Sun, 9 May 2010 06:18:52 -0400
> From: Sonic Zhang <sonic.zhang@analog.com>
>
> Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
This should never ever happen, it's a bug and you should print a warning
message when and if it does actually occur.
At any point where your ->next pointer hits tx_list_head, the queue
should have been stopped by your driver and therefore the networking
core will never pass another packet to you.
If this condition is actually triggering, it means you're not locking
properly or you have some race.
> ---
> drivers/net/bfin_mac.c | 3 +++
> 1 files changed, 3 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/net/bfin_mac.c b/drivers/net/bfin_mac.c
> index 6d69bbb..0b5ea01 100644
> --- a/drivers/net/bfin_mac.c
> +++ b/drivers/net/bfin_mac.c
> @@ -920,6 +920,9 @@ static int bfin_mac_hard_start_xmit(struct sk_buff *skb,
> u32 data_align = (unsigned long)(skb->data) & 0x3;
> union skb_shared_tx *shtx = skb_tx(skb);
>
> + if (current_tx_ptr->next == tx_list_head)
> + return NETDEV_TX_BUSY;
> +
> current_tx_ptr->skb = skb;
>
> if (data_align == 0x2) {
> --
> 1.7.1
>
next prev parent reply other threads:[~2010-05-10 11:40 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-09 10:18 [PATCH 01/11] netdev: bfin_mac: add support for IEEE 1588 PTP Mike Frysinger
2010-05-09 10:18 ` [PATCH 02/11] netdev: bfin_mac: handler RX status errors Mike Frysinger
2010-05-09 10:18 ` [PATCH 03/11] netdev: bfin_mac: invalid data cache only once for each new rx skb buffer Mike Frysinger
[not found] ` <1273400337-26501-1-git-send-email-vapier-aBrp7R+bbdUdnm+yROfE0A@public.gmane.org>
2010-05-09 10:18 ` [PATCH 04/11] netdev: bfin_mac: deduce Ethernet FCS from hardware IP payload checksum Mike Frysinger
2010-05-09 10:18 ` [PATCH 05/11] netdev: bfin_mac: clear RXCKS if hardware generated checksum is not enabled Mike Frysinger
2010-05-09 10:18 ` [PATCH 06/11] netdev: bfin_mac: avoid tx skb overflows in the tx DMA ring Mike Frysinger
2010-05-10 11:40 ` David Miller [this message]
[not found] ` <AANLkTimWjjXKwi_YLFPxBrCBu1qkiuaUKyo1UW5373lH@mail.gmail.com>
2010-05-18 19:29 ` David Miller
2010-05-19 9:23 ` Sonic Zhang
2010-05-19 20:12 ` David Miller
[not found] ` <AANLkTimDFWyO8YaNJrWifkYS6g6zSvMZXmtEniCO1wb1@mail.gmail.com>
[not found] ` <20100520.030835.267363374.davem@davemloft.net>
2010-05-20 10:23 ` Sonic Zhang
2010-05-20 10:36 ` Sonic Zhang
2010-05-09 10:18 ` [PATCH 07/11] netdev: bfin_mac: add support for wake-on-lan magic packets Mike Frysinger
2010-05-09 10:18 ` [PATCH 08/11] netdev: bfin_mac: use promiscuous flag for promiscuous mode Mike Frysinger
2010-05-09 10:18 ` [PATCH 09/11] netdev: bfin_mac: only use hardware checksum in normal IPv4 mode Mike Frysinger
2010-05-10 11:42 ` David Miller
2010-05-10 15:35 ` [Uclinux-dist-devel] " Mike Frysinger
2010-05-09 10:18 ` [PATCH 10/11] netdev: bfin_mac: handle timeouts with the MDIO registers gracefully Mike Frysinger
2010-05-09 10:18 ` [PATCH 11/11] netdev: bfin_mac: check for mii_bus platform data Mike Frysinger
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=20100510.044035.199023238.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
--cc=sonic.zhang@analog.com \
--cc=uclinux-dist-devel@blackfin.uclinux.org \
--cc=vapier@gentoo.org \
/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;
as well as URLs for NNTP newsgroup(s).