openflowjava.git
8 years agoFix BUG 4281 72/27172/3
Vaclav Demcak [Wed, 14 Oct 2015 15:17:22 +0000 (17:17 +0200)]
Fix BUG 4281

Caused by: java.lang.IllegalStateException: Resource '/META-INF/yang/openflow-instruction.yang' is missing

added KEY_WORD into modules ment to live outside of md-sal

Change-Id: I3d6cc4d3d9bf5eb845ab5757447bed462567c335
Signed-off-by: Yi Yang <yi.y.yang@intel.com>
Signed-off-by: Vaclav Demcak <vdemcak@cisco.com>
8 years agoBug 4432 - NPE problem in OFEncode 01/28201/1
Vaclav Demcak [Thu, 8 Oct 2015 02:51:23 +0000 (04:51 +0200)]
Bug 4432 - NPE problem in OFEncode

* add check for listener in msg wrapper
* add default listener for logging in OutboundQueueManager

Change-Id: Ib652d60a210feaddf96840334af3b435e7d0a14f
Signed-off-by: Vaclav Demcak <vdemcak@cisco.com>
8 years agoFixed missing prefix in augmentation. 68/27868/1
Tony Tkacik [Sat, 3 Oct 2015 10:43:15 +0000 (12:43 +0200)]
Fixed missing prefix in augmentation.

Change-Id: Ia210b3c77cd7b593949439aca06e1f7d3bd719bd
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
8 years agoUse odlparent configuration for jacoco 03/26303/2
Thanh Ha [Wed, 2 Sep 2015 03:46:13 +0000 (23:46 -0400)]
Use odlparent configuration for jacoco

Change-Id: I2825a7637eb95e085cbeeb3286e468362c3545b9
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
8 years agoMigration to use MD-SAL Project 96/26396/3
Tony Tkacik [Wed, 2 Sep 2015 14:13:31 +0000 (16:13 +0200)]
Migration to use MD-SAL Project

Change-Id: I6cc9068df952934d153b328670508aa8e2314628
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
8 years agoIntroduced openflowjava parent pom.xml 83/26083/3
Michal Polkorab [Thu, 27 Aug 2015 12:25:33 +0000 (14:25 +0200)]
Introduced openflowjava parent pom.xml

Change-Id: I68b321532e494ead49105012401332cc4a5df19c
Signed-off-by: Michal Polkorab <michal.polkorab@pantheon.sk>
8 years agoUse odlparent checkstyle.version 54/25054/1
Thanh Ha [Sun, 9 Aug 2015 18:10:01 +0000 (14:10 -0400)]
Use odlparent checkstyle.version

Change-Id: I2633028a7bb218dadb2faf9c69829702ef5fb790
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
8 years agoBUG-4072: Echo reply missing 04/24704/1
Michal Rehak [Fri, 31 Jul 2015 12:54:36 +0000 (14:54 +0200)]
BUG-4072: Echo reply missing

 - propper wrapper added at place where OF-message is written
   into netty channel

Change-Id: I4a65cffff946c4f7a1ad8dbc589ab008958c8cf8
Signed-off-by: Michal Rehak <mirehak@cisco.com>
8 years agoExplicitly set git-review branch to master 21/24421/1
Thanh Ha [Wed, 22 Jul 2015 19:19:15 +0000 (15:19 -0400)]
Explicitly set git-review branch to master

Change-Id: I902966c7f4827b152521e95aeacd774c6fe25f9f
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
8 years agoBug 2875 - fix initiating OFPT_HELLO over SSL from the controller 71/23971/2
Matus Marko [Thu, 9 Jul 2015 13:25:05 +0000 (15:25 +0200)]
Bug 2875 - fix initiating OFPT_HELLO over SSL from the controller

Change-Id: I69a19898c2d4ea916f895d588dc9af20f036e1ef
Signed-off-by: Matus Marko <matus.marko@pantheon.sk>
8 years agoBUG-3907: openflow-plugin-api does not build with jdk8 31/23631/1
Michal Rehak [Wed, 1 Jul 2015 07:38:45 +0000 (09:38 +0200)]
BUG-3907: openflow-plugin-api does not build with jdk8

 - added missing docs
 - fixed misformed docs

Change-Id: I8eb131e7b0510718a4690b69094bb27907b79c41
Signed-off-by: Michal Rehak <mirehak@cisco.com>
(cherry picked from commit 0fe8e47a8d82d19583ebfd5d191367e803b22384)

8 years agoImprove OutboundQueueManager IO patterns 03/23403/1
Robert Varga [Sat, 6 Jun 2015 00:31:01 +0000 (02:31 +0200)]
Improve OutboundQueueManager IO patterns

Channel state is tracked internally, which means we can forgo a
synchronized block. This is done by introducing three explicit states,
READING, WRITING, IDLE, which allow more optimal task scheduling.

Change-Id: Ief00abe8aa4e90e85ca0c98bc908e481a7eaab7c
Signed-off-by: Robert Varga <rovarga@cisco.com>
(cherry picked from commit e1e4d30f9c07a7b7db7a63e9f350bba4e758e564)

8 years agoSpeed up StackedOutboundQueue.reserve() 02/23402/1
Robert Varga [Sat, 6 Jun 2015 02:02:50 +0000 (04:02 +0200)]
Speed up StackedOutboundQueue.reserve()

In the case of multiple segments being present, we do not need to
completely synchronize if the corresponding segment has already been
allocated. Communicate this fact when allocating segments and check this
flag before embarking on the entire synchronized affair during
reserve().

Change-Id: I10a9ecb141f619b94a20d74152124134d36591b1
Signed-off-by: Robert Varga <rovarga@cisco.com>
(cherry picked from commit 45547dc0381407ec537a924447ff9ce0d01890b2)

8 years agoImplement a segmented OutboundQueue 01/23401/1
Robert Varga [Tue, 2 Jun 2015 19:19:57 +0000 (21:19 +0200)]
Implement a segmented OutboundQueue

