1003 Commits

Author SHA1 Message Date
Ankur Aggarwal
32c9696d28 [ONOS-8073] Fix for : BGP Open message keeps only last "Optional Parameter"
- Create an inner linkedlist and add that to the main Linked list of capabilities

Change-Id: I42e87d4fd3949d13ebacc36dd83682365b4cbdd8
2020-02-27 16:38:37 +00:00
ChinmayaAgarwal
c9decdec5a [ONOS-8036] Unit test cases
Change-Id: I1cbdf7fe0527f7c1cf6982fbca3ec03d8f3c9c9e
2020-02-25 14:41:45 +00:00
ChinmayaAgarwal
a3d7d7e9ca Fix for ONOS Jira Bug 8060
Change-Id: I4d5cf5af4adf343a66d1b752c8d9459dd30e8cdd
2020-02-24 14:38:13 +00:00
Pier Luigi Ventre
d8a923c512 Avoids delete of dataplane state during mastership change
Leftover in the flow stats creates duplicate flow stats entry.
These entries were considered as flows not in the store and thus removed

Additionally adds further guards during the processing of the stats and
updates unit tests

Change-Id: I242009f560660fb572a633f153edf9798256bfd0
2020-02-24 09:48:19 +00:00
Pier Luigi Ventre
3491e761c0 Revert "Avoids delete of dataplane state during mastership change"
This reverts commit 0a4ead65f47bdf8576bb6d4f1605858f2e8f9df4.

Change-Id: I595ac6181cc0b4494a0e2198629d38522f74d86b
2020-02-20 08:05:43 +00:00
pier
0a4ead65f4 Avoids delete of dataplane state during mastership change
Leftover in the flow stats creates duplicate flow stats entry.
These entries were considered as flows not in the store and thus removed

Additionally adds further guards during the processing of the stats and
updates unit tests

Change-Id: Iba07996e1413c54374b7a4ce7efd21109b429eeb
2020-02-20 08:00:21 +00:00
pier
f528effedd Avoids disconnection from the switches
- Restarting the dispatcher during idle events
- Checking, during idle events, if the backlog can be drained
- Reducing the interval of idle events

Does not change the behavior of the state machine

Change-Id: I1721d8fad37e4e833d0fdfd12d51dc51a06559d0
2020-02-04 08:40:23 +00:00
Maciej Skala
3251a30661 Implement BGP Prefix Listener for BGP Controler
Change-Id: I8cbb43df45104e5cfd7dc7aa7225e5bf99a8ee37
2020-01-07 17:28:54 +00:00
Ankur Aggarwal
f363d1ae6c [ONOS-8036] BGP-LS has only partial support for IPv6
- Removed hard-coded Ipv4Address and replaced with the generic
IpAddress wherever necessary
- Added support of AFI = 2 (IPv6) in MPReachNlri and MPUnreachNlri
- Added a new config parameter for IPv6 in BGP Config. This allows
AFI = 2 to be sent in BGP Open messages
- Skipped TLV 1170 and 1173, which were causing exceptions

Change-Id: I76e69021b1d2687754bbf700681070051e347942
2020-01-06 18:36:34 +00:00
Ankur Aggarwal
b62e8c5490 [ONOS-8052] BGP-LS : NodeMutiTopology sub-TLV causes BGPParseException
BgpNodeMultitopologyId TLV is called by BgpLinkLSIdentifier. In parseLinkDescriptors
method of BgpLinkLSIdentifier, length is read and then, in switch-case statement, the
control goes to BgpAttrNodeMultiTopologyId.java , where read() method again tries to
read the length. This is the root cause of the BGPParseException in certain BGP packets.

This has been fixed by passing the length from BgpLinkLSIdentifier to
BgpAttrNodeMultiTopologyId. And ofcourse, the same change had to be implemented in other
TLVs which included BgpAttrNodeMultiTopologyId.wq

