47 Commits

Author SHA1 Message Date
Carmelo Cascone
f66f77911c Replace references to old versions of Bazel with 1.0
Change-Id: I2998e0b13ec3f9df4d7ec2a5bccdf46a66d9e065
2019-11-22 06:13:48 +00:00
Carmelo Cascone
fb9926708e Update STC scripts to build stratum_bmv2 with PI dynamic linking
Change-Id: I7c32505e54377510b130340c848a7fc50eb95c0c
2019-07-09 10:36:38 -07:00
Rohan Tibrewal
5766cc57f7 Update P4VM to use Bazel version 0.27.0
Change-Id: I693b9585555c26830782ab42e90347b981e84daf
2019-06-28 23:49:06 +00:00
Carmelo Cascone
1537e8ea5c Fix stratum-related jenkins job failing
Change-Id: Ide032cfe8d93529f266d2cba3435f75920c96877
2019-06-28 14:30:05 -07:00
cmo
4ab984b3c7 Fix p4vm script to export ova and tutorial script
- Modify missing command in tutorial-bootstrap.sh
- Modify command order in ova-cleanup.sh
- Modify the way to execute ovs-cleanup.sh in vm

Change-Id: Ib010d07b31d9b06f3c4b04d34b2036c0058ca300
(cherry picked from commit f1a04004363d2c59108ad3ca9277c09ec1a2167a)
2019-06-19 21:04:23 +00:00
Carmelo Cascone
ada7b5b820 New P4 dev and tutorial VM with Ubuntu 18.04
Change-Id: Iacf2ca8f8467dc91e696ace5ed30412f7869110a
(cherry picked from commit 2b8bcbcd3d0e3e66ee2bc681f0f1dfbb0e2a218f)
2019-05-17 20:45:36 +00:00
Yi Tseng
b81121fc21
[ONOS-7982] Remove P4Config
Change-Id: Ie5cb39da2f5aad7b097b7e4819fc3a1ea7129ed2
2019-05-07 18:36:46 -07:00
Carmelo Cascone
4b2ff04ad8 Fix clone session not working for BMv2 built in p4vm
Change-Id: I9e1e2516aa886303b406a9d5ab286c5f22e733d3
2019-04-16 21:19:34 +00:00
Carmelo Cascone
97d36a284e Use specific kernel version in p4vm
There is a known issue with some kernel versions that affects PTF tests:
https://github.com/jafingerhut/p4-guide/tree/master/linux-veth-bug

Change-Id: I207cd7b6c2de72c1a9fd353c931584551889a0d3
2019-04-12 18:59:41 +00:00
Carmelo Cascone
a1ae427895 Bump P4 tools and scapy version used in p4vm
Change-Id: Ief0b6a49fed9cdb945a92bb7b5a1bdfd2a283636
2019-04-12 17:57:42 +00:00
Carmelo Cascone
ab5d41e8ab Add support for enabling/disabling ports for gNMI devices
This change also includes:
- Refactoring of gNMI protocol+driver to take advantage of the recent
changes to the gRPC protocol subsystem (e.g. no more locking, start RPC
with timeouts, etc.).
- Fixed Stratum driver to work after GeneralDeviceProvider refactoring
- Updated bmv2.py to generate ChassisConfig for stratum_bmv2
- Fixed portstate command to use the same port name as in the store

Change-Id: I0dad3bc73e4b6d907b5cf6b7b9a2852943226be7
2019-03-07 07:45:32 +00:00
Carmelo Cascone
25243d671f Missing changes from update install-p4-tools.sh to use P4Runtime v1.0
Change-Id: I89aca8b081bd05f10c6a8ad88322fd132316b581
2019-02-22 22:54:19 +00:00
Carmelo Cascone
a4dc3c12bc Update install-p4-tools.sh to use P4Runtime v1.0
Includes also various improvements to the p4vm scripts, such as:
- Choose to build VM with Ubuntu 16.04 or 18.04 (experimental)
- Allow users to specify version of protobuf and grpc to use
- Avoid building protobuf and grpc if already installed in the system
- Install Bazel 0.22

Also:
- Remove check for invalid group member weights (now PI always returns
members with weight 1)
- Re-compiled all P4 programs and fixed missing padding in controller
packet headers

Change-Id: I0e672fcebbaba63354c749f0c774af251f3cbc6c
2019-02-21 23:24:26 +00:00
Carmelo Cascone
7c82bcf4a7 Add command to install stratum and its deps on a remote node
Also:
- update install-p4-tools.sh to build BMv2 and PI for Stratum, as
they need different configure options when used with Stratum
- improved build times (~4 minutes on cell machines)
- removed support for Ubuntu 14.0 and code related to old gnmi support
via sysrepo

Change-Id: Icf9cf936237e2815dee73bdc4370562f29616a23
2019-02-09 20:06:30 +00:00
Carmelo Cascone
e45902b280 Bumped P4Runtime to v1.0.0
Change-Id: Ie6419e45980a0394ce1e0439831f4b011a4d7487
2019-02-05 00:44:37 +00:00
Carmelo Cascone
bcb055e550 Generate tutorial p4vm with a specific ONOS version
Also:
- Updated Bazel version
- Removed non-working code to auto-login user and disable screen saver
- Reduce size by doing a shallow clone of ONOS

Change-Id: Ie6efc3ebd6766164e7051f28dff89046141afa7f
(cherry picked from commit 68a0a00b4f332cb1cc518dc9c76e587d70cb4492)
2019-01-09 00:11:44 +00: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
bfb3a21a51 Update install-p4-tools.sh to support Ubuntu 18.04
Change-Id: I11b79bb87090aff0fc0ebaf945500391e47412fb
2018-11-20 21:13:05 +00:00
Carmelo Cascone
65aa829cd1 Various improvements to P4 tutorial
- Added steps to exercise 2 to use wireshark to capture MyTunnel packets
- Various formatting fix/improvements
- Fixed markdown link to use relative paths
- Fixed bm-cli command not to use sudo (not needed)

Change-Id: I514da99a6cfadd048294c610ba201503c0339e89
(cherry picked from commit 19ea89f8540eef0e41fdf7b4fd9a2a1950f2ade9)
2018-11-09 18:52:40 +00:00
Carmelo Cascone
a252df1d9a Updated Ubuntu 16 desktop vagrant box for tutorial P4 VM
Change-Id: I4c3028a715d2a91cceaad44685285148f47d556b
(cherry picked from commit 4b9974fabf5393d53b99b70f88b577e4f3076c5e)
2018-11-01 01:05:48 +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
Carmelo Cascone
76e6386d41 Bump version of BMv2 and disable nanomsg
To match what used in Stratum

Change-Id: Ic4b87bcad6c3da36030fa01ee4135f60c05fcd78
(cherry picked from commit 1a16f00d8ddfb47c6423e5bc70f5d362230debb7)
2018-09-05 05:17:19 +00:00
Carmelo Cascone
ea2c110e4e Updated tutorial p4vm scripts to build upon Ubuntu Desktop
And not Lubuntu which had u=issues with VirtualBox guest additions

Change-Id: I47218b78ea3d6ae2574fa55166cc48c1de3989e7
2018-08-23 00:21:41 +00:00
Charles Chan
84431b9aae Add Trellis dependency into p4vm
Change-Id: Ieddb3ffa9da620ea78e4538aae02869804e2d0d1
2018-08-17 15:27:00 -07:00
Carmelo Cascone
a1812adb19 ONOS-7770 Install Bazel in p4vm
Change-Id: I3e1540bd4d080655047e3fb6accac9bec21de484
2018-08-15 20:15:04 +00:00
Charles Chan
87dc82e42e Fix missing depencencies for fabric.p4 tutorial
Change-Id: Ie8758c1e8ceee78fcb41984b06b6e216c82177d8
2018-08-06 17:07:08 +00:00
Carmelo Cascone
95e5afdf38 Various improvements to p4vm scripts
- Allow running up to a given step of install-p4-tools.sh
(e.g. helpful to install only PI)
- Install fabric-p4test deps (ONOS-7656)
- Fix python protobuf libraries not installed

Change-Id: I443edb08f455703ae682e485a89d793a584c30ff
2018-07-21 14:14:16 +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
f645e8406c Bump P4 tools to latest version
With support for P4Runtime multicast API

Change-Id: I6982c32187204b656a927d0f3d7f3a4b1b877e75
2018-07-16 20:31:32 +00:00
Carmelo Cascone
f742a1186f Fixed p4vm not building with debug flags disabled
Change-Id: I5089319b91c6b62166f4e506762f2552dd20744c
2018-07-11 11:28:57 +00:00
Carmelo Cascone
f02872d834 Allow to build P4 tools without debug flags to improve BMv2 performance
If the env variable DEBUG_FLAGS is set to false, build tools without
debug features to improve throughput of BMv2 and reduce CPU/memory
footprint.

