140 Commits

Author SHA1 Message Date
Carmelo Cascone
776be389d1 Rejuvenate (to some extent) the basic pipeconf
- Use auto-generated BasicConstants
- Implement own pipeliner that maps to table0 (will remove soon
interpreter mapping for index table IDs)

Change-Id: I19fd2091605edc0efbe62134e1ad8e3336089cde
2018-12-12 22:19:38 -08:00
Carmelo Cascone
d06a8511cd Fix fabric.p4 pipeliner not generating next_vlan rule for routing to a tagged host
Change-Id: If3cba5509545bb1de5d8f35796ba2bfee3020ef4
2018-12-11 14:48:06 -08:00
Carmelo Cascone
45cc08627f Xconnect support for fabric.p4 pipeliner
Change-Id: I3bd802ccbc34561b71862a160bab67adeccc2891
2018-12-11 14:48:06 -08:00
Carmelo Cascone
b5324e7168 Improve fabric.p4 to reduce pipeline resources and refactor pipeconf impl
This patch affects both the P4 pipeline implementation and the
Java pipeconf.

P4 PIPELINE
- Less tables and smarter use of metadata to reduce inter-tables
dependencies and favor parallel execution of tables.
- Removed unused actions / renamed existing ones to make forwarding
behavior clearer (e.g. ingress_port_vlan table)
- Remove co-existence of simple and hansed table. Hashed should be the
default one, but implementations that do not support action profiles
might compile fabric.p4 to use the simple one.
- Use @name annotations for match fields to make control plane
independent of table implementation.
- Use @hidden to avoid showing actions and table on the p4info that
cannot be controlled at runtime.
- First attempt to support double VLAN cross-connect (xconnect table).
- New design has been tested with "fabric-refactoring" branch of
fabric-p4test:
github.com/opennetworkinglab/fabric-p4test/tree/fabric-refactoring

JAVA PIPECONF
This patch brings a major refactoring that reflects the experience
gathered in the past months of working on fabric.p4 and reasoning on its
pipeconf implementation. Indeed, the FlowObjective API is
under-specified and sometimes ambiguous which makes the process of
creating and maintaining a pipeliner implementation tedious. This
refactoring brings a simplified implementation by removing unused/
unnecessary functionalities and by recognizing commonality when possible
(e.g. by means of abstract and utility classes). It also makes design
patterns more explicit and consistent. Overall, the goal is to reduce
technical debt and to make it easier to support new features as we
evolve fabric.p4

Changes include:
- Changes in pipeliner/interpreter to reflect new pipeline design.
- By default translate objective treatment to PiAction. This favors
debuggability of flow rules in ONOS.
- Support new NextObjective’s NextTreatment class.
- Remove lots of unused/unnecessary code (e.g. async callback handling
for pending objective install status in pipeliner as current
implementation was always returning success)
- Gather commonality in abstract classes and simplify implementation
for objective translator (filtering, forwarding, next)
- New implementation of ForwardingFunctionTypes (FFT) that looks at
criterion instance values along with their types (to avoid relying on
case-specific if-else conditions to recognize variants of an FFT)
- Adaptive translation of NextObjective based on presence of simple or
hashed table.
- Support DENY FilteringObjective

Also:
- Fix onos-p4-gen-constants to avoid generating conflicting
PiMatchFieldId variable names.
- Install Graphviz tools in p4vm to generate p4c graphs
- Generate p4c graphs by default when compiling fabric.p4
- Use more compact Hex string when printing PI values

Change-Id: Ife79e44054dc5bc48833f95d0551a7370150eac5
2018-12-11 14:48:06 -08:00
Jonghwan Hyun
6777d53386 Implement INT Telemetry Reporting functionality
[ONOS-7335] Add telemetry reporting functionality to basic int.p4

