1081 Commits

Author SHA1 Message Date
pierventre
5489c2f6b1 [SDFAB-1196] Build ONOS with Bazel 6.0.0 pre-release
This was a quite big jump (3.7.2 -> 6.x.x) and we had
to face the deprecation of several components.

- javabase/host_javabase -> java_language_version and
java_runtime_version

- java_toolchain/host_java_toolchain -> java_language_version
and java_runtime_version

- Turnedoff "ReturnValueIgnored" related to ErrorProne

- Moved to bazelisk v1.11.0

- patched again the grpc code due to the deprecation of host_javabase
as java_toolcahin contains already this information.

- resource_jars are also handled as resources because java constructs
do not accept them anymore.

- Use the OSGIWrapper to fix the path of the resource_hars and untar them.
Additionally clean up the code and enable/disable logging through a param.

- Fix absolute_javabase in the Dockerfile by providing the absolute
path of the local jvm through local_java_repository. The latter is
appended to the WORKSPACE file on demand inside the Dockerfile.

Change-Id: I96e06fe52b3b49a1a34f01443eec583a95347323
(cherry picked from commit 846c8b167f3e3aa8086b3eab3df94154a75dc423)
2022-07-29 07:42:16 +00:00
Yi Tseng
0926513a15 [SDFAB-1147] Encode P4Runtime messages with canonical byte string
In ONOS, we still use non-canonical byte strings when sending P4Runtime
write requests.

Ref: https://p4.org/p4-spec/p4runtime/v1.3.0/P4Runtime-Spec.html#sec-bytestrings

Change-Id: I27d7977660bea462de82ebe2a4cb5d14500d3b69
(cherry picked from commit 3821399aee849c2a6a334fdb16bfa6b5f8f6dcc5)
2022-03-28 18:18:33 +00:00
Niraj Dubey
b7921b2b1c BGP Monitoring Api
Add Junit
Add Interface

Change-Id: I86ac6cb366c324472c1aebb2d05e1901813916a2
2021-10-25 18:52:50 +00:00
Andrea Campanella
8f6594c6fb [ONOS-8150][VOL-4414] Fix for NPE in rest API after app gets uninstalled
Change-Id: I1cf0b330af43be8ea2211c5831ef715c1eafdea9
(cherry picked from commit 365751943b0c5316e79fbc1201a8d7af659e5008)
2021-10-25 14:08:55 +00:00
pierventre
581c8407e6 [SDFAB-616] Inconsistent format of port number in DhcpRelay
CircuitId deserialize use custom parsing instead of leveraging
the ConnectPoint class. Unfortunately, this custom parsing
does not parse correctly the portname.

Additionally, fix port number format for hostlocation and dhcprecords
and exclude Dhcp4HandlerImpl from file length checks

Change-Id: I360f26f8dd7de492cb65ad7af05fb85c8e940c33
(cherry picked from commit 61bd673eec2282aff175daff141059870db78c7d)
2021-09-27 19:27:55 +00:00
Niraj Dubey
a828719294 BGP Monitoring in ONOS.
Jira Id: ONOS-8136

Implement bgpmonitoring Api.

Change-Id: I3542cf63b3b3ec604d293c166dbf413b7c158ac7
2021-08-27 16:06:48 +00:00
Daniele Moro
53a3cdfb82 Ensure P4Runtime byte strings are padded to their bit width
The P4Runtime server may send canonical byte strings (i.e.,
non-padded byte strings).
In ONOS we ensure, in the codecs, that all byte strings are
padded to match the model (P4Info) bit width. In this way,
we provide read-write symmetry inside ONOS.
ONOS always pads byte strings when sending messages to the
P4Runtime server.
This patch doesn't enforce read-write symmetry between
P4Runtime client and server on the wire.

N.B.: the current padding implementation works ONLY when
using non-negative integer.

Change-Id: I9f8e43de015bd0929dd543d7688c8e71bf5fe98d
2021-05-18 15:58:44 +02:00
Daniele Moro
7aa13e6898 Allows to specify matches, action parameters as strings in PI
Some PI elements can encode in their value a string (e.g., when
a P4Runtime translation is used), for this reason we allow users
to specify matches and action parameters as strings.
From southbound, during decode, we interpret the elements as
string if the P4 model suggests that.

