openflowjava.git
9 years agoAdded a get method for InetSocketAddress of a remote OF switch 15/9615/3
Martin Sunal [Sat, 2 Aug 2014 17:24:09 +0000 (19:24 +0200)]
Added a get method for InetSocketAddress of a remote OF switch

Signed-off-by: Martin Sunal <msunal@cisco.com>
9 years agoFixed FIXME on MAC address serialization 59/10359/3
Rob Adams [Fri, 18 Jul 2014 16:53:10 +0000 (09:53 -0700)]
Fixed FIXME on MAC address serialization

 + Fix incorrect log message formatting

Change-Id: Ifc523e1e67e1e29ee3c1271995ca79d6edc8b223
Signed-off-by: Michal Polkorab <michal.polkorab@pantheon.sk>
9 years agoMerge "Improve unit test coverage"
michal rehak [Wed, 27 Aug 2014 08:35:09 +0000 (08:35 +0000)]
Merge "Improve unit test coverage"

9 years agoImprove unit test coverage 32/10132/2
Michal Polkorab [Tue, 19 Aug 2014 13:45:29 +0000 (15:45 +0200)]
Improve unit test coverage

Change-Id: I374bcf2c76a4a3b6cba441dc0c0570be7855d8a9
Signed-off-by: Michal Polkorab <michal.polkorab@pantheon.sk>
9 years agoFeatures.xml update 87/10287/3
Michal Polkorab [Tue, 26 Aug 2014 08:54:26 +0000 (10:54 +0200)]
Features.xml update

 - removed odl-yangtools-binding-generator feature as it is not needed

Change-Id: Ia6a31f0fd235536a87d86fbd3b47305aab44460c
Signed-off-by: Michal Polkorab <michal.polkorab@pantheon.sk>
9 years agoFix karaf features, and add testing for them. 05/10105/2
Ed Warnicke [Wed, 20 Aug 2014 16:09:15 +0000 (11:09 -0500)]
Fix karaf features, and add testing for them.

Change-Id: I272e0b92099d68e72f30138fe42935495ddf7d94
Signed-off-by: Ed Warnicke <eaw@cisco.com>
9 years agoMore updates to sonar 43/9743/1
Robert Varga [Wed, 6 Aug 2014 11:55:41 +0000 (13:55 +0200)]
More updates to sonar

- per-test reports
- integration test support
- findbugs reports

Change-Id: Ie6a8865551f3d4957be87ccef4b4820d30a1cbd1
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoFix UT coverage not reported in sonar 31/9731/1
Robert Varga [Wed, 6 Aug 2014 04:56:27 +0000 (06:56 +0200)]
Fix UT coverage not reported in sonar

Just a couple of properties and making sure jacoco runs.

Change-Id: I75aeae7b74f5c7e94a0a237728dc2b6f0c4df090
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoCreated experimenter subtype for vendor's actions 29/9429/6
Martin Sunal [Tue, 29 Jul 2014 10:21:56 +0000 (12:21 +0200)]
Created experimenter subtype for vendor's actions

ExperimenterActionSerializerKey has a new parameter which is type of vendor's action.
It allows to select right serializer directly in OFJava so a vendor does not need to care about it.
- created codec for Nicira match nxm_of_eth_type

Change-Id: Id9bc0f06820cab7b897eb710a70ddc3d6af13a45
Signed-off-by: Martin Sunal <msunal@cisco.com>
9 years agoNicira extensions in OpenFlowJava library 86/8986/16
Martin Sunal [Mon, 14 Jul 2014 12:27:09 +0000 (14:27 +0200)]
Nicira extensions in OpenFlowJava library

- creates and registers codecs(serializers & deserializers) for:
actions:
reg-load
reg-move
matches:
NXM_NX_REG(0-7)
NXM_NX_TUN_ID
NXM_NX_ARP_SHA
NXM_NX_ARP_THA
NXM_OF_ARP_OP
NXM_OF_ARP_SPA
NXM_OF_ARP_TPA
NXM_NX_TUN_IPV4_DST
NXM_NX_TUN_IPV4_SRC
NXM_OF_ETH_SRC
NXM_OF_ETH_DST
- moved CoSS config to appropriate place
- added revision to ietf-yang-types

Change-Id: If847b9098722337318109d3ffe34ddaca8b6b363
Signed-off-by: Martin Sunal <msunal@cisco.com>
Signed-off-by: Michal Rehak <mirehak@cisco.com>
9 years agoCorrected equals & hashcode methods in extension keys 71/9271/1
Martin Sunal [Wed, 23 Jul 2014 22:17:22 +0000 (00:17 +0200)]
Corrected equals & hashcode methods in extension keys

- corrected equals & hashcode methods in keys
- tests for equals & hashcode methods in keys

Signed-off-by: Martin Sunal <msunal@cisco.com>
9 years agoAdded switch TLS keys 25/9225/4
Michal Polkorab [Tue, 22 Jul 2014 09:58:45 +0000 (11:58 +0200)]
Added switch TLS keys

 - this allows to finish exemplary TLS configuration
 - selfSignedSwitch and selfSignedController keystores were moved to src/test/resources
  as they are used only in test
 - other keystores located in src/main/resources were updated with "exemplary-" prefixes
to clearly mark them for exemplary usage

Change-Id: I821f79e1af8b50fc59e3e5067841a017ec9c1282
Signed-off-by: Michal Polkorab <michal.polkorab@pantheon.sk>
9 years agoSimplified Multipart TableFeatureProperties serialization 98/8798/2
Michal Polkorab [Mon, 7 Jul 2014 12:10:50 +0000 (14:10 +0200)]
Simplified Multipart TableFeatureProperties serialization

