netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Daniel Borkmann <daniel@iogearbox.net>
To: Eric Dumazet <eric.dumazet@gmail.com>
Cc: davem@davemloft.net, alexei.starovoitov@gmail.com,
	jhs@mojatatu.com, john.fastabend@gmail.com,
	netdev@vger.kernel.org
Subject: Re: [PATCH net-next] net, sched: add clsact qdisc
Date: Thu, 07 Jan 2016 17:52:54 +0100	[thread overview]
Message-ID: <568E97E6.1000701@iogearbox.net> (raw)
In-Reply-To: <1452184195.8255.215.camel@edumazet-glaptop2.roam.corp.google.com>

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

      reply	other threads:[~2016-01-07 16:52 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-06  1:00 [PATCH net-next] net, sched: add clsact qdisc Daniel Borkmann
2016-01-06  2:40 ` Cong Wang
2016-01-07  3:53 ` Alexei Starovoitov
2016-01-07 10:09   ` Hannes Frederic Sowa
2016-01-07 11:58     ` Daniel Borkmann
2016-01-07 14:29       ` Jamal Hadi Salim
2016-01-07 14:42       ` Hannes Frederic Sowa
2016-01-07 15:16         ` Daniel Borkmann
2016-01-07 16:29 ` Eric Dumazet
2016-01-07 16:52   ` Daniel Borkmann [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=568E97E6.1000701@iogearbox.net \
    --to=daniel@iogearbox.net \
    --cc=alexei.starovoitov@gmail.com \
    --cc=davem@davemloft.net \
    --cc=eric.dumazet@gmail.com \
    --cc=jhs@mojatatu.com \
    --cc=john.fastabend@gmail.com \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).