Change-Id: I662d5f7007e8c92a863fb63ca9ebc7ba2038811a
2019-12-03 08:40:17 +00:00
pier
aeb7dbcf45 Fixes openflow echo req adding flush after write
This fix will avoid the disconnection of the backup instance

Change-Id: I6e4251c0207cdf8a044d2f0f6b033385823b0c51
2019-11-28 15:47:13 +01:00
Chinmaya Agarwal
8bfea5ec60 Fix for Bug 8005. Parsing Sub Tlv for multiple neighbors
Change-Id: I32c86793db14698280199dd24f9a0e3731fb9771
2019-10-16 10:45:26 +00:00
Thomas Vachuska
e38afb3754 Demoting log regarding interrupt exception to warning.
Change-Id: Iae06ae0f2d5e8a807dc564ee8c64e2982fe9726f
2019-10-14 15:33:40 -07:00
10068695
e340ec9c40 ZTE Netconf driver for ODTN-phase 1.0
Change-Id: I2cfa65fb889f13ed0e4cab1559229f79cdd7a42b
2019-10-11 08:30:03 +00:00
DongRyeol Cha
e39aa1cb0e Fixed that the stp enable column name
The ovs vswitchd manual said that the stp enable column name is stp_enable.
But onos's implementation is stpenable. Please refers to following document.

http://www.openvswitch.org//ovs-vswitchd.conf.db.5.pdf

Change-Id: I10973a7c880d27ccef63b9f2e6730272b4280124
2019-10-02 17:41:19 +09:00
pier
c684ee1939 Fix duplicate dpid scenario
Change-Id: I408d849b385a54963ed86d2f9c0558cdac4efefe
2019-09-23 12:48:07 +02:00
Anton Chigrin
bf14b37efe Use typed queues for OF message processing
Process OF messages through 8 queues. Output queue for messages
controlled per OF Agent with help of message classifiers.

Queues can be configured through component configuration mechanism
for "org.onosproject.openflow.controller.impl.OpenFlowControllerImpl"
component.

Classifiers can be configured through NetworkConfig API in the following
form:

      {
        "devices": {
           "of:0000000000000001": {
               "classifiers": [{
                   "ethernet-type":"LLDP",
                   "target-queue":0
               },{
                   "ethernet-type":"BDDP",
                   "target-queue":0
               },{
                   "ethernet-type":"0x1234",
                   "target-queue":1
               }]
           }
        }
      }

Where "target_queue" is queue number from 0 to 7 (7 is default queue),
"ethernet_type" is a type of a packet either in "0xFFFF" from or enum
name as defined in the "org.onlab.packet.EthType.EtherType" enum.

Change-Id: I0512ef653d90c36f00289014872170c1a8aa5204
2019-08-29 17:27:49 +00:00
Carmelo Cascone
2254dcdcf0 Fix P4RuntimeClient not logging write errors
Change-Id: I07d9e3ecdc4bcd7178db2fe5356c984d8ae64d5b
2019-08-20 17:05:27 -07:00
Andrea Campanella
3a36145deb Updating CassiniDriver according to testing with IPI
Change-Id: Ia183f0a9ef432909aafa5480ee5b740425aa1832
2019-08-02 14:26:14 +02:00
Carmelo Cascone
cf6a828975 Bump Protobuf to 3.9.0 and grpc-java to 1.22.1
Along with transitive dependencies:

- Netty 4.1.35
- tcnative-boringsll 2.0.25

Change-Id: Icfb9f0c9a9de316f02fefa833be496ca1dd4ec4b
2019-07-16 18:02:29 +00:00
Sean Condon
714f885073 Changes test port to 18080 to avoid clashes with 8080 usage
Change-Id: I3697f3315863927e765e9c37c86c1680ef2d2911
2019-07-03 09:41:08 +01:00
Carmelo Cascone
d33d3b4838 Build ONOS exclusively with Bazel-provided remote JDK
This change make it possible to build ONOS in a host system without JDK
installed, or ignoring the one installed, instead relying exclusively on
the "remote" JDK provided by Bazel. The JDK version, along with the
toolchain configuration (language source and target values), are checked
in as part of the build files (tools/build/bazel/BUILD), thus enabling
deterministic builds that are less dependent of the host environment.