Change-Id: Ifdf3936b5985beba23c94bc1e64dde738a844ca2
Signed-off-by: Michal Polkorab <michal.polkorab@pantheon.sk>
9 years agoReplaced usage of BytebufUtils.padBuffer() as it is deprecated 94/8794/2
Michal Polkorab [Mon, 7 Jul 2014 14:28:18 +0000 (16:28 +0200)]
Replaced usage of BytebufUtils.padBuffer() as it is deprecated

 - replaced with buffer.writeZero()

Change-Id: Ica7ef6d244fc531419c42d4055f0d42b09e7ebf0
Signed-off-by: Michal Polkorab <michal.polkorab@pantheon.sk>
9 years agoTcpFlag match entry serializer registration fix 20/9220/1
Michal Polkorab [Tue, 22 Jul 2014 07:30:40 +0000 (09:30 +0200)]
TcpFlag match entry serializer registration fix

 - TcpFlag and Tunnel match entry serializers used old keys for registration

Change-Id: Ib0c3944d7d27b3ce8601aa3797d175dc94bce6dd
Signed-off-by: Michal Polkorab <michal.polkorab@pantheon.sk>
9 years agoFix: Correct key looked up on experimenter messages 59/9159/2
Michal Polkorab [Fri, 18 Jul 2014 13:56:57 +0000 (15:56 +0200)]
Fix: Correct key looked up on experimenter messages

Signed-off-by: Michal Polkorab <michal.polkorab@pantheon.sk>
9 years agoExample of openflowjava extension for nx_action_resubmit 08/8808/5
Michal Polkorab [Tue, 8 Jul 2014 16:21:11 +0000 (18:21 +0200)]
Example of openflowjava extension for nx_action_resubmit

 - configuration file is located in src/main/resources - use this file to load / register this bundle
 - configuration file is exemplary - it registers the NX_ACTION_RESUBMIT into ofjava 6633 and 6653 instances
 - change contains 2 yang files:
   - nx-resubmit-action.yang - shows how to augment existing structures
   - openflow-nx-resubmit-action.yang - shows how to configure custom bundle
 - unit tests test if the structure is (de)serialized correctly

Change-Id: I6ed7226dba83f36deb100de88e5408ae32c060b2
Signed-off-by: Michal Polkorab <michal.polkorab@pantheon.sk>
9 years agoUpdated experimenter model 55/9155/1
Michal Polkorab [Wed, 16 Jul 2014 11:36:24 +0000 (13:36 +0200)]
Updated experimenter model

 - all extension-capable-messages have their augmentations (experimenter message is defined - so no augment needed here)
 - these augmentations will be used for vendor / experimenter differentiation

Signed-off-by: Michal Polkorab <michal.polkorab@pantheon.sk>
9 years agoExtracted (De)SerializerExtensionProvider interfaces from SwitchConnectionProvider 51/9151/1
Michal Polkorab [Fri, 4 Jul 2014 13:48:35 +0000 (15:48 +0200)]
Extracted (De)SerializerExtensionProvider interfaces from SwitchConnectionProvider

Signed-off-by: Michal Polkorab <michal.polkorab@pantheon.sk>
9 years agoSimplified extension registration (part1) 38/9138/2
Michal Polkorab [Thu, 17 Jul 2014 14:00:45 +0000 (16:00 +0200)]
Simplified extension registration (part1)

 - introduced methods for match, action and instruction registration
 - other extension method will be added in part2

Change-Id: I928833e8df6d4a9037fea480ddef4d54d4ac46a6
Signed-off-by: Michal Polkorab <michal.polkorab@pantheon.sk>
9 years agoRenamed base identity for match oxm_classes 37/9137/1
Michal Polkorab [Thu, 17 Jul 2014 14:34:19 +0000 (16:34 +0200)]
Renamed base identity for match oxm_classes

 - renamed from "Clazz" to "OxmClassBase"

Signed-off-by: Michal Polkorab <michal.polkorab@pantheon.sk>
9 years agoBug 1373 - Fixed NullPointerException on incorrect input 15/9115/2
Michal Polkorab [Thu, 17 Jul 2014 10:21:38 +0000 (12:21 +0200)]
Bug 1373 - Fixed NullPointerException on incorrect input

 - now throws IllegalArgumentException. This is just logged and pushed into Future, the Future delegates the information further to upper ODL layers

Change-Id: I64ac1e4904e8837ab5b26572235bdaf5fac984da
Signed-off-by: Michal Polkorab <michal.polkorab@pantheon.sk>
9 years agoCreated special extension keys for more easier (de)serializer (un)registration 63/9063/1
Michal Polkorab [Wed, 16 Jul 2014 12:17:52 +0000 (14:17 +0200)]
Created special extension keys for more easier (de)serializer (un)registration

 - these keys don't need special types in their constructors, because they always use the same type (e.g. Experimenter.class)
 - also created two marker interfaces (Experimenter(De)SerializerKey) to mark appropriate extension keys

Signed-off-by: Michal Polkorab <michal.polkorab@pantheon.sk>
9 years agoDeleted openflow-protocol-ext bundle 52/9052/1
Michal Polkorab [Wed, 16 Jul 2014 09:20:27 +0000 (11:20 +0200)]
Deleted openflow-protocol-ext bundle

 - there is another exemplary bundle - more simpler
 - removal needed by upcoming changes

Signed-off-by: Michal Polkorab <michal.polkorab@pantheon.sk>
9 years agoUpdated extension registration keys 91/8991/4
Michal Polkorab [Mon, 14 Jul 2014 14:45:04 +0000 (16:45 +0200)]
Updated extension registration keys

 - keys now properly use experimenter ID to distinguish between experimenter messages
 - also updated initialization and registry helper classes

Change-Id: I6177c72397aa7b534cffdf0a9b729fbec2effa50
Signed-off-by: Michal Polkorab <michal.polkorab@pantheon.sk>
9 years agoBug 1324 - Buffer released correctly (even if translated dataObject is null) 87/8787/4
Michal Polkorab [Tue, 8 Jul 2014 09:28:48 +0000 (11:28 +0200)]
Bug 1324 - Buffer released correctly (even if translated dataObject is null)

 - updated OFDecoderTest - buffer is now released even on deserialization exception

Change-Id: I1a3a6f17309f795b7db08bf3ed68ea49ab888cf0
Signed-off-by: Michal Polkorab <michal.polkorab@pantheon.sk>
9 years agoBug 1323 - Treated expensive logging in OFDecoder and OFFrameDecoder 86/8786/1
Michal Polkorab [Tue, 8 Jul 2014 09:18:55 +0000 (11:18 +0200)]
Bug 1323 - Treated expensive logging in OFDecoder and OFFrameDecoder

Signed-off-by: Michal Polkorab <michal.polkorab@pantheon.sk>
9 years agoDefault experimenter bundle migrated to ConfigSubsystem 15/8615/5
Michal Polkorab [Fri, 9 May 2014 13:21:05 +0000 (15:21 +0200)]
Default experimenter bundle migrated to ConfigSubsystem

 - updated copyright for ext bundle

Change-Id: I031afe7f1674d4fc44e91be64b5a1cb51bef44ac
Signed-off-by: Michal Polkorab <michal.polkorab@pantheon.sk>
9 years agoDefault experimenters moved to separate bundle + unit tests 42/6742/5
Michal Polkorab [Wed, 30 Apr 2014 15:56:11 +0000 (17:56 +0200)]
Default experimenters moved to separate bundle + unit tests

(ConfigSubsystem migration will be added later)

Change-Id: Ia6477919fa56347d1e28fd329949b2fb4b852b55
Signed-off-by: Michal Polkorab <michal.polkorab@pantheon.sk>
9 years agoChanged output directory for generated classes 07/8607/2
Michal Polkorab [Thu, 3 Jul 2014 11:17:03 +0000 (13:17 +0200)]
Changed output directory for generated classes

 - generated classes were not cleaned when located in src -> moved to target
 - also modified .gitignore - removed unnecessary lines

Signed-off-by: Michal Polkorab <michal.polkorab@pantheon.sk>
9 years agoExtensibility support - added possibility to unregister registered (de)serializers 99/8599/2
Michal Polkorab [Thu, 3 Jul 2014 08:02:51 +0000 (10:02 +0200)]
Extensibility support - added possibility to unregister registered (de)serializers

Signed-off-by: Michal Polkorab <michal.polkorab@pantheon.sk>
9 years agoUnified extensibility method names 97/8597/2
Michal Polkorab [Thu, 3 Jul 2014 07:04:37 +0000 (09:04 +0200)]
Unified extensibility method names

 - removed ambiguity - now both registration methods use the same name pattern
 - registerSerializer() now correctly allows usage of HeaderSerializer

Signed-off-by: Michal Polkorab <michal.polkorab@pantheon.sk>
9 years agoMerge "Bug 1277 - Move ByteBuffUtils to separate bundle"
Michal Polkorab [Thu, 3 Jul 2014 14:43:16 +0000 (14:43 +0000)]
Merge "Bug 1277 - Move ByteBuffUtils to separate bundle"

9 years agoMerge "Bug 1277 - Move ByteBuffUtils to separate bundle"
Michal Polkorab [Thu, 3 Jul 2014 14:38:47 +0000 (14:38 +0000)]
Merge "Bug 1277 - Move ByteBuffUtils to separate bundle"

9 years agoMerge "Bug 1277 - Move ByteBuffUtils to separate bundle"
Michal Polkorab [Thu, 3 Jul 2014 14:35:26 +0000 (14:35 +0000)]
Merge "Bug 1277 - Move ByteBuffUtils to separate bundle"

9 years agoTLS support - configurable passwords 45/8545/2
Michal Polkorab [Tue, 1 Jul 2014 08:38:24 +0000 (10:38 +0200)]
TLS support - configurable passwords

 - this change allows usage of arbitrary passwords (for keystore, certificate, truststore) instead of hardcoded "opendaylight" password

Signed-off-by: Michal Polkorab <michal.polkorab@pantheon.sk>
9 years agoMerge "TLS unit test resources moved from src/main/resources to test/main/resources"
Adam Brcek [Thu, 3 Jul 2014 14:24:23 +0000 (14:24 +0000)]
Merge "TLS unit test resources moved from src/main/resources to test/main/resources"

9 years agoBug 1277 - Move ByteBuffUtils to separate bundle 09/8609/2
Martin Bobak [Wed, 2 Jul 2014 14:04:11 +0000 (16:04 +0200)]
Bug 1277 - Move ByteBuffUtils to separate bundle

- ByteBufUtils moved to bundle utils

Signed-off-by: Martin Bobak <mbobak@cisco.com>
9 years agoBug 1277 - Move ByteBuffUtils to separate bundle 54/8554/3
Martin Bobak [Wed, 2 Jul 2014 13:46:47 +0000 (15:46 +0200)]
Bug 1277 - Move ByteBuffUtils to separate bundle

- constants classes moved form openflow-protocol-impl to openflow-protocol-api

Signed-off-by: Martin Bobak <mbobak@cisco.com>
9 years agoTLS unit test resources moved from src/main/resources to test/main/resources 60/8560/1
Michal Polkorab [Wed, 2 Jul 2014 14:37:32 +0000 (16:37 +0200)]
TLS unit test resources moved from src/main/resources to test/main/resources

 - TLS unit tests access resources via classpath (not relative path)

Signed-off-by: Michal Polkorab <michal.polkorab@pantheon.sk>
9 years agoUpdated logging on NotSslRecordException 56/8556/1
Michal Polkorab [Wed, 2 Jul 2014 14:06:40 +0000 (16:06 +0200)]
Updated logging on NotSslRecordException

 - stackTrace was unnecessarily disruptive

Signed-off-by: Michal Polkorab <michal.polkorab@pantheon.sk>
9 years agoBug 1277 - Move ByteBuffUtils to separate bundle 52/8552/1
Martin Bobak [Wed, 2 Jul 2014 13:36:14 +0000 (15:36 +0200)]
Bug 1277 - Move ByteBuffUtils to separate bundle

- bundle project directory created
- added dependency on util bundle to openflow-protocol-impl

Signed-off-by: Martin Bobak <mbobak@cisco.com>
9 years agoSimple client framing fix 98/8498/2
Michal Polkorab [Tue, 1 Jul 2014 12:42:37 +0000 (14:42 +0200)]
Simple client framing fix

 - fixes problem when 2 or more messages were sent simultaneously

Signed-off-by: Michal Polkorab <michal.polkorab@pantheon.sk>
9 years agoBug 1248 - Pyang validation fixed 31/8531/1
Michal Polkorab [Wed, 2 Jul 2014 09:05:59 +0000 (11:05 +0200)]
Bug 1248 - Pyang validation fixed

Signed-off-by: Michal Polkorab <michal.polkorab@pantheon.sk>
9 years agoExtensibility fix - simplified too strict key limitation 25/8525/1
Michal Polkorab [Wed, 2 Jul 2014 06:40:36 +0000 (08:40 +0200)]
Extensibility fix - simplified too strict key limitation

 - MessageTypeKey in SwitchConnectionProvider#registerCustomSerializer was restricted to <E extends DataObject>, which does not allow for use of other objects (such as descendants of BaseIdentity)

Signed-off-by: Michal Polkorab <michal.polkorab@pantheon.sk>
9 years agoMerge "Fix Eclipse errors"
Michal Polkorab [Tue, 1 Jul 2014 12:26:45 +0000 (12:26 +0000)]
Merge "Fix Eclipse errors"

9 years agoTLS initialization fix 90/8490/1
Michal Polkorab [Tue, 1 Jul 2014 12:08:47 +0000 (14:08 +0200)]
TLS initialization fix

 - fixed TlsConfiguration object creation - now null instead of empty object

Signed-off-by: Michal Polkorab <michal.polkorab@pantheon.sk>
9 years agoTLS support 04/7904/8
jameshall03885 [Mon, 23 Jun 2014 16:54:43 +0000 (12:54 -0400)]
TLS support

TLS is configured in 42-openflowplugin.xml (openflowplugin)
Added tests for:
 - pipeline components
 - TLS classes
 - updated integration test
Added new yang file: openflow-configuration.yang (contains generated classes for library configuration)
Logging updated

Change-Id: I5480b01760377db7de7791594a3b541338a1b43a
Signed-off-by: jameshall03885 <ghall@brocade.com>
Signed-off-by: Michal Polkorab <michal.polkorab@pantheon.sk>
9 years agoFix Eclipse errors 40/8440/1
Ed Warnicke [Sun, 29 Jun 2014 22:24:53 +0000 (17:24 -0500)]
Fix Eclipse errors

Copied in the m2e section from controller.

Change-Id: I19694b87833f44d39433dc05ae4e88932b56fc2e
Signed-off-by: Ed Warnicke <eaw@cisco.com>
9 years agoEclipse Build Errors - moved generated source for build-helper 94/8194/1
jameshall03885 [Mon, 16 Jun 2014 14:07:44 +0000 (10:07 -0400)]
Eclipse Build Errors - moved generated source for build-helper

Also removed a version override on maven-bundle-plugin

Change-Id: Ia22f3d3c60cbe1ff9c8f096c52c897eb7fc5fb2b
Signed-off-by: jameshall03885 <ghall@brocade.com>
9 years agoRemoved unnecessary writeAndFlush() from OFEncoder 32/7332/2
Michal Polkorab [Thu, 22 May 2014 09:27:44 +0000 (11:27 +0200)]
Removed unnecessary writeAndFlush() from OFEncoder

Signed-off-by: Michal Polkorab <michal.polkorab@pantheon.sk>
9 years agoMoved interface part of OFJava config into SPI so that OFPlugin won't need dependency... 19/6919/6
Michal Rehak [Tue, 13 May 2014 17:12:50 +0000 (19:12 +0200)]
Moved interface part of OFJava config into SPI so that OFPlugin won't need dependency on OFJava-IMPL

Change-Id: Ia1c135c1b5d026212e400fe23844c5179d0bb06d
Signed-off-by: Michal Polkorab <michal.polkorab@pantheon.sk>
Signed-off-by: Michal Rehak <mirehak@cisco.com>
9 years agoUse ReadTimeoutHandler for IdleHandler 83/7783/2
Robert Varga [Fri, 6 Jun 2014 16:28:50 +0000 (18:28 +0200)]
Use ReadTimeoutHandler for IdleHandler

This converts to using ReadTimeoutHandler, as it has no impact on the
writeout path -- which IdleStateHandler does by attaching listeners to
promises flying by -- which is omething we don't need.

