mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-05 08:26:59 +00:00
net: core: dev: replace state xoff flag comparison by netif_xmit_stopped method
Function netif_schedule_queue() has a hardcoded comparison between queue state and any xoff flag. This comparison does the same thing as method netif_xmit_stopped(). In terms of code clarity, it is better. See other methods like: generic_xdp_tx() and dev_direct_xmit(). Signed-off-by: Julio Faracco <jcfaracco@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
5f71c84038
commit
5be5515a8e
1 changed files with 1 additions and 1 deletions
|
@ -2771,7 +2771,7 @@ static struct dev_kfree_skb_cb *get_kfree_skb_cb(const struct sk_buff *skb)
|
||||||
void netif_schedule_queue(struct netdev_queue *txq)
|
void netif_schedule_queue(struct netdev_queue *txq)
|
||||||
{
|
{
|
||||||
rcu_read_lock();
|
rcu_read_lock();
|
||||||
if (!(txq->state & QUEUE_STATE_ANY_XOFF)) {
|
if (!netif_xmit_stopped(txq)) {
|
||||||
struct Qdisc *q = rcu_dereference(txq->qdisc);
|
struct Qdisc *q = rcu_dereference(txq->qdisc);
|
||||||
|
|
||||||
__netif_schedule(q);
|
__netif_schedule(q);
|
||||||
|
|
Loading…
Reference in a new issue