4746 Commits

Author SHA1 Message Date
Carmelo Cascone
1e8843f8e3 ONOS-7251 ONOS-7264 Support for clone to CPU action in fabric.p4
Clone to CPU is available only for packets processed via multicast
groups. Can be changed in the future when implementation for clone
session APIs is available in PI and P4 targets.

Also:
- compile "fabric-full" profile and generate constants from it
- use interpreter to map logical ports to data plane port IDs

Change-Id: I7db30c08dcf69ed9c870748cce8a797bbd5d6f78
2018-07-25 14:44:32 +00:00
Charles Chan
b928b3ff42 Correct a log message in HostManager
Change-Id: I64897b85cd5aefe4b4a865c5cb2d52c191846b06
2018-07-24 17:10:59 +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
a73f1065a9 Translate only certain groups to PI
Change-Id: I71417e43ec456bce21a9abcc0609dc05a82b264c
2018-07-16 23:11:15 +00:00
Jordan Halterman
c8b591ea1b Ensure multimap events are published on replaceValues
Change-Id: Ie4fb007ae70e618f0adfd16fd506e326b24580bc
2018-07-13 19:22:29 +00:00
jaegonkim
cbe1c5ed4b [ONOS-7681] IntentCleanup.resubmitPendingRequest() can not generate pendingMap PUT event, and IntentData processing does not happen.
Change-Id: I4bcaf21581d72e9715443f9089a2940bffdc6df0
2018-07-10 23:09:22 +00:00
jaegonkim
b914fcb0da [ONOS-7682] IntentManager.buildAndSubmitBatches overwrites intent operation of pending map with the intent opeation of current map
Change-Id: If5fd87f8caf14b4a668c78db2cd3999aa917cc54
2018-07-10 23:08:51 +00:00
jaegonkim
a9acf7a2ce [ONOS-7533] Extension instruction deserialization failure due to un-available device
Change-Id: I44b179bdb4ef78f6103453a9eec8df661586bed1
2018-07-10 23:08:02 +00:00
Jordan Halterman
dae1160e3c Implement lazy iterators/streams for ConsistentMap
Change-Id: Id643726441c99186667c104cfdd1dab95b06cf87
2018-07-09 22:04:41 +00:00
Jordan Halterman
d04e344cd5 Implement service for mastership-based remote Java proxies
Change-Id: I36228fcc79b73550fbf5d6cbbc8b24e01d869957
2018-07-09 18:27:10 +00:00
Jordan Halterman
b8cace7ec9 Implement service for registering, managing, and operating on remote Java proxies over the cluster communication service
Change-Id: I4576e3554cfad08747eed847b73fe695e219f3b8
2018-07-09 17:25:11 +00:00
Ray Milkey
4b19da6ce9 Fix for OS-13 - don't allow app pathnames to leave the app root
Change-Id: I6bb7be6df8be3dced903f72cef4600532cb118a3
(cherry picked from commit 10e606aab45365b15f2533e0e92d5047ac6a84fe)
2018-07-09 16:06:10 +00:00
Charles Chan
eded688740 Set R-bit in neighbor advertisement if replying as a router
Change-Id: Ic51140cf7ab88064df0bc87fb4d1fbc976ce7bc7
2018-07-06 11:19:50 -07:00
Charles Chan
4e7de42b97 Bugfix: DistributedPacketStore does not notify delegate in some cases
Assuming we execute two put operations with the same key but different value, i.e. put {key, value1} and put {key, value2}
Both put should return true

Change-Id: Iad8d68fa68e7b4ce37cdd3634d36144aa1b21afe
(cherry picked from commit fb92a5a50b6ce2abe94ca807937207210fd094cb)
2018-07-06 17:38:56 +00:00
Georgios Katsikas
40ecef3be0 New Device type for commodity servers
This device type is now advertized by the server
device driver. Also, the ONOS UI maps this new device
type to a glyph.

Change-Id: Ib4147676474b43202bbdff595a0fa0520b70fe91
Signed-off-by: Georgios Katsikas <katsikas.gp@gmail.com>
2018-07-06 17:38:42 +00:00
Jordan Halterman
158feb94e1 [ONOS-7729] Copy flow buckets prior to replication to avoid inconsistent collection serialization
Change-Id: Ibad42af76fcc551c3326bbb6ed7627a04791b35a
(cherry picked from commit 4c3a0458e665f67e630aaa1f2d370bd3dab26cd4)
2018-07-06 16:46:06 +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
Jordan Halterman
15f3371bdf Refactor multimap streams to avoid blocking iteration on initialization
Change-Id: I6a357b37e85808972267ef2daf5328fd5035aac4
2018-07-02 18:16:32 +00:00
Laszlo Papp
f50057c986 Add a device upgrade behaviour interface
Change-Id: I43c362a302d3517dda8990e40214ce048b813412
2018-07-02 18:04:00 +00:00
Ray Milkey
dbd3821cf0 Checkstyle rule to prevent throwing the generic RuntimeException
This is a frequent cause of sonar breakage.