Change-Id: I4e6f4ac862747116aa9f5f4fcaa9fc9d562f7de9
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoStarted using pooled buffers 26/7326/2
Michal Polkorab [Thu, 22 May 2014 06:29:47 +0000 (08:29 +0200)]
Started using pooled buffers

Change-Id: I1d5d583cdc0e7ff16da01f07929b8f17a63135fa
Signed-off-by: Michal Polkorab <michal.polkorab@pantheon.sk>
9 years agoUpdated Netty to 4.0.19.Final 27/7727/2
Michal Polkorab [Thu, 5 Jun 2014 09:41:07 +0000 (11:41 +0200)]
Updated Netty to 4.0.19.Final

 - for pooled buffer performance enhancements
 - MERGE AFTER: https://git.opendaylight.org/gerrit/7727

Signed-off-by: Michal Polkorab <michal.polkorab@pantheon.sk>
9 years agoCheckstyle maven plugin check - openflowjava 24/7724/1
Milos Fabian [Thu, 5 Jun 2014 09:11:17 +0000 (11:11 +0200)]
Checkstyle maven plugin check - openflowjava

    -violations do not fail build
    -rules defined in yangtools/common/checkstyle-logging
https://git.opendaylight.org/gerrit/#/c/7595/
https://git.opendaylight.org/gerrit/#/c/7108/

Change-Id: Ibf4e7c9dd0bbcc8a26e60a0cead7d2865c32e44d
Signed-off-by: Milos Fabian <milfabia@cisco.com>
9 years agoUse 0-shifting operand 80/7680/1
Robert Varga [Wed, 4 Jun 2014 12:01:49 +0000 (14:01 +0200)]
Use 0-shifting operand

Do not use sign-dependent operator. Should not matter, as we follow up
with mask, but this makes the intent obvious.

Change-Id: Ie5c4df5373d19f6abe8b48df5b965ee43bf3e8eb
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoOptimize ipv4/ipv6 formatting 62/7662/2
Robert Varga [Tue, 3 Jun 2014 22:41:56 +0000 (00:41 +0200)]
Optimize ipv4/ipv6 formatting

IPv4/IPv6 formatting relied on multiple objects until the final string
was produced. This fixes the way the algorithm operates to make it more
obvious, but also more performant.

Change-Id: Idcfbde227e999dc78363c87952bca7dfb376c5b7
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoOptimize time checking in flush() 69/7669/1
Robert Varga [Wed, 4 Jun 2014 09:15:17 +0000 (11:15 +0200)]
Optimize time checking in flush()

Pre-calculate deadline and do not do timeunit conversions while checking
if we should yield.

Change-Id: Ie315a9650f6f7cdbd1bbd2ac611df2a3dfda4975
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoOptimize macAddressToBytes() 61/7661/2
Robert Varga [Tue, 3 Jun 2014 20:59:49 +0000 (22:59 +0200)]
Optimize macAddressToBytes()

Using raw string parsing has some significant overhead. For parsing a
MAC address, we can employ hand-coded routing which has does not
allocate objects and is much more (~140x) more efficient.

Change-Id: Iad1e6bc1618dd1eedcdfbc9f1e55ac49d03ea4aa
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoOptimize mask creation utilities 48/7648/1
Robert Varga [Tue, 3 Jun 2014 16:13:45 +0000 (18:13 +0200)]
Optimize mask creation utilities

This introduces a simpified fillBitMask(), which is much simpler to use
and also much faster.

Change-Id: I5519032e3a83a3ace73c1b383784b1e372870782
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoAdding tunnel ipv4 src/dst openflow augmentations 33/7633/3
Brent Salisbury [Tue, 3 Jun 2014 09:47:42 +0000 (05:47 -0400)]
Adding tunnel ipv4 src/dst openflow augmentations

Augments the low-level openflowjava models and
OF13 implementation to support flow based tunnels
rather then port based tunnels only which is ovsdb
specific thus making a more generic TEP implementation.

I used the v4 parent serializer
AbstractOxmIpv4AddressSerializer since its pretty
class agnostic except for the v4 OpenflowBasic
match but it that is abstracted from the DP and
I don't see any glaring issues uses it. If you
guys would prefer an NXM1Class/NXM0Class specific
ipv4 super just say the word. I have both
implementations local with the same result in the DP.

Output of tests and ovs integration is posted here:
https://gist.github.com/22f0749bba00df1a3cf6

Change-Id: I0f3ebed560bba0137553944fe342704456b4658e
Signed-off-by: Brent Salisbury <brent.salisbury@gmail.com>
9 years agoOptimize macAddressToString and padBuffer 37/7637/1
Robert Varga [Tue, 3 Jun 2014 10:46:40 +0000 (12:46 +0200)]
Optimize macAddressToString and padBuffer

Optimizes macAddressToString to prevent multiple object allocations and
do a straightforward coversion -- speedup of ~6x.

padBuffer() is deprecated in favor of writeZero(), and uses it
internally.

Change-Id: I98264fe1744b66363b8b3fcae4d54b4b78814cc8
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoFlush all entries on channel shutdown 36/7636/1
Robert Varga [Tue, 3 Jun 2014 09:16:00 +0000 (11:16 +0200)]
Flush all entries on channel shutdown

This just makes sure we flush out outstanding queue quickly.

Change-Id: Ib1f7262545f012fe8c418cbe980cc63467a4f654
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoPre-cache key makers 35/7635/1
Robert Varga [Tue, 3 Jun 2014 10:48:56 +0000 (12:48 +0200)]
Pre-cache key makers

These are essentially constants, so there is no need to allocate them
over and over again -- just create a single instance and reuse it. Save
CPU and GC cycles.