To allow this, this change replaces all references to JDK-related tools
expected to be on the host PATH, such as the jar command, with their
counterpart from the remote JDK (now a sandboxed relative path). This is
achieved by:

  * Creating a new "jdk_genrule" macro that exposes the remote JDK bin
    directory to the PATH visible by the genrule command. This is used
    for all genrule targets invoking for example `jar`;
  * Modifying custom Starlak rule implementations by replacing
    invocation to JDK tools with a path from the remote one.
  * Renaming the onos/lib directory to onos/deps as it clashes with
    the Bazel-provided JDK's lib directory (that for some strange reason
    is resolved on the ONOS workspace)

Finally, this change is reflected on the Dockerfile which now builds
ONOS from an Ubuntu image with no JDK installed.

Change-Id: Ie7d990cfce6fef00ddb4ffffe4c6205b8530fb47
2019-06-18 22:26:33 +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
Jian Li
46fcbe4b91 Remove duplicated ovsdb javadoc, harden setController logic
Change-Id: I1b0aad513ded71a767d72e6e2eafb836366285c5
2019-06-17 22:37:55 +00:00
Jian Li
d575a3cc59 Fix: add new ovs controller first, remove ovs controller afterward
Change-Id: I7ed7f9b01d512ece3781891d69aaf76ba255fd1b
2019-06-12 15:13:13 +09:00
Kieran McPeake
e1b418f08b Clean up logging in (or relevant to) Juniper NETCONF provider
Also fix missing chassisId in DefaultDeviceDescription.toString()

Change-Id: I944baf0b3a4eb9960c0cbcec2ad585701d9a2989
2019-06-05 10:09:33 +01:00
Carmelo Cascone
b9536696f6 First attempt at supporting builds with Java 11
Includes:
- Bump protobuf to 3.8.0 and grpc-java to 1.21.0 (along with transitive
  dependencies such as Netty)
- Add jaxb_api at compile time when needed (removed in JDK 11)
- Bump Bnd to 4.1 (adds support for Java 11)

To build with JDK 11, uncomment lines in .bazelrc.
Tested with Bazel 0.26.0.

Change-Id: Ib8e0c7310eacf97328762606e57c01e4834e5565
2019-05-30 18:11:06 +00:00
Jian Li
f5c9276f1a Allow to inject external_id field when creating an OVSDB interface
Change-Id: Iabc69771ac5dd1a321f8c9cc440fa2e166965a17
2019-05-24 11:07:39 +09:00
Yi Tseng
b81121fc21
[ONOS-7982] Remove P4Config
Change-Id: Ie5cb39da2f5aad7b097b7e4819fc3a1ea7129ed2
2019-05-07 18:36:46 -07:00
Carmelo Cascone
c0b23a459f Allow building third-party apps based on gRPC
By publishing the repackaged grpc and protobuf artifacts

Change-Id: Ib3af7dba4f64948132aa70be31922de61d6f6ab2
2019-04-25 15:38:00 -07:00
Carmelo Cascone
75a9a8958e Trigger pipeconf deploy right after registration
Without waiting for the next pipeconf watchdog periodic probe.
To support this, this patch extends the PiPipeconfService to advertise
pipeconf registration events.

Change-Id: Ib44f1813bd37083c666a5e7980de320ce469c2d2
2019-04-23 19:39:56 +00:00
Carmelo Cascone
adb89058b4 Do not require device data blob when checking pipeconf on device
This prevents loading potentially large amount of data in memory when
doing pipeconf reconciliation, as well as unregistering a pipeconf while
devices are using it (since we no longer need to access the
target-specific extensions to generate the device data blob)

Change-Id: Ib54123ce49a931ff88d93c991244d4086e5d7de0
2019-04-18 05:52:26 +00:00
Carmelo Cascone
9db4d5c644 Add support for P4Runtime clone sessions via Group API
Clone sessions can now be created by defining groups with new type CLONE

The PI framework has been refactored to abstract commonality between
multicast groups and clone sessions as both are managed as part of the
P4Runtime packet replication engine (PRE).

Change-Id: I2f23c629b7de1931d5cab96ec76aef26130ce418
2019-04-17 21:55:13 +00:00
Carmelo Cascone
4b616316d9 Further improvements to connection handling for gRPC-based devices
Force reset of gRPC connection backoff when probing for reachability.
This allows provider to attempt reconnection when needed, instead of
depending on the channel backoff timer.

Improved checkup task in GDP to better handle mastership
flapping observed when reconnecting devices.

Change-Id: I473fb14160b2eb744a483de431b91f9f6bcdab95
2019-04-17 21:54:42 +00:00
Carmelo Cascone
d51a555886 Minor fixes for P4Runtime devices
- Push ports before device is marked online
- Do not notify role NONE on device disconnection (otherwise the
DeviceManager won't mark the device as offline if there's not a master)
- Detect changes in the pipeconf extensions when reloading a pipeconf

Change-Id: I1779987da1269ec98c71b2ccda7bb579be5bf3f0
2019-04-15 20:34:12 +00:00
Carmelo Cascone
c2be50a804 Allow sharing the same gRPC channel between clients
This change introduces a refactoring of the gRPC protocol subsystem that
allows the creation of a gRPC chanel independently of the client, while
allowing multiple clients to share the same channel (e.g. as in Stratum
where we use 3 clients).

Moreover, we refactor the P4RuntimeClient API to support multiple
P4Runtime-internal device ID using the same client. While before the
client was associated to one of such ID.

Finally, we provide an abstract implementation for gRPC-based driver
behaviors, reducing code duplication in P4Runtime, gNMI and gNOI drivers.

Change-Id: I1a46352bbbef1e0d24042f169ae8ba580202944f
2019-04-11 23:14:41 +00:00
Carmelo Cascone
b8a2505d80 More robust deferring for P4Runtime MasterArbitrationUpdate messages
The P4RuntimeClient implements a deferring mechanism to avoid becoming
master when it shouldn't, i.e. when the requested election ID is bigger
than the master one on the device, but it was not asked to be master.
We rely on a distributed primitive to make sure all nodes are aware of
the latest master election ID on the device. In case we lose primitive
update events, this patch adds a maximum timeout after which the
MasterArbitrationUpdate message is always sent.

Change-Id: I98669dac3fc79173b9e98f41e11a4d08901c6cb1
2019-04-08 23:01:01 +00:00
Carmelo Cascone
c32976e7d5 Various fixes in preparation of Stratum demo at ONS 2019
- Do not read counters with table entries for Barefoot drivers
- If driver behavior setup fails, log which operation we are aborting
- Remove unnecessary setup steps in Stratum-related drivers
- Always get clients by their key in gRPC-based drivers
- Log when P4Runtime group operation fails because of missing group in
store
- Fix polling of table entry counters for P4Runtime driver

Change-Id: Ic9bf19b76d8cb5a191aec24852af4410fea8b998
2019-04-08 23:00:54 +00:00
oleksandr.yashchuk@plvision.eu
3dbcaafa0c Initial gNOI implementation added. Introduced system Time and Reboot RPC
Change-Id: I8accdcc6c1ff247408ce54490ceff3972fdf850f
2019-03-26 21:35:33 +00:00
Carmelo Cascone
a3635abf1d Parse action profile max group size from P4Info annotations
This is a temporary workaround to the inability of p4c to
correctly interpret P4Runtime-defined @max_group_size annotations.

Change-Id: If2799786c135b2eb5b6a3b4c6d6022350d37237e
2019-03-22 05:00:35 +00:00
Ray Milkey
bd508ede5c cfgdef tool modifications to catch variable names that don't match properties
- catch errors in the cfgdef tool and abort compilation if a mismatch
  is seen
- Fix mismatches in the code discovered by the tool

Change-Id: Icd9a15eb9312bba6c2208b0b2a684062fcdc19c3
2019-03-21 19:07:31 +00:00
Carmelo Cascone
62d5c2e033 Allow enabling gRPC message logging for existing channels
Change-Id: Ic7586266e6a264ceeb9b55d7dae0db5e9a34c0c1
2019-03-08 06:15:07 +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
6146946e16 Fix inconsistent update type during concurrent P4Runtime writes
This is achieved by optimistically updating the P4Runtime mirror using
the write request (instead of waiting for a response) and by serializing
building write requests for the same device.

This change requires updating the P4Runtime protocol classes to expose
the content of the write request.

It also includes:
- force member weight to 1 when reading groups (some server
implementation still fails to be compliant to the spec)
- remove unused operation timeout handling in GDP (now all RPCz have a
timeout)

Change-Id: Ib4f99a6085c1283f46a2797e0c883d96954e02e9
2019-03-06 19:28:42 +00:00
Carmelo Cascone
3977ea4d9e Refactor channel and mastership handling in P4Runtime
This (big) change aims at solving the issue observed with mastership flapping
and device connection/disconnection with P4Runtime.

Channel handling is now based on the underlying gRPC channel state. Before,
channel events (open/close/error) were generated as a consequence of P4Runtime
StreamChannel events, making device availability dependent on mastership. Now
Stream Channel events only affect mastership (MASTER/STANDBY or NONE when the
SteamChannel RPC is not active).

Mastership handling has been refactored to generate P4Runtime election IDs that
are compatible with the mastership preference decided by the MastershipService.

GeneralDeviceProvider has been re-implemented to support in-order
device event processing and to reduce implementation complexity. Stats polling
has been moved to a separate component, and netcfg handling updated to only
depend on BasicDeviceConfig, augmented with a pipeconf field, and re-using the
managementAddress field to set the gRPC server endpoints (e.g.
grpc://myswitch.local:50051). Before it was depending on 3 different config
classes, making hard to detect changes.

Finally, this change affects some core interfaces:
- Adds a method to DeviceProvider and DeviceHandshaker to check for device
availability, making the meaning of availability device-specific. This is needed
in cases where the device manager needs to change the availability state of a
device (as in change #20842)
- Support device providers not capable of reconciling mastership role responses
with requests (like P4Runtime).
- Clarify the meaning of "connection" in the DeviceConnect behavior.
- Allows driver-based providers to check devices for reachability and
availability without probing the device via the network.

Change-Id: I7ff30d29f5d02ad938e3171536e54ae2916629a2
2019-03-06 19:28:42 +00:00
gyewan.an
3c99ee77c2 Changed the how to relay proxy message within cluster
*changed the commnunication way to 'unicast' from 'sendAndReceived'

Change-Id: I0207c074fd2ab7b8378d9b4ce0cf877fc9aeab29
2019-03-05 17:55:05 +00:00
gyewan.an
91d7e7e283 [ONOS-7566] Implementation of NetconfProxySession
Change-Id: I01cbe0b10ac36cb6db53127555b551f405acdeb1
2019-03-05 17:55:05 +00:00
Brian O'Connor
c69438361a Adding support for TLS connections for gRPC clients
This patch uses BoringSSL to negotiate TLS sessions under the hood.

Change-Id: I1495479ff33654f9cffe04d61f293c3e923b8aeb
2019-02-26 17:50:57 +00:00
Andrea Campanella
c535b67566 Fix for Netconf device re-connection.
Unproprer issuing of Device_UNREGISTERED event was causing incorrect device
removal during session re-establishment.
Unconsistent state in ports and links resulted.

Change-Id: Ie07d9077ff0b197a1cb8936b1f307807fae34aeb
2019-02-26 09:45:08 +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