Debug features include BMv2 logging, debugger, nanomsg, etc.

With DEBUG_FLAGS=true, when running 20 BMv2 instances, it requires 4 CPU
cores 100%. With DEBUG_FLAGS=false, when running 50 BMv2 instances,
overall CPU usage is only 1%.

Change-Id: Ifdd8ea976940b440797beb0e2300a749a55907dd
2018-06-29 14:36:05 +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
Eder Ollora
319b9bfe3e Fixed URL for p4.vim in tutorial script
Change-Id: Ia7a174edfd63ba677fce81fc91b4463cfc62d813
2018-06-19 15:06: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
Andrea Campanella
4f9085e2d7 Adding an STC scenario for fabric.p4
Change-Id: I3457ab67c2c97eab73623500ba3f6a75b9ed33a3
2018-06-04 10:24:55 +00:00
Carmelo Cascone
c282133c31 Remove depenency on internal BMv2 device ID when starting bmv2.py
Needed to support TestON-based Segment Routing tests. All instances
started with internal ID = 0 (one PI/P4Runtime server procees is
executed for each simple_switch_grpc instance, i.e, there's no need to
use different internal IDs to distinguish between switch instances).
Log/conf files and bm-* commands are now based on switch name.

Change-Id: I34d3079d6dff5933ceb4d95f04863426af24eb81
2018-05-15 05:19:30 +00:00
Carmelo Cascone
ef71549529 Fix incorrect SSH port when generating P4 VM
Change-Id: I649433e2fcaa3c935bd6ebe61240e1645ace8d77
2018-05-14 19:48:46 -07:00
Carmelo Cascone
57defd3782 Generate leaner P4 VM
Dev: 1.5 GB instead of 3.5 GB
Tutorial: 2.3 GB instead of 5.5 GB

Change-Id: Ib63d47578a2c9e16a97827bfba463f90cfe1187d
2018-05-11 16:01:16 -07:00
Carmelo Cascone
c5569c2c19 Extend ONOS+P4 VM scripts to build tutorial VM
With Lubuntu desktop and P4-enabled code editors

Change-Id: I0c287c1d039da5f227d43994340b20a01ffc2617
2018-04-18 09:48:30 +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
Carmelo Cascone
05354678a9 Fixed missing square brackets in install-p4-tools.sh
Change-Id: I46e118bba275e704ddc0c73514796e2ca2495b52
2018-04-10 20:57:53 +00:00
Carmelo Cascone
4f985cd8c5 Disabled gNMI support in p4vm until it becomes more stable
Change-Id: If2085d5824a2b9d06b249bf8d82d92fd384de5af
2018-02-11 20:12:49 -08:00
Kevin Chuang
53a9d5b37d Fix build error on Ubuntu 14.04
- Build protobuf-c (libprotobuf-c-dev is not available on Ubuntu 14.04
apt repository)
- Build libboost-iostreams1.58 (The highest version of libboost-iostreams on Ubuntu 14.04
apt repository is 1.55, which will cause error when building p4c)

Change-Id: I00648e3c4890ebee0052c643e9f4b4ea10d345a9
2018-02-01 01:00:54 +00:00
Carmelo Cascone
76b3ee6bb5 Install P4Runtime Python test scripts in dev VM
Change-Id: I096bf1ef6b91bb2507745250c5fec0a7d18a6680
2018-01-31 02:16:09 +00:00
Carmelo Cascone
f11513d1bc Various improvements to P4 dev env
- Better handling of BMv2 crashes in bmv2.py (with watchdog and logging)
- bm-* commands for easy access to BMv2 log, CLI, etc

Change-Id: I1c79acda641171566d8e1162442c7f377bb273fe
2018-01-18 00:59:26 +00:00
Carmelo Cascone
b7e618d43d Updated script to build P4 VM
Among other things, build now is not based on the upstream version of
onos-setup-p4-dev, but on the local one.

Change-Id: I270a324152a9349d6a9989aa8b5a38b45e1856d9
2018-01-14 18:21:06 +00:00
Carmelo Cascone
d66150733a ONOS-7330 Added ONOS-P4 VM build script
Builds and OVA from scratch with the most updated tools in one command.
The build process is based on Vagrant.

Change-Id: I633d99092946f99e877f0c97631a4f99c5b1f37e
2017-12-20 21:56:02 +00:00