Commit 99860208 authored by Florian Westphal's avatar Florian Westphal Committed by David S. Miller

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: default avatarSven Eckelmann <sven@narfation.org>
Signed-off-by: default avatarFlorian Westphal <fw@strlen.de>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent eb37c563
...@@ -90,7 +90,6 @@ void netdev_set_default_ethtool_ops(struct net_device *dev, ...@@ -90,7 +90,6 @@ void netdev_set_default_ethtool_ops(struct net_device *dev,
#define NET_XMIT_SUCCESS 0x00 #define NET_XMIT_SUCCESS 0x00
#define NET_XMIT_DROP 0x01 /* skb dropped */ #define NET_XMIT_DROP 0x01 /* skb dropped */
#define NET_XMIT_CN 0x02 /* congestion notification */ #define NET_XMIT_CN 0x02 /* congestion notification */
#define NET_XMIT_POLICED 0x03 /* skb is shot by police */
#define NET_XMIT_MASK 0x0f /* qdisc flags in net/sch_generic.h */ #define NET_XMIT_MASK 0x0f /* qdisc flags in net/sch_generic.h */
/* NET_XMIT_CN is special. It does not guarantee that this packet is lost. It /* NET_XMIT_CN is special. It does not guarantee that this packet is lost. It
......
...@@ -653,7 +653,7 @@ static int batadv_route_unicast_packet(struct sk_buff *skb, ...@@ -653,7 +653,7 @@ static int batadv_route_unicast_packet(struct sk_buff *skb,
len + ETH_HLEN); len + ETH_HLEN);
ret = NET_RX_SUCCESS; ret = NET_RX_SUCCESS;
} else if (res == NET_XMIT_POLICED) { } else if (res == -EINPROGRESS) {
/* skb was buffered and consumed */ /* skb was buffered and consumed */
ret = NET_RX_SUCCESS; ret = NET_RX_SUCCESS;
} }
......
...@@ -156,7 +156,7 @@ int batadv_send_unicast_skb(struct sk_buff *skb, ...@@ -156,7 +156,7 @@ int batadv_send_unicast_skb(struct sk_buff *skb,
* attempted. * attempted.
* *
* Return: NET_XMIT_SUCCESS on success, NET_XMIT_DROP on failure, or * Return: NET_XMIT_SUCCESS on success, NET_XMIT_DROP on failure, or
* NET_XMIT_POLICED if the skb is buffered for later transmit. * -EINPROGRESS if the skb is buffered for later transmit.
*/ */
int batadv_send_skb_to_orig(struct sk_buff *skb, int batadv_send_skb_to_orig(struct sk_buff *skb,
struct batadv_orig_node *orig_node, struct batadv_orig_node *orig_node,
...@@ -188,7 +188,7 @@ int batadv_send_skb_to_orig(struct sk_buff *skb, ...@@ -188,7 +188,7 @@ int batadv_send_skb_to_orig(struct sk_buff *skb,
* network coding fails, then send the packet as usual. * network coding fails, then send the packet as usual.
*/ */
if (recv_if && batadv_nc_skb_forward(skb, neigh_node)) { if (recv_if && batadv_nc_skb_forward(skb, neigh_node)) {
ret = NET_XMIT_POLICED; ret = -EINPROGRESS;
} else { } else {
batadv_send_unicast_skb(skb, neigh_node); batadv_send_unicast_skb(skb, neigh_node);
ret = NET_XMIT_SUCCESS; ret = NET_XMIT_SUCCESS;
......
...@@ -3463,7 +3463,6 @@ static void pktgen_xmit(struct pktgen_dev *pkt_dev) ...@@ -3463,7 +3463,6 @@ static void pktgen_xmit(struct pktgen_dev *pkt_dev)
break; break;
case NET_XMIT_DROP: case NET_XMIT_DROP:
case NET_XMIT_CN: case NET_XMIT_CN:
case NET_XMIT_POLICED:
/* skb has been consumed */ /* skb has been consumed */
pkt_dev->errors++; pkt_dev->errors++;
break; break;
......
...@@ -95,8 +95,6 @@ static int tclass_notify(struct net *net, struct sk_buff *oskb, ...@@ -95,8 +95,6 @@ static int tclass_notify(struct net *net, struct sk_buff *oskb,
Expected action: do not backoff, but wait until queue will clear. Expected action: do not backoff, but wait until queue will clear.
NET_XMIT_CN - probably this packet enqueued, but another one dropped. NET_XMIT_CN - probably this packet enqueued, but another one dropped.
Expected action: backoff or ignore Expected action: backoff or ignore
NET_XMIT_POLICED - dropped by police.
Expected action: backoff or error to real-time apps.
Auxiliary routines: Auxiliary routines:
......
...@@ -363,7 +363,7 @@ static int atm_tc_enqueue(struct sk_buff *skb, struct Qdisc *sch) ...@@ -363,7 +363,7 @@ static int atm_tc_enqueue(struct sk_buff *skb, struct Qdisc *sch)
struct atm_flow_data *flow; struct atm_flow_data *flow;
struct tcf_result res; struct tcf_result res;
int result; int result;
int ret = NET_XMIT_POLICED; int ret = NET_XMIT_SUCCESS | __NET_XMIT_BYPASS;
pr_debug("atm_tc_enqueue(skb %p,sch %p,[qdisc %p])\n", skb, sch, p); pr_debug("atm_tc_enqueue(skb %p,sch %p,[qdisc %p])\n", skb, sch, p);
result = TC_POLICE_OK; /* be nice to gcc */ result = TC_POLICE_OK; /* be nice to gcc */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment