Re: [iovisor-dev] Question about XDP on multiple NICs with the same driver

2016-08-22 Thread William Tu via iovisor-dev
I see, thanks!

I miss the fact that the xdp prog is attached to struct e1000_adapter
*adapter, which is different per netdev, and thus different per
ifindex.


On Mon, Aug 22, 2016 at 4:47 PM, Alexei Starovoitov
 wrote:
> On Mon, Aug 22, 2016 at 4:26 PM, William Tu via iovisor-dev
>  wrote:
>> Hi,
>>
>> I'm not sure if we discussed this before, but I'm thinking that if I
>> have two identical NICs (ex: two e1000 cards with ifindex 1 and 2),
>> and I load the e1000.ko driver. At userspace, I run
>> $ /samples/bpf/xdp 1
>> $ /samples/bpf/xdp 2
>>
>> Then the latter XDP BPF actually overwrites the former because they
>> share the same driver. And there is no way to trigger different XDP
>> BPFs from different input ports. For example, if I want to return
>> XDP_DROP for packet from ifindex 1, and return XDP_PASS for packets
>> from ifindex 2. Am I understand correct?
>
> why do you see it's being overwritten?
> How did you test that?
>
> two ifindex = two different netdev.
> And in case of e1k:
> struct e1000_adapter *adapter = netdev_priv(netdev);
> adapter->prog
> so we can have different programs on different netdevs
> even when they're both e1k, mlx or anything else.
___
iovisor-dev mailing list
iovisor-dev@lists.iovisor.org
https://lists.iovisor.org/mailman/listinfo/iovisor-dev


Re: [iovisor-dev] Question about XDP on multiple NICs with the same driver

2016-08-22 Thread Alexei Starovoitov via iovisor-dev
On Mon, Aug 22, 2016 at 4:26 PM, William Tu via iovisor-dev
 wrote:
> Hi,
>
> I'm not sure if we discussed this before, but I'm thinking that if I
> have two identical NICs (ex: two e1000 cards with ifindex 1 and 2),
> and I load the e1000.ko driver. At userspace, I run
> $ /samples/bpf/xdp 1
> $ /samples/bpf/xdp 2
>
> Then the latter XDP BPF actually overwrites the former because they
> share the same driver. And there is no way to trigger different XDP
> BPFs from different input ports. For example, if I want to return
> XDP_DROP for packet from ifindex 1, and return XDP_PASS for packets
> from ifindex 2. Am I understand correct?

why do you see it's being overwritten?
How did you test that?

two ifindex = two different netdev.
And in case of e1k:
struct e1000_adapter *adapter = netdev_priv(netdev);
adapter->prog
so we can have different programs on different netdevs
even when they're both e1k, mlx or anything else.
___
iovisor-dev mailing list
iovisor-dev@lists.iovisor.org
https://lists.iovisor.org/mailman/listinfo/iovisor-dev


[iovisor-dev] Question about XDP on multiple NICs with the same driver

2016-08-22 Thread William Tu via iovisor-dev
Hi,

I'm not sure if we discussed this before, but I'm thinking that if I
have two identical NICs (ex: two e1000 cards with ifindex 1 and 2),
and I load the e1000.ko driver. At userspace, I run
$ /samples/bpf/xdp 1
$ /samples/bpf/xdp 2

Then the latter XDP BPF actually overwrites the former because they
share the same driver. And there is no way to trigger different XDP
BPFs from different input ports. For example, if I want to return
XDP_DROP for packet from ifindex 1, and return XDP_PASS for packets
from ifindex 2. Am I understand correct?

Thanks
William
___
iovisor-dev mailing list
iovisor-dev@lists.iovisor.org
https://lists.iovisor.org/mailman/listinfo/iovisor-dev


Re: [iovisor-dev] XDP at netdev1.2

