On 01/07/2016 05:29 PM, Eric Dumazet wrote:
On Wed, 2016-01-06 at 02:00 +0100, Daniel Borkmann wrote:
This work adds a generalization of the ingress qdisc as a qdisc holding
only classifiers. The clsact qdisc works on ingress, but also on egress.
In both cases, it's execution happens without taking the qdisc lock, and
the main difference for the egress part compared to prior version of [1]
is that this can be applied with _any_ underlying real egress qdisc (also
classless ones).

+void net_dec_egress_queue(void)
+{
+       static_key_slow_dec(&egress_needed);
+}
+EXPORT_SYMBOL_GPL(net_dec_egress_queue);
+#endif
+
  static struct static_key netstamp_needed __read_mostly;
  #ifdef HAVE_JUMP_LABEL
  /* We are not allowed to call static_key_slow_dec() from irq context
@@ -3100,6 +3116,48 @@ int dev_loopback_xmit(struct net *net, struct sock *sk, 
struct sk_buff *skb)
  }
  EXPORT_SYMBOL(dev_loopback_xmit);

+#ifdef CONFIG_NET_EGRESS
+static struct sk_buff *
+sch_handle_egress(struct sk_buff *skb, int *ret, struct net_device *dev)
+{
+       struct tcf_proto *cl = rcu_dereference_bh(dev->egress_cl_list);
+       struct tcf_result cl_res;
+
+       if (!cl)
+               return skb;
+
+       qdisc_skb_cb(skb)->pkt_len = skb->len;

You probably should move qdisc_pkt_len_init() out of __dev_xmit_skb()
and call it earlier. Then this pkt_len partial init is no longer needed.

Agreed, will change it for v2.

Thanks,
Daniel
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to