Internal lifecycle of a queue segment is disconnected. With this
implementation users do not observe queue changes until channel
shutdown, when the reported queue changes to null.

The reason for that is that the segments are managed internally without
the need to synchronize with the Netty thread. That synchronization is
performed only when there are multiple segments -- which is typical for
crossing the request count barrier.

Outbound queue manager is taght to not schedule a flush task it the
current state of the channel indicates that scheduling is not needed,
such as when the channel is not writable.

Change-Id: I037e27c00524e2a6ec218e3e7c1a5d6188b25ae8
Signed-off-by: Robert Varga <rovarga@cisco.com>
(cherry picked from commit d7755318c0395f3f74ca580f4e2db963976776aa)

8 years agoTune write low/highwatermark 00/23400/1
Robert Varga [Sun, 7 Jun 2015 00:23:41 +0000 (02:23 +0200)]
Tune write low/highwatermark

Since we rely on channel writability to throttle message writout, bring
it higher up a bit, so we can flush an entire segment in one go.

Change-Id: I9394aa795d3e30375f50ffd84efecbe05aa49bf4
Signed-off-by: Robert Varga <rovarga@cisco.com>
(cherry picked from commit 754bef597c3b9de84e26bde968e7ab9a502344ff)

8 years agoRun flush immediately when channel becomes writable 27/21727/1
Robert Varga [Mon, 1 Jun 2015 20:52:14 +0000 (22:52 +0200)]
Run flush immediately when channel becomes writable

Instead of scheduling it on the executor, make sure we run the flush
task immediately.

Change-Id: Ic0cf9d031127d8e744a5cd79cfe440d52b3c3f0b
Signed-off-by: Robert Varga <rovarga@cisco.com>
(cherry picked from commit cefbc1e206effcc6d7dc39d860ab2829d3c3cf2a)

8 years agoRelease OutboundQueueEntry callback on completion 91/21391/1
Robert Varga [Thu, 28 May 2015 22:20:39 +0000 (00:20 +0200)]
Release OutboundQueueEntry callback on completion

Memory traces of steady state with mininet have shown we are retaining
already-completed callbacks for the duration of the OutboundQueueImpl's
generation. For multipart requests that means we end up holding up large
chunks of memory for extended time, leading to unacceptable memory
pressure which can be easily avoided.

Change-Id: I2a980fc454583e8fb5d7fe44e47d7ddf076c650b
Signed-off-by: Robert Varga <rovarga@cisco.com>
(cherry picked from commit 6b6700b60e2db29fdb23d2044ab254accf86ecc9)

8 years agoBUG-3219: implement a shared stash for queue reuse 99/20999/1
Robert Varga [Tue, 19 May 2015 15:14:06 +0000 (17:14 +0200)]
BUG-3219: implement a shared stash for queue reuse

This introduces a global per-size stash for reuse of OutbountQueueImpl
objects. This allows for efficient reuse across multiple sessions, which
means we minimize stale memory use when some channels are idle.

The stash is implemented in terms of a ConcurrentLinkedDeque, which is
flushed from the tail and has soft references. We rely on
FinalizableReference to notify us when a particular queue is finished.

Change-Id: I78e654a0c3470bbd1c9274237b2be04f50459809
Signed-off-by: Robert Varga <rovarga@cisco.com>
(cherry picked from commit b95f82e5129f22e7b22352d028b0d32d744e924d)

8 years agoBUG-3219: Throw away message as soon as we send it out 98/20998/1
Robert Varga [Thu, 21 May 2015 12:57:48 +0000 (14:57 +0200)]
BUG-3219: Throw away message as soon as we send it out

In order to relieve pressure on memory, do not wait until the entire
buffer is acknowledged, but clear the message as soon as we send it to
the network.

Change-Id: Ie64c1e0a011e1d1a1a0a98a21d9cc90642f81e6c
Signed-off-by: Robert Varga <rovarga@cisco.com>
(cherry picked from commit be5f0cac1babcfccc7209657f2541dd0818c5cb0)

8 years agoBUG-3219: clear queue array before stashing 96/20996/1
Robert Varga [Thu, 21 May 2015 11:05:15 +0000 (13:05 +0200)]
BUG-3219: clear queue array before stashing

The queue should be cleared before stashing so as to not take the take
up memory.

Change-Id: I71c9a90e1ed9e4b7c7d47bb3e0785f67a8daf932
Signed-off-by: Robert Varga <rovarga@cisco.com>
(cherry picked from commit f84d1445e610bf985caa1c4e41c35954ea664b2c)

8 years agoFix precondition format string 95/20995/1
Robert Varga [Thu, 21 May 2015 09:07:01 +0000 (11:07 +0200)]
Fix precondition format string

Instead of logging-style placeholders, use String.format() ones.

Change-Id: I2cfde7eef0dcf4b906d4760dcedc3fd2f1a14df9
Signed-off-by: Robert Varga <rovarga@cisco.com>
(cherry picked from commit 1ef77ad63ab66eed7dd5404301964db8291004b1)

8 years agoadded packetIn filter counts to statistics 92/20992/1
Martin Bobak [Wed, 20 May 2015 08:58:07 +0000 (10:58 +0200)]
added packetIn filter counts to statistics

Change-Id: Ifce135548ad1d2ecb9c4bc6ff15e922af771368f
Signed-off-by: Michal Polkorab <michal.polkorab@pantheon.sk>
Signed-off-by: Michal Rehak <mirehak@cisco.com>
(cherry picked from commit 25d95eb2be97152d7a459a12caa5e51a79556f58)

8 years agoDo not reschedule flush when channel is up and not writable 86/20986/1
Robert Varga [Tue, 19 May 2015 11:45:09 +0000 (13:45 +0200)]
Do not reschedule flush when channel is up and not writable

Shutdown logic checks removed a ciritical check for channel writability
during reschedule. The problem is that an inactive channel is not
writable, hence we need to check for two conditions.

Change-Id: I2c0a79d5f7b8d9cbaec0eaeb553a6f4ecc74f391
Signed-off-by: Robert Varga <rovarga@cisco.com>
(cherry picked from commit 491faf19aef765281f32ac787f9fab9a3b459b7d)

8 years agoBUG-3219: guard from wron-use entry commit 73/20973/1
Robert Varga [Tue, 19 May 2015 09:32:34 +0000 (11:32 +0200)]
BUG-3219: guard from wron-use entry commit

Debugging has revealed that OFP may be crossing channels and ends up
committing an unreserved offset. Add a guard to check for that.

Change-Id: I445e07df6e628a4abccd4a6daa347e1de12e8eba
Signed-off-by: Robert Varga <rovarga@cisco.com>
(cherry picked from commit 5430767b0b533d1db017b2c4fce88150ac25f50c)

8 years agoBUG-3219: Handle EchoRequests directly in ConnectionAdapter 72/20972/1
Robert Varga [Mon, 18 May 2015 15:18:41 +0000 (17:18 +0200)]
BUG-3219: Handle EchoRequests directly in ConnectionAdapter

If we have an OutboundQueueManager, we should short-cut handling of echo
request messages in the plugin itself. Perform exectly that.

Change-Id: If4090d02e521c2da5914545bf3e887bd265c54a0
Signed-off-by: Robert Varga <rovarga@cisco.com>
(cherry picked from commit 464718c39f203539d7285c172d29027484c88fc9)

8 years agoBUG-3219: Fix debug arguments 71/20971/1
Robert Varga [Mon, 18 May 2015 16:11:04 +0000 (18:11 +0200)]
BUG-3219: Fix debug arguments

The LOG.debug() message specifies the first argument should be 'this',
but that argument is missing. Fix the inconsistency.

Change-Id: Ie9bbed4fa6974430457cb32fc6f0481948351e20
Signed-off-by: Robert Varga <rovarga@cisco.com>
(cherry picked from commit 964fe07ec797b78a5390c9f9088eb468967b4906)

8 years agoBUG-3219: Fix flush task scheduling 70/20970/1
Robert Varga [Mon, 18 May 2015 16:11:04 +0000 (18:11 +0200)]
BUG-3219: Fix flush task scheduling

The flush task should be conditionally scheduled if we have any
outstanding requests. We also cannot directly report the channel
shutdown until we have ensured that all requests have been completed by
the user.

Change-Id: Ic8d266d6167eed15f3a51bf8476bbd1db3071dd4
Signed-off-by: Robert Varga <rovarga@cisco.com>
(cherry picked from commit 752e794406bc31ea5412f780b01d5db5c5b80e33)

8 years agoBUG-3229: Add support for PacketIn filtering 69/20969/1
Robert Varga [Fri, 15 May 2015 18:35:50 +0000 (20:35 +0200)]
BUG-3229: Add support for PacketIn filtering

When we are facing an overload situation, we may need to suppress
PacketIns while still processing other messages. This patch adds the
interface for ConnectionAdapter users which they can use to enable
filtering of such packets.

The implementation ensures that we filter these packets as efficiently
as possible.

Change-Id: I431631922437af7a08eb8ece647904d487634bd9
Signed-off-by: Robert Varga <rovarga@cisco.com>
(cherry picked from commit 1f1a00d6c132e58a4d8f549f836323ecfe003e77)

8 years agoBUG-3219: Fix OutboundQueue cleanup on channel failure 68/20968/1
Robert Varga [Sun, 17 May 2015 01:11:00 +0000 (03:11 +0200)]
BUG-3219: Fix OutboundQueue cleanup on channel failure

When the channel goes inactive, we still need to make sure that any
entries that were reserved and not committed get flushed. Instead of
perfoming a one-shot cleanup in channelInactive(), perform cleanup
whenever flush() runs.

When channel goes inactive, we just cleanup the obviously-freeable
resources and ensure that a flush is scheduled.

Change-Id: I48e1ceb51dcfafedb7352db5d952e9749cdfa50d
Signed-off-by: Robert Varga <rovarga@cisco.com>
(cherry picked from commit 44b028491689d8d89c2ffea2e7bc6bb2d80209fe)

8 years agoBUG-3219: introduce OutboundQueueException 67/20967/1
Robert Varga [Sat, 16 May 2015 22:46:48 +0000 (00:46 +0200)]
BUG-3219: introduce OutboundQueueException

Original API has not specified an encapsulation exception for errors
incurred during local processing. This patch fixes that by introducing
OutboundQueueException.

Change-Id: I01197710c9d60bd778009c098ec640511eea23c6
Signed-off-by: Robert Varga <rovarga@cisco.com>
(cherry picked from commit 763e430f61196740c5ea1c7356022396adf55065)

8 years agoBUG-3219: Fix OutboundQueue request error reporting 66/20966/1
Robert Varga [Sat, 16 May 2015 22:34:50 +0000 (00:34 +0200)]
BUG-3219: Fix OutboundQueue request error reporting

Original patch failed to describe how errors are reported when they
arrive in an ErrorMessage or are generated by the local system.

The only error path interface is the onFailure() method in the callback
the user specifies. This fits naturally, as we now define
DeviceRequestFailedException to carry the encapsulated message and pass
it to the callback.

Change-Id: Ie8eb62558991ceb7f6d5eb8d7cd547aecaf63f19
Signed-off-by: Robert Varga <rovarga@cisco.com>
(cherry picked from commit ccb7e5bda0598185f98d52ddd16e49ae4d48e5aa)

8 years agoMigrate to RpcResultBuilder 65/20965/1
Robert Varga [Sat, 16 May 2015 16:59:50 +0000 (18:59 +0200)]
Migrate to RpcResultBuilder

Removes the use of Rpcs and RpcErrors in favor of RpcResultBuilder.

Change-Id: I9bd5f710321ab70098e79bbab463c7b5447ffa17
Signed-off-by: Robert Varga <rovarga@cisco.com>
(cherry picked from commit 8e5473613cc8f6b0d9558edd170b93e238b87d57)

8 years agoBUG-3219: do to park thread in flush 64/20964/1
Robert Varga [Sun, 17 May 2015 00:48:42 +0000 (02:48 +0200)]
BUG-3219: do to park thread in flush

If we encounter an entry which has been reserved but not committed
during flush operation, do not wait for it to get committed, but bail
immediately.

Change-Id: I04a3ca1de4447bba9b513d85601c83fd31d115a9
Signed-off-by: Robert Varga <rovarga@cisco.com>
(cherry picked from commit eea277b72dc9337bb06bb6f2ff470830cc98e74c)

8 years agoCleanup queue logging 63/20963/1
Robert Varga [Sat, 16 May 2015 15:25:44 +0000 (17:25 +0200)]
Cleanup queue logging

Move messages to trace so debug level does not produce a lot of logs.

Change-Id: Id1b361dee3e3b934010e494541b93baf874a48bc
Signed-off-by: Robert Varga <rovarga@cisco.com>
(cherry picked from commit adbe84ccdff26bc2e58a42a63a023ea8fadff7a9)

8 years agoMake sure we route error messages back 62/20962/1
Robert Varga [Sat, 16 May 2015 17:21:25 +0000 (19:21 +0200)]
Make sure we route error messages back

Error messages need to be routed/paired with requests, too.

Change-Id: I265343f2e44d07ce8182fe9d399d594ee549d0fe
Signed-off-by: Robert Varga <rovarga@cisco.com>
(cherry picked from commit cd8f3f3c6bd1013558f0fdef84ce95cf711b016f)

8 years agoOptimize barrier-implied flushes 61/20961/1
Robert Varga [Sat, 16 May 2015 00:21:19 +0000 (02:21 +0200)]
Optimize barrier-implied flushes

Original code did a full queue scan up to the current request. This
is inefficient if there are previously-completed barriers, as we end up
checking the same slots multiple times.

Remember the offset of last completed future and only flush slots from
that offset on subsequent barrier completion.

Change-Id: I9715f9f7818de611c01d0cd2eaa7637ac5372e91
Signed-off-by: Robert Varga <rovarga@cisco.com>
(cherry picked from commit 7da0dcda4b5d9e5c4510ceb8e4d7840696fbdd90)

8 years agoEnable periodic barrier only when needed 60/20960/1
Robert Varga [Fri, 15 May 2015 23:38:12 +0000 (01:38 +0200)]
Enable periodic barrier only when needed

Instead of rescheduling the timer, track precisely when we need to have
it enabled. This will ensure that idle channels are really idle.

Change-Id: I34f7b2fdc5a7abb9d3c2c612adb307bdf097cf10
Signed-off-by: Robert Varga <rovarga@cisco.com>
(cherry picked from commit 096d3de0bc39bef5bb0493e721d794e850a5b49d)

8 years agoLog the incoming channel 59/20959/1
Robert Varga [Sat, 16 May 2015 12:24:11 +0000 (14:24 +0200)]
Log the incoming channel

For debugging purposes it is useful to understand which channel is being
processed by a particular thread, especially when it is blasting
packets.

Change-Id: I4a12ed5350026d554937e818d824f7d63acff5f6
Signed-off-by: Robert Varga <rovarga@cisco.com>
(cherry picked from commit 2a2781e63b1d36d1b293519e0bca7d2b292a5584)

8 years agoMigrate away from deprecated methods 58/20958/1
Robert Varga [Fri, 15 May 2015 23:34:26 +0000 (01:34 +0200)]
Migrate away from deprecated methods

Objects is going away, as is Rpcs.

Change-Id: If4bff97d0f3ec20d7e5a6ed1695bc6ab38213caa
Signed-off-by: Robert Varga <rovarga@cisco.com>
(cherry picked from commit 96ae2f8565bcf8bbe20eac0370fcc0a20258c5fd)

8 years agoFix Logger use 57/20957/1
Robert Varga [Fri, 15 May 2015 20:33:45 +0000 (22:33 +0200)]
Fix Logger use

Cleanup use of Loggers so we do not concatenate strings, and also check
if the logging leve is enabled before embarking on creating large
strings.

Change-Id: I9f0f513f8cd4857ab7064ed5b824a01b026b831f
Signed-off-by: Robert Varga <rovarga@cisco.com>
(cherry picked from commit 272138f7081efbd9796a2a661c92c88727935235)

8 years agoRead data directly into a local array 56/20956/1
Robert Varga [Fri, 15 May 2015 15:28:27 +0000 (17:28 +0200)]
Read data directly into a local array

Do not instantiate an implied ByteBuf -- just allocate it explicitly and
pass it on.

Change-Id: Ib76e03dbf154cd7525aa5cd3e75cb9d3c45cd727
Signed-off-by: Robert Varga <rovarga@cisco.com>
(cherry picked from commit a706f49c49d16bbb441c8d0a5c85950c28b6c246)

8 years agoChange Assert import 55/20955/1
Robert Varga [Thu, 14 May 2015 10:04:52 +0000 (12:04 +0200)]
Change Assert import

Assert should be imported from org.junit, as that is its new place.

Change-Id: I3f3834e529869af8f3165323210b1d4187dcc828
Signed-off-by: Robert Varga <rovarga@cisco.com>
(cherry picked from commit 59c03f0f989bff42a888135e48b522a0dd888c4a)

8 years agoUse an ImmutableMap in DeserializationFactory 54/20954/1
Robert Varga [Fri, 15 May 2015 15:26:43 +0000 (17:26 +0200)]
Use an ImmutableMap in DeserializationFactory

The contents are not changed once initialized. Take advatage of
ImmutableMap's speed.

Change-Id: I60d76f85149cf5f757eb224d0a993e7b8d9c3504
Signed-off-by: Robert Varga <rovarga@cisco.com>
(cherry picked from commit 32b44f6755e35fbe1ccb429ffc3a03345aff4a1b)

8 years agoDo not use string concat 53/20953/1
Robert Varga [Fri, 15 May 2015 15:27:38 +0000 (17:27 +0200)]
Do not use string concat

Usigng strign concat has performance impact even when the message is not
logged.

