1058 Commits

Author SHA1 Message Date
Anurag Chadha
da4c5c40f5 isAvailable returning true due to pingDevice method at NetconfControllerImpl even if netconf data tree can't be fetched from device.
Change-Id: If4ee29d4db266561b63421b4aae538874daf7a53
2022-08-20 16:36:40 +00:00
Andrea Campanella
a42a6ab206 Enabling role timeout configuration on the Device Manager
Change-Id: Ie8664189d236431a5f2ee42476d0f99fdfe5f1d7
(cherry picked from commit 32762fa3a3fce3f0cc6d97e9fadca2959080ad08)
2022-06-29 16:42:31 +00:00
Anurag Chadha
75baa0b33f [ONOS-8153][ONOS-8154] Fix for isAvailable validating netconf session and thread pool size defined at Netconf Controller
Change-Id: I34ba70c8806bf518ab8f5804c54e6fa2a256dafa
2022-04-08 12:49:36 +05:30
Jian Li
4b3436a259 Support STT tunneling protocol at kubevirt networking app
Change-Id: Icbef76dbfb842ce1cf6893bf18ee80c4b1b26006
2022-03-29 07:52:20 +00:00
Yi Tseng
0926513a15 [SDFAB-1147] Encode P4Runtime messages with canonical byte string
In ONOS, we still use non-canonical byte strings when sending P4Runtime
write requests.

Ref: https://p4.org/p4-spec/p4runtime/v1.3.0/P4Runtime-Spec.html#sec-bytestrings

Change-Id: I27d7977660bea462de82ebe2a4cb5d14500d3b69
(cherry picked from commit 3821399aee849c2a6a334fdb16bfa6b5f8f6dcc5)
2022-03-28 18:18:33 +00:00
pierventre
14a76e72a7 Improve Mastership logging
Logs only meaningful mastership changes

Change-Id: Ibbe4f85526df01b3c1b6eab317a2c15716098d80
2022-03-03 01:46:40 +00:00
senthil
9d33aa21d2 SNMPv3 protocol support for onos.
Implement RFC-rfc3414 standard.

Change-Id: Ibe8d10aaaf569274b922a7500ed237a9813c0428
2022-03-01 18:11:09 +00:00
pierventre
1c18ee5c26 [SDFAB-1015] Use gNOI to probe reachability and increase short timeouts
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
2022-02-25 06:27:00 +00:00
pierventre
ee394c4f68 [SDFAB-1048] Fix wiring issue caused by readPortId
Leverage the dep already in place between gnmi driver and gnmi protocol
and expose readPortId as cfg property of GnmiControllerImpl

Change-Id: I34defd8928589129dc84cae45033f7f7c3c673bb
2022-02-18 04:17:46 +00:00
Anurag Chadha
dbffc043a6 [ONOS-8152] Adding new event in NetconfDeviceListener for netconf connection re-establishment after idle-timeout/session close received from device
Change-Id: I13f9ba181a0512b7496b76c04df67d38a9cea7df
2022-02-10 22:30:18 +00:00
Yi Tseng
09347c11b5 Handle huge egress port number in PreReplicaCodec
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
2022-02-04 08:14:27 +00:00
Wailok Shum
741d50de0a [SDFAB-820] Improve error logging in StreamClientImpl
Change-Id: I93a737f31432743f20917b8c85dd54d8b81eee62
2021-12-17 19:11:34 +00:00
Emanuele Gallone
b692a8240e Add architecture method to PiPipelineModel Interface.
The field `pkg_info:arch` is now parsed, when parsing a P4Info file.

