149 Commits

Author SHA1 Message Date
pierventre
69db90c26e [SDFAB-1197] First stab to update ONOS to py3
Update has been performed only on the scripts and the
executables strictly necessary for the following use cases:

- Build (including Intellij)
- Tests (including Intellij)
- Docker build (including dev and yourkit)
- Upload snapshot (including local)
- Release

Finally, fix the ability to run ONOS using onos-local targets,
stc and docker stc (aka up4 stc env). Last but not least, updated
the azul image to a newer one which exports also the PYTHONENCODING

Change-Id: Ie96f3a9c76dbba83b1fc3896a372f1045d3d7ccc
2022-07-29 13:09:20 +02:00
Daniele Moro
88e414c8b7 Add support for direct meters in generating P4 constants
Also, add imports for PI IDs only when needed in the constants file.

Change-Id: If1821a55a07d5f6874514174381be212188580e3
2021-04-23 11:01:54 +00:00
CyberHasH
2713bb6765 Fix wrong package path generated for BasicConstants when recompile basic pipeline. The package path will generated from output argument if no with-package-path argument specified
Change-Id: I1e864bc08d2aa855e44a9fb2a80e453941eefa8b
2019-11-14 10:05:49 +08:00
Carmelo Cascone
356ab8b479 Support creation of vendor-specific versions of the fabric pipeconf
We provide a new service to facilitate registration of vendor-specific
versions of the Fabric pipeconf (e.g., for Tofino) from third-party
apps. This service is designed such that third-party apps do not need to
depend on internal classes at compile time, such as the behaviour
implementations.

To make this possible, the package structure has been refactored to
separate APIs from implementation.

Change-Id: I487cb806541eb9e6877ebf398a94f057613df8cc
(cherry picked from commit 36d5e7a2337c242e45ee57beacd82bba07a0851d)
2019-10-23 17:54:58 +00:00
Daniele Moro
1edc0bd3fd Added meter support to P4info to java tool
Change-Id: Ic5ff5a680199d78d7f7725ff18dc05d7ce1151c3
2019-08-28 18:24:40 +00:00
Thomas Vachuska
9ccb5faa32 Added a tool to set default JDK to 11 on test cells.
Change-Id: Ie9b983460afa634a2599ff633c3a0a5673eb91dc
2019-06-25 21:07:14 +00:00
Carmelo Cascone
21eb042dba Enforce build with Java 11 for all by default
- Build with JDK11 and language levels (source and target) are now
enforced in .bazelrc, which depends on our own Java toolchain (defined
in tools/build/bazel/BUILD)
- Easymock bumped to v4.0.2 with support for Java 11 (minor API changes)
- The minimum required Bazel version is now 0.27.*

Change-Id: I0bb6dfe7fc1ea134b5a53dd249c369d58259688c
2019-06-18 22:26:33 +00:00
Sean Condon
a36f65c29a GUI2 Archetype stage 1
Change-Id: Icb17b5f0e7f0e38370390653a6bb27f4204f4091
2019-05-20 21:03:27 +01:00
DongRyeol Cha
2803d30843 Add ipv6 address supporting for file transfer using scp
Some files's scp does not have supporting for ipv6 address.
So, I have added supporting for ipv6 address using scp.

Change-Id: Ie6db5c6988c708e4cec862f6b671dd64b457a69a
2019-03-13 18:40:15 +00:00
Carmelo Cascone
92e7d87cc1 Remove additional_languages from generated .bazelproject file
Which might not be supported in IntelliJ community version

Change-Id: Ica6770a33769a47627bd1b0b871e7086fe1b2933
2019-02-08 23:03:25 +00:00
Carmelo Cascone
9d16ad8fe7 Add script to auto-generate Bazel project file
Which is much faster to sync since it reduces the scope of the IDE
targets to java libraries. Although, it requires one to execute the
script each time a new app/library is added to the source tree.

Example usage:
onos-gen-bazel-project > .bazelproject

Change-Id: Ia2911a323b66554f4c5ea588573343013c3c739b
2019-02-08 10:20:49 -08:00
Carmelo Cascone
4c289b731d New P4RuntimeClient implementation that supports batching and error reporting
The new client API supports batching and provides detailed response for
write requests (e.g. if entity already exists when inserting), which was
not possible with the old one.

This patch includes:
- New more efficient implementation of P4RuntimeClient (no more locking,
use native gRPC executor, use stub deadlines)
- Ported all codecs to new AbstractCodec-based implementation (needed to
implement codec cache in the future)
- Uses batching in P4RuntimeFlowRuleProgrammable and
P4RuntimeGroupActionProgrammable
- Minor changes to PI framework runtime classes

Change-Id: I3fac42057bb4e1389d761006a32600c786598683
2019-02-04 23:12:46 -08:00
Thomas Vachuska
b74fef2841 Making stc-set-openjdk11 non-destructive.
Change-Id: Icee7d34d3e00989e00a5b68a9d82dff7da1f6d96
2018-12-17 09:09:18 -08:00
Thomas Vachuska
1e39bd2f44 Allowing cell-stc to inherit stcOpenJDK env. variable.
Change-Id: Iff82642eee04654487245926ba4f3329ed3498cb
2018-12-14 14:47:53 -08:00
Andrea Campanella
d8bc03d90f Updating search for last commitId
Change-Id: Ia6380b718827c340e976ea51e9d985a297a83622
2018-12-12 17:37:41 +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
Thomas Vachuska
c4d037797d Allow ONOS to be built against locally built ONOS YANG Tools.
Change-Id: If4373245be901cae0f620aadcbea557fea35c4e7
2018-11-26 21:05:49 +00:00
Ray Milkey
761e80a427 Remove pom files from ONOS
Change-Id: I53e2395466cba10222d638736635b11380421d98
2018-08-21 18:11:58 +00:00
Thomas Vachuska
07a367b711 Enhancing cell-stc to utilize the local value of ONOS_APPS variable.
Change-Id: Ida396c96d2fc0359c60d7a3c187b087459949602
2018-08-14 00:13:57 +00:00
Thomas Vachuska
6c616d5a45 Fixing cell-build tool. Doh!
Change-Id: Id00507d727dbaaaae2d2f5a54fdfa672afa0aa72
2018-08-13 21:09:03 +00:00
Thomas Vachuska
88d396e55f Fixing javadoc build for Linux and enhancing cell-build with a no-build option.
Change-Id: Ia24ef1f0c04fe52e2506eb708c46cb5a77cf66d5
2018-08-08 22:49:46 +00:00
Thomas Vachuska
c661c20db0 Enhancing cell-build to provide option to use shared cache.
Change-Id: I8ddd43cfec6bd0c6ce9acbbaa18ab0bad53307f0
2018-08-08 21:44:06 +00:00
Thomas Vachuska
74329389c8 Enhanced cell-build to work with other branches and to run unit tests remotely.
Change-Id: I6fe6406561c5968e102475efde3599c15d321656
2018-08-07 14:09:11 -07:00
Thomas Vachuska
bf6739d050 Fixing cell-build to apply patch only if necessary.
Change-Id: I08dcb74d2e421e4fe12c015b5afba1bf282896be
2018-08-07 08:00:59 +00:00
Thomas Vachuska
8141264e25 Adding tool to invoke STC remotely from a borrowed cell using artifacts built via cell-build.
Change-Id: I22ea955d9b9b6fc077c7e94b04c1a3762be40f65
2018-08-06 17:07:36 -07:00
Thomas Vachuska
19bd0c3745 Making fixes and improvements to the cell-build tool.
Change-Id: I1fc5b908f431c5f9f09aa7167fabb061024de28e
2018-08-06 15:13:12 -07:00
Thomas Vachuska
6be30687b0 Adding tool to execute a remote cell-based build via Bazel.
Change-Id: I69f94c3664d8ce75e3691a9e4d8d0a2271406a4c
2018-08-06 14:37:43 -07:00
Thomas Vachuska
21112ad3dc Adding tool to execute a remote cell-based build via Bazel.
Change-Id: Ibb4e0a8454760335d202f7692723d65e2cc16a94
2018-08-06 14:28:10 -07: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
Ray Milkey
c5e2f43a8a Upgrade ONOS to yang tools version 2.5
Change-Id: I2a8f9ca6637185522023123f8e0b68cbe750d3fd
2018-07-02 13:15:15 -07:00
Yi Tseng
13c27f180b Update onos-gen-p4-constant script for new P4Runtime version
Change-Id: I6db9b826e743da70945903cdd934f47f18ba5a7b
2018-06-23 09:32:37 +00:00
Yi Tseng
43ee7e8ea8 Add P4 info to java constant tool
Change-Id: I73a451404e8b657845bfc9b6a37abd824a10910e
2018-06-08 02:17:09 +00:00
Yuta HIGUCHI
57ba38eb10 bump yang-tools version to 2.4.7
Change-Id: I0a257b8b524cd7f6e606d57e6d1a3a5388646ebe
2018-05-16 02:05:38 +00:00
Yuta HIGUCHI
5a438bbdee Forgot to bump yang tool version
Change-Id: Ia0f77356814c18b7f77a269b9ed11fa606abd9db
2018-03-01 17:12:47 -08:00
Thomas Vachuska
7f2a356294 Creating build of a small bundle of remote administrative tools that
can be installed separately from the ONOS source or ONOS runtime.