2016-08-22 Thread Tom Herbert via iovisor-dev
On Mon, Aug 22, 2016 at 2:44 PM, Thomas Graf  wrote:
> 2016-08-09 17:47 GMT-04:00 Tom Herbert via iovisor-dev
> :
>> Hi,
>>
>> I requested a workshop at netdev (Oct. 5-7 in Tokyo) to present and
>> showcase XDP. The goal of this is to start providing the public
>> information about XDP and to start talking about real world use cases
>> and development.
>>
>> I am looking for presenters of various topics in XDP. The content
>> might be similar to what we had at XDP summit, but the target audience
>> should be considered to be potentail users and programmers of XDP as
>> opposed to developers working on the infrastructure.
>
> I would love to demo Cilium to provide some context. Hopefully by then
> we will have the loadbalancer running on XDP but I think it will be a
> valuable demo to provide some context for the kernel work either way.
>
> Time requirement is about 20-30 minutes, depends a bit on much context
> has already been provided in the session.
>
That's great.

The way it's looking is that we'll have 1 1/2 hours for the XDP
workshop. We're going to have two XDP HW talks (Barefoot and
Netronome) that are going to be done as separate talks. So for the
workshop we will try to devote most of the time to use cases and
demos.

So far we'd have:
  - Ceth
  - Cilium
  - ILA router/load balancer

We should also have an overview and introduction to XDP. So I'm
thinking 30 minutes for intro/overview then 1 hr. for the above (e.g.
20 minutes for each). What I'm hoping is that we can snag a few people
to get really interested in this and then maybe have some followup
hallway discussions on potential projects and contribution (very
import everyone attending wear their XDP T-shirt, I'll bring some
extras :-) )

Tom
___
iovisor-dev mailing list
iovisor-dev@lists.iovisor.org
https://lists.iovisor.org/mailman/listinfo/iovisor-dev


Re: [iovisor-dev] XDP at netdev1.2

2016-08-22 Thread Thomas Graf via iovisor-dev
2016-08-09 17:47 GMT-04:00 Tom Herbert via iovisor-dev
:
> Hi,
>
> I requested a workshop at netdev (Oct. 5-7 in Tokyo) to present and
> showcase XDP. The goal of this is to start providing the public
> information about XDP and to start talking about real world use cases
> and development.
>
> I am looking for presenters of various topics in XDP. The content
> might be similar to what we had at XDP summit, but the target audience
> should be considered to be potentail users and programmers of XDP as
> opposed to developers working on the infrastructure.

I would love to demo Cilium to provide some context. Hopefully by then
we will have the loadbalancer running on XDP but I think it will be a
valuable demo to provide some context for the kernel work either way.

Time requirement is about 20-30 minutes, depends a bit on much context
has already been provided in the session.

Thomas
___
iovisor-dev mailing list
iovisor-dev@lists.iovisor.org
https://lists.iovisor.org/mailman/listinfo/iovisor-dev


Re: [iovisor-dev] XDP at netdev1.2

2016-08-22 Thread Tom Herbert via iovisor-dev
On Mon, Aug 22, 2016 at 2:32 PM, Yunsong Lu  wrote:
> I can run from 30 minutes to 1 hour, depending on what's the overall plan.
>
We have 1 1/2 hr. so will need to limit to 30 min.

> Any demo plan? We're discussing what to demo there.
>
Yes, a demo would be great!

Tom

> Thanks,
> Yunsong
>
>
>> On Aug 22, 2016, at 17:21, Tom Herbert  wrote:
>>
>>> On Tue, Aug 9, 2016 at 3:02 PM, Yunsong Lu  wrote:
>>> Sounds great.
>>>
>>> What we're doing is to finalize a version of CETH and get it reviewed by 
>>> the community in the next a few weeks, and I can talk about it in detail.
>>
>> Hi Yunsong,
>>
>> Can you tell me how much time you'd like?
>>
>> Tom
>>
>>
>>> The other thing on my mind is to test and show some user cases, for example 
>>> your LB and router. Will you put your code somewhere so that we can try it 
>>> out?
>>>
>>> Do you have a link to the documents presented at XDP Summit?
>>>
>>> Thanks,
>>> Yunsong
>>>
>>> -Original Message-
>>> From: Tom Herbert [mailto:t...@herbertland.com]
>>> Sent: Tuesday, August 09, 2016 2:48 PM
>>> To: Tom Herbert via iovisor-dev; Yunsong Lu
>>> Subject: XDP at netdev1.2
>>>
>>> Hi,
>>>
>>> I requested a workshop at netdev (Oct. 5-7 in Tokyo) to present and 
>>> showcase XDP. The goal of this is to start providing the public information 
>>> about XDP and to start talking about real world use cases and development.
>>>
>>> I am looking for presenters of various topics in XDP. The content might be 
>>> similar to what we had at XDP summit, but the target audience should be 
>>> considered to be potentail users and programmers of XDP as opposed to 
>>> developers working on the infrastructure.
>>>
>>> If you would like to present please let me know. I will put together the 
>>> agenda over next couple of weeks.
>>>
>>> Thanks,
>>> Tom
___
iovisor-dev mailing list
iovisor-dev@lists.iovisor.org
https://lists.iovisor.org/mailman/listinfo/iovisor-dev