Change-Id: Ia1b24b929fe4ed8ac2a2becfa0ce7678642e9037
(cherry picked from commit ce9942049825c51c0a0818ad4b89395321aa82b3)
2021-11-18 15:31:45 -08:00
Miguel Borges de Freitas
89e3d23d2b [P4Runtime] Make sure write requests contain the codec failure reason
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
2021-10-26 17:52:13 +00:00
Miguel Borges de Freitas
3daf7cef74 [OVSDB] Fix ovsdb passive mode connections
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
2021-10-25 13:14:00 +00:00
Andrea Campanella
18fdda8cb8 [VOL-4343] Processing status of ports in order with mastership and connection/disconnection to avoid inconsisten state
Change-Id: I731866b358fd4b6a7cfd296051e11f3d8690c5a7
(cherry picked from commit b0b93ac609e7860d5fd15703a50a0180fbf7a176)
(cherry picked from commit 727ed68ed3edc4512e353af814abe327ee25f143)
2021-09-20 07:18:54 +00:00
pierventre
c0914ec586 [SDFAB-500][SDFAB-527] Meters cleanup and leftovers
- 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
2021-09-10 10:22:18 +00:00
Wailok Shum
221d70dc4e [SDFAB-453] Add a field check to MeterEntryCodec
Change-Id: I4c59c9d45f3128a7d75661fa432bfb33336965aa
2021-08-24 01:40:09 +08:00
Wailok Shum
6d42cff6bc [SDFAB-354] Improve P4RTMeterProgrammable
Change-Id: I65a325f90a49853c6c4a1cfb8212a016a8ec2b2d
2021-08-24 01:33:04 +08:00
Wailok Shum
9664209358 [SDFAB-356] Extend P4RuntimeMeterProgrammable and Codecs to support reset scenario
Change-Id: Ifad0b296568d3f78b2aa792fa63f2f81fa80ebae
2021-08-06 17:28:50 +08:00
pierventre
8e489de27f [SDFAB-271] Change the default max inbound metadata size for grpc channels
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)
2021-07-01 18:13:18 +00:00
Daniele Moro
d900fe4a87 Add support for one shot action profile programming in PI
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
2021-07-01 17:34:35 +00:00
pierventre
f92de5130a [SDFAB-98] Improve logging in several ONOS subsystems
Change-Id: Ic9a20af6da27c3cc5c219657f10999f6804b9334
2021-05-25 07:29:49 +00:00
Daniele Moro
53a3cdfb82 Ensure P4Runtime byte strings are padded to their bit width
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
2021-05-18 15:58:44 +02:00
Daniele Moro
7aa13e6898 Allows to specify matches, action parameters as strings in PI
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
2021-05-18 12:51:24 +00:00
Anurag Chadha
4673237526 [ONOS-8139]Private SSH Key File Path made configurable for passwordless netconf ssh connection
Change-Id: I3a3d991dcd2f458acad2cc98f10543b697440fb3
2021-05-10 17:32:59 +05:30
pierventre
219dd8fedf [AETHER-1550] Add additional trace logs in P4RT SB
log:set TRACE org.onosproject.p4runtime.ctl.client.WriteRequestImpl
to have all the prints we need

Change-Id: Ie46e36145769ffc7a91485ee3f3791a94cf8b8a9
2021-04-30 04:33:42 +00:00
Anurag Chadha
b6a6bcbe12 [ONOS-8137] Bug fixed for driver not found in case of ipv6 address being used in short notation
Change-Id: I8fd0922eb2cce98ecb5612979f0554ac2281351b
2021-03-29 18:27:17 +00:00
Daniele Moro
2375917830 Add support for arbitrary bitwidth packet metadata
This patch is related to #24172

Change-Id: I29fc82bd3944b7fc9f58021df56cadd209cac190
2021-03-01 17:57:36 +00:00
Daniele Moro
298d326e35 Fix bug when reading table entries
Check if table has counter only if not all tables wildcard read.

Change-Id: I1a15e578bb55eaaf0b1ce4e1c509a6ec0334292b
2021-02-17 23:00:07 +00:00
Daniele Moro
46b27630d4 Add support for all tables wildcard read in P4Runtime
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
2021-02-11 16:52:57 +00:00
Daniele Moro
c6f2f7f3c5 Add Optional match fields support to PI subsystem
Change-Id: Ic458f59cab98340e40c04a0ad060d3c725ac5dbb
2021-02-05 19:03:05 +01:00
Carmelo Cascone
304b6644a1 Add digest to P4InfoBrowser
Change-Id: Ie79b61d2ecfc5a52c8b027a5384b86a555623db7
(cherry picked from commit 08be25533d09c3ba8023f4d34e07f4555d6013aa)
2021-02-05 18:02:04 +00:00
Daniele Moro
f178b0a5ad Add tests for codecs and P4Info parser when P4Runtime Translation is used
Change-Id: Ied0e83e81dad29f5b250548d2e26ec960b98f560
2021-02-05 18:00:09 +00:00
pierventre
69329170ad [AETHER-1104] Calculate PiPipeconf fingerprint in a deterministic way
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
2021-01-21 21:55:24 +01:00
pierventre
1a833d4c85 [AETHER-1074][AETHER-1088] Missing Kryo classes in several subsystems
This was leading to not proper replication of the state
and some EC maps being empty