Change-Id: I3ddd776857598d0b9c1bb70aab22a302c0d6bcc0
2018-11-21 02:38:48 +00:00
Jonghwan Hyun
435ec7bd74 Fix NPE in IntProgrammableImpl
Change-Id: Ibb45a701327021ac9daae7e0e357a6bc2c8587d1
2018-11-15 07:32:42 +00:00
Ray Milkey
a349da9d6b Merge branch 'master' into dev-karaf-4.2.1
Change-Id: I3c87139d15508e16a15df62fe73590b2a2ef7a04
2018-11-07 16:20:46 -08:00
Alan Lo
5e2b705713 Update spectrum pipeline config
Change-Id: I6d663e1a2851d812ab64cf6cb268c20914520570
2018-11-06 23:47:09 +00:00
Yi Tseng
2a340f7cc6 [ONOS-7829] Implement AbstractGrpcClient and AbstractGrpcClientControl
Change-Id: I39cba6834e7fe8d1b60b576b9934c0b3cfa7104b
2018-11-05 19:05:35 +00:00
Ray Milkey
a218d43062 Merge branch 'master' into merge
Change-Id: Id77bb2de77dd288404c83e331b076aaf9aafacc5
2018-10-30 12:44:55 -07:00
Carmelo Cascone
8e5818dc65 In fabric.p4 do not parse int_data if sink is not enabled
Change-Id: Ie4d5b9ccdf31ea1142945365fca7db7b8d4ae3f9
2018-10-26 19:42:11 +00:00
Ray Milkey
956bb1691a Merge remote-tracking branch 'origin/master' into dev-karaf-4.2.1
Change-Id: If611105632e508cb17352c6f5b1cbcfd85f716d1
2018-10-26 10:53:44 -07:00
steven30801
7632e150e1 [ONOS-7596] Support reading table entries with counter data in P4Runtime
Change-Id: I85bacb1697a6c881dd69ba74a2162c73ec0b8aee
2018-10-26 17:25:13 +00:00
Thomas Vachuska
22ea6126e4 Removing BUCK files and other Buck-related auxiliaries.
Change-Id: I23691380efcd9bce4906695605214ed59ada0e87
2018-10-24 20:02:31 +00:00
Ray Milkey
d542568b21 Merge branch 'master' into dev-karaf-4.2.1
Change-Id: Iec1b8947c898b0bf10db8caece0c3a064d1c63ae
2018-10-23 10:50:43 -07:00
wu
914ed23baa The ops should be checked if it is null.
Change-Id: If91582add24334427c4b9f935cec622a6e7d8f6d
2018-10-23 17:22:33 +00:00
Carmelo Cascone
03ae0acdd8 Bump version of P4Runtime to 1.0.0rc3 and P4 tools
Change-Id: I3082b4bd772d692830bd5af8e326a0fd5fb2f167
2018-10-18 22:30:46 +00:00
Ray Milkey
db57f1c326 Merge branch 'master' into dev-karaf-4.2.1
Change-Id: I86b9d80581cd76a7c20e05201023090f9692d1ab
2018-10-09 11:26:45 -07:00
Carmelo Cascone
fa42158937 Refactored INT service impl to support multi-instance ONOS and fabric.p4
Change-Id: Ic82a3ab72d71a774606b25997e283b93aedc6ec9
2018-10-05 23:45:33 +00:00
Carmelo Cascone
5a8a650896 Added fabric.p4 profile with both SPGW and INT support
Change-Id: I738e47cc6dbb49d7b3f9b82b44f0f863ff0d0e9d
2018-10-05 23:45:23 +00:00
Carmelo Cascone
50d195ffb3 Do not insert or delete default action entries in P4Runtime
Spec says:
the default entry for a table is always set. It can be set at
compile-time by the P4 programmer - or defaults to NoAction (which is a
no-op) otherwise - and assuming it is not declared as const, can be
modified by the P4Runtime client. Because the default entry is always
set, we do not allow INSERT and DELETE updates on the default entry and
the P4Runtime server must return an INVALID_ARGUMENT error code if the
client attempts one.

With this patch we convert insert or delete operations into modify ones
(unless specified by a driver property, to support non-compliant devices).
For delete, we use the interpreter to suggest a default action that is
the same as the one when the pipeline was originally deployed.

Also, we introduce the capability of synchronizing the device mirror
with the device state.

Change-Id: I3758fc11780eb0f1cf4ed5a295bd98b54b182e29
2018-10-05 23:45:18 +00:00
Carmelo Cascone
79a3a31aec Refactor fabric.p4 INT support to allow compilation on more P4 targets
Also use constant entries for instruction mask tables to avoid
programming them at runtime.

Change-Id: Ia1ab1ecd42a433daec171f9a30bcdba3b8484061
2018-10-05 23:44:49 +00:00
Carmelo Cascone
0c8d73ea08 Use P4 port counters only for BMv2 pipeconf in fabric.p4
Change-Id: I7d13b42188368318c43606f9b97afe75adfae7dc
2018-10-05 23:44:42 +00:00
Carmelo Cascone
6880ba619a Get CPU port dynamically in fabric interpreter
Different HW platforms have different CPU ports, here we allow using
the same interpreter with multiple platform.

Change-Id: I0895d4d3e11560c75aca3fa908ca38759b597d67
2018-10-05 23:39:16 +00:00
Ray Milkey
df521294ce Merge remote-tracking branch 'origin/master' into merge-master
Change-Id: I4608093c4400a313b253508ac6bc8a84ecba5c7e
2018-10-04 15:13:33 -07:00
Yi Tseng
15ab4b0953 [ONOS-7703] FabricPipeliner does not remove NextGroup from store when remove NextObjective
Change-Id: Id945443606bd26e87f9e5236e97820bdbbe5b195
2018-10-03 04:34:49 +00:00
Ray Milkey
d84f89ba3d [WIP] Upgrade ONOS to karaf version 4.2.1
Change-Id: I7cd40c995bdf1c80f94b1895fb3344e32404c7fa
2018-09-28 11:20:57 -07:00
Carmelo Cascone
4235257e52 Convert default routes to two table entries in fabric.p4 pipeliner
This is a workaround to the still brittle support for default actions
in P4Runtime.