Change-Id: I8d588944028ca984474974f4c042f15ea9029396
Signed-off-by: Robert Varga <rovarga@cisco.com>
(cherry picked from commit 8e6748b6570aa25cbfbba6239baf583e77af7cc0)

8 years agoBUG-3219: Introduce OutboundQueueHandler and related interfaces 52/20952/1
Robert Varga [Mon, 11 May 2015 19:18:29 +0000 (21:18 +0200)]
BUG-3219: Introduce OutboundQueueHandler and related interfaces

This patch introduces a barrier-enabled outbound queue. The queue works
in reserve/commit manner and notifies users with the result of the
requests. XID allocation occurs as an offset in a particular queue.

Change-Id: Icd3ceda34746be0346ac59b8ed46352db3be9a2f
Signed-off-by: Robert Varga <rovarga@cisco.com>
(cherry picked from commit 0d3ddb408c6a37ff48f98c7e7d9dd00808b4c486)

8 years agoBug 3178 - Statistics collection turned on by default 51/20951/1
Michal Polkorab [Wed, 13 May 2015 13:18:04 +0000 (15:18 +0200)]
Bug 3178 - Statistics collection turned on by default

Change-Id: I75c540f22db1f79dafe61a80278cd0181ba1e551
Signed-off-by: Michal Polkorab <michal.polkorab@pantheon.sk>
(cherry picked from commit 350839172904ad939f0c6de03445e456c37ad86b)

8 years agoCache pattern splitters 50/20950/1
Robert Varga [Wed, 13 May 2015 01:08:56 +0000 (03:08 +0200)]
Cache pattern splitters

Splitters are reusable, so make sure we cache them in a constant and
reuse as needed.

Change-Id: I87b50b790b758ad275e6095c1e820385c535968d
Signed-off-by: Robert Varga <rovarga@cisco.com>
(cherry picked from commit 2cf784ba8553237e6c6714a2ca0ee2414f0b029e)

8 years agoSpeedup ChannelOutboundQueue flush end 49/20949/1
Robert Varga [Tue, 12 May 2015 15:34:05 +0000 (17:34 +0200)]
Speedup ChannelOutboundQueue flush end

At the end of a flush we report statistics at debug, but that requires
System.nanoTime(). Make that call conditional on debug being enabled.

Change-Id: Ibdf02b93ca12d8930227de059d107aa3c4ccb88d
Signed-off-by: Robert Varga <rovarga@cisco.com>
(cherry picked from commit d25d4e071936d072cd4a847f4414bfe560bfd8a4)

9 years agoBumped openflowjava versions by minor for next release cycle 21/19321/1
Michal Polkorab [Wed, 29 Apr 2015 17:03:50 +0000 (19:03 +0200)]
Bumped openflowjava versions by minor for next release cycle

Change-Id: I4f1f78cc58aa3e81a2196c794f39def2331f49b7
Signed-off-by: Michal Polkorab <michal.polkorab@pantheon.sk>
9 years agoBug 2926 - API yangs hidden 83/18083/1
Michal Polkorab [Thu, 9 Apr 2015 14:33:48 +0000 (16:33 +0200)]
Bug 2926 - API yangs hidden

Change-Id: Icf250c0aab45ccfd0d48361d24828fdb0002ed29
Signed-off-by: Michal Polkorab <michal.polkorab@pantheon.sk>
9 years agoRemove mention on enunciate 09/17409/1
Robert Varga [Tue, 31 Mar 2015 09:22:05 +0000 (11:22 +0200)]
Remove mention on enunciate

It is not used anywhere in the project, so let's not mention it.

Change-Id: I7c2aa4c9f476c8c127d5a4b3c6ec4a8ceb04b5d8
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoBUG 2905 TCP Options incorrect 13/17213/2
Anton Ivanov [Fri, 27 Mar 2015 08:09:08 +0000 (08:09 +0000)]
BUG 2905 TCP Options incorrect

OpenFlow requires latency related optimizations, not throughput
ones (in the TCP sense of this word).

Signed-off-by: Anton Ivanov <aivanov@brocade.com>
9 years agoFix Java 8 javadoc compatibility 90/17290/3
Robert Varga [Sat, 28 Mar 2015 17:15:06 +0000 (18:15 +0100)]
Fix Java 8 javadoc compatibility

Java 8 is more picky about javadocs -- make sure we can pass
compilation.

Change-Id: I816b25cc439cc7eadd8e073205611cb15ab95e9b
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoFix checkstyle 89/17289/2
Robert Varga [Sat, 28 Mar 2015 16:42:59 +0000 (17:42 +0100)]
Fix checkstyle

Wrong indent, trailing whitespace, unused imports, tabs.

Change-Id: I34d1673fc61d8de31bc0a79509e8317b5622c958
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoInstruction experimenterId fix 62/17162/4
Michal Polkorab [Thu, 26 Mar 2015 14:27:24 +0000 (15:27 +0100)]
Instruction experimenterId fix

Change-Id: I19dde700890e9211b37cfef70b35d764391831f0
Signed-off-by: Michal Polkorab <michal.polkorab@pantheon.sk>
9 years agoAction experimenterId fix 59/17159/2
Michal Polkorab [Thu, 26 Mar 2015 14:07:24 +0000 (15:07 +0100)]
Action experimenterId fix

Change-Id: Idebe6abbaf24977209857c5d47efe67717e6a027
Signed-off-by: Michal Polkorab <michal.polkorab@pantheon.sk>
9 years agoRevert "Add odlparent relativepath relative to autorelease" 91/17191/1
Thanh Ha [Thu, 26 Mar 2015 19:02:43 +0000 (15:02 -0400)]
Revert "Add odlparent relativepath relative to autorelease"

Per discussion on mailing list thread we have decided to revert this
change and achieve relative path updating via scripting in autorelease.

https://lists.opendaylight.org/pipermail/release/2015-March/001754.html

This reverts commit 435f3e8a95843a6e9a326ab56663c31ff6d7cdb7.

