All of lore.kernel.org
 help / color / mirror / Atom feed
From: Florian Westphal <fw@strlen.de>
To: Jamal Hadi Salim <jhs@mojatatu.com>
Cc: Florian Westphal <fw@strlen.de>, netdev@vger.kernel.org
Subject: Re: [PATCH -next] net: sched: remove TC_MUNGED bits
Date: Fri, 1 May 2015 11:46:19 +0200	[thread overview]
Message-ID: <20150501094619.GA22481@breakpoint.cc> (raw)
In-Reply-To: <5542CC25.8060501@mojatatu.com>

Jamal Hadi Salim <jhs@mojatatu.com> wrote:
> On 04/30/15 17:16, Alexei Starovoitov wrote:
> >On Thu, Apr 30, 2015 at 12:12:00PM +0200, Florian Westphal wrote:
> >>Not used.
> >>
> >>pedit sets TC_MUNGED when packet content was altered, but all the core
> >>does is unset MUNGED again and then set OK2MUNGE.
> >>
> >>And the latter isn't tested anywhere. So lets remove both
> >>TC_MUNGED and TC_OK2MUNGE.
> >>
> >>Signed-off-by: Florian Westphal <fw@strlen.de>
> >
> >Wanted to do the same.
> >iproute2 doesn't use 'munge' flag either.
> >
> >Acked-by: Alexei Starovoitov <ast@plumgrid.com>
> >
> 
> Florian,
> If you are going to take this path then fix pedit to do a pskb_expand.

Jamal, what about this:

- I'll wait for this patch to be accepted or rejected
- same for your suggested rttl removal patch to go in

After that I will then send out all my pending tc_verd patches.

As for pedit, my suggestion would be to use skb_make_writeable(),
something like.... (untested):

-                       ptr = skb_header_pointer(skb, off + offset, 4, &_data);
-                       if (!ptr)
+                       if (!skb_make_writable(skb, off + offset + 4))
                                goto bad;
+
+                       ptr = skb->data + off + offset;
+

Does that sound ok?  I can send a followup patch to take care of pedit.

[ I'd first move skb_make_writeable out of netfilter core, of course ]

> I think it would be better to fix the actions that do
> pskb_expand_head() and let them indicated they were munged.

I don't think 'i was munged' flag is needed, the helper should
do on-demand copy if needed to get us exclusive access.

Thanks Jamal.

  reply	other threads:[~2015-05-01  9:46 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-30 10:12 [PATCH -next] net: sched: remove TC_MUNGED bits Florian Westphal
2015-04-30 21:16 ` Alexei Starovoitov
2015-05-01  0:43   ` Jamal Hadi Salim
2015-05-01  9:46     ` Florian Westphal [this message]
2015-05-01 12:15       ` Jamal Hadi Salim
2015-05-01 12:55 ` Daniel Borkmann
2015-05-03  2:25 ` David Miller

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=20150501094619.GA22481@breakpoint.cc \
    --to=fw@strlen.de \
    --cc=jhs@mojatatu.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 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.