[P4-dev] Binding interfaces to bmv2

Antonin Bas antonin at barefootnetworks.com
Sat Sep 15 11:47:31 EDT 2018


Also make sure that Linux forwarding is disabled (net.ipv4.ip_forward),
otherwise traffic will be forwarded by Linux anyway.

On Sat, Sep 15, 2018 at 7:43 AM, Vladimir Gurevich via P4-dev <
p4-dev at lists.p4.org> wrote:

> Hello David,
>
> BMv2 implements P4 spec "to the t", meaning that it initializes all
> metadata to 0 and that includes standard_metadata.egress_spec. Therefore, a
> program that does "nothing" in reality will unconditionally send all the
> packets to port 0.
>
> Happy hacking,
> Vladimir
>
> *Vladimir Gurevich*
>
> *Barefoot Networks*
> *Technical Lead, Customer Engineering*
> Email: vag at barefootnetworks.com
> Phone: (408) 833-4505
>
>
>
> On Fri, Sep 14, 2018 at 6:04 PM David Hancock <dhancock at cs.utah.edu>
> wrote:
>
>> Hello,
>>
>> I'm trying to use bmv2 in a physical cluster (previously I've always used
>> mininet).  I'm trying to bind the interfaces of a node to bmv2 and run a
>> do-nothing P4 program on bmv2.  I expect that packets should not flow
>> through this node once I have done this.  But packets still flow,
>> suggesting that bmv2 is not handling the packets.  I have confirmed with
>> traceroute that the packets are traversing the interfaces that should be
>> bound to bmv2.
>>
>> I start simple_switch as follows:
>>
>> ./simple_switch -i 0@<iface 1> -i 1@<iface 2> -i 2@<iface 3> <path to
>> .json>
>>
>> The result:
>>
>> Thrift port was not specified, will use 9090
>> Calling target program-options parser
>> Adding interface <iface 1> as port 0
>> Adding interface <iface 2> as port 1
>> Adding interface <iface 3> as port 2
>> Thrift server was started
>>
>> I can connect to the CLI.
>>
>> Am I missing something obvious?
>>
>> Thanks,
>>
>> David
>> _______________________________________________
>> P4-dev mailing list
>> P4-dev at lists.p4.org
>> http://lists.p4.org/mailman/listinfo/p4-dev_lists.p4.org
>>
>
> _______________________________________________
> P4-dev mailing list
> P4-dev at lists.p4.org
> http://lists.p4.org/mailman/listinfo/p4-dev_lists.p4.org
>
>


-- 
Antonin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.p4.org/pipermail/p4-dev_lists.p4.org/attachments/20180915/b116be95/attachment.html>


More information about the P4-dev mailing list