Change-Id: I77670f4465d8139c6f218bd6f7dab13b66a5b8fc
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoDo not instantiate Joiner/Splitter 05/7605/1
Robert Varga [Mon, 2 Jun 2014 15:53:18 +0000 (17:53 +0200)]
Do not instantiate Joiner/Splitter

This patch centralized Splitter and Joiner instances to ByteBufUtils,
from where they are used -- reducing object allocation and CPU usage
(due to checks).

As a bonus, this optimizes splitters on single characters to the
simplest possible form, further reducing overhead.

Change-Id: If635656af49967cd17333ebbeef3452091edd5d5
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoDo not instantiate key in fast path 04/7604/1
Robert Varga [Mon, 2 Jun 2014 16:52:09 +0000 (18:52 +0200)]
Do not instantiate key in fast path

This is a constant lookup for each packet -- let's just use a static
key to prevent useless allocations.

Change-Id: I4a81fc04e29607ace710c7a35671420271836066
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoUsed Splitter instead of String.split() - performance improvement 83/7583/3
Michal Polkorab [Mon, 2 Jun 2014 10:58:50 +0000 (12:58 +0200)]
Used Splitter instead of String.split() - performance improvement

- removed ending whitespace characters from .buildBuffer method as those hexStrings should be ended with a hex character

Change-Id: If1e53d7bbcc81293aa7a231b24b1b7a7746cb5c7
Signed-off-by: Michal Polkorab <michal.polkorab@pantheon.sk>
9 years agoIntroduce ChannelOutboundQueue 36/7136/10
Robert Varga [Sat, 17 May 2014 07:59:58 +0000 (09:59 +0200)]
Introduce ChannelOutboundQueue

This patch introduces a tunable queue for outstanding requests. The core
idea is to maintain a limited queue between the message produces and the
IO threads. The producers place their pre-made messages to the queue,
where the IO thread picks them up and pushes them down the pipeline.
Should the queue be empty, the caller is informed of this fact and can
choose a recovery strategy -- current implementation reports
RejectedExecutionException.

The flush task is placed in the IO pool only when the channel is
writable and the queue is non-empty. A single run of the flush task is
time-limited, so a single channel which is being churned by producer
does not end up monopolizing a particular thread for extended periods of
time -- after a tunable time the flush task will re-insert itself on the
task queue and exit.

Change-Id: If6f09c60cf2cf5a69e9f051e2dfe2bae3bb90b5d
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoAdded augmentations for TCP_Flag reads and low level models 33/7533/1
Brent Salisbury [Tue, 27 May 2014 09:17:38 +0000 (05:17 -0400)]
Added augmentations for TCP_Flag reads and low level models

Extensions are supered under OFPXMC_NXM_1 code point 0x0001

Once this and the high-level controller patches merge
I will commit the openflowplugin conversion patch since
openflowplugin will fail its build until the yang bindings
are generated.

Signed-off-by: Brent Salisbury <brent.salisbury@gmail.com>
9 years agoBug 1048 - Removed dependency on model-flow-service 47/7247/2
Michal Polkorab [Tue, 20 May 2014 13:26:09 +0000 (15:26 +0200)]
Bug 1048 - Removed dependency on model-flow-service

Change-Id: Ie2065b47e02b7cd203227213b66050957f0760a9
Signed-off-by: Michal Polkorab <michal.polkorab@pantheon.sk>
9 years agoDelegatingInboundHandler.consumer is mandatory 35/7135/2
Robert Varga [Sat, 17 May 2014 07:16:32 +0000 (09:16 +0200)]
DelegatingInboundHandler.consumer is mandatory

The consumer is mandatory and constant, make it final and check for
nulls.

Change-Id: I44585c03284669033639ecf5dd9bd61ab48fedf7
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoPublishingChannelInitializer.allChannels is final 34/7134/2
Robert Varga [Sat, 17 May 2014 07:12:33 +0000 (09:12 +0200)]
PublishingChannelInitializer.allChannels is final

Add final keyword as appropriate.

Change-Id: Idfbadf4f1cc6f296fddcaaf49a2fb18775d63671
Signed-off-by: Robert Varga <rovarga@cisco.com>
Signed-off-by: Michal Polkorab <michal.polkorab@pantheon.sk>
9 years agoOptimize checkListeners() 33/7133/2
Robert Varga [Sat, 17 May 2014 07:05:59 +0000 (09:05 +0200)]
Optimize checkListeners()

This changes the use of StringBuffer to StringBuilder. Also use
Preconditions.checkState().

Change-Id: I378cc84d7b70010cd9559ad6ef3a278ce5f07c90
Signed-off-by: Robert Varga <rovarga@cisco.com>
Signed-off-by: Michal Polkorab <michal.polkorab@pantheon.sk>
9 years agoShare cache RemovalListener 32/7132/2
Robert Varga [Sat, 17 May 2014 07:00:16 +0000 (09:00 +0200)]
Share cache RemovalListener

The removal listener can be easily be shared among instances -- so
create only one shared instance for all ConnectionAdapterImpls.

Change-Id: I3d47d30eb537b86a35f42a69ff590b623a99e035
Signed-off-by: Robert Varga <rovarga@cisco.com>
Signed-off-by: Michal Polkorab <michal.polkorab@pantheon.sk>
9 years agoRemove ExitingDataObject 31/7131/2
Robert Varga [Sat, 17 May 2014 06:56:29 +0000 (08:56 +0200)]
Remove ExitingDataObject

This class is unused -- remove it.

