Barefoot Runtime gRPC Helper
bfrt-helper
is a library for creating gRPC messages and communicating with
Intel® Tofino™ devices exposing a Barefoot Runtime gRPC interface.
Note
Disclaimer
This is not a substitute for Intel’s documentation and that in the event of any discrepancies, you should refer to their documentation.
The building of this library requires a copy of the Intel Barefoot Runtime gRPC Protocol Buffers definition, which is included as a part of the Intel Barefoot SDE. This is available under license from Intel and requires the signing of a non-disclosure agreement. We are not able to supply this.
As a consequence of 2, we are unable to discuss Tofino specific specifications, technical data, workarounds, and other errata.
bfrt_data = json.loads(open("bfrt.json").read())
bfrt_info = BfRtInfo(bfrt_data)
bfrt_helper = BfRtHelper(DEVICE_ID, CLIENT_ID, bfrt_info)
write_request = bfrt_helper.create_table_write(
program_name='forwarder',
table_name='pipe.PortForward.destination_port',
key={
'ig_intr_md.ingress_port': Exact(PortId(INGRESS_PORT))
},
action_name='PortForward.forward',
action_params={
'egress_port': PortId(EGRESS_PORT),
})
Contents: