Skip to content

Commit 9986020

Browse files
Florian Westphaldavem330
authored andcommitted
sched: remove NET_XMIT_POLICED
sch_atm returns this when TC_ACT_SHOT classification occurs. But all other schedulers that use tc_classify (htb, hfsc, drr, fq_codel ...) return NET_XMIT_SUCCESS | __BYPASS in this case so just do that in atm. BATMAN uses it as an intermediate return value to signal forwarding vs. buffering, but it did not return POLICED to callers outside of BATMAN. Reviewed-by: Sven Eckelmann <[email protected]> Signed-off-by: Florian Westphal <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent eb37c56 commit 9986020

File tree

6 files changed

+4
-8
lines changed

6 files changed

+4
-8
lines changed

include/linux/netdevice.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,6 @@ void netdev_set_default_ethtool_ops(struct net_device *dev,
9090
#define NET_XMIT_SUCCESS 0x00
9191
#define NET_XMIT_DROP 0x01 /* skb dropped */
9292
#define NET_XMIT_CN 0x02 /* congestion notification */
93-
#define NET_XMIT_POLICED 0x03 /* skb is shot by police */
9493
#define NET_XMIT_MASK 0x0f /* qdisc flags in net/sch_generic.h */
9594

9695
/* NET_XMIT_CN is special. It does not guarantee that this packet is lost. It

net/batman-adv/routing.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -653,7 +653,7 @@ static int batadv_route_unicast_packet(struct sk_buff *skb,
653653
len + ETH_HLEN);
654654

655655
ret = NET_RX_SUCCESS;
656-
} else if (res == NET_XMIT_POLICED) {
656+
} else if (res == -EINPROGRESS) {
657657
/* skb was buffered and consumed */
658658
ret = NET_RX_SUCCESS;
659659
}

net/batman-adv/send.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ int batadv_send_unicast_skb(struct sk_buff *skb,
156156
* attempted.
157157
*
158158
* Return: NET_XMIT_SUCCESS on success, NET_XMIT_DROP on failure, or
159-
* NET_XMIT_POLICED if the skb is buffered for later transmit.
159+
* -EINPROGRESS if the skb is buffered for later transmit.
160160
*/
161161
int batadv_send_skb_to_orig(struct sk_buff *skb,
162162
struct batadv_orig_node *orig_node,
@@ -188,7 +188,7 @@ int batadv_send_skb_to_orig(struct sk_buff *skb,
188188
* network coding fails, then send the packet as usual.
189189
*/
190190
if (recv_if && batadv_nc_skb_forward(skb, neigh_node)) {
191-
ret = NET_XMIT_POLICED;
191+
ret = -EINPROGRESS;
192192
} else {
193193
batadv_send_unicast_skb(skb, neigh_node);
194194
ret = NET_XMIT_SUCCESS;

net/core/pktgen.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3463,7 +3463,6 @@ static void pktgen_xmit(struct pktgen_dev *pkt_dev)
34633463
break;
34643464
case NET_XMIT_DROP:
34653465
case NET_XMIT_CN:
3466-
case NET_XMIT_POLICED:
34673466
/* skb has been consumed */
34683467
pkt_dev->errors++;
34693468
break;

net/sched/sch_api.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,8 +95,6 @@ static int tclass_notify(struct net *net, struct sk_buff *oskb,
9595
Expected action: do not backoff, but wait until queue will clear.
9696
NET_XMIT_CN - probably this packet enqueued, but another one dropped.
9797
Expected action: backoff or ignore
98-
NET_XMIT_POLICED - dropped by police.
99-
Expected action: backoff or error to real-time apps.
10098
10199
Auxiliary routines:
102100

net/sched/sch_atm.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -363,7 +363,7 @@ static int atm_tc_enqueue(struct sk_buff *skb, struct Qdisc *sch)
363363
struct atm_flow_data *flow;
364364
struct tcf_result res;
365365
int result;
366-
int ret = NET_XMIT_POLICED;
366+
int ret = NET_XMIT_SUCCESS | __NET_XMIT_BYPASS;
367367

368368
pr_debug("atm_tc_enqueue(skb %p,sch %p,[qdisc %p])\n", skb, sch, p);
369369
result = TC_POLICE_OK; /* be nice to gcc */

0 commit comments

Comments
 (0)