Change-Id: I54e0044447633a61bab560b020b57ed0a6875ebe
2018-07-02 18:03:00 +00:00
Jordan Halterman
e4bf856baf Ensure backups are updated on change in DeviceFlowTable
Change-Id: I5f21879e84e6093839cf3603eba352a5ced267f2
2018-06-29 20:28:53 +00:00
Jordan Halterman
281dbf3eb3 Refactor flow rule store to resolve missing flows with old masters following mastership reassignment
Change-Id: I7b7e639c84cbd23fe9ab1f12080f865cdfc7f7f9
2018-06-29 20:03:51 +00:00
Jordan Halterman
0a2bd45ad2 Add atomic mastership/term/backups method to MastershipService
Change-Id: I18c3aeaa5101c9ce08ff38fffd70eaec903a0f3e
2018-06-29 19:45:22 +00:00
Jordan Halterman
aeea0bbc30 Rely on anti-entropy protocol to resolve missing flows after mastership change in ECFlowRuleStore
Change-Id: Ia4cf91d8441e2ed8d539dc29b22cbbb7e49dd66b
2018-06-29 19:24:08 +00:00
Jordan Halterman
7851f6d4fd Ensure flow rules are purged from non-backup nodes on mastership change
Change-Id: I0ae67eee6c1e6727a6714b96f1cf98b770c03e9f
2018-06-29 18:29:08 +00:00
Jordan Halterman
5259b33a72 Implement anti-entropy protocol for detecting and resolving missing flows in the ECFlowRuleStore
Change-Id: I90e1243a40b90328b9e4fdbeb36f830c20f18b5c
2018-06-29 18:03:58 +00:00
Jordan Halterman
4127d39460 Use external null checks to avoid computeIfAbsent calls in FlowRuleStore
Change-Id: Ib5cc1bb77dfcd8f38b52cb175f21e1f1055447a5
2018-06-29 17:36:14 +00:00
Jordan Halterman
8f90d6d707 Move flow count updates off write path in ECFlowRuleStore
Change-Id: I44c611625baec124a45524ddb39fbe74f4c3c907
2018-06-29 17:08:11 +00:00
Jordan Halterman
a765d22222 [CORD-3119] Fix missing flows on node restart
Change-Id: I51cf3ee0682873beb7f9334dac1e77ed20022bfb
2018-06-29 17:08:03 +00:00
Carmelo Cascone
96beb6fdd0 Refactored GDP and PipeconfManager to fix multi-node tests
Issue was caused by race condition in GDP between the first connection
task, and the periodic one (checking reachability of devices in the cfg).
The issue is fixed by serializing such tasks for the same device.

Moreover, this patch brings better error reporting and handling of
completable futures.

Change-Id: I8c3a685c368541d33395945159b45a5740a5a0c3
2018-06-29 15:30:25 +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
nitinanand
f14dccdc03 [ONOS-7704] device memory/cpu stats for pica8 switch using Switch_Inventory DB
Change-Id: I1956d06ab373119da59561252f5b35561f8f5619
2018-06-28 15:56:40 +00:00
Esin Karaman
971fb7fd1f ONOS-7251 - Initial implementation of fabric.p4 L2 broadcast feature.
Thrift client cherry-picked from the commit dd5792ac9ee38a702c3128a34224852b5c284687

