p4runtime probe reachability is based on GetPipelineConfig gRPC that
can timeout if we are setting in parallel the pipeline: the two requests
concur for the same lock. For our purposes it is enough to check if the
device is still there; for this reason stratum handshaker now relies
on gNOI reachability which is based on getTime RPC.
Additionally increase short timeouts: we have consistenly measured a
time of 14s to push the pipeline on the new QS devices.
Change-Id: I8837540241d8a68f648e47ae165ea53a2d0a865c
Leverage the dep already in place between gnmi driver and gnmi protocol
and expose readPortId as cfg property of GnmiControllerImpl
Change-Id: I34defd8928589129dc84cae45033f7f7c3c673bb
When using logical port for replica such as SDN CPU port (0xfffffffd), the
PreReplicaCodec will throw an ArithmeticException since this value is too
big for an signed 32-bit integer.
In that example, we need to convert the value to -3
According to the protobuf document[1]:
"In Java, unsigned 32-bit and 64-bit integers are represented using their
signed counterparts, with the top bit simply being stored in the sign bit."
[1]: https://developers.google.com/protocol-buffers/docs/proto#scalar
Change-Id: Ie3bda828d499b7d26d7b790f9ed76bb687243e57
The field `pkg_info:arch` is now parsed, when parsing a P4Info file.
Change-Id: Ia1b24b929fe4ed8ac2a2becfa0ce7678642e9037
(cherry picked from commit ce9942049825c51c0a0818ad4b89395321aa82b3)
The submit() method of p4 WriteRequestImpl is returning an empty
response if there are no update messages. However, one of the reasons
for updates to be empty is the fact the catch block in
appendToRequestMsg is reached due to some invalid usage of the p4runtime
contract. In such situations, not only the user doesn't know why the
request is failing (absence of logging in ONOS) but the responseBuilder
which contains the failure is also not propagated. As a result, a future
call to P4RuntimeWriteClient.WriteResponse.isSuccess() will return
true (as if the request actually succeeded) and .all() will also not
contain the failedResponse appended during the CodecException. Added a
test to illustrate the issue.
Change-Id: I0acfd3b34b3ed1db2d91f91fed08f9d00800dda4
Currently ovsdb passive connections are broken. This happens because the
eventloop is never initialized. As a result, in connectRetry() (called
in connect()) the workerGroup is null and the connection to the switch
can't be established.
Change-Id: Ic20a3f699e49f119bd2ba6edb6eb8ad94ba09009
- Improve ONOS cli enabling CRUD of p4rt trtcm
- Improve ONOS rest enabling CRUD of p4rt trtcm
- Improve MeterService with scope defined reads and integrate in cli/rest
- Add support along the stack for BYTE_PER_SEC unit
- Add support along the stack for COMMITTED and PEAK bands
- Fix several bugs in ONOS cli/rest interfaces
- Improve REST codecs
- Fix NPE in MeterDriverProvider
- Improve PiMeterTransalation by enforcing trtcm config
- Implement explicit translation of the bands
- Fix ONOS reconciliation by removing from the mirror the wrong configs
- Remove unnecessary checks in MeterEntryCodec
- Update unit tests
It will follow a 2nd patch to complete SDFAB-527
Change-Id: I855235b17f60cb1d39f5b9a042c1015105a8a269
The default size is set to 8KB which can be easily exceed even by batch
of 100 flows. When this happens ONOS closes the channel as consequence
of the HTTP2Exception thrown by Netty. With this patch we set the size
to 40MB which should avoid any problem even with batch larger than 100k
flows.
Change-Id: I3f1ccbf20275898798e039531d1871991d99d952
(cherry picked from commit cf5dabd3dd6b1a94fb718da6fe8d5e95ef1e5479)
A P4 table annotated with @oneshot annotation can be programmed
only with the action profile action set. For these kind of tables
we don't issue read request for action profile groups and members.
Change-Id: I7b6a743f4f4df4190f17d958ebb4807aca5feda5
The P4Runtime server may send canonical byte strings (i.e.,
non-padded byte strings).
In ONOS we ensure, in the codecs, that all byte strings are
padded to match the model (P4Info) bit width. In this way,
we provide read-write symmetry inside ONOS.
ONOS always pads byte strings when sending messages to the
P4Runtime server.
This patch doesn't enforce read-write symmetry between
P4Runtime client and server on the wire.
N.B.: the current padding implementation works ONLY when
using non-negative integer.
Change-Id: I9f8e43de015bd0929dd543d7688c8e71bf5fe98d
Some PI elements can encode in their value a string (e.g., when
a P4Runtime translation is used), for this reason we allow users
to specify matches and action parameters as strings.
From southbound, during decode, we interpret the elements as
string if the P4 model suggests that.
Change-Id: I5884de1500437ab647abc200d65de442e23bd1a8
log:set TRACE org.onosproject.p4runtime.ctl.client.WriteRequestImpl
to have all the prints we need
Change-Id: Ie46e36145769ffc7a91485ee3f3791a94cf8b8a9
This is required for targets that are not P4RT-compliant
and do not support table-specific wildcard reads.
The all tables wildcard read are activated via
tableWildcardReads driver property.
Change-Id: I675e6f876648ad7634ea0a13ecf44aa366739d3f
New master after taking over a switch was pushing again the pipeline
and all the flows and groups. This was happening because DefaultPiPipeconf
fingerprint was not calculated in a deterministic way across the cluster.
This patch introduces the following changes:
- Implements toString method in each abstraction representing a pipeline
- Hashes the p4Info file to generate a consistent hash of the pipeline model
- Uses a sorted collection to generate a consistent hash of the extensions
Change-Id: I792283b0a9b821284add36b3aba52843f33527c3
This commit goes into the direction of supporting user-defined types in P4Runtime.
The modification is focusing on supporting fields and params with arbitrary bit width, that is the
case of using a String with the p4runtime_translation annotation on the user-defined type.
Change-Id: I7db7a6d97211378ff78ab4f1b3734a0bec4558e6
This avoid processing Port Status messages in the same thread of the channel read
avoiding blocking the processing if too many messages are received at once.
Change-Id: I397723d621f69fbac9478f4f3d91a277d17cfa28
(cherry picked from commit dad65ac5a058242326fe91fbe47e65fa9c5a3583)
This reverts commit 992bf52f25d491afec8d8e54efb5c3a8125b77bb.
Reason for revert: Broke the master build.
Change-Id: If47508a8cff95bd6e9c57f7234baa517879a54cf
- Added Route Refresh message
- Changes in BgpFactory
- Add parsing for Route Refresh Capability TLV
- Add Unit Test case for Route Refresh message
Change-Id: I68efe55be50c545b06c99a099c4bc315b2d5f566