2633 Commits

Author SHA1 Message Date
Daniele Moro
e719836516 [SDFAB-1177] Separate ingress and egress UpfCounter
Change-Id: I957754bc3f12d2e8f6d9d5748bb0b8c2b01a924c
(cherry picked from commit db0e125ac2515dbb711efdeebc3948b28e9e392b)
2022-05-18 14:20:30 +00:00
pierventre
13792aa10f Update FlowRuleOperations API
stripeKey now exposes an Optional instead of an Integer

Change-Id: I9a13fcea85ba3e0b52c004ece5a47fc50e99c9d6
2022-04-04 13:14:13 +00:00
Jian Li
4b3436a259 Support STT tunneling protocol at kubevirt networking app
Change-Id: Icbef76dbfb842ce1cf6893bf18ee80c4b1b26006
2022-03-29 07:52:20 +00:00
pierventre
16ff3291a8 [SDFAB-1100] In-order flowrule processing
Extends the FlowRuleService and its api by adding in-order processing
capabilities. This is achieved by introducing stripe key as way to
indicate how to process the flowrules. Key is an object which is used
to select a specific executor. Operations having the same key is guaranteed
that will be processed by the same executor.

Change-Id: I5ab4d42e8a2b8cb869f3dc2305dbc5084d31f08b
(cherry picked from commit 07af21d9e116414b74152dc812cc980ca2c4c0a5)
2022-03-29 06:46:27 +00:00
Daniele Moro
31faf955a8 Add slice meter to upf programmable driver behaviour
Also, TC in terminations entities is now required when not dropping.

Change-Id: Ia7e371376ca4f61564ba52a1e8c85a0ff76bb202
(cherry picked from commit b471bd19a7d116e201798509f9bc819664f1ac8d)
2022-03-22 10:25:54 +00:00
Carmelo Cascone
600ffd27e2 Allow building UpfApplication matching only on slice_id
According to the UP4 logical pipeline, the only required match field is
slice_id. All other fields are ternary, hence optional.

Change-Id: I265b43621d6469087e57fda5eb6a4ba350853e9d
(cherry picked from commit ee60f76ae19abeb2162315dd141ce44233880076)
2022-03-04 22:11:44 +00:00
pierventre
bc91cea9de [SDFAB-1015] Introduce gracePeriod and defer mastership check
For some devices like p4rt devices which are first registered
and then updated does not make sense to check the reachability
asap: connection is established concurently to the mastership
checks and the channel might not be ready.

Change-Id: I5a31e09cf382df388a473af338eb72fb9a187fa8
2022-02-25 00:30:01 +00:00
Daniele Moro
516c959846 Use N3 instead of S1U terminology
Change-Id: I54e63b46b9df7a1b62cdb2e4f9807d79e71f8a3b
(cherry picked from commit 3894e9e1492d42d2bb2d8ec3be43da7a0caba945)
2022-02-21 09:20:48 +00:00
pierventre
63ce741a36 Add probeReachability API to the DeviceProvider
The new API is meant for probing the reachability of a device
and adds the ability to directly asses the result of the probe.

Change-Id: I310eba11b943208b5d6776fd8ccbc679d55dfb41
(cherry picked from commit d7cae13c11bdc6c9d344d362ecb71ad99df67367)
2022-02-17 14:29:46 +00:00
pierventre
b59c51dd4e [SDFAB-933] Integrate atomix-3.1.12 and expose demote API
Additionally, this patch adds unit tests for demote and
updates a bunch of testing tools

Change-Id: I9636078b08486c9167ae253f0251f72239ad2802
2022-02-15 17:05:26 +01:00
Daniele Moro
909b958bff [SDFAB-831] Add UPF meters to UpfProgrammable APIs
UPF meters can be of type session or application.
Also, add meter index to sessions and terminations UPF entities.

Change-Id: I8babfca35341a21b234d8eb6edaa2e1c02684210
(cherry picked from commit b25299afaf824a8d352297224e5b9a1285901d00)
2022-02-10 09:19:52 +00:00
Daniele Moro
f3a5ab0401 Refactor UPF entities to have consistent naming and string representations
Also, add slice ID into applications and interfaces entities

Change-Id: I159bcf04af1504b4e5c7210aa1402218fae3eb8f
(cherry picked from commit de1f1f7806716ac6e368e55eaf0b887ab89530d4)
2022-02-02 17:53:49 +00:00
pierventre
81a2cb9c49 Fix ONOS CI by removing the usage of getRegisteredApps
getRegisteredApps is deprecated and it has been discontinued

This patch partially reverts:
- https://gerrit.onosproject.org/c/onos/+/22325
- https://gerrit.onosproject.org/c/onos/+/22362
- https://gerrit.onosproject.org/c/onos/+/22382

Change-Id: I652d814a006709bd40a673699697ba229955b0e4
2022-02-01 19:12:11 +00:00
Yi Tseng
8c79f3f7e3 New PiInterpreter API to map logical port to long type
Introduce a new API for PiInterpreter to map logical port number to a long
port number and deprecate the old one.
The reason we need to translate logical port number to a long type is that
the mapped number will become negative when translating port number to
an unsigned integer with MSB (e.g., 0xFFFFFFFD) and the low level driver
or translator is expecting to get a positive number.

Change-Id: I751e69461b0cf97280f12fd98ca2b15b83cbe84f
2022-01-26 14:55:13 +00:00
Daniele Moro
a1c7ba4266 [SDFAB-834] Add application filtering to ONOS UPF programmable APIs
Change-Id: I3e3d44d5d160470c3f4bfca32e7a83e194d155d8
(cherry picked from commit 97fd80c104570275937d4c24227916c83bf0dd4c)
2022-01-24 09:43:28 +00:00
Daniele Moro
dfc2385b60 Fix toString in UPF UE Sessions and Terminations
Change-Id: I90c9d3180ba9cbbd688ccadd5734792c13504c56
2022-01-05 12:20:22 +01:00
tosinski
36ba33aeb0 Refactor of UpfProgrammable APIs
Change-Id: I792659ad4a163d7115d7320bb33c11534edd484a
Signed-off-by: Daniele Moro <daniele@opennetworking.org>
(cherry picked from commit a57652d92bdd01b1e77bffbac78a44f96fb385f3)
2022-01-05 11:16:39 +01:00
Niloofar Toorchi
8bbe9ca7ab adding support of WCMP weights to Next Objective
Change-Id: Id8f9a4222d0d9d98995f727dbfbf467ab2104468
2021-12-14 17:49:24 +00:00
Emanuele Gallone
b692a8240e Add architecture method to PiPipelineModel Interface.
The field `pkg_info:arch` is now parsed, when parsing a P4Info file.

Change-Id: Ia1b24b929fe4ed8ac2a2becfa0ce7678642e9037
(cherry picked from commit ce9942049825c51c0a0818ad4b89395321aa82b3)
2021-11-18 15:31:45 -08:00
David Glantz
c3e4c0df37 Fix ClassCastException caused by sorting intents in gui when using both string and long keys.
Change-Id: Ide180556761cfe3ca92d14e197d2e3dfc175563e
2021-11-18 20:36:12 +00:00
pierventre
55a5f39ae6 [SDFAB-753] Improve ONOS cluster event
Main idea of this change is to add an additional parameter
in the event that carries information about the failed instance.

Additionally, prevents several NPE by using hostname as id
when controller hostname cannot be resolved into an ip.

Change-Id: Id9886afe3f1e5ecee0f1414b2722c340680a813e
(cherry picked from commit fa5dc3c137a4deaa020a669388470b511c2b6a8e)
2021-11-15 17:05:23 +00:00
David Glantz
dfb3ceb78d Return intent collection with details
Added backwards compatible flag to GET /intents/ to return full intent JSON.
Added GET /intents/application/{appId} to return application specifc intents.
Extended IntentService to include getIntentsByAppId(appId).
Removed hard-coded intent codec lookup in IntentWebResource.