Change-Id: Id39660c2ce3b5507e796801c0213c194f0a2009a
2021-01-19 16:47:27 -08:00
Charles Chan
730d546f05 Add debug log in P4RuntimePipelineConfigClient
Change-Id: Ie71af2f80b12b8ad99c8f597af1c3f026a532c4b
2021-01-19 16:47:21 -08:00
Anurag Chadha
924f01f31f [ONOS-8129] Bug fixed for duplicate events when netconf device goes down along with some fixes for NPE in NetconfControllerImpl
Change-Id: I4ea6100ce4c4e56ff8219cf846f107f49c50cd2d
2021-01-08 00:54:25 +00:00
Daniele Moro
5c82b0fb37 Support arbitrary bit width action parameter and match field
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
2020-12-15 17:50:10 +00:00
Jian Li
a56dea6ecd Support to enable multicast snooping of ovsdb through bridge desc
Change-Id: Ia14e67ab3a5a734a8a0eaa0b7bdda2fc9429c905
2020-12-12 10:21:02 +09:00
Carmelo Cascone
7981d09ab6 Extract and publish p4runtime protocol utils in separate artifact
For consumption by third-party apps built via mvn

Change-Id: Ic9c1eccb2519b2952cdb632e1f07ccefbba00396
2020-12-04 15:58:31 -08:00
Andrea Campanella
fb362174e1 [ONOS-8130] Correct and cosistent access to message-id counter in NetconfSessionMinaImpl
Change-Id: If27435c5ff9e1855696246326243eabe92a20335
2020-12-04 14:06:18 +01:00
Andrea Campanella
9ef930aa75 Offload OF Port Status message processing to a single thread executor.
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)
2020-11-11 19:06:10 +00:00
Thomas Vachuska
84d9fac856 Pruned defunct and unused contributions from Huawei
Change-Id: I8f1c611682e0f282bc41eb7a4ff4ff23b91a48e5
2020-09-03 16:09:36 +00:00
Ankur Aggarwal
2d7ff64d09 [ONOS-8085] Route Refresh timers in Controller
- Add timers in BgpController
- Add triggers in BgpLocalRib
- Code to send Route Refresh messages

Change-Id: Id45f1bcb3325ccc21c0d0d2e673c2b0097aac552
2020-08-11 09:50:59 +00:00
Anurag Chadha
8a9feb5716 [ONOS-8111]Fix for passwordless ssh to netconf device without sshkey
Change-Id: I7bedb4c1463024d359b641b24a2089c909e6f03e
2020-07-31 08:59:19 +00:00
Thomas Vachuska
c6ea647501 Revert "Introduced SetPackage and SwitchControlProcessor RPC to gNOI implementation."
This reverts commit 992bf52f25d491afec8d8e54efb5c3a8125b77bb.

Reason for revert: Broke the master build.

Change-Id: If47508a8cff95bd6e9c57f7234baa517879a54cf
2020-07-30 23:24:24 +00:00
Serhii Boiko
992bf52f25 Introduced SetPackage and SwitchControlProcessor RPC to gNOI implementation.
Change-Id: Ib8df537459b50bb83fadfe217e6ea5cd2bf6da5f
2020-07-30 19:44:19 +00:00
Ankur Aggarwal
bd6fc428c3 [ONOS-8082] and [ONOS-8083] Route refresh changes
- 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
2020-07-30 13:10:33 +00:00
Ankur Aggarwal
9deda616b7 [ONOS-8084] Changes to Bgp Cfg
- Added route refresh params to BgpCfg
- Added default values and value checks

Change-Id: I835fd9bbcb6d0c627c216d98ac84fdb65d98eea8
2020-07-30 12:54:04 +00:00