Error when executing standalone simple_switch_grpc

4 views
Skip to first unread message

Sergio Gutiérrez

unread,
Sep 27, 2022, 1:21:44 AM9/27/22
to p4-dev
Hello all.

I am trying to implement an scenario as follows:

- I compiled the targets included in the behavioral-model repository. In particular, I am interested in running simple_switch_grpc target.

- I am creating a very simple P4 program (attached), and I am compiling it in order to generate both the output file (json) and the p4Info file.

- I am modifying the pipeconf application (available from the ngsdn tutorial repository) to reflect the generated files.

I can sucessfully compile and deploy the application in ONOS (with the P4 related applications enabled), and I can sucessfully upload a network configuration file for my switch.

In brief, I would like to be able to run the simple_switch_grpc in standalone mode, and connect it to the ONOS controller in order to configure it from there.

Now, when I start the switch, I  have the following messages in the ONOS log:

2022-09-27T04:55:15,442 | WARN  | grpc-default-executor-1 | GnmiClientImpl                   | 220 - org.onosproject.onos-protocols-grpc-ctl - 2.7.0 | Error while per
forming GET on device:s1: UNIMPLEMENTED: not implemented
2022-09-27T04:55:16,476 | WARN  | FlowRuleDriverProvider-0 | P4RuntimeFlowRuleProgrammable    | 221 - org.onosproject.onos-protocols-grpc-utils - 2.7.0 | Unable to tr
anslate flow rule for pipeconf 'org.onosproject.ngsdn-tutorial': The following criteria cannot be translated for table 'IngressPipeImpl.acl_table': IP_PROTO, ICMPV6_T
YPE [DefaultFlowEntry{rule=DefaultFlowEntry{id=100001e85c6bd, deviceId=device:s1, priority=40000, selector=[ETH_TYPE:ipv6, IP_PROTO:58, ICMPV6_TYPE:135], treatment=De
faultTrafficTreatment{immediate=[IngressPipeImpl.clone_to_cpu()], deferred=[], transition=None, meter=[], cleared=false, StatTrigger=null, metadata=null}, tableId=Ing
ressPipeImpl.acl_table, created=1664254356131}, state=PENDING_ADD, life=0, liveType=UNKNOWN, packets=0, bytes=0, errCode=-1, errType=-1, lastSeen=1664254356131}]

I have the following questions:

- What might be causing the error related the criteria, considering that I am eliminating all the code associated to IPv6 in the application source files?

- Is there something that I  need to consider when modifying the pipeconf application?

- What can be the cause of the error associated to the GET?

Thanks in advance for your attention and any hint you can provide me.

Kind regards,

Sergio Gutiérrez
sw_sample.p4
sw_sample.p4info
netcfg.json

Davide Scano

unread,
Sep 27, 2022, 9:08:06 AM9/27/22
to p4-...@lists.p4.org

Hi Sergio,

- What might be causing the error related the criteria, considering that I am eliminating all the code associated to IPv6 in the application source files?
Imho opinion somewhere in the ONOS application that you use for manage the p4 program you have the IPv6. The development workflow is write your P4 program and then you have to write a ONOS application for managing and control the P4 Pipeline.

- What can be the cause of the error associated to the GET?
Migth be that you are using stratum driver, if you deploy bmv2 switch grpc without stratum you should run only the bmv2 driver in ONOS.

Could you please provide the list of onos app that you are using and the status of the flow rules?

best
Davide
--
You received this message because you are subscribed to the Google Groups "p4-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to p4-dev+un...@lists.p4.org.
To view this discussion on the web visit https://groups.google.com/a/lists.p4.org/d/msgid/p4-dev/5aa0a743-d1f2-4a9e-ada8-3a7143b6cb16n%40lists.p4.org.

Sergio Gutierrez

unread,
Sep 27, 2022, 11:29:53 AM9/27/22
to Davide Scano, p4-...@lists.p4.org
Hello Davide.

Thanks for your reply and hints

