lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAAb+SYaMYV1XO2B8fhcPVvE2mTj-o8+qiesgz8jh9Y796iDC_Q@mail.gmail.com>
Date:	Fri, 22 Nov 2013 20:26:02 +0800
From:	ZHAO Gang <gamerh2o@...il.com>
To:	Denis Kirjanov <kirjanov@...il.com>
Cc:	Mark Einon <mark.einon@...il.com>,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	LKML <linux-kernel@...r.kernel.org>,
	STAGING SUBSYSTEM <devel@...verdev.osuosl.org>
Subject: Re: [PATCH v3 2/5] staging: et131x: drop packet when error occurs in et131x_tx

On Fri, Nov 22, 2013 at 7:56 PM, Denis Kirjanov <kirjanov@...il.com> wrote:
> If you have no free TX descriptors that means that something went
> wrong and it's a BUG. You have to tell the stack to stop sending
> packets using netif_stop_queue() and reenable transmissions once tx
> descriptors will be available. There are a lot of live examples in the
> source tree.
>
The stop queue code dose not show in the diff, actually it is at the
beginning of et131x_tx:

/* stop the queue if it's getting full */
if (adapter->tx_ring.used >= NUM_TCB - 1 &&
    !netif_queue_stopped(netdev))
        netif_stop_queue(netdev);

I think the logic is when there is only one descriptor left, stop the
queue and transmit this packet, if tx queue is full, it must have been
stopped, so just drop the packet.

Cheers
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