Change-Id: I2bca2e9309cf8a751a81e11b47f2c01ff6786184
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
9 years agoBug 2866 - Fixed ipv6 address parsing 10/16810/3
Michal Polkorab [Thu, 19 Mar 2015 09:50:26 +0000 (10:50 +0100)]
Bug 2866 - Fixed ipv6 address parsing

 - added unit test with uncovered cases

Change-Id: Id3ad9263428e6d6cb10c8799d031a1d75b05c98d
Signed-off-by: Michal Polkorab <michal.polkorab@pantheon.sk>
9 years agoBug 2756 - Instruction model update 39/16039/3
Michal Polkorab [Wed, 4 Mar 2015 18:01:01 +0000 (19:01 +0100)]
Bug 2756 - Instruction model update

Change-Id: Id1fbcd55f44a7e60b24ed10d7852fa0a100cf6b5
Signed-off-by: Michal Polkorab <michal.polkorab@pantheon.sk>
9 years agoBug 2756 - Action model update 32/15932/6
Michal Polkorab [Fri, 9 Jan 2015 08:04:07 +0000 (09:04 +0100)]
Bug 2756 - Action model update

Change-Id: I63b715c3de85201bb351f9468dea1bedcef702b4
Signed-off-by: Michal Polkorab <michal.polkorab@pantheon.sk>
9 years agoBug 2756 - Match model update 18/15718/7
Michal Polkorab [Wed, 25 Feb 2015 11:59:40 +0000 (12:59 +0100)]
Bug 2756 - Match model update

 - updated openflow-extensible-match and openflow-augments revisions

Change-Id: I87188326bd2365133fc55f1ebddf78e0e453bb44
Signed-off-by: Michal Polkorab <michal.polkorab@pantheon.sk>
9 years agoAdd odlparent relativepath relative to autorelease 43/16443/1
Thanh Ha [Fri, 13 Mar 2015 02:28:49 +0000 (22:28 -0400)]
Add odlparent relativepath relative to autorelease

Change-Id: Iaef70a0a21db712b50adbc2afae1b9deb350631e
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
9 years agoExposed channel autoread option 38/14438/2
Martin Uhlir [Fri, 23 Jan 2015 13:17:48 +0000 (14:17 +0100)]
Exposed channel autoread option

Change-Id: I8174d4d7d54eaa4bb6959501561384afd2267afa
Signed-off-by: Martin Uhlir <martin.uhlir@pantheon.sk>
9 years agoMigrate features to features-parent 82/15282/3
Robert Varga [Fri, 13 Feb 2015 19:35:14 +0000 (20:35 +0100)]
Migrate features to features-parent

odlparent provides a convenient parent, so we can easily use it.

Change-Id: I1912af326716305298867504d6fb6dc5df1d4040
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoRemove yang.prototypes.version 81/15281/4
Robert Varga [Fri, 13 Feb 2015 19:28:55 +0000 (20:28 +0100)]
Remove yang.prototypes.version

This corresponds to mdsal.version and is already covered by the import.

Change-Id: I77f2c225f2ae938380ed994d3726306ec9144390
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoRemove unneeded properties 80/15280/4
Robert Varga [Fri, 13 Feb 2015 19:26:28 +0000 (20:26 +0100)]
Remove unneeded properties

These are not referenced anywhere, so we can remove them.

Change-Id: Ib528f96fe3832103c79ae0fdcaea3d3f035e06b1
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoRemove unneeded version declarations 79/15279/5
Robert Varga [Fri, 13 Feb 2015 19:19:46 +0000 (20:19 +0100)]
Remove unneeded version declarations

They are taken care of by parent import, so no need to declare them
again.

Change-Id: I66997b43887043e33de039bb2e5f829720a4fc68
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoIntroduce an artifacts artifact 78/15278/5
Robert Varga [Fri, 13 Feb 2015 19:15:33 +0000 (20:15 +0100)]
Introduce an artifacts artifact

This will ease up the imports in downstream projects.

Change-Id: Ie91dfc04cf969639d83ebb85e4d0a348c5108971
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoRemove unneeded yangtools version 75/15275/3
Robert Varga [Fri, 13 Feb 2015 18:54:24 +0000 (19:54 +0100)]
Remove unneeded yangtools version

The version is already inherited from parent, no need to repeat it here.

Change-Id: I862dd6912463b063078d7bb927da7e3e3952f465
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoMigrate to artifact imports 77/15277/3
Robert Varga [Fri, 13 Feb 2015 18:57:20 +0000 (19:57 +0100)]
Migrate to artifact imports

This is the proper inter-project version declartion mechanism: just
import the produced artifacts along with versions.

Change-Id: I1ad948e400e3c994522912ed2be1f08fe6349893
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoRemove distributionManagement 76/15276/2
Robert Varga [Fri, 13 Feb 2015 18:54:57 +0000 (19:54 +0100)]
Remove distributionManagement

It is handled by settings.xml now, so no need to carry it around.

Change-Id: I6a5de99277d735487a6f2f62727bb1e4200ba898
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoRemove unncessary Sonar variables 20/15220/1
Thanh Ha [Thu, 12 Feb 2015 21:44:28 +0000 (16:44 -0500)]
Remove unncessary Sonar variables

These variables are managed server side or in Jenkins with the latest
Sonar release so should not be configured in project pom.xml files.

Change-Id: I34dc5a64569a1aaf2ca65f0cff2aa87a9f9b1b6f
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
9 years agoAdded option to initiate connection to device 77/14977/7
Martin Uhlir [Fri, 6 Feb 2015 14:41:38 +0000 (15:41 +0100)]
Added option to initiate connection to device

 - as this feature was missing (according to OF specification)
 - added integration test

Change-Id: I0f7346195999170a74975ee3438bc948fd685e61
Signed-off-by: Martin Uhlir <martin.uhlir@pantheon.sk>
9 years agoRemoved <repository> tags 73/15073/2
Martin Uhlir [Mon, 9 Feb 2015 16:23:18 +0000 (17:23 +0100)]
Removed <repository> tags

 - according to future plans mentioned here:
   https://lists.opendaylight.org/pipermail/tsc/2015-February/002497.html

Change-Id: Ieb48b5a1348a3de2c3cabf62a009934ba552d2c8
Signed-off-by: Martin Uhlir <martin.uhlir@pantheon.sk>
9 years agoRemove unneeded dependencyManagement declarations 55/15055/1
Robert Varga [Mon, 9 Feb 2015 09:06:53 +0000 (10:06 +0100)]
Remove unneeded dependencyManagement declarations

All of these declarations already exist in odlparent, no need to
redefine them here.

Change-Id: Iacebf45d5b8054f6656ea102f5755eaf713c7440
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoDo not override versions from odlparent 54/15054/1
Robert Varga [Mon, 9 Feb 2015 08:55:44 +0000 (09:55 +0100)]
Do not override versions from odlparent

All of these properties/plugins are define din odlparent, no need to
hard-code them here.

Change-Id: I33e5d01ba9fe0ca31e7a9c2c7e041efaac82b0c0
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoNXM (de)serializers deleted 25/14625/2
Martin Uhlir [Fri, 30 Jan 2015 12:33:29 +0000 (13:33 +0100)]
NXM (de)serializers deleted

Change-Id: I51e279fea8cc8cc619fd2b46a2dfe135be1d24b8
Signed-off-by: Martin Uhlir <martin.uhlir@pantheon.sk>
9 years agoBug 2245 - fixed multiple types of issues 71/14571/2
Martin Uhlir [Wed, 28 Jan 2015 08:58:55 +0000 (09:58 +0100)]
Bug 2245 - fixed multiple types of issues

Issues solved:
1. Objects should be compared with "equals()"
2. Declarations should use Java collection interfaces such as "List" rather than specific implementation classes such as "LinkedList"
3. Modifiers should be declared in correct order
4. Avoid commented-out lines of code
5. Unused private fields should be removed

Change-Id: I4ca2224a9fd272dd2deb25f6f36db2ed7bd8bb99
Signed-off-by: Martin Uhlir <martin.uhlir@pantheon.sk>
9 years agoBug 2245 Fixed Avoid cycle between java packages 21/12321/5
Marian Adamjak [Wed, 29 Oct 2014 15:18:05 +0000 (16:18 +0100)]
Bug 2245 Fixed Avoid cycle between java packages
        - move all classes from protocol.api.experimenter into api.keys
        - move Message*key.java from protocol.api.extensibility into api.keys

Change-Id: I509c57ecdd41ddfa48b224c87d762571639b0b8a
Signed-off-by: Marian Adamjak <marian.adamjak@pantheon.sk>
Signed-off-by: Michal Polkorab <michal.polkorab@pantheon.sk>
9 years agoBug 2245 - Synchronized classes and data structures replaced by unsynchronized. 96/14496/3
Martin Uhlir [Mon, 26 Jan 2015 14:18:17 +0000 (15:18 +0100)]
Bug 2245 - Synchronized classes and data structures replaced by unsynchronized.

Change-Id: Ie5aeeb28c74757d1a8bac21ce611a403a0fb6f57
Signed-off-by: Martin Uhlir <martin.uhlir@pantheon.sk>
9 years agoBug 2245 - Changed type parameters to comply with naming conventions 49/14449/5
Martin Uhlir [Fri, 23 Jan 2015 12:54:24 +0000 (13:54 +0100)]
Bug 2245 - Changed type parameters to comply with naming conventions

Change-Id: I0593538542f6e4ee295b12b19b60058a666a8b04
Signed-off-by: Martin Uhlir <martin.uhlir@pantheon.sk>
9 years agoBug 2245 - Added private constructors to utility classes, in order to hide the implic... 80/14480/1
Martin Uhlir [Mon, 26 Jan 2015 12:36:06 +0000 (13:36 +0100)]
Bug 2245 - Added private constructors to utility classes, in order to hide the implicit one.

Change-Id: I9c0c0d0e2e91f87ca24c5ac5b7edb8931dbc7a2f
Signed-off-by: Martin Uhlir <martin.uhlir@pantheon.sk>
9 years agoSet root pom.xml <name> for Sonar 50/14050/1
Thanh Ha [Fri, 9 Jan 2015 20:53:27 +0000 (15:53 -0500)]
Set root pom.xml <name> for Sonar

As mentioned on the mailing list Sonar uses the <name> field of the
pom.xml that is passed to the mvn command as the name of the project in
Sonar. In most cases this is the root pom.xml file in a project. This
patch sets the name to the project shortname.

https://lists.opendaylight.org/pipermail/discuss/2014-November/004024.html

Change-Id: I51859978242e4d93ba434890a12a1014b286dd30
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
9 years agoFeatures updated (odl-mdsal-common) 13/14013/2
Michal Polkorab [Fri, 9 Jan 2015 08:43:25 +0000 (09:43 +0100)]
Features updated (odl-mdsal-common)

 - features.xml updated with mdsal repository as odl-mdsal-common feature
   had been moved to new location
 - added dependency into features-openflowjava pom.xml
   (new odl-mdsal-common feature location)
 - introduced new property (mdsal.version)in parent pom.xml

Change-Id: I9854b88b6db970f0446fe5bb57057568ee118ce1
Signed-off-by: Michal Polkorab <michal.polkorab@pantheon.sk>
9 years agoRemove trailing whitespace 10/13210/2
Robert Varga [Fri, 28 Nov 2014 15:03:49 +0000 (16:03 +0100)]
Remove trailing whitespace

Trailing whitespace generates a lot of warnings -- mass-remove it.

Change-Id: I9b73bc873685576daa80a998a58d1ce55e475c35
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoMass replace CRLF->LF 09/13209/2
Robert Varga [Fri, 28 Nov 2014 14:59:46 +0000 (15:59 +0100)]
Mass replace CRLF->LF

Windows EOLs generate a checkstyle warning. Eliminate them to silence
the build a bit.