Change-Id: I989f2b2074485a892195889a7c976b518510da88
2018-06-28 13:34:47 +00:00
Carmelo Cascone
1da7a4d3cd Fixed UnsupportedOperationException in DeviceManager
Change-Id: Iaebbce0d86fce0d01899740d1708a4a573b78206
2018-06-27 23:01:16 +00:00
Jordan Halterman
3b01fec004 Ensure cached document tree listeners are run after cache has been updated to prevent stale reads from the cache
Change-Id: I6cad61bd0fcec15b96cc7e418f5ec2471ee62930
2018-06-27 22:33:00 +00:00
Jordan Halterman
74d76b1eb0 Ensure cache map listeners are run after cache has been updated to prevent stale reads from the cache
Change-Id: Ia9abf57aa6f18037c9e5db7ef4f21f72bf8b211b
2018-06-27 22:33:00 +00:00
Jordan Halterman
7cdb87f7e0 Ensure multimap event listeners are executed after cache update to avoid stale reads from the cache.
Change-Id: I527cb2905cfde85b63a0b61ebca3e1a56ef49f48
(cherry picked from commit 837be006017353e5af14addd6d36c7dfe46d978c)
2018-06-27 17:56:58 +00:00
Carmelo Cascone
b37bddeea0 Fixed not relinquishing mastership on role response
Change-Id: I9dc1ad094df3e6ef624a5153f24bf977f7b35841
2018-06-22 17:25:46 +02:00
Yi Tseng
667538d4ea
[ONOS-7724] Incorrect priority check in PiFlowRuleTranslator
Change-Id: Ib927bd52959b3d128060960c5e048ea5afc7a52a
2018-06-22 02:19:23 +08:00
Ray Milkey
324af9301f Bazel build files for protocols
Change-Id: I12a9cfe2d135d10c640a51d9b3438bcd92f8e37f
2018-06-21 03:48:25 +00:00
Charles Chan
6a7d3677f2 Improve KryoNamespaces to better support Objectives and lambda functions
Change-Id: Iaeb10d8e237e4c2bca972e97f65bb0fc1cf338f9
2018-06-21 00:20:25 +00:00
Carmelo Cascone
e6a9754787 Better logging when configuring the FlowRuleManager
Change-Id: I7da22b1bf796a7199acc5a55c21f6a5334f312d4
2018-06-20 20:44:46 +00:00
Saurav Das
137f27f0e7 Bugfix in routing logic to avoid null groups; Improvement in group handling.
Two main changes for the bug-fix:
    - avoid doing a full-reroute in the event of link failure as this will leave behind stale state in stores
      if event has been preceded by mastership change leading to the nuking of the ecmpSpg for one of the
      link's devices; instead do a rehash
    - when full-reroute is attempted, do it only once, with a complete nuke of the next-obj store

Improvement in group handling allows for a max number of retries for a group that failed to be added.
Earlier behavior was to try only once, and if it fails, it gets removed from the group-store. Now it
is removed after a couple of retries - so total 3 attempts to program the group.

Change-Id: I54ca8203cef779463522b01353540d12f8be3c91
2018-06-20 17:48:32 +00:00
Jordan Halterman
e76f0c8559 Fix NPE in ClusterCommunicationManager exception handling
Change-Id: I4dd3c6aeb3150e117e2ba414c8d2a58adef79170
(cherry picked from commit 7b3830bef35b703ba411684f1f10c291d5a22f61)
2018-06-19 18:58:30 +00:00
Andreas Pantelopoulos
194164153f Disable host learning feature.
This patch gives us the ability to disable
host learning in certain ports via the ports
configuration.

We have the following cases :
        - Discover a host with no learning configuration, this
          results to learned host (missing config assumes learning is on)
        - Discover a host with learning configuration set to false,
          do not learn that host.
        - Update the learning configuration of a CP to false. Then,
          fetch all host at that location, if these hosts are not
          configured statically at this location, remove them

Change-Id: I2a05ce5f9a890bb4049fd7856f95d78f467e3330
2018-06-15 21:43:39 +00:00
Carmelo Cascone
6af4e17c53 Bumped supported revisions of P4 tools
Includes:
- Use new P4Runtime "v1" package names
- Removed VALID match
- New table entry priority spec (1 is min priority, not 0)
- Fixed p4c-bm2-ss to include arch flag
- Re-compiled P4 programs with more recent p4c (with updated p4info)

Change-Id: I05908f40eda0f0c755009268fd261fb8bcc9be35
2018-06-15 19:04:30 +00:00
Jordan Halterman
8c57a09e4d Refactor DistributedPacketStore to store packet requests in a ConsistentMultimap
Change-Id: Ia4a93c47fee726009673e99609b2f8800807e675
2018-06-13 22:18:00 +00:00
Jordan Halterman
b2f5795c68 Clean up implementation of buckets for flow rule replication
Change-Id: Ifc6aaed08c3a74e8b8f8fd9d69d5802351e5f47c
(cherry picked from commit 3664e8e8c7e5fcdcb04e3e6b879871e51af0e59b)
2018-06-13 21:59:50 +00:00
Jordan Halterman
05299088a2 Reduce false positives in Netty messaging timeouts
* Compute the max response time for each minute in the last 10 minutes
* Use standard deviation to account for pauses
* Enforce a minimum standard deviation

Change-Id: Id13c3510cd59892e58c3847a96850946d0f36b5e
(cherry picked from commit c1b41d4e280ad141261114155d5b87af1b547f39)
2018-06-13 21:59:40 +00:00
Jordan Halterman
e74e629406 Ensure mastership elections are cached in flow rule store
Change-Id: Iff1b1d743a38310e76a5c87605480e9faa5eab2b
(cherry picked from commit d334841f7067def3bad1c618a27a75d28d6df004)
2018-06-13 21:59:31 +00:00