- What might be causing the error related the criteria, considering that I am eliminating all the code associated to IPv6 in the application source files?
Imho opinion somewhere in the ONOS application that you use for manage the p4 program you have the IPv6. The development workflow is write your P4 program and then you have to write a ONOS application for managing and control the P4 Pipeline.

I will take a look on this. I believed to have removed all the IPv6 code from the pipeconf application, but I think I must to double check then 

 
- What can be the cause of the error associated to the GET?
Migth be that you are using stratum driver, if you deploy bmv2 switch grpc without stratum you should run only the bmv2 driver in ONOS.

Could you please provide the list of onos app that you are using and the status of the flow rules?


I guess this is probably my problem. I have enabled both the stratum and bmv2 driver.

I will also check this

onos@root > apps -s | grep '^\*'                                                                                                                              15:24:13
*  23 org.onosproject.protocols.grpc       2.7.0    gRPC Protocol Subsystem
*  26 org.onosproject.hostprovider         2.7.0    Host Location Provider
*  27 org.onosproject.lldpprovider         2.7.0    LLDP Link Provider
*  39 org.onosproject.protocols.gnmi       2.7.0    gNMI Protocol Subsystem
*  40 org.onosproject.generaldeviceprovider 2.7.0    General Device Provider
*  41 org.onosproject.protocols.p4runtime  2.7.0    P4Runtime Protocol Subsystem
*  42 org.onosproject.p4runtime            2.7.0    P4Runtime Provider
*  43 org.onosproject.drivers              2.7.0    Default Drivers
*  44 org.onosproject.drivers.p4runtime    2.7.0    P4Runtime Drivers
*  45 org.onosproject.pipelines.basic      2.7.0    Basic Pipelines
*  82 org.onosproject.gui2                 2.7.0    ONOS GUI2
*  85 org.onosproject.drivers.gnmi         2.7.0    gNMI Drivers
*  86 org.onosproject.protocols.gnoi       2.7.0    gNOI Protocol Subsystem
*  87 org.onosproject.drivers.gnoi         2.7.0    gNOI Drivers
*  88 org.onosproject.drivers.stratum      2.7.0    Stratum Drivers
* 171 org.onosproject.drivers.bmv2         2.7.0    BMv2 Drivers
* 174 org.onosproject.ngsdn-tutorial       1.0.SNAPSHOT NG-SDN Tutorial App
onos@root > flows -s                                                                                                                                          15:24:17
deviceId=device:s1, flowRuleCount=4
   ADDED, bytes=0, packets=0, table=IngressPipeImpl.acl_table, priority=40000, selector=[ETH_TYPE:lldp], treatment=[immediate=[IngressPipeImpl.clone_to_cpu()]]
   PENDING_ADD, bytes=0, packets=0, table=IngressPipeImpl.acl_table, priority=40000, selector=[ETH_TYPE:ipv6, IP_PROTO:58, ICMPV6_TYPE:136], treatment=[immediate=[In
gressPipeImpl.clone_to_cpu()]]
   PENDING_ADD, bytes=0, packets=0, table=IngressPipeImpl.acl_table, priority=40000, selector=[ETH_TYPE:ipv6, IP_PROTO:58, ICMPV6_TYPE:135], treatment=[immediate=[In
gressPipeImpl.clone_to_cpu()]]
   ADDED, bytes=0, packets=0, table=IngressPipeImpl.acl_table, priority=40000, selector=[ETH_TYPE:arp], treatment=[immediate=[IngressPipeImpl.clone_to_cpu()]]
onos@root >            
 

Thanks for your help.

Kind regards.

Sergio
 

Davide Scano

unread,
Sep 28, 2022, 3:11:35 PM9/28/22
to Sergio Gutierrez, p4-...@lists.p4.org
Hi Sergio,

If you use BMV2 switch without Stratum I suggest to you to activate only the Bmv2 driver.  The flow rules imho are correct, but I belive that somewere in your code you have  the installation of  IPV6 flow rules that are not "supported " your P4 pipeline, So you see IPv6 flow rules in state pending add.

Best,

Davide

Reply all
Reply to author
Forward
0 new messages