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

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

netdev: Move rest of qdisc state into struct netdev_queue



Now qdisc, qdisc_sleeping, and qdisc_list also live there.

Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 555353cf
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -287,7 +287,7 @@ isdn_net_unbind_channel(isdn_net_local * lp)
		   BEWARE! This chunk of code cannot be called from hardware
		   interrupt handler. I hope it is true. --ANK
		 */
		qdisc_reset(lp->netdev->dev->qdisc);
		qdisc_reset(lp->netdev->dev->tx_queue.qdisc);
	}
	lp->dialstate = 0;
	dev->rx_netdev[isdn_dc2minor(lp->isdn_device, lp->isdn_channel)] = NULL;
+3 −7
Original line number Diff line number Diff line
@@ -451,6 +451,9 @@ static inline void napi_synchronize(const struct napi_struct *n)
struct netdev_queue {
	spinlock_t		lock;
	struct net_device	*dev;
	struct Qdisc		*qdisc;
	struct Qdisc		*qdisc_sleeping;
	struct list_head	qdisc_list;
};

/*
@@ -634,13 +637,6 @@ struct net_device

	struct Qdisc		*qdisc_ingress;

/*
 * Cache line mostly used on queue transmit path (qdisc)
 */
	/* device queue lock */
	struct Qdisc		*qdisc;
	struct Qdisc		*qdisc_sleeping;
	struct list_head	qdisc_list;
	unsigned long		tx_queue_len;	/* Max frames per queue allowed */

	/* Partially transmitted GSO packet. */
+1 −1
Original line number Diff line number Diff line
@@ -223,7 +223,7 @@ int irda_device_is_receiving(struct net_device *dev);
/* Interface for internal use */
static inline int irda_device_txqueue_empty(const struct net_device *dev)
{
	return skb_queue_empty(&dev->qdisc->q);
	return skb_queue_empty(&dev->tx_queue.qdisc->q);
}
int  irda_device_set_raw_mode(struct net_device* self, int status);
struct net_device *alloc_irdadev(int sizeof_priv);
+2 −2
Original line number Diff line number Diff line
@@ -1720,14 +1720,14 @@ gso:
	 * also serializes access to the device queue.
	 */

	q = rcu_dereference(dev->qdisc);
	q = rcu_dereference(txq->qdisc);
#ifdef CONFIG_NET_CLS_ACT
	skb->tc_verd = SET_TC_AT(skb->tc_verd,AT_EGRESS);
#endif
	if (q->enqueue) {
		/* Grab device queue */
		spin_lock(&txq->lock);
		q = dev->qdisc;
		q = txq->qdisc;
		if (q->enqueue) {
			/* reset queue_mapping to zero */
			skb_set_queue_mapping(skb, 0);
+6 −2
Original line number Diff line number Diff line
@@ -79,8 +79,10 @@ static void rfc2863_policy(struct net_device *dev)

static int linkwatch_urgent_event(struct net_device *dev)
{
	struct netdev_queue *txq = &dev->tx_queue;

	return netif_running(dev) && netif_carrier_ok(dev) &&
	       dev->qdisc != dev->qdisc_sleeping;
	       txq->qdisc != txq->qdisc_sleeping;
}


@@ -181,7 +183,9 @@ static void __linkwatch_run_queue(int urgent_only)
		rfc2863_policy(dev);
		if (dev->flags & IFF_UP) {
			if (netif_carrier_ok(dev)) {
				WARN_ON(dev->qdisc_sleeping == &noop_qdisc);
				struct netdev_queue *txq = &dev->tx_queue;

				WARN_ON(txq->qdisc_sleeping == &noop_qdisc);
				dev_activate(dev);
			} else
				dev_deactivate(dev);
Loading