[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20120511084500.GB1561@minipsycho>
Date: Fri, 11 May 2012 10:45:00 +0200
From: Jiri Pirko <jpirko@...hat.com>
To: Li Yu <raise.sail@...il.com>
Cc: Eric Dumazet <eric.dumazet@...il.com>,
David Miller <davem@...emloft.net>, netdev@...r.kernel.org,
bhutchings@...arflare.com, shemminger@...tta.com, matt@...abs.org
Subject: Re: [Q/RFC] BPF use in broader scope
Fri, May 11, 2012 at 09:06:42AM CEST, raise.sail@...il.com wrote:
>于 2012年05月11日 14:22, Jiri Pirko 写道:
>>Fri, May 11, 2012 at 04:41:31AM CEST, raise.sail@...il.com wrote:
>>>于 2012年03月29日 17:31, Jiri Pirko 写道:
>>>>Thu, Mar 29, 2012 at 10:45:32AM CEST, eric.dumazet@...il.com wrote:
>>>>>On Thu, 2012-03-29 at 10:31 +0200, Jiri Pirko wrote:
>>>>>>Thu, Mar 29, 2012 at 10:02:25AM CEST, eric.dumazet@...il.com wrote:
>>>>>>>On Thu, 2012-03-29 at 09:54 +0200, Jiri Pirko wrote:
>>>>>>>
>>>>>>>>Yep, I'm aware. I must admit that the JIT code scares me a litte :(
>>>>>>>>
>>>>>>>
>>>>>>>If you add a new XOR instruction in interpreter only, JIT compiler will
>>>>>>>automatically aborts, so no risk.
>>>>>>>
>>>>>>>Each arch maintainer will add the support for the new instructions as
>>>>>>>separate patches.
>>>>>>>
>>>>>>>So you can focus on net/core/filter.c file only.
>>>>>>>
>>>>>>
>>>>>>Ok - I can do this for 2). But for 3) JITs need to be modified. So I
>>>>>>would like to kindly ask you and Matt if you can do this modification so
>>>>>>bpf_func takes pointer to mem (scratch store) as second parameter. I'm
>>>>>>sure it's very easy for you to do.
>>>>>
>>>>>I am not sure why you want this.
>>>>>
>>>>>This adds register pressure (at least for x86) ...
>>>>
>>>>Well I think that there would become handy to be able to pass some data
>>>>to bpf_func (other than skb). But it's just an idea.
>>>>
>>>
>>>Hi, Jiri Pirko, any progress of extended BPF? :)
>>>
>>>I am interesting in 3) much. For my requirements,
>>>it just only need BPF has ability to handle arbitrary
>>>"pre-filled memory area", but not handle both a skb and
>>>such a memory area at same time, so I think that register
>>>pressure should not be become the performance bottleneck
>>>here.
>>>
>>>Otherwise, I must construct a fake sk_buff to execute filter
>>>feature, it is ugly, isn't it?
>>>
>>>I guess that Nuno Martins's requirements also are similar.
>>>
>>>And, I also would like join this project, if you need.
>>
>>For my needs it turned out I do not need pre-filled memory. So I dropped
>>that point.
>>
>
>Oops, I may try to work on this, would you like send
>a copy of your sk-unattached filters patch to me ?
>I think that it is a good start.
>
>Thanks for your time.
commit 302d663740cfaf2c364df6bb61cd339014ed714c
Author: Jiri Pirko <jpirko@...hat.com>
Date: Sat Mar 31 11:01:19 2012 +0000
filter: Allow to create sk-unattached filters
Today, BPF filters are bind to sockets. Since BPF machine becomes handy
for other purposes, this patch allows to create unattached filter.
Signed-off-by: Jiri Pirko <jpirko@...hat.com>
Signed-off-by: David S. Miller <davem@...emloft.net>
I use that in drivers/net/team/team_mode_loadbalance.c
Jirka
>
>Yu
>
>>>
>>>Thanks
>>>
>>>Yu
>>>
>>>>>
>>>>>
>>>>>
>>>>--
>>>>To unsubscribe from this list: send the line "unsubscribe netdev" in
>>>>the body of a message to majordomo@...r.kernel.org
>>>>More majordomo info at http://vger.kernel.org/majordomo-info.html
>>>>
>>>
>>
>
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists