Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 05297949 authored by David S. Miller's avatar David S. Miller
Browse files

pkt_sched: Add qdisc_tx_is_noop() helper and use in IPV6.



This indicates if the NOOP scheduler is what is active for TX on a
given device.

Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 6fa9864b
Loading
Loading
Loading
Loading
+8 −0
Original line number Original line Diff line number Diff line
@@ -250,6 +250,14 @@ static inline bool qdisc_tx_changing(struct net_device *dev)
	return (txq->qdisc != txq->qdisc_sleeping);
	return (txq->qdisc != txq->qdisc_sleeping);
}
}


/* Is the device using the noop qdisc?  */
static inline bool qdisc_tx_is_noop(const struct net_device *dev)
{
	const struct netdev_queue *txq = &dev->tx_queue;

	return (txq->qdisc == &noop_qdisc);
}

static inline int __qdisc_enqueue_tail(struct sk_buff *skb, struct Qdisc *sch,
static inline int __qdisc_enqueue_tail(struct sk_buff *skb, struct Qdisc *sch,
				       struct sk_buff_head *list)
				       struct sk_buff_head *list)
{
{
+2 −3
Original line number Original line Diff line number Diff line
@@ -229,10 +229,9 @@ const struct in6_addr in6addr_linklocal_allnodes = IN6ADDR_LINKLOCAL_ALLNODES_IN
const struct in6_addr in6addr_linklocal_allrouters = IN6ADDR_LINKLOCAL_ALLROUTERS_INIT;
const struct in6_addr in6addr_linklocal_allrouters = IN6ADDR_LINKLOCAL_ALLROUTERS_INIT;


/* Check if a valid qdisc is available */
/* Check if a valid qdisc is available */
static inline int addrconf_qdisc_ok(struct net_device *dev)
static inline bool addrconf_qdisc_ok(const struct net_device *dev)
{
{
	struct netdev_queue *txq = &dev->tx_queue;
	return !qdisc_tx_is_noop(dev);
	return (txq->qdisc != &noop_qdisc);
}
}


/* Check if a route is valid prefix route */
/* Check if a route is valid prefix route */