66 Commits

Author SHA1 Message Date
Carmelo Cascone
de3b6843ca Relinquish mastership when device reports "permission" denied event
Also reduces default pipeconf watchdog probe interval
Also fixes NPE on GDP when device is unreachable

Change-Id: Ie2fe1874b0883a037596d9a555a2f8cc030a55a6
(cherry picked from commit d797e2c28505fbdbb8597038ebcf977a053bae72)
2018-09-10 08:33:22 +00:00
Carmelo Cascone
9e4972c5d8 Refactor P4Runtime subsystem to implement async connection procedure
This patch is an attempt to solve issues observed when restarting both
switches and ONOS nodes. Most of the issues seemed to depend on a
brittle mastership handling when deploying the pipeline.

With this patch, GDP registers devices to the core with available=false
(i.e. offline) and marks them online only when the P4 pipeline has been
deployed to the device. A new PiPipeconfWatchdogService takes care of
deploying pipelines and producing event when devices are ready.

Moreover, we fix a race condition where pipeconf-related behaviors
were not found. This was caused by GDP enforcing the merged
driver name in the network config, while external entities (e.g.
Mininet) were pushing a JSON blob with the base driver name. This patch
removes the need to rely on such a trick and instead uses
pipeconf-aware logic directly in the driver manager (change #19622).

Finally, we fix issues in P4RuntimeClientImpl that were causing the
stream channel not detecting unreachable devices. The solution is to
follow gRPC APIs and re-instantiate a new channel once the first fails.

Change-Id: I6fbc91859c0fb58a6db3bc197b7081a8fe9f97f7
2018-09-06 03:08:09 +00:00
Ray Milkey
761e80a427 Remove pom files from ONOS
Change-Id: I53e2395466cba10222d638736635b11380421d98
2018-08-21 18:11:58 +00:00
Ray Milkey
312d987732 Starting snapshot 1.15.0-SNAPSHOT
Change-Id: I9239c7695f7faf6dc184a0ff54a34dedf4761b2d
2018-08-20 16:09:54 -07:00
Carmelo Cascone
0e427dc182 Fix P4RuntimeClientImpl sending empty stream RPC messages
Change-Id: I31e010144585a0cb9e054e773b7a7e4380919d75
2018-08-15 05:53:37 +00:00
ONOS Jenkins User
03e5521fba Starting snapshot 1.14.0-SNAPSHOT 2018-08-14 22:13:58 +00:00
ONOS Jenkins User
3594c24cb2 Tagging 1.14.0-rc2 2018-08-14 22:13:02 +00:00
ONOS Jenkins User
4e5f2d67ac Starting snapshot 1.14.0-SNAPSHOT 2018-08-13 23:16:37 +00:00
ONOS Jenkins User
cff0bd8922 Tagging 1.14.0-rc1 2018-08-13 23:15:43 +00:00
Ray Milkey
4867af2f9c Revert "Tagging 1.14.0-b1"
This reverts commit 78ce40093ac008fd6d169ab83d2d5961f91f6e31.

Change-Id: I8482f550c30f75d65333f6be9c9115a930abc56f
2018-08-10 16:53:10 -07:00
Ray Milkey
78ce40093a Tagging 1.14.0-b1 2018-08-10 11:16:44 -07:00
Carmelo Cascone
72893b7755 [WIP] Attempt at building grpc and p4runtime protocols with Bazel
STILL NOT WORKING AT RUNTIME

Change-Id: I1f9e60b12a12e09edad2a714ec2921a4f71c6d35
2018-08-09 20:33:39 +00:00
Carmelo Cascone
58136816ab ONOS-7739 Support for P4Runtime multicast programming
Design doc: https://docs.google.com/document/d/13rkQlwr49M-uxQQEuxCMP7BFEPY2gtQ850Hn3gUfesU/edit#heading=h.lzdayib259sq

Change-Id: Ief00bec89fe5a9784b0ee13fdaafa3ae58ab654f
2018-07-20 18:16:17 +00:00
Carmelo Cascone
158b8c4f6b More improvements and bugfixes in P4Runtime subsystem
Most notably, we fix a bug in which some nodes were not able to find
pipeconf-specific behaviors for a given device. The problem is not
completelly solved but it's mitigated.

There's a race condition caused by the fact that the GDP updates the cfg
with the merged driver name before advertising the device to the core.
Some nodes might receive the cfg update after the device has been
advertised. We mitigate the problem by performing the pipeline deploy
(slow operation) after the cfg update, giving more time for nodes
to catch up. Perhaps we should listen for cfg update events before
advertising the device to the core?

Also:
- NPE when getting P4Runtime client
- Detect if a base driver is already merged in pipeconf manager
- Longer timeouts in P4Runtime driver and protocol (for slow networks)
- Configurable timeout in P4Runtime driver and GDP
- NPE when adding/removing device agent listeners in P4Rtunime handshaker
- Various exceptions due to race conditions in GDP when disconnecting
devices (by serializing disconnect tasks per device)
- NPE when cancelling polling tasks in GDP
- Refactored PipeconfService to distinguish between driver merge,
pipeconf map update, and cfg update (now performed in the GDP)
- Fixed PipeconfManagerTest, not testing driver behaviours
- Use Guava striped locks when possible (more memory-efficient than maps,
and with strict atomicity guarantees w.r.t. to caches).

Change-Id: I30f3887541ba0fd44439a86885e9821ac565b64c
2018-07-06 08:13:44 +00:00
Carmelo Cascone
e5b2872eb6 Improve scalability of P4Runtime subsystem
The P4Runtime client was hanging (deadlock) on a master arbitration
request. As such, all other requests (e.g. table write) were waiting
for the client's request lock to become available.

Apart from fixing those deadlocks, this patch brings a number of
improvements that all together allow to run networks of 100+ P4Runtime
devices on a single ONOS instance (before only ~20 devices)

Includes:
- Asynchrounous mastership handling in DevicHandshaker (as defined in
the P4Runtime and OpenFlow spec)
- Refactored arbitration handling in the P4RuntimeClient
to be consistent with the P4Runtime spec
- Report suspect deadlocks in P4RuntimeClientImpl
- Exploit write errors in P4RuntimeClient to quickly report
channel/mastership errors to upper layers
- Complete all futures with deadlines in P4Runtime driver
- Dump all tables in one request
- Re-purposed ChannelEvent to DeviceAgentEvent to carry also mastership
response events
- Fixed IntelliJ warnings
- Various code and log clean-ups

Change-Id: I9376793a9fe69d8eddf7e8ac2ef0ee4c14fbd198
2018-06-29 13:59:27 +00:00
Carmelo Cascone
44448a52cc Allow re-creating clients for the same P4Runtime addr-port
Change-Id: Ib3de10d047f52dd28511e71385773d4b4a9ad74f
2018-06-26 12:23:29 +00:00
Andrea Campanella
1e5734480f [ONOS-7584] Adding Capability of re-connecting to a P4Runtime Device.
Also addresses ONOS-7359

Change-Id: I47ec4ed429af82feb225ab5ac180b94c91366a53
2018-06-08 02:14:33 +00:00
Ray Milkey
816db1086a Add modules to Bazel build
cli
core
incubator/rpc
pipelines/basic
protocols/netconf
protocols/openflow
protocols/rest

Change-Id: I165b94a04ba893d97d944e5deb2746f54566503b
2018-05-31 15:44:36 +00:00
Ray Milkey
472d839809 Start bazel support for protobuf models and p4runtime build
Change-Id: Ib3beb70c1b401854444b106b4af3723cd40635e4
2018-05-29 21:26:37 +00:00
Ray Milkey
0bcdfd1e59 reformat bazel files to use Google coding standards
Change-Id: I320f0ca7ccb1b2247ccdd9fa58fefca7dad8a16f
2018-05-23 14:07:19 -07:00
Ray Milkey
7dac7dadf5 Initial builds using bazel
Change-Id: I38123b396a2ffda5f36cdca43f3ad1fa67a7ab52
2018-05-23 20:38:54 +00:00
Yi Tseng
8d355132da [ONOS-7605] Unable to modify groups on BMV2
Change-Id: I797366ac152dccac75f8ed82b62abe6e5da6dd3e
2018-05-22 18:57:19 +00:00
Ray Milkey
bca9049101 Starting snapshot 1.14.0-SNAPSHOT
Change-Id: I97bab4e31d2b701f015289eae29d0c58a4937685
2018-04-13 12:47:31 -07:00
Carmelo Cascone
81929aa0cf Bumped supported commit of P4Runtime and BMv2
Includes fixes for:
- ONOS-7593: Support for indirect resource Index type
- ONOS-7595: Removed ID from direct resources
- P4Runtime requires unset bits to be 0 in ternary field matches
- Incorrect parsing of flow rule byte counters
- Full entity names in P4Info with top-level control block (fixed only
	for basic.p4, other programs need to be re-compiled and PI IDs in
	respective pipeconf changed)

Change-Id: Ia19aa949c02e363a550e692915c6d6516a2d13d7
2018-04-11 19:04:45 +00:00
Frank Wang
d7e3b4bc9d [ONOS-7051] Support for P4Runtime meters
Change-Id: Id71374af65aeb84b71636b4ec230dc6001a77a8b
2018-04-04 00:35:08 +00:00
ONOS Jenkins User
45d340c839 Starting snapshot 1.13.0-SNAPSHOT 2018-01-09 01:56:13 +00:00
ONOS Jenkins User
32ebb5add8 Tagging 1.13.0-b8 2018-01-09 01:54:28 +00:00
Ekber Aziz
123ad5d560 P4Runtime unit tests for api, ctl, model modules
Change-Id: Iac1b1ef6e274c355ce3a26cffbd8adcb39694f69
2017-12-17 08:09:22 -08:00
Carmelo Cascone
b1936bd93f Bumped version of gRPC to 1.3.1
Change-Id: I7798476bd443a796e0e6a6e149ab8f66435ba4fa
2017-12-13 03:24:50 +00:00
ONOS Jenkins User
61881df1ee Starting snapshot 1.13.0-SNAPSHOT 2017-12-12 21:19:45 +00:00
ONOS Jenkins User
d22dccc27f Tagging 1.13.0-b7 2017-12-12 21:18:01 +00:00
ONOS Jenkins User
4bf9e3a520 Starting snapshot 1.13.0-SNAPSHOT 2017-12-12 18:46:22 +00:00
ONOS Jenkins User
168ac92b8d Tagging 1.13.0-b6 2017-12-12 18:44:15 +00:00
ONOS Jenkins User
0e78e27f0c Starting snapshot 1.13.0-SNAPSHOT 2017-12-12 03:27:00 +00:00
ONOS Jenkins User
2a7d833cab Tagging 1.13.0-b5 2017-12-12 03:25:23 +00:00
ONOS Jenkins User
c53a15f933 Starting snapshot 1.13.0-SNAPSHOT 2017-12-11 20:43:30 +00:00
ONOS Jenkins User
d06da9e33c Tagging 1.13.0-b3 2017-12-11 20:41:44 +00:00
ONOS Jenkins User
716484c58c Starting snapshot 1.13.0-SNAPSHOT 2017-12-09 03:41:19 +00:00
ONOS Jenkins User
6a6ac1d5a0 Tagging 1.13.0-b1 2017-12-09 03:39:39 +00:00
ONOS Jenkins User
a57a814230 Starting snapshot 1.13.0-SNAPSHOT 2017-12-09 00:57:30 +00:00
ONOS Jenkins User
8977cedde7 Tagging 1.13.0-b0 2017-12-09 00:55:39 +00:00
Carmelo Cascone
e75b794aa4 ONOS-7050 Refactored P4Runtime GP to use distributed stores
Change-Id: I155bd0d848bfad2a198d220fcb35ab2ad2daa56a
2017-11-30 09:43:35 -08:00
Carmelo Cascone
6a0b5a3c95 ONOS-7050 Refactored P4Runtime FRP to use distributed stores
It uses the PI translation store and a newly introduced P4Runtime device
mirror.

Change-Id: Id2031af5e9bbdc8be4ec6967b867f97d35d54ab0
2017-11-30 17:42:04 +00:00
Ray Milkey
a09f87f02b Starting snapshot 1.13.0-SNAPSHOT
Change-Id: Ib3360118c42aa760632ff80537d585865813060f
2017-11-21 09:38:31 -08:00
Carmelo Cascone
87892e25d1 ONOS-7066 ONOS-7067 PI abstractions refactoring and P4Info model parser
Includes changes previously reviewed in #15607, #15877, and #15955.

Change-Id: Ie2ff62e415f2099832ebfe05961a879b7b188fc3
2017-11-13 16:15:17 -08:00
Ray Milkey
cc6ec60fb2 Starting snapshot 1.12.0-SNAPSHOT 2017-11-10 16:22:59 -08:00
Ray Milkey
9f9a752bdc Tagging 1.12.0-b2 2017-11-10 16:21:23 -08:00
Sean Condon
bf7d39bd75 Adding pom files for P4Runtime and GRPC
Change-Id: I9e205fc054875813200fe83a0bca4a9152ec66ae
2017-11-09 13:35:22 -08:00
Ray Milkey
e27bb9023b Fix maven build
Change-Id: I71374cf697c79fe6809c687ca353e709fd087ae2
2017-11-06 12:55:17 -08:00
Yi Tseng
3e7f145b90 [ONOS-7143] Add arbitration update support by P4RuntimeClient
Change-Id: I671275576018d50447f969166a7b42a28dd93b1d
2017-11-03 23:13:29 +00:00