32 Commits

Author SHA1 Message Date
Carmelo Cascone
9fae8d5830 Removed files that were accidentally commited to BMv2 protocol
Change-Id: Id639d0f8d1b34bd7b82f30d5af2b79ee4630d354
2016-09-27 13:16:14 +00:00
Brian O'Connor
bfc02ecd22 Bumping snapshot version to 1.8.0-SNAPSHOT
Change-Id: I4ca57b277d8ac814b8a10b107d995cb1cc4d499d
2016-09-16 17:41:55 +00:00
Brian O'Connor
b19fc86f82 Bumping version back to 1.7.0-SNAPSHOT
Change-Id: I1df9d0f12cd7ec7597499d41cacebdbe75899556
2016-09-16 00:12:21 -07:00
Brian O'Connor
338bc0cf19 Bumping pom versions to 1.7.0-rc2 and fixing some maven issues
Change-Id: I6169420328333d0916452aa92efbfa961d72e9c4
2016-09-16 00:11:45 -07:00
Brian O'Connor
0a4e6742b8 Copyright update
Change-Id: I534d938da3820f6fb814aed3bb4a0855fa41ddd5
2016-09-16 06:48:34 +00:00
Yuta HIGUCHI
0de4ba9401 Remove duplicate version specifications
Change-Id: I0fe6027e66815ab2e7db5e090dd5aea39b3c36e1
2016-08-18 15:59:50 +00:00
Matteo Scandolo
c9306e46d1 Enabling UI live-reload for apps not in the ONOS source code
Change-Id: Ib88929a8825b7adf136d2b6b90d66db10549c165
2016-08-09 19:09:28 +00:00
Carmelo Cascone
728b1cd9cd Fixed stack overflow bug when using BMv2 table entry service
Similarly to ONOS-4206, due to a bug in kryo, a non-registered class
(Date in this case) was causing such a problem.

Change-Id: I993f4b41d4deaa617065b29086a49d834832eca8
2016-06-29 21:03:38 +00:00
Carmelo Cascone
eeeabecdf1 More readable toString for BMv2 extension selectors and treatments
Also, added a test for serialization

Change-Id: I77e80fa7597b552c71e80c9d39d03549e0325778
2016-06-29 20:52:21 +00:00
Carmelo Cascone
62f1e1e089 BMv2 performance improvements
- Implemented a non-blocking Thrift server for the controller (before it
	was limiting the number of active connections)
- Improved configuration swap times by forcing it
- Minor bugfixes and polishing
- Update onos-bmv2 repo URL in thrift-api pom.xml

Change-Id: I13b61f5aa22558c395768e3b445f302b20c5bd33
2016-06-29 16:25:47 +00:00
Carmelo Cascone
0ec92f1977 Implemented convenient builders of BMv2 extension selectors and
treatments. 

Match and action parameters can now be built from primitive data types
(short, int, long or byte[]) which are then casted automatically
according to a given BMv2 configuration. Also, simplified demo
applications code / structure.

Change-Id: Ia5bebf62301c73c0b20cf6a4ddfb74165889106f
2016-06-28 23:22:29 +00:00
Carmelo Cascone
6256d01c1c Fixed deadlock in BMv2 device context service
Also minor refactoring of synchronized blocks.

Change-Id: Ifea25208ca4f1839bb3f21ba5b5ecfb2441baa35
2016-06-28 23:04:51 +00:00
Carmelo Cascone
ee4cd7e406 Improved consistency for BMv2 flow rules handling
Change-Id: I3a4798af3f35f135e8162385a1bf7fc059028307
2016-06-28 22:41:23 +00:00
Carmelo Cascone
9e39e31c56 Polished BMv2 protocol module
- Improved and fixed typos in javadocs
- Added missing beta API annotations
- Refactored the default interpreter implementation

Change-Id: Ibfb21d31415d8f25cc67307f8bea2871951c9a8f
2016-06-28 22:40:42 +00:00
Carmelo Cascone
c18e82cf10 Simplified Bmv2 device context service and context handling in demo apps
Change-Id: I2a13ed673902d0616732d43c841f50b1ad38cd4c
2016-06-28 19:56:35 +00:00
Carmelo Cascone
3f85684f42 Added caching for bmv2 thrift sources
No need for internet connectivity after the first maven build.
Also switched to rawgit.com hosting (no throttling of requests). Minor
polishing of the patch script and module structure.

Change-Id: I065a62bddc779c698f4b76865525bf4d973ad2ab
2016-06-28 19:54:50 +00:00
Brian O'Connor
1b2aea88c0 Removing gratuitous relativePath from pom.xmls
The default value for relativePath is: ../pom.xml

Change-Id: I1f5e5e6bfa1e91fcddae4f8cb8ab0c00c276e6b0
2016-06-16 07:05:31 +00:00
Carmelo Cascone
25f1888414 Various bmv2 changes to reflect onos-bmv2 v1.0.0 (onos1.6 cherry-pick)
Most notably:
- Updated repo URL and commit ID to official onos-bmv2 fork
- Removed ugly string-based table dump parser, now there's
	a proper API to retrieve table entries (added support in
	Bmv2DeviceAgent)
- Removed unused arguments in packet-in API

Change-Id: I5ff0948eb8fec5283a085913496c187e7b278d8d
2016-06-16 01:30:12 +00:00
Carmelo Cascone
0831efb0b5 Various changes in BMv2 driver and provider modules (onos1.6 cherry-pick)
Driver notable changes:
- Implemented new behaviors, removed deprecated ones
- Removed flow rule translator classes (now under protocol module)
- Improved FlowRuleProgrammable: now it uses BMv2TableEntryService
	to lookup/bind flow rules with BMv2 table entries, retrieves flow
	statistics, better exception handling when adding/replacing/removing
	table entries.
- Improved PacketProgrammable: better exception handling and logging

Provider notable changes:
- Bmv2DeviceProvider: detects and notifies device configuration
	changes and reboots to Bmv2DeviceContextService, added support for
	periodic polling of port statistics
- Bmv2PacketProvider: implemented workaround for OutboundPackets with
	flood treatment

Change-Id: I79b756b533d4afb6b70025a137b2e811fd42a4e8
2016-06-16 00:48:51 +00:00
Carmelo Cascone
17fc9e41df Major refactoring of the BMv2 protocol module (onos1.6 cherry-pick)
- Created 3 separate sub-modules: API (doesn't depend on
    Thrift), CTL (depends on Thrift), THRIFT-API (to generate Thrift
    sources)
- Implemented 2 new services (for device configuration swapping and
    table entry management) needed to distribute BMv2-specific state
    among ONOS instances.
- Implemented a BMv2 controller (previously other modules where
    using separately a Thrift client and a server)
- Added a default BMv2 JSON configuration (default.json) and interpreter
    to be used for devices that connect for the first time to ONOS.
    This allows for basic services to work (i.e. LLDP link discovery,
    ARP proxy. etc.).
- Changed behavior of the flow rule translator and extension selector,
    now it allows extension to specify only some of the match parameters
    (before extension selectors were expected to describe the whole
    match key, i.e. all fields)
- Various renaming to better represent the API
- Various java doc fixes / improvements

Change-Id: Ida4b5e546b0def97c3552a6c05f7bce76fd32c28
2016-06-16 00:47:42 +00:00
Brian O'Connor
e642f7cf7b Bumping version to 1.7.0-SNAPSHOT
Change-Id: Id105bf08ecbdac6d4e214ae035b4220aea90f29f
2016-05-23 18:35:29 -07:00
Carmelo Cascone
2c72ac7f04 Fixed race condition in bmv2 SafeThriftClient
This was due to the fact that multiple clients were instantiated over
the same tranposrt. Now SafeThriftClient locks over the transport.
Also fixed a bug where some exceptions where uncaught in
SafeThriftClient.

Change-Id: I841ef64e64c28fc78016a0e0dc33e59052cd983e
2016-05-12 12:33:20 -07:00
Carmelo Cascone
f8cf288d75 Added ability to poll flow counters in BMv2
Also fixed few minor things here and there.

Change-Id: Ib5e6a92de46870f52510cd6fad0cef8da022bb62
2016-05-12 12:24:02 -07:00
Carmelo Cascone
2bf44a41a3 Added dump of table entry ids in bmv2 protocol
Change-Id: I54534cfb2c6188c922b36a2f8eb8e5c0851bc681
2016-05-10 17:09:51 +00:00
Carmelo Cascone
b57a134cf8 Added methods to Bmv2ThriftClient to dump the device JSON config
Change-Id: I8ad334d3030f2754f9361731e4c53d446efcb663
2016-05-10 16:49:12 +00:00
Carmelo Cascone
c0fbbee80b ONOS-4420 Implemented BMv2 packet provider
Also, moved DeviceId generation logic from Bmv2DeviceProvider to
Bmv2Device.

Change-Id: I0a7af6d558d054604038a858dce67a2d287bcde3
2016-05-10 16:48:21 +00:00
Carmelo Cascone
5fa651ee47 ONOS-4422 Implemented device discovery in Bmv2 device provider and other
improvements

- Added listener for hello messages received from Bmv2 devices
- Added a periodic poller task to check device reachability and port
information updates
- Avoids periodically re-connecting the device if it is already
available in the core
- Fixed minor bug in Bmv2ThriftClient

Change-Id: I416d1880773e11b2ac6fa062d8be2b8f280786fb
2016-05-09 22:41:10 +00:00
Carmelo Cascone
e4da9096a7 ONOS-4278 Implemented BMv2 control plane server and packet-out support
Change-Id: I4d9027b232dea31d1091c980fb040ec93da9473d
2016-05-05 21:59:18 +00:00
Carmelo Cascone
37d5dbf8b6 ONOS-4118 Added synchronization and resiliency to Bmv2ThriftClient
Due to the multi-threaded nature of drivers, calls to a Bmv2ThriftClient
could result in a race condition if not properly synchronized. Also,
once open, transport session might close due to several reasons. Now the
client calls are synchronized and automatically wrapped in a try/catch
that tries to re-open the session for fixed number of times before
giving up.

Change-Id: I5dcdd5a6304406dc6d9d3a0ccf7f16cdbf3b9573
2016-05-04 17:21:32 +00:00
HIGUCHI Yuta
d8d3dd40b2 Fixing path in pom.xml
- ${project.build.directory} already points to ../target/

Change-Id: I80c72633736cd8e1892c4e0b9dd34da2923e8b7d
2016-05-03 23:40:58 +00:00
Carmelo Cascone
aa8b6297a3 Various Bmv2 protocol refactorings in preparation of the flow rule
translator (ONOS-4044)

- Added new classes for different match parameters (exact, ternary, lpm,
  valid)
- Divided api package in two sub-packages, model (previously under
  drivers) and runtime (old api package)
- Improved Bmv2ThriftClient caching and table entry handling

Change-Id: I23c174cf3e8f9f6ecddb99c2d09dc531e8f1c73f
2016-04-26 11:46:30 -07:00
Carmelo Cascone
2ea177bb70 ONOS-3961 ONOS-4285 Implemented BMv2 drivers and protocol
Provides Thrift-based implementation for FlowRuleProgrammable and
PortDiscovery behaviours.

Change-Id: Ibbf8720d92301bcd23c5c583d156f464015ff1ef
2016-04-26 18:43:51 +00:00