Change-Id: I5884de1500437ab647abc200d65de442e23bd1a8
2021-05-18 12:51:24 +00:00
Daniele Moro
4807983e42 Avoid casting to double to round-up integer division
Use integer arithmetic instead

Change-Id: I7b96d2aa99affad7dcd71c3212e7314cd90fb3b4
2021-05-18 12:21:12 +02:00
Carmelo Cascone
e98dead599 Fix issues seen during bundle refresh with shared executors
Shared executors are shut down by CoreManager during bundle refresh,
which creates issues in many apps/subsystems. This change fixes only
those issues seen in TOST.

- Fix NPE, by shutting down executors only if initialized
- Fix timer already cancelled by re-creating resources depending
  on terminated executors

Change-Id: I00cfb451c54ada67ab94b09edb486d49a5bd084f
2021-02-02 08:41:08 +01:00
Gustavo Silva
7055cce784 [VOL-3660] Add support for PPPoED message decoding and flow installation on OltPipeline.
Signed-off-by: Gustavo Silva <gsilva@furukawalatam.com>
Change-Id: I1a6f318d71b8c1f59fdf582edacd44e9c46cd061
(cherry picked from commit 2bcc805d09f59aa5389a921c8b442c93d805a2d0)
2021-01-28 14:35:58 +00:00
Matteo Scandolo
42e8c2527e Adding helper method in RADIUS packet
Change-Id: Ia4641a89699ffbc2dd1a591f323829399b728e6b
2020-10-24 10:24:02 +02:00
pierventre
53d76edef3 [AETHER-38] Moves T3 utils to ONOS utils
Change-Id: I8eebc7934df2018507742b187bb64ee9b425fca7
2020-10-02 12:22:26 +02:00
Andrea Campanella
191eae0896 Lowering error log for optional TLV type in LLDP packet
Processing of the LLDP packet can proceed with no issue without the TLV and null cases are handled in sequent methods.
This shoudl not be treated as an error warning.

Change-Id: I3c201ca1c9daaf030fed6dbb09a6608527df283d
(cherry picked from commit b5255ff34d24a2c9b85967e2dc00f84cd72406bf)
2020-07-10 12:25:06 +00:00
Charles Chan
9797ebbdc1 Phased recovery
- Implemented a set of CLI commands
    - Enable/disable group of ports
    - List recovery phase of each device
    - Force a specific device to enter given phase
- Return CompletableFuture in RRP
- Introduce completeAfter method in Tools
- Introduce submit method in PredictableExecutor which returns a CompletableFuture

Change-Id: I60b0fb7b67e392b33b52d908d2b53f7acbddc565
2020-06-19 06:49:23 +00:00
Daniele Moro
cc41a94599 Add support to propagate ONOS log to Kafka with KafkaAppender in log4j2
- new OSGi Bundle to define extra imports for log4j2
- update OSGiWrapper to support fragment-host tag + bugfix
- add kafka-clients to onos-dependencies package
- add example of how to propagate log to Kafka via KafkaAppender
- bugfix to org.ops4j.pax.logging.cfg

Change-Id: I89992936101a48c6452082bf23c7133c20aa0b48
2020-02-14 19:02:07 +00:00
pier
b84e91977d Improves host programming introducing a pool of worker threads
Change-Id: I979693aa220e2666c13c4015435c66173624ea64
2019-11-07 17:03:38 +00:00
pier
75651b0f3f Improves ping responder
Patch contains several bugfixes and improvements:
- Fixes sid retrieval when the destination leaf is down
- Fixes sid retrieval when ping goes through the spine
- Fixes MPLS deserializer
- Improves Ethernet toString
- Fixes ping to looback for dh host when bond sends to wrong leaf

Change-Id: I05963e74b2976e526826ffd377cadeb462ba0a8d
2019-10-11 14:08:35 +02:00
Dmytro Titov
a1010de8ea [ONOS-8000] Use passed length for Data payload
Current code can broke a packet during serialization due to bug in
the "Data.deserialize" call. According to the IEEE Std 802.3 standard
an ethernet frame can not have the payload less then 46 bytes. When
the ethernet frame have shorter payload it padded with zeros.

We observed that for short UDP packets deserialize methods for both
the IPv4 and UDP packets calculate length correctly, but the Data
payload deserialization method ignores passed length and takess all
data up to end of the buffer with ethernet frame.

Suggested changes change the Data deserialization method to use only
passed "length" bytes instead of whole remaining "data" buffer.

Change-Id: I6b93458a8925a0924f3830e3a5d5763369e8ea92
2019-06-17 12:37:33 +00:00
Jordan Halterman
d884d8acf9 Pre-allocate sliding window counter slots to avoid thread safety issues.
Change-Id: I331457ee36416d11e52a2e8092662ade3f2e8575
2019-04-23 22:42:28 +00:00
Ray Milkey
deeb726083 Use a copy on write array list for sliding window counter
Change-Id: I80f957c55e49b94e6904630ece031c1dbc8ad356
2019-04-23 16:05:27 +00:00
Jordan Halterman
631e770789 Ensure SlidingWindowCounter is advanced in correct order prior to building the complete window
Change-Id: Ie58cb48cf4af5e29fdc48e02ec53e37b326b0340
(cherry picked from commit 322a624e60cc4367f0a041129d6721aee007a127)
2019-04-12 04:50:14 +00:00
Jordan Halterman
df4b08a297 Modify OpenFlow provider to avoid stats collection when switch is under high load
* Track load via sliding window
* Pause stats collection when load is significantly above average
* Resume stats collection when load returns to normal
* Pause stats collection when reply is in-flight

Change-Id: I3159b4f806a6405ca6be494534497348716cc921
2019-04-09 21:16:53 +02:00
Ray Milkey
7fd9ae2208 Synchronize access to static executors
Change-Id: Iad743cfd22b7017b432f8fd6bdb3e13096a31da5
2019-04-02 17:05:33 +00:00
Ray Milkey
397caca173 Fix ONOS-7958 - problems that were causing failures when onos-core restarts
Change-Id: I186107a386827d66f017182a573377a6a7bb7b00
2019-04-02 00:07:14 +00:00
Ray Milkey
397d8d4679 Fix Sonar complaints about synchronization
Change-Id: I1febbe24b9c96083c661a9b1e88b3e0a3bf03752
2019-03-22 09:05:02 -07:00
Ray Milkey
9bf3b2a877 Allocate a new Timer if component is restarted
Change-Id: I8f7487d636a95613a2e6aa311987a908de21df16
2019-03-22 00:02:24 +00:00
Ray Milkey
4972416f9d Remove deprecated APIs from packet classes
Change-Id: Id02d759077e19e84ed290994ca53b2a0593de223
2019-01-28 09:11:35 -08:00
Thomas Vachuska
bd8ddfe228 Refactoring audit subsystem to clean-up and eliminate back-dependency from core to CLI; still needs additional work.
Change-Id: I93c04c94f27b7b89c582b359eebe125458a573a7
2018-12-14 14:47:17 -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
Ray Milkey
f22adbf0a0 Remove ERROR log that happens during normal processing
Change-Id: I968868875fd903e328dc7dd15e537ff3d8295254
2018-12-10 16:58:53 +00:00
arjunek1992
f6353d4fc8 ONOS audit REST API support
Change-Id: Ic2910785f1f16fe5e36b33c1a73f44539cd8fbea
2018-12-07 21:13:07 +00:00
Ray Milkey
fe6afd8c38 Sonar suggestions
Change-Id: I68d400185ffc885bf92b558a2565a49af149ef0c
2018-11-26 23:15:53 +00:00
Ray Milkey
427e9756cf Add dependency on Jersey HK to prevent failure to locate injection factory class during startup
Change-Id: I9ea6cec2ed7fe60bec1bb86be4284507d655e065
2018-11-16 02:01:31 +00:00
Ray Milkey
123f0e08ad Merge branch 'master' into dev-karaf-4.2.1
Change-Id: If6c7d5f1dc6434ac8ea2fd9716b8ebeee38daa50
2018-11-08 14:18:52 -08:00
DongRyeol Cha
ce65cc0055 Make a link depends on packet-in LLDP packet.
The ONOS does not process the incoming LLDP packet from switches.
The ONOS only process LLDP packets if LLDP packet has "ONOS Discovery" optional TLV.

So, this changes process incoming LLDP packet from switch and make a link information and onos can utilize it.

Also, this patch changes the requested appId of DefaultForwardingObjective generated by PacketManager.
So, AppId in result of flows cli will be printed to actual requested appId.

ONOS-7748

Change-Id: I2611b34655bec2369b8817ce0cd29fb2edbed845
2018-11-08 18:36:54 +00:00
Ray Milkey
a218d43062 Merge branch 'master' into merge
Change-Id: Id77bb2de77dd288404c83e331b076aaf9aafacc5
2018-10-30 12:44:55 -07:00
Charles Chan
64c2dfd3a1 Implement packet seriailizer and deserializer for LACP
Change-Id: Idbbd87a3ddeb477cac49a65e6a5c768761019e11
2018-10-29 16:49:14 -07:00
Anjali K K
4a694f692c IEEE 802.1x EAPOL-MKA packet support.
Change-Id: I61bc45226d5b84445d4fafa969150c4a707ab3bc
(cherry picked from commit 7cd5ff66764505e9c8688af8cb96fa4f089dcf3e)
2018-10-29 22:38:20 +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
d17309c2f5 Merge branch 'master' into merge
Change-Id: I35af23202e94a114f129f2f000ab237165b26737
2018-10-18 10:12:54 -07:00
Samuel Jero
31e16f57b1 Secure LLDP-based Topology Detection
Current LLDP/BDDP-based Topology Detection is vulnerable to the
creation of fake links via forged, modified, or replayed LLDP packets.
This patch fixes this vulnerability by authenticating LLDP/BDDP packets
using a Message Authentication Code and adding a timestamp to prevent
replay. We use HMAC with SHA-256 has our Messge Authentication Code and
derive the key from the config/cluster.json file via the
ClusterMetadata class.

Change-Id: I01dd6edc5cffd6dfe274bcdb97189f2661a6c4f1
2018-10-17 15:59:31 +00:00
Ray Milkey
0b18b72872 Merge branch 'master' into merge
Change-Id: I163ecf699b554e33f4db938c66b73c9911e51135
2018-10-16 13:19:15 -07:00
Saurav Das
a432cf87fa Allow applications to specify a few other packet-request flow priorities.
Also let Ethernet class recognize EAPOL eth-type when printing.

Change-Id: I52b9d9aec6dfdd07aa49861f8c6b82ed814f638e
(cherry picked from commit 6f58cf1e5aae371cb8c7e0ad69552f3e68672f05)
2018-10-12 01:12:27 +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
Ray Milkey
13472a137e remove references to deprecated ICMP constant
Change-Id: I041ee8fb555df318edfc5ebca9ebd9a8934c947d
2018-09-20 16:25:01 -07:00
Ray Milkey
1f8fcc3c6b Fix problems detected by the latest version of errorprone
Change-Id: I532d3627fa232e93ee6860bd10db64c99e78f915
2018-09-17 22:48:13 +00:00
Ray Milkey
51bee8df4b Bump up BND to version 4.0.0 in preparation for Java 10
Change-Id: Ieb4b718d6e0077c3b620afe0d8ec50a5901f868f
2018-09-11 16:45:21 +00:00
Ray Milkey
2c84a9a158 Remove deprecated fit() API
Change-Id: I693389c0c40c0c6fc4d8fabf78307c9acc84b247
2018-09-11 16:43:16 +00:00
Ray Milkey
946fb4f2d3 Remove deprecated getTimer() API
Change-Id: Ie6d99b7145f180ff264c2f372495880f50a10ca1
2018-09-11 16:43:08 +00:00