Change-Id: Ia1587c0318f7b98638c316a61bc7a41b18a541da
Signed-off-by: Robert Varga <rovarga@cisco.com>
Signed-off-by: Michal Polkorab <michal.polkorab@pantheon.sk>
9 years agoConnectionAdapterImpl fields should be private 30/7130/3
Robert Varga [Sat, 17 May 2014 06:41:59 +0000 (08:41 +0200)]
ConnectionAdapterImpl fields should be private

This reduces visibility of protected fields to private, allowing us to
reason about their interactions.

Change-Id: Ie3954ad548c4fe20f98bda13cedf657513bd7d11
Signed-off-by: Robert Varga <rovarga@cisco.com>
Signed-off-by: Michal Polkorab <michal.polkorab@pantheon.sk>
9 years agoConnectionAdapterImpl is always bound to a channel 29/7129/3
Robert Varga [Sat, 17 May 2014 06:35:13 +0000 (08:35 +0200)]
ConnectionAdapterImpl is always bound to a channel

ConnectionAdapterImpl needs to have a channel -- so require it in the
costructor and make it final.

Change-Id: Id170afd055460c24b851cdb3969286c62eee22d0
Signed-off-by: Robert Varga <rovarga@cisco.com>
Signed-off-by: Michal Polkorab <michal.polkorab@pantheon.sk>
9 years agoImprove cache interactions 05/7105/3
Robert Varga [Fri, 16 May 2014 08:26:38 +0000 (10:26 +0200)]
Improve cache interactions

Do not interact with the XID request cache until the request completes.

Change-Id: I39a8b0bac94474a5a52ef461ed596e70bddfd087
Signed-off-by: Robert Varga <rovarga@cisco.com>
Signed-off-by: Michal Polkorab <michal.polkorab@pantheon.sk>
10 years agoInitial openflowjava Karaf feature file 56/6756/3
Ed Warnicke [Tue, 6 May 2014 18:24:18 +0000 (13:24 -0500)]
Initial openflowjava Karaf feature file

PatchSet2: Stop using wrap when unneeded.
PatchSet3: Removed spurious config-all feature

Change-Id: Ibe67d9debb841bf93dd846e1f694019dea3c43b2
Signed-off-by: Ed Warnicke <eaw@cisco.com>
10 years agoOF10ActionDeserializer and ActionDeserializer split into separate classes 22/6622/1
Michal Polkorab [Wed, 30 Apr 2014 10:26:24 +0000 (12:26 +0200)]
OF10ActionDeserializer and ActionDeserializer split into separate classes

 - updated deserializer initializers

Signed-off-by: Michal Polkorab <michal.polkorab@pantheon.sk>
10 years agoInstructionDeserializer split into separate deserializers 98/6598/2
Michal Polkorab [Tue, 29 Apr 2014 13:50:04 +0000 (15:50 +0200)]
InstructionDeserializer split into separate deserializers

 - created List deserialization classes
 - added default experimenter deserializer intialization
 - created default experimenter instruction deserializer
 - MessageDeserializerRegistryHelper renamed to SimpleDeserializerRegistryHelper
  + unified its use for simple (MessageCodeKey) deserializers
 - updated unit tests

Change-Id: I3f428fdd81f39a4cf96a826e208fee067e9c0b6f
Signed-off-by: Michal Polkorab <michal.polkorab@pantheon.sk>
10 years agoInstructionSerializer split into separate serializers 53/6553/2
Michal Polkorab [Mon, 28 Apr 2014 08:49:18 +0000 (10:49 +0200)]
InstructionSerializer split into separate serializers

 - updated initialization of default Action and Instruction experimenter serializers
 - CodingUtils replaced by ListSerializer
 - added EnhancedTypeKeyMaker classes to create lookup keys
 - added InstructionConstants
 - updated unit tests

Signed-off-by: Michal Polkorab <michal.polkorab@pantheon.sk>
Change-Id: If27b8273aadc84ec93e90fbb08326cf7baeb3645