Change-Id: I0f8a7e2739010f34d913d79ab40390aef3fc07e2
2018-02-28 18:57:05 +00:00
Yuta HIGUCHI
28bcaf16dc decouple buck yang plugin from buck main archive
- prep to allow bumping yang tool versin without releasing whole
  onos-buck archive

- with this patch,
  reverting back from locally patched state
  (= undo `patch-yang-libs`)
  will be:
   $ git checkout -- lib/BUCK tools/build/onos-buck

Change-Id: I06bfccdcfd6b22e2252b5c9dc145cece26058841
2018-02-15 19:33:05 +00:00
Ray Milkey
5193cb736c Bump yang tools version to 2.4
Change-Id: I7fada36e6ecd93d761c41ba70f057ce3a62b842b
2018-02-09 20:46:57 +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
Brian O'Connor
f3735654e3 Updating onos-setup-p4-dev to support gNMI
- Adding gNMI dependencies
- Updating PI and BMv2 to build with sysrepo support
- Building simple_switch_grpc with Thrift server

Change-Id: Ida69d80353652174b0bc61a16b6436bf78a2d194
2018-01-13 00:38:27 +00:00
Carmelo Cascone
65cd9e3e17 Bumped version of p4c in p4 tools script
Needed to fix bug seen when compiling spgw.p4

Change-Id: I2f6d06bdd7755e0819c8f1dc91d3746f922089cb
2018-01-09 21:12:42 +00:00
Carmelo Cascone
ee09071b6a Bumped p4c and fixed missing dependency in onos-setup-p4-dev
Change-Id: I079c55a4f7716369f6b8828b3ffd6477a9a31ed5
2017-12-15 18:06:25 +00:00
Carmelo Cascone
b1936bd93f Bumped version of gRPC to 1.3.1
Change-Id: I7798476bd443a796e0e6a6e149ab8f66435ba4fa
2017-12-13 03:24:50 +00:00
Andrea Campanella
8bcd5863ff [ONOS-7311] and [ONOS-7197] Update ONOS to support most recent version of BMv2 and PI
Change-Id: Ie69cfe1946f3c9241dc7f59a64bd40005a063931
2017-12-12 14:03:36 -08:00
Ray Milkey
cbf9917ca8 Bump up ONOS to version 2.3.1 of yangtools
Change-Id: I96c3ce7672df6c11f9049eb8462b395b75087da2
2017-11-30 20:05:56 +00:00
Yuta HIGUCHI
74681b57f2 Bump next yang tool version to 2.4 series
Change-Id: I90cd799f2bc263f2b59de961cbfba8fd0abede29
2017-11-15 22:52:55 +00:00
Ray Milkey
1c4826636c Bump up yangtools to 2.3 version
Change-Id: Ia56b3a3866760a58aa541604a20f23317fe94b4d
2017-11-15 22:40:44 +00:00
Yi Tseng
3e7f145b90 [ONOS-7143] Add arbitration update support by P4RuntimeClient
Change-Id: I671275576018d50447f969166a7b42a28dd93b1d
2017-11-03 23:13:29 +00:00
Ray Milkey
1cf74edf93 Update ONOS to use yang tools version 2.3.0-b3
Change-Id: I09f6ac082804a1e4b9f80732bbebb83596a1f4d7
2017-11-03 15:00:07 -07:00
Carmelo Cascone
ca94bcf5ea ONOS-7058 Refactored default pipeconfs in new pipelines directory
- Minimal refactoring of P4 programs
- Removed symlinks to BMv2 JSON/P4Info
- Bumped p4c commit (which fixes known parser bug)
- Renamed "default" pipeconf to "basic" (ONOS-6818)

Change-Id: I319f8b142ab22dba9b15457e28cd62d17f78a423
2017-10-30 16:53:37 +00:00
Ray Milkey
8e2c339b06 Upgrade ONOS to use 2.3.0-b2 version of the yang tools
Change-Id: I1111958d4d172320a00d595c20ff82a385a4be3e
2017-10-17 22:06:07 +00:00