95 Commits

Author SHA1 Message Date
Jonghwan Hyun
ed478dc4bd Integrating INT into fabric pipeline
Change-Id: I9555de0852de79d1a3c7302ecaa17ff112fc5107
2018-08-14 06:15:55 +00:00
Charles Chan
ea89a1c27b NextId should be int instead of byte
Change-Id: I58b1dc7181eadc83dc6782756e631c241f62b15b
2018-08-14 06:02:07 +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
Carmelo Cascone
4164436785 More p4runtime-related bazel build files
Change-Id: Icdd02a06d7905e4cd0a6c61d282fd522c7b75fe7
2018-08-10 18:42:44 +00:00
Ray Milkey
78ce40093a Tagging 1.14.0-b1 2018-08-10 11:16:44 -07:00
Yi Tseng
8235a1a6b0 Minor refactor fabric.p4
Remove origin_ether_type from fabric.p4
We can use ether_type from VLAN header since ingress_port_vlan table
always push a VLAN header to the packet if there is no VLAN header.

For configured interface, there exists flow rules to push VLAN.
For ports which not configured (infrastructure ports), the segment routing
application installs a rule which pushed internal VLAN to the packet (4094)

Change-Id: Ifae0b79a9d92b73a2a22cb33864e5bd5b6c95bfb
2018-07-31 15:59:08 +00:00
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
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
Ray Milkey
35ea5bfb55 Additional bazel build files for apps
Change-Id: If3f31139022b5657e4a7b8a33871e4eba0da286e
2018-07-19 21:47:33 +00:00
Carmelo Cascone
a5400afad6 ONOS-7744 ONOS-7742 Don't send pkt on ingress port and always decrement TTL in fabric.p4
Change-Id: I998c67cef93c59bba3a48cb01a2bbcc4e66ac171
2018-07-17 21:14:19 +00:00
Carmelo Cascone
f645e8406c Bump P4 tools to latest version
With support for P4Runtime multicast API

Change-Id: I6982c32187204b656a927d0f3d7f3a4b1b877e75
2018-07-16 20:31:32 +00:00
Yi Tseng
47eac89eb0 Refactor fabric.p4
minor refactor for coding style

Change-Id: I7b73b9c3f439c66ce435404cb42fdb38323845b3
2018-07-12 23:47:10 +08:00
Ray Milkey
a4f8d9d914 Fix some test dependencies and pretty format all BUILD files
Change-Id: I300e236c15491f8724f1e493e2414388217f2174
2018-07-11 10:41:31 -07: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
Jonghwan Hyun
722275f68a [ONOS-7675] Initial implementation of IntProgrammable
Change-Id: I277ea7a56bb3a38debbb2959823df394a4103541
2018-07-03 15:14:01 +00:00
Esin Karaman
24fda8acfd ONOS-7402 Broadcast objective type support by FabricNextPipeliner.
Change-Id: I08b544a82e257091a079648c07b1dc6fb72c9ab9
2018-06-29 13:37:13 +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
Yi Tseng
bf0d437423
[ONOS-7723] Intrepreter can not handle Treatment of VLAN meta table
Change-Id: Iba0c4eab8d35d93aaa1b00d30a398709acde1a13
2018-06-21 23:55:58 +08:00
Carmelo Cascone
8a51743927 Removed fabric.p4 data plane test files
Now living in separate fabric-p4testrepo:
https://github.com/opennetworkinglab/fabric-p4test

Change-Id: I333906fe36b02a6ea5efed86b6dcd59405bffb17
2018-06-19 21:47:02 +00:00
Carmelo Cascone
228092b190 Refactored fabric PipeconfLoader to automatically build pipeconfs
Fabric.p4 is evolving in a way that will allow multiple profiles (e.g.
fabric, fabric-spgw, fabric-int, etc). Moreover, we need to support
multiple targets (e.g. BMv2, Tofino, etc.) as well as platforms
(variant of a target). Maintaining a pipeconf for each
profile/target/platform is time-consuming.

The new PipeconfLoader automatically builds pipeconfs based on the
available p4c compiler outputs available in the 'resources' directory.
This approach removes the need to maintain separate pipeconfs like
fabric-pro. Those interested in using fabric.p4 with targets other than
BMv2, will simply need to place the appropriate target/platform-specific
P4 compiler outputs in the resource directory.

Change-Id: I58d208a1837e747357373b2296cb950f13799ed6
2018-06-19 15:05:43 +00:00
Yi Tseng
34af3168f4
Fix incorrect defined boolean value for fabric.p4
Change-Id: I59cfbd81c1818f489d1fcded187d0ca034d418f8
2018-06-17 18:02:21 +08:00
Carmelo Cascone
35d9b333f8 Support compiling fabric.p4 with non-standard bool declarations
Change-Id: I5e579f58f274996fdff55d8e35d1dd96a7013941
2018-06-15 19:05:11 +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
Yi Tseng
43ee7e8ea8 Add P4 info to java constant tool
Change-Id: I73a451404e8b657845bfc9b6a37abd824a10910e
2018-06-08 02:17:09 +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
Yi Tseng
20f9e7b406 [ONOS-7285][ONOS-7263] VLAN support by fabric.p4
Change-Id: I9ea460bca2698eb74f0d4988830a1e7cc7bc2768
2018-05-29 17:29:57 +08:00
Keesjan Karsten
2336889e82 Make the Basic pipeline more portable
This change makes the Basic pipeline compile better with different
compilers. One change is this: the type parameter for a v1model meter
instance cannot be a programmer-defined enum. This is because in P4_16,
enums don't necessarily have underlying bitstring types and the
language doesn't specify that enum members should be assigned a
numerical value in any given way.

