[P4-dev] simple_switch on mininet sends all to port 0

Regis Martins regisftm at gmail.com
Sat Apr 29 06:31:27 EDT 2017


Hi Antonin,

Thank you so much for your prompt answer!
Actually, I was expecting the switch.p4 working as a L2 switch with STP.
I thought it would multicast the ARP to all ports and forward the packet to
the right one.

The switch.p4, as it is, doesn't work like that, apparently...

I tried to create a multicast group and add ports to this but it didn't
work. Still the same behavior...

ubuntu at p4lab01:~/behavioral-model/tools$ sudo bm_CLI --pre SimplePreLAG
Obtaining JSON from switch...
Done
Control utility for runtime P4 table manipulation
RuntimeCmd: mc_mgrp_create 1
Creating multicast group 1
RuntimeCmd: show_ports
  port #       iface name       status  extra info
==================================================
    1           s1-eth1           UP
    2           s1-eth2           UP
RuntimeCmd: mc_node_create 0 1
Creating node with rid 0 , port map 10 and lag map
node was created with handle 0
RuntimeCmd: mc_node_create 1 2
Creating node with rid 1 , port map 100 and lag map
node was created with handle 1
RuntimeCmd: mc_node_associate 1 0
Associating node 0 to multicast group 1
RuntimeCmd: mc_node_associate 1 1
Associating node 1 to multicast group 1
RuntimeCmd: mc_dump
==========
MC ENTRIES
**********
mgrp(1)
  -> (L1h=0, rid=0) -> (ports=[1], lags=[])
  -> (L1h=1, rid=1) -> (ports=[2], lags=[])
==========
LAGS
==========
RuntimeCmd:


What do I need to configure in the switch.p4 to get it working like that?

Thanks 1st,

*Regis Martins*

On Fri, Apr 28, 2017 at 10:37 PM, Antonin Bas <antonin at barefootnetworks.com>
wrote:

> This is the default behavior if you do not set a unicast port in the
> ingress pipeline, i.e. if you do not write the desired port value to the
> standard_metadata.egress_spec field.
>
> On Fri, Apr 28, 2017 at 5:47 PM, Regis Martins <regisftm at gmail.com> wrote:
>
>> Hello everyone!
>>
>> I'm trying to run the 1sw_demo.py using simple_switch.
>>
>> sudo python 1sw_demo.py --behavioral-exe /usr/local/bin/simple_switch
>> --json ../../switch/p4-build/bmpd/switch.json
>>
>> It starts mininet with no problem... however no ping between h1 and h2.
>>
>> Looking in the nanomsg I could see that all packets are sent to port_out:
>> 0, which does not exists.
>>
>>
>> mininet> pingall
>> *** Ping: testing ping reachability
>> h1 -> X
>>
>> type: PACKET_IN, switch_id: 0, cxt_id: 0, sig: 8913935704055548682, id:
>> 13, copy_id: 0, port_in: 1
>> ...
>> type: PACKET_OUT, switch_id: 0, cxt_id: 0, sig: 8913935704055548682, id:
>> 13, copy_id: 0, port_out: 0
>>
>>
>> h2 -> X
>>
>> type: PACKET_IN, switch_id: 0, cxt_id: 0, sig: 7739991354702958702, id:
>> 14, copy_id: 0, port_in: 2
>> ...
>> type: PACKET_OUT, switch_id: 0, cxt_id: 0, sig: 7739991354702958702, id:
>> 14, copy_id: 0, port_out: 0
>>
>> Any clue about what is happening?
>>
>> Thank you so much,
>>
>>
>> *Regis Martins*
>>
>> _______________________________________________
>> 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/20170429/a2ddd157/attachment-0002.html>


More information about the P4-dev mailing list