mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2025-03-01 15:38:54 +07:00
net: Use NET_XMIT_SUCCESS where possible.
This is based on work originally done by Patric McHardy. Signed-off-by: Ben Greear <greearb@candelatech.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
06d88e4a88
commit
9871e50edd
@ -418,7 +418,7 @@ static int atm_tc_enqueue(struct sk_buff *skb, struct Qdisc *sch)
|
|||||||
}
|
}
|
||||||
|
|
||||||
ret = qdisc_enqueue(skb, flow->q);
|
ret = qdisc_enqueue(skb, flow->q);
|
||||||
if (ret != 0) {
|
if (ret != NET_XMIT_SUCCESS) {
|
||||||
drop: __maybe_unused
|
drop: __maybe_unused
|
||||||
if (net_xmit_drop_count(ret)) {
|
if (net_xmit_drop_count(ret)) {
|
||||||
sch->qstats.drops++;
|
sch->qstats.drops++;
|
||||||
@ -442,7 +442,7 @@ drop: __maybe_unused
|
|||||||
*/
|
*/
|
||||||
if (flow == &p->link) {
|
if (flow == &p->link) {
|
||||||
sch->q.qlen++;
|
sch->q.qlen++;
|
||||||
return 0;
|
return NET_XMIT_SUCCESS;
|
||||||
}
|
}
|
||||||
tasklet_schedule(&p->task);
|
tasklet_schedule(&p->task);
|
||||||
return NET_XMIT_SUCCESS | __NET_XMIT_BYPASS;
|
return NET_XMIT_SUCCESS | __NET_XMIT_BYPASS;
|
||||||
|
@ -334,7 +334,7 @@ sfq_enqueue(struct sk_buff *skb, struct Qdisc *sch)
|
|||||||
if (++sch->q.qlen <= q->limit) {
|
if (++sch->q.qlen <= q->limit) {
|
||||||
sch->bstats.bytes += qdisc_pkt_len(skb);
|
sch->bstats.bytes += qdisc_pkt_len(skb);
|
||||||
sch->bstats.packets++;
|
sch->bstats.packets++;
|
||||||
return 0;
|
return NET_XMIT_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
sfq_drop(sch);
|
sfq_drop(sch);
|
||||||
|
@ -127,7 +127,7 @@ static int tbf_enqueue(struct sk_buff *skb, struct Qdisc* sch)
|
|||||||
return qdisc_reshape_fail(skb, sch);
|
return qdisc_reshape_fail(skb, sch);
|
||||||
|
|
||||||
ret = qdisc_enqueue(skb, q->qdisc);
|
ret = qdisc_enqueue(skb, q->qdisc);
|
||||||
if (ret != 0) {
|
if (ret != NET_XMIT_SUCCESS) {
|
||||||
if (net_xmit_drop_count(ret))
|
if (net_xmit_drop_count(ret))
|
||||||
sch->qstats.drops++;
|
sch->qstats.drops++;
|
||||||
return ret;
|
return ret;
|
||||||
@ -136,7 +136,7 @@ static int tbf_enqueue(struct sk_buff *skb, struct Qdisc* sch)
|
|||||||
sch->q.qlen++;
|
sch->q.qlen++;
|
||||||
sch->bstats.bytes += qdisc_pkt_len(skb);
|
sch->bstats.bytes += qdisc_pkt_len(skb);
|
||||||
sch->bstats.packets++;
|
sch->bstats.packets++;
|
||||||
return 0;
|
return NET_XMIT_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
static unsigned int tbf_drop(struct Qdisc* sch)
|
static unsigned int tbf_drop(struct Qdisc* sch)
|
||||||
|
@ -85,7 +85,7 @@ teql_enqueue(struct sk_buff *skb, struct Qdisc* sch)
|
|||||||
__skb_queue_tail(&q->q, skb);
|
__skb_queue_tail(&q->q, skb);
|
||||||
sch->bstats.bytes += qdisc_pkt_len(skb);
|
sch->bstats.bytes += qdisc_pkt_len(skb);
|
||||||
sch->bstats.packets++;
|
sch->bstats.packets++;
|
||||||
return 0;
|
return NET_XMIT_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
kfree_skb(skb);
|
kfree_skb(skb);
|
||||||
|
Loading…
Reference in New Issue
Block a user