Change-Id: I6d2e76df2519eb2660b793a3fb213387fb388ce6
2018-09-13 20:52:08 +00:00
Charles Chan
b1f02f2e07 Do not change vlan_meta flow if we are only editing the buckets
There may be some other buckets in the hash group relying on the vlan_meta flow

Change-Id: Ie208328df0e8b43c5dd836f0d9c43785bc74c908
2018-09-05 17:34:13 +00:00
Charles Chan
cd03f07fb7 Implement NOP in routing v4 table
Change-Id: Ia238cf88eb1ed5e23309f3b2cab7f1403f30dafe
2018-09-05 16:24:26 +00:00
Charles Chan
91ea972a04 Report successful objective operation immediately once the flows/groups are translated
P4 pipeliners are fundamentally different from OpenFlow pipeliners.
It can verify if the flow objective can be translated into a flow that is compatible with the pipeline.
Once verified, it is almost certain the flow can be installed on the switch.
The flow/group subsystem retry mechanism will take care of some rare cases where the flow/group doesn’t get in for the first time.

Therefore, we only fail the objective if there is a translation error in the FabricPipeliner

Change-Id: I868016c0859930fa15b9cdbacb6f72d8c3df307f
2018-09-05 16:24:23 +00:00
Charles Chan
3330195a19 Slience warning of MPLS_PUSH and TTL_OUT
Change-Id: I4ed38d42924782f4fa68675b3dd0b43bae6fd674
2018-08-30 13:11:38 -07:00
Carmelo Cascone
8d2d1b2cb1 Avoid egress processing for controller packet-in/out in fabric.p4
Change-Id: If8ac129efd11a437054ed6b7178e167eff9c6e74
2018-08-28 09:17:52 +00:00
Charles Chan
384aea29c6 Support IPv4 multicast in P4 fabric pipeline
- Multicast can use the same table as unicast. Merge into one.
- Allow masked destination MAC in classifier table

Note:
- Pipeliner now translates all exact MAC match to masked match with FF:FF:FF:FF:FF:FF mask.
- Interpreter now only uses masked src/dst MAC

Change-Id: Ibd27ebfb2d72ba929031f07a29927eb6f1844f11
(cherry picked from commit 0865779b66a59a623856b1353615e462af5575c5)
2018-08-28 05:24:39 +00:00
Carmelo Cascone
07bc58eebe Fixed port duration 0 on P4Runtime devices running basic.4 and fabric.p4
Change-Id: I3e2e81be6753f25a6b8c6b602804686fc1c05677
2018-08-23 00:21:47 +00:00
Charles Chan
68e5973ae1 Fix another installation timeout
There can be multiple next obj waiting for the same flow, i.e. the egress vlan flow.
The key of map is modified to make sure they won't override each other.

Change-Id: I3b3d5ccb850b534146476a2fb57cc7a364c0cbd3
2018-08-22 20:13:34 +00:00
Yi Tseng
fe13f3e634 Fix timeout problem of fabric pipeliner
Including a workaround for ONOS-7785

Change-Id: I867161f5edf63e82c42a731a4b107ea326d4675c
2018-08-22 20:13:34 +00:00
Carmelo Cascone
8a715f84c5 Add default VLAN 4094 tag to all untagged traffic in fabric.p4
Also fix nop action in ingres_port_vlan table not invoking direct
counter.

This allows processing LLDP packets before any SR-related flow rule is
pushed

Change-Id: Ic6c33ff0c74e643d9e7c853e029bff924ba6f2ac
(cherry picked from commit 0433a9d002c6a9533ffd55de709aba5a6ca26f04)
2018-08-22 18:48:35 +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
Charles Chan
8da5779be4 Avoid warning when seeing VLAN_POP in next treatment
Change-Id: Id4b63842be30afc1689aef7392a6b9b0d2e922ae
2018-08-17 17:45:03 +00:00
Charles Chan
cf696e55d3 NoAction in ACL should be mapped to NOP
Change-Id: Ia3c9038eb726379ed2f95635c28ddf5794e646de
2018-08-17 17:45:03 +00:00
Carmelo Cascone
9b0171bc34 Fixed spgw.p4 decapping GTP packets not meant to be decapped
Also reduces the number of tables used for downlink processing.

Change-Id: I09a67cfac335b805d80e90cf5bb69fbab931e80b
2018-08-15 00:13:27 +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
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