Change-Id: I16281420a51e237f516decd64ed46bbe7b4b1461
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoStatic fields should be accessed via class 08/13208/2
Robert Varga [Fri, 28 Nov 2014 15:26:13 +0000 (16:26 +0100)]
Static fields should be accessed via class

This emits a warning in eclipse, so get rid of it.

Change-Id: I92734c32e76cfc6320340de714689aa6c235f34e
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoMake sure to pick up junit version from odlparent 07/13207/2
Robert Varga [Fri, 28 Nov 2014 15:07:41 +0000 (16:07 +0100)]
Make sure to pick up junit version from odlparent

Fixes 4.10/4.11 inconsistency reported by maven. Also migrates imports
of Assert to the new place.

Change-Id: Id0953e69207ac9507b6baa0cc47bfaa938d86655
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoDo not override versions supplied by odlparent 06/13206/2
Robert Varga [Fri, 28 Nov 2014 15:17:06 +0000 (16:17 +0100)]
Do not override versions supplied by odlparent

Remove overrides which cause downgrades.

Change-Id: I7c55209cfce404368bfa732543197a9e1db91539
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoReference odlparent to get common settings 05/13205/1
Robert Varga [Fri, 28 Nov 2014 14:58:54 +0000 (15:58 +0100)]
Reference odlparent to get common settings

Change-Id: If12f2a59b039d43fd8f325445a4246ef578c45a2
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoTest updated according to yangtools string validation change 13/13113/2
Michal Polkorab [Tue, 25 Nov 2014 12:10:50 +0000 (13:10 +0100)]
Test updated according to yangtools string validation change

Change-Id: I61a5a215721ef9d2d98e92a0fa0b15fcf1e43440
Signed-off-by: Michal Polkorab <michal.polkorab@pantheon.sk>
9 years agoStatistics loadable / installable in Karaf 09/12909/2
Michal Polkorab [Tue, 18 Nov 2014 09:41:42 +0000 (10:41 +0100)]
Statistics loadable / installable in Karaf

 - created new feature odl-openflowjava-stats in order to ensure correct
   module start
 - created new project openflowjava-config to properly store and delagate
   statistics config file
 - removed stats-collection as a service from configuration xml

Change-Id: If2b94c4ec9bf2a2c8157eaad546672df6e1d1500
Signed-off-by: Michal Polkorab <michal.polkorab@pantheon.sk>
9 years agoJConsole support for statistics collection 18/12818/3
Michal Polkorab [Thu, 13 Nov 2014 15:20:44 +0000 (16:20 +0100)]
JConsole support for statistics collection

 - sevice identity moved to spi
 - removed unnecessary methods
 - toString() renamed to getStat()

Change-Id: I84d8c2f333f11c202b3cbb82f55578ea3f7961f9
Signed-off-by: Michal Polkorab <michal.polkorab@pantheon.sk>
9 years agoStatistics collection added 06/12606/2
Marian Adamjak [Fri, 7 Nov 2014 13:17:10 +0000 (14:17 +0100)]
Statistics collection added

 - added statistics counters and tests
 - collection configurable through configSubsystem

Change-Id: I0b292174789fbb39ff7abd25fec9b53b35ff7927
Signed-off-by: Marian Adamjak <marian.adamjak@pantheon.sk>
Signed-off-by: Michal Polkorab <michal.polkorab@pantheon.sk>
9 years agoStatistics collection - initial change 05/12605/2
Marian Adamjak [Wed, 5 Nov 2014 06:51:27 +0000 (07:51 +0100)]
Statistics collection - initial change

Change-Id: I0f252a08a40b93c5ee280d289b28bdd9c88d8419
Signed-off-by: Marian Adamjak <marian.adamjak@pantheon.sk>
Signed-off-by: Michal Polkorab <michal.polkorab@pantheon.sk>
9 years agoBug 2245 - Fixed Avoid cycle between java packages 19/12319/1
Marian Adamjak [Wed, 29 Oct 2014 13:59:47 +0000 (14:59 +0100)]
Bug 2245 - Fixed Avoid cycle between java packages
         - between protocol.impl.core and protocol.impl.connection

Change-Id: Ieb3a5a495fffc679852245b0a70e17c57023d3b1
Signed-off-by: Marian Adamjak <marian.adamjak@pantheon.sk>
9 years agoMaintaining code - Move buildRpcError method into AbstractRpcListener 14/12314/2
Marian Adamjak [Wed, 29 Oct 2014 12:06:57 +0000 (13:06 +0100)]
Maintaining code - Move buildRpcError method into AbstractRpcListener
                 - remove unused method from ConnectionAdapterImpl

Change-Id: I4d25b566fafd28a307345ebdffadcd14e844f2ee
Signed-off-by: Marian Adamjak <marian.adamjak@pantheon.sk>
9 years agoMaintaining code - remove unused class SslTrustManagerFactory 11/12311/1
Marian Adamjak [Wed, 29 Oct 2014 08:45:55 +0000 (09:45 +0100)]
Maintaining code - remove unused class SslTrustManagerFactory

Change-Id: I24a35c5c3ad6a06a27599f689f3de72ab1a47cc1
Signed-off-by: Marian Adamjak <marian.adamjak@pantheon.sk>
9 years agoMaintaining code - review log levels 10/12310/1
Marian Adamjak [Wed, 29 Oct 2014 08:22:47 +0000 (09:22 +0100)]
Maintaining code - review log levels

Change-Id: Ic43628ee1067e112e8c6e1cf21ff9f9a32b0e000
Signed-off-by: Marian Adamjak <marian.adamjak@pantheon.sk>
9 years agoMaintainig code - OFDatagramPacketDecoder, UdpConnectionMap 82/12282/6
Marian Adamjak [Tue, 28 Oct 2014 09:02:15 +0000 (10:02 +0100)]
Maintainig code - OFDatagramPacketDecoder, UdpConnectionMap

Change-Id: I7485108109145b48f605d8f9dce1fee87fad9688
Signed-off-by: Marian Adamjak <marian.adamjak@pantheon.sk>