Re: [iovisor-dev] XDP at netdev1.2

2016-08-22 Thread Yunsong Lu via iovisor-dev
I can run from 30 minutes to 1 hour, depending on what's the overall plan.

Any demo plan? We're discussing what to demo there.

Thanks,
Yunsong


> On Aug 22, 2016, at 17:21, Tom Herbert  wrote:
> 
>> On Tue, Aug 9, 2016 at 3:02 PM, Yunsong Lu  wrote:
>> Sounds great.
>> 
>> What we're doing is to finalize a version of CETH and get it reviewed by the 
>> community in the next a few weeks, and I can talk about it in detail.
> 
> Hi Yunsong,
> 
> Can you tell me how much time you'd like?
> 
> Tom
> 
> 
>> The other thing on my mind is to test and show some user cases, for example 
>> your LB and router. Will you put your code somewhere so that we can try it 
>> out?
>> 
>> Do you have a link to the documents presented at XDP Summit?
>> 
>> Thanks,
>> Yunsong
>> 
>> -Original Message-
>> From: Tom Herbert [mailto:t...@herbertland.com]
>> Sent: Tuesday, August 09, 2016 2:48 PM
>> To: Tom Herbert via iovisor-dev; Yunsong Lu
>> Subject: XDP at netdev1.2
>> 
>> Hi,
>> 
>> I requested a workshop at netdev (Oct. 5-7 in Tokyo) to present and showcase 
>> XDP. The goal of this is to start providing the public information about XDP 
>> and to start talking about real world use cases and development.
>> 
>> I am looking for presenters of various topics in XDP. The content might be 
>> similar to what we had at XDP summit, but the target audience should be 
>> considered to be potentail users and programmers of XDP as opposed to 
>> developers working on the infrastructure.
>> 
>> If you would like to present please let me know. I will put together the 
>> agenda over next couple of weeks.
>> 
>> Thanks,
>> Tom
___
iovisor-dev mailing list
iovisor-dev@lists.iovisor.org
https://lists.iovisor.org/mailman/listinfo/iovisor-dev


Re: [iovisor-dev] XDP at netdev1.2

2016-08-22 Thread Tom Herbert via iovisor-dev
On Tue, Aug 9, 2016 at 3:02 PM, Yunsong Lu  wrote:
> Sounds great.
>
> What we're doing is to finalize a version of CETH and get it reviewed by the 
> community in the next a few weeks, and I can talk about it in detail.
>

Hi Yunsong,

Can you tell me how much time you'd like?

Tom


> The other thing on my mind is to test and show some user cases, for example 
> your LB and router. Will you put your code somewhere so that we can try it 
> out?
>
> Do you have a link to the documents presented at XDP Summit?
>
> Thanks,
> Yunsong
>
> -Original Message-
> From: Tom Herbert [mailto:t...@herbertland.com]
> Sent: Tuesday, August 09, 2016 2:48 PM
> To: Tom Herbert via iovisor-dev; Yunsong Lu
> Subject: XDP at netdev1.2
>
> Hi,
>
> I requested a workshop at netdev (Oct. 5-7 in Tokyo) to present and showcase 
> XDP. The goal of this is to start providing the public information about XDP 
> and to start talking about real world use cases and development.
>
> I am looking for presenters of various topics in XDP. The content might be 
> similar to what we had at XDP summit, but the target audience should be 
> considered to be potentail users and programmers of XDP as opposed to 
> developers working on the infrastructure.
>
> If you would like to present please let me know. I will put together the 
> agenda over next couple of weeks.
>
> Thanks,
> Tom
___
iovisor-dev mailing list
iovisor-dev@lists.iovisor.org
https://lists.iovisor.org/mailman/listinfo/iovisor-dev