681 Commits

Author SHA1 Message Date
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
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
Ray Milkey
fe6afd8c38 Sonar suggestions
Change-Id: I68d400185ffc885bf92b558a2565a49af149ef0c
2018-11-26 23:15:53 +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
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
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
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
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
Ray Milkey
c65a87013e remove deprecated isLinkLocal() method
Change-Id: I05e5d836002a102319abd9ee45dffadd6a5e38e5
2018-09-07 17:47:54 +00:00
Charles Chan
384aea29c6 Support IPv4 multicast in P4 fabric pipeline
- Multicast can use the same table as unicast. Merge into one.
- Allow masked destination MAC in classifier table

Note:
- Pipeliner now translates all exact MAC match to masked match with FF:FF:FF:FF:FF:FF mask.
- Interpreter now only uses masked src/dst MAC

Change-Id: Ibd27ebfb2d72ba929031f07a29927eb6f1844f11
(cherry picked from commit 0865779b66a59a623856b1353615e462af5575c5)
2018-08-28 05:24:39 +00:00
Ray Milkey
761e80a427 Remove pom files from ONOS
Change-Id: I53e2395466cba10222d638736635b11380421d98
2018-08-21 18:11:58 +00:00
Ray Milkey
312d987732 Starting snapshot 1.15.0-SNAPSHOT
Change-Id: I9239c7695f7faf6dc184a0ff54a34dedf4761b2d
2018-08-20 16:09:54 -07:00
ONOS Jenkins User
03e5521fba Starting snapshot 1.14.0-SNAPSHOT 2018-08-14 22:13:58 +00:00
ONOS Jenkins User
3594c24cb2 Tagging 1.14.0-rc2 2018-08-14 22:13:02 +00:00
ONOS Jenkins User
4e5f2d67ac Starting snapshot 1.14.0-SNAPSHOT 2018-08-13 23:16:37 +00:00
ONOS Jenkins User
cff0bd8922 Tagging 1.14.0-rc1 2018-08-13 23:15:43 +00:00
Ray Milkey
4867af2f9c Revert "Tagging 1.14.0-b1"
This reverts commit 78ce40093ac008fd6d169ab83d2d5961f91f6e31.

Change-Id: I8482f550c30f75d65333f6be9c9115a930abc56f
2018-08-10 16:53:10 -07:00
Ray Milkey
78ce40093a Tagging 1.14.0-b1 2018-08-10 11:16:44 -07:00
Carmelo Cascone
72893b7755 [WIP] Attempt at building grpc and p4runtime protocols with Bazel
STILL NOT WORKING AT RUNTIME

Change-Id: I1f9e60b12a12e09edad2a714ec2921a4f71c6d35
2018-08-09 20:33:39 +00:00
Daniel Park
4a0be7b0df Adds mtu option in DHCP option codes.
Change-Id: I12edf10939043ca992ff4a90817d3d290b9ee3e5
2018-08-07 08:00:31 +00:00
Daniel Park
d27dcdaf51 Implements ICMPEcho packet type.
- For echo request and reply purpose
- STC fast test passed

Change-Id: Ib8ff062718f1747ecf6fcf0fbe06935df28f0e71
2018-08-07 08:00:10 +00:00
Ray Milkey
1c896873c5 Revert "Implements ICMPEcho packet type."
This reverts commit c90af240ebf85b2954d414afceafddca5b7d5ef6.

Change-Id: Idfd9e9aa2af8550b8bdd22305704fd368597459e
2018-08-03 11:30:58 -07:00
Ray Milkey
8bf12805a6 Revert "Fixing errorprone's warning."
This reverts commit c5836479cf04a23bc24f097ea606153b572eb76b.

Change-Id: Ia662d4b35a7d063b45876315d8bf97444ca41c5b
2018-08-03 17:14:16 +00:00
Thomas Vachuska
c5836479cf Fixing errorprone's warning.
Change-Id: I8bb35ca74df50c7c9d689272c1f7b24274303540
2018-07-31 17:46:12 +00:00
Daniel Park
c90af240eb Implements ICMPEcho packet type.
- For echo request and reply purpose

Change-Id: I5797bf41ad6f4afd2c7327b9bfa193aa90198ce4
2018-07-31 01:11:28 +00:00
Georgios Katsikas
5e2d40fdbd Get float value from property name
Extended tools to parse and return Float-based
properties.

Change-Id: I706bc7d1b547d675424a24198d31077eef0fc51f
Signed-off-by: Georgios Katsikas <katsikas.gp@gmail.com>
2018-07-30 16:16:29 +00:00
Ray Milkey
74c98a3ee8 Refactor file path validation code; reject apps with up-level references in the name
Change-Id: I4b14604608078d12df2f7b89f9f841ed19c2552c
2018-07-26 17:28:05 +00:00
Ray Milkey
351d456aca Prevent zip archives from putting files in directories outside of the target directory
Change-Id: I4c751097e8d5190f3df32d8aa4195336e28b1c0a
2018-07-26 15:41:50 +00:00
DongRyeol Cha
e0c98dbd91 Present the port number of LLDP as string value
Currently, ONOS packet-out the LLDP packet with port component type for port id as number value.
But according to RFC2922 , It describes that the port id should be octet string(normal string type).
So, if port number is presented as string value, we can see the port number as string at switch's CLI output.

ONOS-7737

Change-Id: I3ecd0e60a038239c9b4cacd0dd06730bdeb5e338
2018-07-17 16:14:52 +00:00
Thomas Vachuska
1ae26c6c28 Tweaking Bazel packaging.
Change-Id: I796f70e1324c40b5d21c3b784662138f2ec04655
2018-07-10 16:01:53 +00:00
Ray Milkey
dbd3821cf0 Checkstyle rule to prevent throwing the generic RuntimeException
This is a frequent cause of sonar breakage.

Change-Id: I54e0044447633a61bab560b020b57ed0a6875ebe
2018-07-02 18:03:00 +00:00
Jordan Halterman
281dbf3eb3 Refactor flow rule store to resolve missing flows with old masters following mastership reassignment
Change-Id: I7b7e639c84cbd23fe9ab1f12080f865cdfc7f7f9
2018-06-29 20:03:51 +00:00
Daniel Park
021d2eb175 Adds classless static route option to DHCP options.
- Classless static route option is defined at RFC 3442 and widely used in OpenStack.

Change-Id: I66200faa5414b02dae325238e3bf1f0442efd0d8
2018-06-26 13:41:58 +09:00