All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jamal Hadi Salim <jhs@mojatatu.com>
To: Daniel Borkmann <daniel@iogearbox.net>,
	Alexei Starovoitov <alexei.starovoitov@gmail.com>
Cc: davem@davemloft.net, netdev@vger.kernel.org,
	xiyou.wangcong@gmail.com, nikolay@cumulusnetworks.com
Subject: Re: [PATCH net-next 1/1] net_sched: Introduce skbmod action
Date: Mon, 18 Jul 2016 06:08:22 -0400	[thread overview]
Message-ID: <578CAA96.2090501@mojatatu.com> (raw)
In-Reply-To: <578CA4EB.7060703@iogearbox.net>

On 16-07-18 05:44 AM, Daniel Borkmann wrote:
> On 07/18/2016 08:51 AM, Jamal Hadi Salim wrote:
>> On 16-07-18 12:19 AM, Alexei Starovoitov wrote:

> Looking at that just out of curiosity on how complex it could look
> for src/dst mac, is it actually functional in iproute2 upstream tree?
>

No it is a bunch of bash script wrapping we did on top of pedit (which
should be no different than adding it to m_pedit as an extension).
We started there then decided that this feature is mostly used with
mirred all the time - so modified  mirred.

> All I see is that pedit can look up 3rd party modules via get_pedit_kind(),
> so it will pick p_%s.so, if built as such, and there's code for p_ip,
> p_tcp, p_udp, p_icmp. But then, for example, all I see in p_udp.c is
> since initial iproute2 import in 2005, apart from some cleanups by
> Stephen:
>

Yes, IP and tcp should be fine. Others were place holders.
Note, there is even no need to change pedit - you could write a bash
script as we did.

> static int
> parse_udp(int *argc_p, char ***argv_p, struct tc_pedit_sel *sel, struct
> tc_pedit_key *tkey)
> {
>      int res = -1;
>      return res;
> }
>
> struct m_pedit_util p_pedit_udp = {
>      NULL,
>      "udp",
>      parse_udp,
> };
>
> Same for tcp, icmp, ipv6 bits code ... :/ Is it still planned to eventually
> complete these?

someone else could run with it; at the moment i think this was ok at
small scale but it hasnt worked well in a larger scale. When you write
other apps (other than tc) to use these APIs parsing all the 32 bit
chunks is more cumbersome then getting a struct which gives me precise
info.

I agree that from a usability PoV, it might be nice to
> have some kind of 'pretty printer' for it besides the existing config
> parser there (e.g. when we know that a loaded instance was done with a
> high-level module, we could annotate that for retrieval on dump or such).
>

If i could tag the structure with something the kernel then returns to
me when i dump, I could add nice pretty printers (same arguement applies
to u32).
But that doesnt solve the programmability issue as being a good cause.

cheers,
jamal

  parent reply	other threads:[~2016-07-18 10:08 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-17  8:41 [PATCH net-next 1/1] net_sched: Introduce skbmod action Jamal Hadi Salim
2016-07-18  4:19 ` Alexei Starovoitov
2016-07-18  6:51   ` Jamal Hadi Salim
2016-07-18  9:44     ` Daniel Borkmann
2016-07-18 10:07       ` Thomas Graf
2016-07-18 10:26         ` Jamal Hadi Salim
2016-07-18 17:38           ` Cong Wang
2016-07-19 10:28             ` Jamal Hadi Salim
2016-07-18 10:08       ` Jamal Hadi Salim [this message]
2016-07-19 13:21         ` Daniel Borkmann
2016-07-19 13:56           ` Jamal Hadi Salim
2016-07-19 15:03             ` Daniel Borkmann
2016-07-19 18:04               ` Cong Wang
2016-07-20  0:23                 ` Daniel Borkmann
2016-07-21  7:27                   ` WAS ( " Jamal Hadi Salim
2016-07-21 14:42                     ` Daniel Borkmann

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=578CAA96.2090501@mojatatu.com \
    --to=jhs@mojatatu.com \
    --cc=alexei.starovoitov@gmail.com \
    --cc=daniel@iogearbox.net \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    --cc=nikolay@cumulusnetworks.com \
    --cc=xiyou.wangcong@gmail.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.