Change-Id: Id2b758eb2b6e76aa708c2e03e7a001667efddb3d
2018-05-25 17:19:21 +00:00
Jonghwan Hyun
f5d5782ecf [ONOS-7654] Fix int.p4 to correctly specify src/sink
Change-Id: I298dee9eb7f85aa9467dae70c63c04c4b7bdd660
2018-05-15 00:27:42 +00:00
Ray Milkey
bca9049101 Starting snapshot 1.14.0-SNAPSHOT
Change-Id: I97bab4e31d2b701f015289eae29d0c58a4937685
2018-04-13 12:47:31 -07:00
Yi Tseng
27b9bc070f [ONOS-7607] Update fabric.p4 bmv2 json w/ new p4c compiler
Change-Id: I0ba33a0773bd32b2108a0e7d163ad1e2c758078b
2018-04-12 16:29:48 +08:00
Carmelo Cascone
255125d9fc No need to map table counters in PI pipeline interpreter
This is related to ONOS-7595. In a recent P4Runtime update, it has been
made explicit that tables can support at most 1 direct counter. Hence,
the pipeline interpreter no longer needs to provide a mapping between a
table and one of potentially many counters. If needed, such mapping can
be derived from the pipeline model (i.e. the p4info)

Change-Id: Ibdece52f35a4d187ab9dbeb90f5527b6285e9788
2018-04-11 21:24:48 +00: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
Yi Tseng
f78e174ca0 [ONOS-7598] Fix P4 fabric pipeliner performance issue
Change-Id: I2dc175a2e0036ac3b1af41873b29714db15900e3
2018-04-11 06:07:22 +00:00
Carmelo Cascone
8a571af574 Support for bitwise AND/OR/XOR in ImmutableByteSequence
Also, minor refactoring of the fit() method to improve code readability

Change-Id: I826650c3fc45573c723d9d2dd8692da174d9ae08
2018-04-09 16:56:49 +00:00
Yi Tseng
df3eec5641 [ONOS-7493] Segment routing may uninstall forwarding with no next id
Change-Id: Id78b9ed94633b7e96fdeebe185e28d6de386e3ec
2018-04-05 21:00:39 +00:00
Frank Wang
d7e3b4bc9d [ONOS-7051] Support for P4Runtime meters
Change-Id: Id71374af65aeb84b71636b4ec230dc6001a77a8b
2018-04-04 00:35:08 +00:00
Yi Tseng
6e9b6f5035 [ONOS-7504] Skip adding or removing flows when operation is ADD_TO_EXIST or REMOVE_FROM_EXIST
Change-Id: Ia45ae50ceb94423df19cc1916dd794e736b9af1b
2018-03-20 02:28:54 +00:00
Carmelo Cascone
274daef03e Minor bugfix to spgw.p4
Change-Id: I2668883ba73558d445f05b7d2e3901252b5a640c
2018-02-15 19:10:46 +00:00
Carmelo Cascone
cedad870ec Test case for fabric-spgw when using MPLS routing
Change-Id: Ia77d8da848935e424aadca65d1f9e60068285df3
2018-02-15 04:34:40 +00:00
Ray Milkey
2b4958a463 SONAR suggestion - don't use generic exceptions
Change-Id: I77c4325281e94e189b7f1212a932f7e912b56b51
2018-02-06 18:59:06 -08:00
Carmelo Cascone
5bdffe79a0 Updated fabric P4 compiler output for BMv2
Change-Id: I46c52b954b8e87879d94e9f78511a003e6a06d8c
2018-02-04 14:53:54 -08:00
Carmelo Cascone
a106140b9c Made multicast support optional in fabric.p4
Change-Id: I4efc53fb3cf4270019cd0408eac9b966fa55c2ca
2018-02-04 02:04:24 +00:00
Yi Tseng
4fd2843696 [ONOS-7438][ONOS-7439] Supports table counters and some properties
Change-Id: Ifc0a0e89c14d2e5c17e11e5cef02a0de8cf5d00c
2018-02-02 03:30:51 +00:00
Carmelo Cascone
33e85c04bc Made GTP UPD checksum update optinal in SPGW
Change-Id: Icb38c47aeff533bd108a96b77e1b7c1ec866bc0a
2018-02-01 22:34:24 +00:00
Ray Milkey
986a47aa7c SONAR suggestion - generic exceptions
Replace uses of generic RuntimeException
with more appropriate unchecked exceptions

Change-Id: If283743c2cf7252b8d280bdb788708ebbe57da9d
2018-02-01 18:36:33 +00:00
Yi Tseng
3d3956d167 Fix bugs from fabric.p4
- Incorrect selector for hashed table
 - Incorrect counter type for port counter

Change-Id: I04af95bfbb17b9ca407313b3b3bfdfa9efbf1fa4
2018-02-01 05:42:43 +00:00
Carmelo Cascone
b531b6889c Minor clean-up of fabric pipeline
Change-Id: I9ee78abf9eca1a90dd24b99f737dd1acafea1fa6
2018-01-31 18:29:27 +00:00
Carmelo Cascone
88bbc99715 Test entries and pcaps for fabric.p4 with SPGW support
Change-Id: I66be4ad8a04b68b225f8061f06e2eb68e502b76c
2018-01-30 23:49:08 +00:00