[P4-dev] Problem reading table entries from BMv2 via gRPC/P4Runtime

Carmelo Cascone carmelo at opennetworking.org
Tue Jul 18 13:12:51 EDT 2017


Hi Antonin,

I’m seeing some problems when I try to read table entries from BMv2 via gRPC using P4Runtime.
I’m using the latest master of both PI and BMv2.

This is the P4 program running on the switch:
https://github.com/opennetworkinglab/onos/blob/master/tools/test/p4src/p4-16/default.p4

BMv2 JSON and P4Info are attached.

Below are the messages that I send to the switch (in order). After sending the read request for the table, BMv2 crashes (see log below).

Any idea of that the problem could be?

Thanks.
Carmelo

—

*** SENDING GRPC MESSAGE [dummy:1]
dummy.DummyService/SayHello:

INFO org.onosproject.p4runtime.ctl.P4RuntimeClientImpl - Setting pipeline config for dummy:1 to mock using BMV2_JSON…
INFO *** SENDING GRPC MESSAGE [dummy:1]
p4.P4Runtime/SetForwardingPipelineConfig:
action: VERIFY_AND_COMMIT
configs {
 device_id: 1
 p4info {
   tables {
     preamble {
       id: 33617813
       name: "table0"
       alias: "table0"
     }
     match_fields {
       id: 1
       name: "standard_metadata.ingress_port"
       bitwidth: 9
       match_type: TERNARY
     }
     match_fields {
       id: 2
       name: "hdr.ethernet.dstAddr"
       bitwidth: 48
       match_type: TERNARY
     }
     match_fields {
       id: 3
       name: "hdr.ethernet.srcAddr"
       bitwidth: 48
       match_type: TERNARY
     }
     match_fields {
       id: 4
       name: "hdr.ethernet.etherType"
       bitwidth: 16
       match_type: TERNARY
     }
     action_refs {
       id: 16794308
     }
     action_refs {
       id: 16829080
     }
     action_refs {
       id: 16793508
     }
     action_refs {
       id: 16800567
       annotations: "@defaultonly()"
     }
     direct_resource_ids: 301990488
     size: 1024
     with_entry_timeout: true
   }
   actions {
     preamble {
       id: 16794308
       name: "set_egress_port"
       alias: "set_egress_port"
     }
     params {
       id: 1
       name: "port"
       bitwidth: 9
     }
   }
   actions {
     preamble {
       id: 16829080
       name: "send_to_cpu"
       alias: "send_to_cpu"
     }
   }
   actions {
     preamble {
       id: 16793508
       name: "drop"
       alias: "drop"
     }
   }
   actions {
     preamble {
       id: 16800567
       name: "NoAction"
       alias: "NoAction"
     }
   }
   counters {
     preamble {
       id: 302025528
       name: "port_counters_control.egress_port_counter"
       alias: "egress_port_counter"
     }
     spec {
       unit: PACKETS
     }
     size: 254
   }
   counters {
     preamble {
       id: 301999025
       name: "port_counters_control.ingress_port_counter"
       alias: "ingress_port_counter"
     }
     spec {
       unit: PACKETS
     }
     size: 254
   }
   direct_counters {
     preamble {
       id: 301990488
       name: "table0_counter"
       alias: "table0_counter"
     }
     spec {
       unit: PACKETS
     }
     direct_table_id: 33617813
   }
 }
 p4_device_config: "\b\001\022\000"
}

*** RECEIVED GRPC MESSAGE [dummy:1]
p4.P4Runtime/SetForwardingPipelineConfig:

INFO org.onosproject.p4runtime.ctl.P4RuntimeClientImpl - Initializing stream chanel on dummy:1...
INFO org.onosproject.p4runtime.ctl.P4RuntimeClientImpl - Sending arbitration update to dummy:1...
INFO *** SENDING GRPC MESSAGE [dummy:1]
p4.P4Runtime/StreamChannel:
arbitration {
 device_id: 1
}

INFO Dumping table table0 from dummy:1 (pipeconf mock)...
1815 [onos-p4runtime-client-dummy:1-dummy:1-2] INFO *** SENDING GRPC MESSAGE [dummy:1]
p4.P4Runtime/Read:
device_id: 1
entities {
 table_entry {
   table_id: 33617813
 }
}

WARN org.onosproject.p4runtime.ctl.P4RuntimeClientImpl - Error on stream channel for dummy:1: Status{code=INTERNAL, description=Connection closed with unknown cause, cause=null}


BMv2 LOG:

p4-mininet at p4-mininet:~$ simple_switch_grpc --device-id 1 --log-console -Ldebug --no-p4 -- --cpu-port 255 --grpc-server-addr 0.0.0.0:55044
Calling target program-options parser
Server listening on 0.0.0.0:55044
P4Runtime SetForwardingPipelineConfig
P4Runtime Read
device_id: 1
entities {
 table_entry {
   table_id: 33617813
 }
}
*** Error in `simple_switch_grpc': double free or corruption (out): 0x00007f7d5c005ba0 ***
Aborted (core dumped)

-------------- next part --------------
A non-text attachment was scrubbed...
Name: default.json
Type: application/json
Size: 73038 bytes
Desc: not available
URL: <http://lists.p4.org/pipermail/p4-dev_lists.p4.org/attachments/20170718/e944ac7f/attachment.json>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: default.p4info
Type: application/octet-stream
Size: 1723 bytes
Desc: not available
URL: <http://lists.p4.org/pipermail/p4-dev_lists.p4.org/attachments/20170718/e944ac7f/attachment.p4info>


More information about the P4-dev mailing list