Change-Id: I38e7b1dbd7669e654afe723f6ec3a4eb7a9af6fb
2021-11-07 09:18:19 +00:00
pierventre
57f7bbb6ac [SDFAB-705] Fix GUI for the control and data plane resiliency
Additionally, fix similar issues in GUI2 and add initial
support for ports with name in GUI/GUI2.

This is also the first step towards supporting port with name widely in ONOS

Change-Id: Ib04f780bf0b7171e82a6beb69b39c0aaeb4be957
(cherry picked from commit 178046ba11ab21d94a1e818fb893931bb015734b)
2021-10-27 06:41:50 +00:00
Miguel Borges de Freitas
5b32b59b34 [OpenFlow] Save dp_desc as a device annotation
dp_desc represents the human readable description of a given datapath
and is provided by an OpenFlow switch when it connects to the controller
in the response to the OFPMP_DESC request. ONOS already has access to
this information when the OpenFlowSwitch object is constructed (accessed
via sw.datapathDescription()) but it does not save it or propagate it in
any way. dp_desc, unlike the dp_id which is "random", works like a switch
label. Accessing this information from the controller app layer is
important so that different business logic can be applied according to
the provided "marking". Thus, save the value into the Device Annotations
if available.

Change-Id: Ifaa715a0440e99ce31fdd8d4753c2e892385e33b
2021-10-14 15:11:09 +00:00
David Glantz
0a5779c775 Fix to reinstall flow rules when they are missing in FlowRuleService.
Change-Id: I1e7e0d62e27012cd090f3a72eb92eadc85afafdf
(cherry picked from commit 5c7fe3acf43bf1304038a7be55a5fd45e5805396)
2021-10-14 13:24:36 +00:00
pierventre
b885685722 [SDFAB-642][SDFAB-643] Fix device disconnection when an instance rejoins
Changes in the GDP are done to make sure the default availability is always
updated through the two step process defined in the provider and to prevent
the disconnection of the devices when an instance rejoins the cluster

Finally, the patch improves logging inside the GossipDeviceStore and improve
the stability of PiPipeconfWatchdogManager by getting rid of the timer and
timer task and by executing the event listeners inside an executor.

Change-Id: Ibc6ce711e15e86bde05dbf3b1c37d2a93516fae3
2021-10-07 22:21:51 +00:00
David Glantz
ff63198d93 Fix to prevent a NullPointerException and instead return an invalid link. Occurs when an intent's path is calculated and there are links that are not annotated with the key identified in the intent's AnnotationConstraint.
Change-Id: Iffb15b1f33c474f16bb8b097e2a6c04993add895
(cherry picked from commit 0b3d1aba7ebcb261ab5d2027dd08c0f691e3d88c)
2021-09-30 20:48:01 +00:00
pierventre
26ac1517c4 [SDFAB-542] Meters cleanup and leftovers v2
- Code clean up (unused code, unuseful comments)
- Remove deprecated internal APIs
- Prevent the ejection of the meter pollers
- Prevent the ejection of the mf pollers
- Fix unproper filter of device events
- Fix delete on store which updated existing meters with dummy value
- Fix NPE in TofinoMeterProgrammable caused by default config
- Update unit tests

Change-Id: Ib2767e3ab3cf146693e61b7e1890419c9743d521
(cherry picked from commit a770879a950d1cc985db1a659da701551700e886)
2021-09-16 16:13:33 +00:00
Wailok Shum
90b988a331 [SDFAB-557] Fix max meter in ONOS
Change-Id: I17f1b760fb4c16e3c0daa0ed0a4e54009b5e9aaf
2021-09-15 17:09:54 +08:00
pierventre
c0914ec586 [SDFAB-500][SDFAB-527] Meters cleanup and leftovers
- Improve ONOS cli enabling CRUD of p4rt trtcm
- Improve ONOS rest enabling CRUD of p4rt trtcm
- Improve MeterService with scope defined reads and integrate in cli/rest
- Add support along the stack for BYTE_PER_SEC unit
- Add support along the stack for COMMITTED and PEAK bands
- Fix several bugs in ONOS cli/rest interfaces
- Improve REST codecs
- Fix NPE in MeterDriverProvider
- Improve PiMeterTransalation by enforcing trtcm config
- Implement explicit translation of the bands
- Fix ONOS reconciliation by removing from the mirror the wrong configs
- Remove unnecessary checks in MeterEntryCodec
- Update unit tests

It will follow a 2nd patch to complete SDFAB-527

Change-Id: I855235b17f60cb1d39f5b9a042c1015105a8a269
2021-09-10 10:22:18 +00:00
pierventre
3b39bd8562 [SDFAB-500][SDFAB-499] Implement user defined index mode for the meter service
- Introduce a boolean to control the meter service modes
- User defined mode does not provide any coordination to the apps
- Only one mode can be active at time
- In addition some sanity checks are peformed by the meter service
- Update existing unit tests and add new ones to test the new behaviors
- Initial clean up of the meters subsystems

Change-Id: I61500b794f27e94abd11637c84bce0dbb2e073f3
2021-09-02 10:50:26 +00:00
Wailok Shum
6d42cff6bc [SDFAB-354] Improve P4RTMeterProgrammable
Change-Id: I65a325f90a49853c6c4a1cfb8212a016a8ec2b2d
2021-08-24 01:33:04 +08:00
Wailok Shum
79919528c8 [SDFAB-355] Revisit MeterService and north abstractions
Change-Id: I685cb90d53f8aa61017ecda9fa7ff842e58e2940
2021-08-24 01:31:51 +08:00
Daniele Moro
08c9e7f71c [SDFAB-357] Backport slicing in fabric and add support for QFI in PDR and fabric
Change-Id: Ieb10140dc0029a0cbf59ddfbb77f64f9a8c7379e
(cherry picked from commit 411f6f7f461db6491d627c2cb31642bdd6e7c8d8)
2021-08-16 16:21:36 +02:00
Daniele Moro
06aac70fd2 [SDFAB-359] Purge all objective for a given application ID
Change-Id: I51847b0be890deacec5caddc18d52bcd2993959a
(cherry picked from commit 607fd0b70e4553226d0937d36de9cde655f2eb62)
2021-08-06 15:01:17 +00:00
Daniele Moro
43ac289464 [SDFAB-359] Allow purging flows, groups and meters by device and application ID
Change-Id: I5e507d230789979ac997dbc99697fa0483363f70
(cherry picked from commit cfd774018c0ed926873b1e171c106217cb2ac568)
2021-08-06 14:13:38 +00:00
Wailok Shum
9664209358 [SDFAB-356] Extend P4RuntimeMeterProgrammable and Codecs to support reset scenario
Change-Id: Ifad0b296568d3f78b2aa792fa63f2f81fa80ebae
2021-08-06 17:28:50 +08:00
Wailok Shum
6a24935592 [SDFAB-384] Modify the MeterStore APIs
Change-Id: I2b612bee1c6addc10a0126fe28880e8076735bfa
2021-08-04 20:22:04 +00:00
Wailok Shum
f013a7852b [SDFAB-352][SDFAB-353] Retrieve MeterFeatures from the P4RT southbound, Extend MeterProviderService and revisit MeterStore
Change-Id: If0dae53643988cb551ff5020abd792cb6d33ff6b
2021-08-05 00:32:55 +08:00
Yi Tseng
29b4f22e8b Add truncate instruction and support it with PI framework
To support truncate by P4Runtime clone/mirror session, we need to pass the
truncate size/length from ONOS northbound to the southbound.
As discussed in the SDFabric syncup, we decide to pass this information via
the instruction in group bucket so applications or pipeliners can simply
reuse current APIs.

Change-Id: I15cc822b7c8008b6b9f8b02f3f399769ae396ef0
(cherry picked from commit 9f94a13bf5695996708eedc17166b5b09308147f)
2021-08-02 20:27:20 +00:00
Daniele Moro
0d8aef5cab [SDFAB-287] Let send packet out throw UpfProgrammableException
Change-Id: Ibdc092dcb24c5e44c5315ef055470f1f5ba671e3
(cherry picked from commit 6a7cb471d32a6c237addf5ef0680c62c2614dcd4)
2021-07-20 15:59:03 +00:00
Daniele Moro
668b3d9b61 [SDFAB-287] Remove and query only upf-related flow entries
In FabricUpfProgrammable, make sure to get and remove only flow entries generated
for the specific device ID and by the UpfProgrammable driver behaviour. Otherwise,
we might remove or get entries from different devices or insert by different driver
behaviour.
Also, add a way to check if a flow rule has been created by a UPF programmable behvaiour.

Change-Id: I7a66885154963fdba8e69f10e187560a1662ad33
(cherry picked from commit d5e3fcbf73f53470a8940630243f439edc1fa549)
2021-07-16 18:12:47 +00:00
Daniele Moro
d900fe4a87 Add support for one shot action profile programming in PI
A P4 table annotated with @oneshot annotation can be programmed
only with the action profile action set. For these kind of tables
we don't issue read request for action profile groups and members.

Change-Id: I7b6a743f4f4df4190f17d958ebb4807aca5feda5
2021-07-01 17:34:35 +00:00
Daniele Moro
f8517cae65 [SDFAB-188] Remove buffer drainer from UpfProgrammable
Change-Id: Id10d8b41d203b4af99867d169255a63fe99b25a0
(cherry picked from commit ac94678fb6204b76f44feef3e6098b18c84359bd)
2021-06-25 13:19:29 +00:00
Daniele Moro
5e66f98ebb [SDFAB-187] Add UpfProgrammable interface in ONOS core
Change-Id: Icef23a14015bb0ebe33ebe57eadecaaadc8eebd3
2021-06-16 22:41:02 +00:00
Andrea Campanella
5bdbe43567 [VOL-4055][ONOS-8138] Adding annotations to meter to allow passing of associated information
This patch allows for adding key value elements in the meter request and in the meter generated from it.
An example is:
Annotations annotations = DefaultAnnotations.builder().set("MeterForDeviceType", "olt").build();
DefaultMeterRequest.builder().withAnnotations(annotations)
Generates:
 DefaultMeter{device=of:00000a0a0a0a0a0b, cellId=2, appId=org.opencord.olt, unit=KB_PER_SEC, isBurst=true, state=ADDED, bands=[DefaultBand{rate=100000, burst-size=5000, type=DROP, drop-precedence=null}, DefaultBand{rate=100000, burst-size=5000, type=DROP, drop-precedence=null}, DefaultBand{rate=100000, burst-size=0, type=DROP, drop-precedence=null}], annotations={MeterForDeviceType=olt}}

Change-Id: Ifaded96ebeb7956bc60cdf311180c984c3ba954e
2021-05-19 13:05:50 +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
Thomas Vachuska
a5e986d31c Added ability to configure GUI traffic refresh rate
Change-Id: Iceb1196a20c16f09218218da2e095fbe9644bb04
2021-04-06 21:31:11 +00:00
Jordan Halterman
f17d173959 [AETHER-75] Add command to force snapshot of Raft partitions.
Change-Id: I1e79967e3dcbf353749b6a1e524ce71c763ca588
2021-04-06 20:12:55 +02:00
pier
4fcb4b2ed1 [AETHER-72] Add bulk update to ConsistentMultimap
Change-Id: I61e9f0c2ed5ab368777c64b6fb4aa2c8dd31d081
2021-04-06 17:13:58 +02:00