提交 816f3258 编写于 作者: D David S. Miller

netdev: Kill qdisc_ingress, use netdev->rx_queue.qdisc instead.

Now that our qdisc management is bi-directional, per-queue, and fully
orthogonal, there is no reason to have a special ingress qdisc pointer
in struct net_device.
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 b0e1e646
...@@ -634,9 +634,6 @@ struct net_device ...@@ -634,9 +634,6 @@ struct net_device
struct netdev_queue rx_queue; struct netdev_queue rx_queue;
struct netdev_queue tx_queue ____cacheline_aligned_in_smp; struct netdev_queue tx_queue ____cacheline_aligned_in_smp;
struct Qdisc *qdisc_ingress;
unsigned long tx_queue_len; /* Max frames per queue allowed */ unsigned long tx_queue_len; /* Max frames per queue allowed */
/* Partially transmitted GSO packet. */ /* Partially transmitted GSO packet. */
......
...@@ -2033,7 +2033,7 @@ static int ing_filter(struct sk_buff *skb) ...@@ -2033,7 +2033,7 @@ static int ing_filter(struct sk_buff *skb)
rxq = &dev->rx_queue; rxq = &dev->rx_queue;
spin_lock(&rxq->lock); spin_lock(&rxq->lock);
if ((q = dev->qdisc_ingress) != NULL) if ((q = rxq->qdisc) != NULL)
result = q->enqueue(skb, q); result = q->enqueue(skb, q);
spin_unlock(&rxq->lock); spin_unlock(&rxq->lock);
...@@ -2044,7 +2044,7 @@ static inline struct sk_buff *handle_ing(struct sk_buff *skb, ...@@ -2044,7 +2044,7 @@ static inline struct sk_buff *handle_ing(struct sk_buff *skb,
struct packet_type **pt_prev, struct packet_type **pt_prev,
int *ret, struct net_device *orig_dev) int *ret, struct net_device *orig_dev)
{ {
if (!skb->dev->qdisc_ingress) if (!skb->dev->rx_queue.qdisc)
goto out; goto out;
if (*pt_prev) { if (*pt_prev) {
......
...@@ -450,14 +450,15 @@ dev_graft_qdisc(struct net_device *dev, struct Qdisc *qdisc) ...@@ -450,14 +450,15 @@ dev_graft_qdisc(struct net_device *dev, struct Qdisc *qdisc)
qdisc_lock_tree(dev); qdisc_lock_tree(dev);
if (qdisc && qdisc->flags&TCQ_F_INGRESS) { if (qdisc && qdisc->flags&TCQ_F_INGRESS) {
oqdisc = dev->qdisc_ingress; dev_queue = &dev->rx_queue;
oqdisc = dev_queue->qdisc;
/* Prune old scheduler */ /* Prune old scheduler */
if (oqdisc && atomic_read(&oqdisc->refcnt) <= 1) { if (oqdisc && atomic_read(&oqdisc->refcnt) <= 1) {
/* delete */ /* delete */
qdisc_reset(oqdisc); qdisc_reset(oqdisc);
dev->qdisc_ingress = NULL; dev_queue->qdisc = NULL;
} else { /* new */ } else { /* new */
dev->qdisc_ingress = qdisc; dev_queue->qdisc = qdisc;
} }
} else { } else {
...@@ -739,7 +740,7 @@ static int tc_get_qdisc(struct sk_buff *skb, struct nlmsghdr *n, void *arg) ...@@ -739,7 +740,7 @@ static int tc_get_qdisc(struct sk_buff *skb, struct nlmsghdr *n, void *arg)
return -ENOENT; return -ENOENT;
q = qdisc_leaf(p, clid); q = qdisc_leaf(p, clid);
} else { /* ingress */ } else { /* ingress */
q = dev->qdisc_ingress; q = dev->rx_queue.qdisc;
} }
} else { } else {
struct netdev_queue *dev_queue = &dev->tx_queue; struct netdev_queue *dev_queue = &dev->tx_queue;
...@@ -814,7 +815,7 @@ static int tc_modify_qdisc(struct sk_buff *skb, struct nlmsghdr *n, void *arg) ...@@ -814,7 +815,7 @@ static int tc_modify_qdisc(struct sk_buff *skb, struct nlmsghdr *n, void *arg)
return -ENOENT; return -ENOENT;
q = qdisc_leaf(p, clid); q = qdisc_leaf(p, clid);
} else { /*ingress */ } else { /*ingress */
q = dev->qdisc_ingress; q = dev->rx_queue.qdisc;
} }
} else { } else {
struct netdev_queue *dev_queue = &dev->tx_queue; struct netdev_queue *dev_queue = &dev->tx_queue;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册