10 years agoOF10ActionsSerializer and OF13ActionsSerializer split into separate actions (to allow... 80/6380/2
Michal Polkorab [Thu, 24 Apr 2014 14:56:32 +0000 (16:56 +0200)]
OF10ActionsSerializer and OF13ActionsSerializer split into separate actions (to allow easier action extensibility)
 - OF13MatchEntriesRegistryHelper renamed to EnhancedKeyRegistryHelper
   + used also in ActionsInitializer
 - added serializeActions into CodingUtils
 - created static ActionConstants class

Signed-off-by: Michal Polkorab <michal.polkorab@pantheon.sk>
Change-Id: I61b11f3acf8d961757e3753a40d26cb77dc02615

10 years agoAdded default experimenter serializers 34/6334/2
Michal Polkorab [Wed, 23 Apr 2014 12:37:31 +0000 (14:37 +0200)]
Added default experimenter serializers
  - updated unit tests

Signed-off-by: Michal Polkorab <michal.polkorab@pantheon.sk>
Change-Id: I5663f61d83ca40dad8a8c8dee42061175e817ec7

10 years agoExtensibility refactoring 09/6309/1
Michal Polkorab [Tue, 22 Apr 2014 11:07:02 +0000 (13:07 +0200)]
Extensibility refactoring
 - RegistryInjector renamed to SerializerRegistryInjector
 - EnhancedMessageTypeKey moved to api project to be visible outside library implementation
 - SerializerRegistryImpl - unified Exception message
 - MessageTypeKey - updated hashCode()
                  - also updated SerializationFactory key to .getImplementedInterface() instead of .getClass()

Signed-off-by: Michal Polkorab <michal.polkorab@pantheon.sk>
10 years agoExtensibility support (deserialization part) 00/6000/6
Michal Polkorab [Wed, 9 Apr 2014 06:19:47 +0000 (08:19 +0200)]
Extensibility support (deserialization part)

Signed-off-by: Michal Polkorab <michal.polkorab@pantheon.sk>
Change-Id: Ic73091b01614e76087b30ad79dbf9b6f8b39545c

10 years agoExtensibility support (serialization part) 77/5777/6
Michal Polkorab [Thu, 3 Apr 2014 12:59:20 +0000 (14:59 +0200)]
Extensibility support (serialization part)

Signed-off-by: Michal Polkorab <michal.polkorab@pantheon.sk>
Change-Id: I51778a009f9a20d6ba1f29b74ca1e3fc1350d8bd

10 years agochanges for config subsystem - BUG 754 82/5882/3
Michal Rehak [Mon, 14 Apr 2014 16:35:03 +0000 (18:35 +0200)]
changes for config subsystem - BUG 754

integration - issue with initialization pending
added sal generator
changed SPI - SwitchConnectionProvider has 1:1 bound with ServerFacade
extended yang model of SwitchConnectionProvider configuration
restored exported packages for osgi
restored documentation generator
changed API in order to use ListenableFuture instead of plain Future

Change-Id: Ic21e3a0c1fd64584d98485567c26095674291548
Signed-off-by: Basheeruddin Ahmed <syedbahm@cisco.com>
Signed-off-by: Michal Rehak <mirehak@cisco.com>
10 years agoBumped Netty to 4.0.17.Final (to match controller's version) 93/5793/1
Michal Polkorab [Thu, 27 Mar 2014 15:57:02 +0000 (08:57 -0700)]
Bumped Netty to 4.0.17.Final (to match controller's version)

Signed-off-by: Michal Polkorab <michal.polkorab@pantheon.sk>
10 years agoExperimenterAction length computation added 58/5758/1
Michal Polkorab [Tue, 25 Mar 2014 15:59:52 +0000 (08:59 -0700)]
ExperimenterAction length computation added

Signed-off-by: Michal Polkorab <michal.polkorab@pantheon.sk>
10 years agoAdded byte[] into ExperimenterAction 94/5694/1
Michal Polkorab [Thu, 20 Mar 2014 10:53:59 +0000 (11:53 +0100)]
Added byte[] into ExperimenterAction

Signed-off-by: Michal Polkorab <michal.polkorab@pantheon.sk>
10 years agoMerge "Fix for Bug#239"
Adam Brcek [Mon, 17 Feb 2014 14:23:44 +0000 (14:23 +0000)]
Merge "Fix for Bug#239"

10 years agoMerge "Bumped to SNAPSHOT dependencies - some dependencies moved to <dependencyManag...
Adam Brcek [Mon, 17 Feb 2014 14:21:12 +0000 (14:21 +0000)]
Merge "Bumped to SNAPSHOT dependencies  - some dependencies moved to <dependencyManagement>  - also bumped netty version to 4.0.15 Final (as there was a lot of fixes since 4.0.10 Final)"

10 years agoFix for Bug#239 83/5283/2
Michal Polkorab [Mon, 17 Feb 2014 13:59:15 +0000 (14:59 +0100)]
Fix for Bug#239

Keys in models replaced by config false (as library does not use the models as configuration)
 - rebased

Change-Id: I9e6311d912ce0fc89d8d71789366752f3764e86c
Signed-off-by: SahilShah <sahil4.s@tcs.com>
Signed-off-by: Michal Polkorab <michal.polkorab@pantheon.sk>
10 years agoBumped to SNAPSHOT dependencies 95/5295/4
Michal Polkorab [Thu, 13 Feb 2014 02:32:17 +0000 (18:32 -0800)]
Bumped to SNAPSHOT dependencies
 - some dependencies moved to <dependencyManagement>
 - also bumped netty version to 4.0.15 Final (as there was a lot of fixes since 4.0.10 Final)

Signed-off-by: Michal Polkorab <michal.polkorab@pantheon.sk>
Change-Id: Ib636921c0dd099b90f451c44d33ab1d00e4455bb

10 years agoMinor model refactor 12/5112/2
Michal Polkorab [Tue, 4 Feb 2014 00:19:40 +0000 (16:19 -0800)]
Minor model refactor
 - added "-grouping" to groupings to distinguish structures
 - moved match-grouping into openflow-extensible-match.yang
 - fixed actions structure (list action-list)
 - updated identities bases with "-base"
MERGE AFTER: https://git.opendaylight.org/gerrit/#/c/5109

Signed-off-by: Michal Polkorab <michal.polkorab@pantheon.sk>
Change-Id: Ie2bf3d446f8f5912796bd751e512189d6bf06018

10 years agoModel updated with descriptions 09/5109/2
Michal Polkorab [Mon, 3 Feb 2014 20:30:11 +0000 (12:30 -0800)]
Model updated with descriptions

Signed-off-by: Michal Polkorab <michal.polkorab@pantheon.sk>
Change-Id: I32124b20c03f1b103ae7fec48437bd29ccaddeb1

10 years agoGet rid of duplicate release repository 59/4959/1
Robert Varga [Tue, 28 Jan 2014 00:16:33 +0000 (01:16 +0100)]
Get rid of duplicate release repository

Change-Id: Ice6994f85130be3edae4d422d3c19d043ac56955
Signed-off-by: Robert Varga <rovarga@cisco.com>
10 years ago[maven-release-plugin] prepare for next development iteration
jenkins-openflowjava [Tue, 28 Jan 2014 00:13:12 +0000 (00:13 +0000)]
[maven-release-plugin] prepare for next development iteration