[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20180821193655.GA15354@nautica>
Date: Tue, 21 Aug 2018 21:36:55 +0200
From: Dominique Martinet <asmadeus@...ewreck.org>
To: Doron Roberts-Kedes <doronrk@...com>
Cc: Tom Herbert <tom@...ntonium.net>, Dave Watson <davejwatson@...com>,
"David S. Miller" <davem@...emloft.net>, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] strparser: remove any offset before parsing messages
Doron Roberts-Kedes wrote on Tue, Aug 21, 2018:
> There are a few issues with this patch. First, it seems like you're
> trying to fix bugs in users of strparser by changing an implementation
> detail of strparser.
Yes, that's why I have been writing since the original discussion that I
do not like this fix, but as I said in the other thread and v0 of this
patch I do not know how to tell the bpf function to start with an offset
in the skb in e.g. kcm_parse_func_strparser
I could add the pull in that function, but that feels a bit wrong on a
separation level to me.
> Second, this implementation change can add malloc's and copies where
> there were none before.
Yes I agree this is more than suboptimal for tls, I've also said that.
> If strparser users do not handle non-zero offset properly, then that
> doesn't motivate changing the implementation of strparser to copy
> around data to accomodate those buggy users.
>
> Why not submit a patch that handles offset properly in the code you
> pointed out?
One of the solutions I had suggested was adding a flag at strparser
setup time to only do that pull for users which cannot handle offset,
but nobody seemed interested two weeks ago. I can still do that.
That's still suboptimal, but I don't have any better idea.
To properly fix the users, I'd really need help with how bpf works to
even know if passing an offset would be possible in the first place, as
I do not see how at this time.
Thanks,
--
Dominique Martinet
Powered by blists - more mailing lists