openflowplugin.git
9 years agoReturning of future from request context - NodeConfigService. 12/20812/2
Jozef Gloncak [Wed, 20 May 2015 13:28:02 +0000 (15:28 +0200)]
Returning of future from request context - NodeConfigService.

Change-Id: I8f9fd184428378e3039ac6d3ab5345f2456ccc9f
Signed-off-by: Jozef Gloncak <jgloncak@cisco.com>
9 years agofuture from request context should be always returned 99/20799/2
Martin Bobak [Wed, 20 May 2015 12:12:02 +0000 (14:12 +0200)]
future from request context should be always returned

Change-Id: Ic6fd71a1372c431cbffa13242e7fba64f527fdb0
Signed-off-by: Martin Bobak <mbobak@cisco.com>
9 years agoadded spying on overall OFJ backpressure on/off operations 88/20788/1
Martin Bobak [Wed, 20 May 2015 09:44:49 +0000 (11:44 +0200)]
added spying on overall OFJ backpressure on/off operations

Change-Id: Icadae7c2a2842dbaade28259e8e823c838561b91
Signed-off-by: Martin Bobak <mbobak@cisco.com>
9 years agoRevert "binding thread pools in drop test to target node" 78/20778/2
Martin Bobak [Wed, 20 May 2015 08:36:07 +0000 (08:36 +0000)]
Revert "binding thread pools in drop test to target node"

This change is suspect of significant decrease of throughput performance by He-codebase ofPlugin.

This reverts commit 673a667dc331d5877f321e45396ad143e0c8055e.

Change-Id: I34c23c280c0c1e6d2e31816af4da0ec2e9ae2725
Signed-off-by: Martin Bobak <mbobak@cisco.com>
9 years agoFix unnecessary timeout submit 70/20770/1
Vaclav Demcak [Wed, 20 May 2015 07:36:19 +0000 (09:36 +0200)]
Fix unnecessary timeout submit

Note: TransactionChainManager submits transactionChain after timeout
(submitScheduledTransaction method) without check nr. of actual
transaction. So we'd like to submit tx if we are some tx inside
only. Otherwise we see bad exception in logs.

Change-Id: Ieff610a8bb337d799aefe131a8c3b787fa4081f9
Signed-off-by: Vaclav Demcak <vdemcak@cisco.com>
9 years agothrottling fix 64/20764/1
Martin Bobak [Wed, 20 May 2015 05:45:16 +0000 (07:45 +0200)]
throttling fix

 - fixed stuck condition

Change-Id: I6824fe66e1125f8f842a4e8ebd61ce31ac6c41e9
Signed-off-by: Martin Bobak <mbobak@cisco.com>
9 years agodefensively create empty list for datastore nodes for datastore operations to complete 30/20730/5
Martin Bobak [Tue, 19 May 2015 13:26:00 +0000 (15:26 +0200)]
defensively create empty list for datastore nodes for datastore operations to complete

Change-Id: I31e4bef62d90f2e58475e8fabf6481f14a0ce406
Signed-off-by: Martin Bobak <mbobak@cisco.com>
9 years agomultimessage collector provides way how to explicitly cancel processing on selected... 39/20739/3
Martin Bobak [Tue, 19 May 2015 14:54:55 +0000 (16:54 +0200)]
multimessage collector provides way how to explicitly cancel processing on selected req. ctx.

Change-Id: Ib6781ebee15c01df7ffdf4dfe185b321633c1fcc
Signed-off-by: Martin Bobak <mbobak@cisco.com>
9 years agoThrottling via packetIn filter proposal 42/20742/1
Martin Bobak [Mon, 18 May 2015 09:07:09 +0000 (11:07 +0200)]
Throttling via packetIn filter proposal

 - throttling is triggered by rejection of packetIn by md-sal
 - outstanding notifications are counted
 - when throttling is active then it is switched off upon
   outstanding notifications amound falls to 0

Change-Id: Ic5e630a8924a5995883e4b59a6b84d8591664805
Signed-off-by: Martin Bobak <mbobak@cisco.com>
9 years agoinitial condition - api change in unit tests 41/20741/1
Martin Bobak [Sat, 16 May 2015 08:55:10 +0000 (10:55 +0200)]
initial condition - api change in unit tests

Change-Id: I94306db05a69394c10600a912699e092c01828d2
Signed-off-by: Martin Bobak <mbobak@cisco.com>
9 years agounregister request ctx from rpc stack when transmitPacket operation fails 25/20725/1
Martin Bobak [Tue, 19 May 2015 13:27:44 +0000 (15:27 +0200)]
unregister request ctx from rpc stack when transmitPacket operation fails

Change-Id: If38c097ba19a2c2062f7ebac110f29a2a8e1a538
Signed-off-by: Martin Bobak <mbobak@cisco.com>
9 years agoMerge "flow descriptors should be always stored when addFlow is called"
michal rehak [Tue, 19 May 2015 11:57:19 +0000 (11:57 +0000)]
Merge "flow descriptors should be always stored when addFlow is called"

9 years agoMerge "call get on transaction submit operation when writing Nodes node into operatio...
michal rehak [Tue, 19 May 2015 11:44:08 +0000 (11:44 +0000)]
Merge "call get on transaction submit operation when writing Nodes node into operational DS on OFP starts"

9 years agoflow descriptors should be always stored when addFlow is called 02/20702/2
Martin Bobak [Tue, 19 May 2015 08:43:04 +0000 (10:43 +0200)]
flow descriptors should be always stored when addFlow is called

Change-Id: Idef70e2e2f28e231dacbe2ccda8a8a9d484570e1
Signed-off-by: Martin Bobak <mbobak@cisco.com>
9 years agocall get on transaction submit operation when writing Nodes node into operational... 13/20713/1
Martin Bobak [Tue, 19 May 2015 10:46:20 +0000 (12:46 +0200)]
call get on transaction submit operation when writing Nodes node into operational DS on OFP starts

Change-Id: I1c7caf563ca35b890f02c1c9aa3cc4ac74db2fd2
Signed-off-by: Martin Bobak <mbobak@cisco.com>
9 years agoDo not use calendar time 11/20711/1
Robert Varga [Tue, 19 May 2015 10:21:31 +0000 (12:21 +0200)]
Do not use calendar time

Instead of using System.currentTimeMillis(), as it travels with wall
time. Use nanoTime(), which is faster and monotonic.

Change-Id: I4b1089a23dbeba69acdceb4e0e55a0ec0457612f
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoDo not keep per-switch state in DeviceManagerImpl 10/20710/1
Robert Varga [Tue, 19 May 2015 09:56:41 +0000 (11:56 +0200)]
Do not keep per-switch state in DeviceManagerImpl

All per-device state is encapsulated in a DeviceContext, keeping a
provider as a field breaks thread-safety, as it is changed on each
request.

Change-Id: I60e818cee662f2f952e5435ff2e9ba9d1c98d053
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoOptimize HashUtil 93/20693/1
Robert Varga [Tue, 19 May 2015 06:45:46 +0000 (08:45 +0200)]
Optimize HashUtil

Do not use String.replace(), as it compiles a regex on each invocation,
but rather compile the pattern upfront and use that for multi-char
replacement. For single-character replacement, use Guava's CharMatcher,
which is much more efficient.

Use String.indexOf(char) instead of String.contains(String).
Use String.isEmpty() instead of comparison to an empty string.

Change-Id: I9d51151295dd66167c5750ed4e961ae8a621c8a2
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoIntroduce a shared successful RpcResult 31/20631/4
Robert Varga [Mon, 18 May 2015 09:09:29 +0000 (11:09 +0200)]
Introduce a shared successful RpcResult

Also fix message counters in PacketProcessing.

Change-Id: I7a270efa50a88dc430691002031d4079e3e369bf
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoMark DeviceDataException as deprecated 30/20630/4
Robert Varga [Sat, 16 May 2015 23:20:52 +0000 (01:20 +0200)]
Mark DeviceDataException as deprecated

Change-Id: I9f8dca65426b60ca9d0919cb5f1fe833bf65a5ad
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoUse StringBuilder instead of StringBuffer 45/20645/4
Robert Varga [Mon, 18 May 2015 11:26:22 +0000 (13:26 +0200)]
Use StringBuilder instead of StringBuffer

StringBuffer is needlessly synchronized, so do not use it.

Change-Id: Iba425633aa626495e1bfadf918273309a824f3b1
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoNode created when device connects is created with empty Node list 59/20659/1
Martin Bobak [Mon, 18 May 2015 16:11:35 +0000 (18:11 +0200)]
Node  created when device connects is created with empty Node list

Change-Id: I1f44dffb9406e7d31783cac75baa4d5f6cec007f
Signed-off-by: Martin Bobak <mbobak@cisco.com>
9 years agoMerge "RequestContext's are not held by DeviceContext anymore"
michal rehak [Mon, 18 May 2015 13:59:40 +0000 (13:59 +0000)]
Merge "RequestContext's are not held by DeviceContext anymore"

9 years agoMerge "fix callback handling"
michal rehak [Mon, 18 May 2015 13:48:53 +0000 (13:48 +0000)]
Merge "fix callback handling"

9 years agofix callback handling 32/20632/2
Martin Bobak [Mon, 18 May 2015 09:25:42 +0000 (11:25 +0200)]
fix callback handling

Change-Id: I911d8614d8ad477b5f856e67caf94e05bfde064d
Signed-off-by: Martin Bobak <mbobak@cisco.com>
9 years agoRequestContext's are not held by DeviceContext anymore 43/20643/1
Martin Bobak [Mon, 18 May 2015 11:24:10 +0000 (13:24 +0200)]
RequestContext's are not held by DeviceContext anymore

All necessary work is done in callbacks registered when commiting entry in  outbound queue.
That makes registration of req. context inside device context worthless. Collection of
multiparts is done in message collector on request context registered when entry is commited.
Request contexts not held by DeviceManager and barrier reuqests issued by OFJ makes
OutsandingMessageExtractor useless as well.

Change-Id: Ib259020ed4e3cca56463696827bb24bf7bc97069
Signed-off-by: Martin Bobak <mbobak@cisco.com>
9 years agoshift statistics services to new OFJ codepath 34/20634/1
Martin Bobak [Mon, 18 May 2015 09:12:56 +0000 (11:12 +0200)]
shift statistics services to new OFJ codepath

Change-Id: Id3fa22878605029989baabbc5722394fa3e92728
Signed-off-by: Martin Bobak <mbobak@cisco.com>
9 years agoremoved unwanted git file created by merge 27/20627/2
Martin Bobak [Mon, 18 May 2015 09:02:32 +0000 (11:02 +0200)]
removed unwanted git file created by merge

Change-Id: If225d432498f9767428757c8cb9be33e412121ab
Signed-off-by: Martin Bobak <mbobak@cisco.com>
9 years agoThrottledNotificationsOfferer should not be generic 05/20605/1
Robert Varga [Sat, 16 May 2015 16:36:14 +0000 (18:36 +0200)]
ThrottledNotificationsOfferer should not be generic

The only use of the type argument is to bind method arguments -- which
we can spell out. This way we can reuse an offerer across multiple types
without incurring warnings.

Change-Id: Ie003f6c9ebe00f1abae4f8171086a7240843a14c
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoFix RpcResultBuilder/RpcContext raw references 04/20604/1
Robert Varga [Sat, 16 May 2015 16:29:25 +0000 (18:29 +0200)]
Fix RpcResultBuilder/RpcContext raw references

This adds proper type arguments to eliminate eclipse warnings.

Change-Id: I63373fadd17c1f99f8e8e465190adc65a2597a0a
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoDo not use InstanceIdentifier.builder() 03/20603/2
Robert Varga [Sat, 16 May 2015 16:18:40 +0000 (18:18 +0200)]
Do not use InstanceIdentifier.builder()

These instance identifiers are expected to be short-lived, so use the
appropriate utility child() method instead.

Change-Id: I23a6e6d33fec7b904794ac38ff153b4d46063858
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoFix various warnings 02/20602/2
Robert Varga [Sat, 16 May 2015 16:15:38 +0000 (18:15 +0200)]
Fix various warnings

Fixes raw RequestContext references, as well as unclosed test resources.

Change-Id: Ia2aa821e0d520fa26e2de66e30f09de7cf300ba5
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoMark methods as static 01/20601/2
Robert Varga [Sat, 16 May 2015 16:06:11 +0000 (18:06 +0200)]
Mark methods as static

Some methods can be marked as static -- do that to improve clarity.

Change-Id: Ib73b989ae0bc81617ffa8a07d715922d9198da2b
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoRemove unused imports 00/20600/1
Robert Varga [Sat, 16 May 2015 16:01:17 +0000 (18:01 +0200)]
Remove unused imports

Eclipse-reported unused imports -- remove them.

Change-Id: I0ecfda5cd3730ee685740f300d7268898f5d748c
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoDo not override versions 99/20599/1
Robert Varga [Sat, 16 May 2015 16:00:38 +0000 (18:00 +0200)]
Do not override versions

Fix a few maven warnings about overriding managed versions.

Change-Id: Icd980761fb33b35213ffc8b43fd85e25d725ef3f
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoMessageSpy should not be generic 97/20597/2
Robert Varga [Sat, 16 May 2015 15:46:50 +0000 (17:46 +0200)]
MessageSpy should not be generic

This reduces the amount of warnings and confusion around when the actual
argument should be.

Change-Id: I614f2ba44f8432e3be3f3fd79c37f5d95f87fd76
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoUse pre-constructed NODES_IDENTIFIER 38/20538/6
Robert Varga [Fri, 15 May 2015 16:36:04 +0000 (18:36 +0200)]
Use pre-constructed NODES_IDENTIFIER

We have a constant for the first-order identifier. Make sure it is a
proper constant and use it as a base for all child identifiers.

Change-Id: I53d6ddfc782424aae0e4ac0997afb735c9ca7688
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agocheck for manadatory attribute 96/20596/1
Martin Bobak [Sat, 16 May 2015 13:39:39 +0000 (15:39 +0200)]
check for manadatory attribute

Change-Id: Ibe1ba13e63b65a8cb4a2799a2c8b902d7feaf8bb
Signed-off-by: Martin Bobak <mbobak@cisco.com>
9 years agocorrected way of handlig XID 95/20595/1
Martin Bobak [Sat, 16 May 2015 13:34:16 +0000 (15:34 +0200)]
corrected way of handlig XID

Change-Id: Iad1386ca6a1b47a1849ceabeabd234ba012d1a4f
Signed-off-by: Martin Bobak <mbobak@cisco.com>
9 years agocorrected message spy counters per service 94/20594/1
Martin Bobak [Sat, 16 May 2015 12:54:47 +0000 (14:54 +0200)]
corrected message spy counters per service

Change-Id: I62bf785d96f8dd1e4226f4d46278de243e3214e5
Signed-off-by: Martin Bobak <mbobak@cisco.com>
9 years agofixed npes in service processing and message spying 91/20591/3
Martin Bobak [Sat, 16 May 2015 10:59:39 +0000 (12:59 +0200)]
fixed npes in service processing and message spying

Change-Id: I607200b0ac2a9324c44c2460a6c633000f0029f1
Signed-off-by: Martin Bobak <mbobak@cisco.com>
9 years agoremoved worthless callbacks 90/20590/3
Martin Bobak [Sat, 16 May 2015 10:16:26 +0000 (12:16 +0200)]
removed worthless callbacks

Change-Id: I8e408f2dbd0d7c7a52eb8731cd3ae79049d03ea0
Signed-off-by: Martin Bobak <mbobak@cisco.com>
9 years agoFlowCapableTransactionServiceImpl and SalEchoServiceImpl.java shifted to new OFJ... 89/20589/3
Martin Bobak [Sat, 16 May 2015 10:10:35 +0000 (12:10 +0200)]
FlowCapableTransactionServiceImpl  and SalEchoServiceImpl.java shifted to new OFJ codepath

Change-Id: I3787c1c8ed16a2ebabdc26425ea8f4e823c72cc8
Signed-off-by: Martin Bobak <mbobak@cisco.com>
9 years agoNodeConfigService shifted to new OFJ codepath 88/20588/2
Martin Bobak [Sat, 16 May 2015 10:05:32 +0000 (12:05 +0200)]
NodeConfigService shifted to new OFJ codepath

Change-Id: I5b5e6cb1906e1fc9a9a99a446606dc4b106c0399
Signed-off-by: Martin Bobak <mbobak@cisco.com>
9 years agoMake sure RequestContext has a constant XID 77/20577/8
Robert Varga [Fri, 15 May 2015 22:41:23 +0000 (00:41 +0200)]
Make sure RequestContext has a constant XID

All callers end up talking to the underlying device to acquire an XID.
Since all RequestContextStack implementations already have (potential)
access to a DeviceContext, there is no need to do this.

Thus make sure RequestContext has an XID allocated by the underlying
device, which unifies code and makes callers simpler. If we fail to
allocate one, the caller will see that XID as null.

We also take this opportunity to make Xid take a Long instead of a
primitive type, as that's what we need for DataObjects and that's what
we get from the Device anyway -- thus preventing autoboxing operations.

Change-Id: I7f553a9a1283d1c82ba7e287d0f21cf4147779e2
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoDataCrate removed and its usage replaced by RequestContext 87/20587/1
Martin Bobak [Sat, 16 May 2015 09:01:10 +0000 (11:01 +0200)]
DataCrate removed and its usage replaced by RequestContext

DataCrate created unnecessary code and in light of newest OFJ changes became obsolete.
All we need to have when handling rpc call is request context.

Change-Id: Iff565c48af6634c9000a2b09057997b81cbb062b
Signed-off-by: Martin Bobak <mbobak@cisco.com>
9 years agoremoved redundat xid reservation 86/20586/1
Martin Bobak [Sat, 16 May 2015 08:23:08 +0000 (10:23 +0200)]
removed redundat xid reservation

Change-Id: Ic6bfadf9b163b53a6930219df10da7d3865dd213
Signed-off-by: Martin Bobak <mbobak@cisco.com>
9 years agoCleanup RequestContextStack 76/20576/3
Robert Varga [Fri, 15 May 2015 21:24:50 +0000 (23:24 +0200)]
Cleanup RequestContextStack

Instead of exposing the limits as a tweakable API, we should specify the
limit at instantiation as an implementation-specific thing.

We document that RequestContextStack.createRequestContext() can return
null and let callers deal with that.

This change allows us to implement RpcContext throttling using a simple
counting Semaphore, which is more scalable and efficient than an
explicit queue. To do that, we turn RequestContextImpl into AbstractRequestContext,
which is subclassed as needed by the various RequestContextStack
implementations.

Change-Id: Ibbeafad6cd7f740284264cca22412e11696cede8
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoRemove DeviceContextImpl.XidGenerator 75/20575/1
Robert Varga [Fri, 15 May 2015 22:15:10 +0000 (00:15 +0200)]
Remove DeviceContextImpl.XidGenerator

The generator is not used anymore, remove it.

Change-Id: Ia4a50a0b2b02b34f3854a4f09c4b307ccebb24c2
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoFix various small warnings 74/20574/1
Robert Varga [Fri, 15 May 2015 20:53:25 +0000 (22:53 +0200)]
Fix various small warnings

All of these are reported by eclipse: needlessly raw types, missing
serialversionUUID, methods which can be made static.

Change-Id: I5b71c35ee37167ead77f7baa2e5d6e5c23f99834
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoMerge "Speed FlowUtil up a bit"
michal rehak [Fri, 15 May 2015 20:07:44 +0000 (20:07 +0000)]
Merge "Speed FlowUtil up a bit"

9 years agoMerge "Explicitly deal with rejected offer operation"
michal rehak [Fri, 15 May 2015 20:05:25 +0000 (20:05 +0000)]
Merge "Explicitly deal with rejected offer operation"

9 years agoSpeed FlowUtil up a bit 39/20539/3
Robert Varga [Fri, 15 May 2015 16:40:49 +0000 (18:40 +0200)]
Speed FlowUtil up a bit

Instead of taking a Short, it can take the primitive short, increasing
performance just a tiny bit.

Change-Id: I7a2c4b0f20108c943110b83ba1237a9ad21d57e0
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoExplicitly deal with rejected offer operation 34/20534/2
Robert Varga [Fri, 15 May 2015 19:39:10 +0000 (21:39 +0200)]
Explicitly deal with rejected offer operation

Performance traces show a whopping 30% of the method's time being spent
in ImmediateFailedFuture.get(). Make sure this does not occur by
checking for the well-known constant first, shaving 4% of global CPU
usage.

Change-Id: Id7fdfbb32a071634e7e5467441beb242181c68bb
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoremoved misplaced internal statistics counters 60/20560/1
Martin Bobak [Fri, 15 May 2015 19:14:20 +0000 (21:14 +0200)]
removed misplaced internal statistics counters

Change-Id: I8ca8fde20d01982c7564a47dc308d2eaf6193021
Signed-off-by: Martin Bobak <mbobak@cisco.com>
9 years agofixe NPE when logging in add flow's future callback 57/20557/1
Martin Bobak [Fri, 15 May 2015 19:13:09 +0000 (21:13 +0200)]
fixe NPE when logging in add flow's future callback

Change-Id: Iaf53511e8b1f09676ddb7284b3c5b239d778c1d4
Signed-off-by: Martin Bobak <mbobak@cisco.com>
9 years agoMerge "Do not use InstanceIdentifier.builder()"
michal rehak [Fri, 15 May 2015 18:33:39 +0000 (18:33 +0000)]
Merge "Do not use InstanceIdentifier.builder()"

9 years agoMake sure we wait for the reserve XID 35/20535/1
Martin Bobak [Fri, 15 May 2015 13:19:13 +0000 (15:19 +0200)]
Make sure we wait for the reserve XID

 Base openflowjava OutboundQueue has non-blocking semantics, so can fail
easily. Convert our handler to be a blocking proxy working on top of it.

- no throttling on packetIn
- fix npe when logging response from queue
- unregister request context in queue callback when request fails
  - positive callbacks are gathered by multipart message collector
    and unregistered when all multiparts are collected by device
    context

- OutboundQueueProvider encapsulation in deviceContext

Change-Id: I52cc145d2b59bf51594c7da08796570b35b8250b
Signed-off-by: Martin Bobak <mbobak@cisco.com>
9 years agocommon service doesn't wrap future into BaseCallback 33/20533/2
Martin Bobak [Thu, 14 May 2015 21:22:28 +0000 (23:22 +0200)]
common service doesn't wrap future into BaseCallback
removed unwanted callbacks in SalFlowService

Change-Id: I83a55752544826aaeeb5d1246e5a622fe1021532
Signed-off-by: Martin Bobak <mbobak@cisco.com>
9 years agostatistics groups renamed 32/20532/2
Martin Bobak [Thu, 14 May 2015 19:17:41 +0000 (21:17 +0200)]
statistics groups renamed

- fixed statistics counting in device context's notification forwarding
- added new statistics group for spying on unregistering items from rpc stack
- changed way how barrier nanos value is expressed
- spying on rpc stack operations

Change-Id: I82df21076543458f9e34f677007bfe31aa697634
Signed-off-by: Martin Bobak <mbobak@cisco.com>
9 years agoadded new statistics groups for measuring refused notifications and XID requests 98/20398/5
Martin Bobak [Thu, 14 May 2015 14:15:06 +0000 (16:15 +0200)]
added new statistics groups for measuring refused notifications and XID requests

- spying for new statistics
- initial OFJ queue length set to 25600
- when first XID reservation on outbound queue fails, we attempt for second one
- PacketProcessingService uses outbound queue for sending requests to OFJ
- StatisticsGatheringService doesn't use uoutbound queue in synchronized block

Change-Id: I9f40be8c65c2ff4d75d81b9b814fa28cc1cae8f2
Signed-off-by: Martin Bobak <mbobak@cisco.com>
9 years agoDeviceContext provides reserved values for XID 97/20397/5
Martin Bobak [Thu, 14 May 2015 10:19:44 +0000 (12:19 +0200)]
DeviceContext provides reserved values for XID

Change-Id: I1db70922f8a4bbbb4d0b44c66888975dc8b949b4
Signed-off-by: Martin Bobak <mbobak@cisco.com>
9 years agoMultipartMessageCollector is used one per device context 48/20348/5
Martin Bobak [Thu, 14 May 2015 07:57:58 +0000 (09:57 +0200)]
MultipartMessageCollector is used one per device context

- Multipart messages are collected inside OutboundQueue callback.
- StatisticsGatheringService collects its multipart responses in queue callback

Change-Id: I7e4cf52d2e396f08b94d4d7f08af8b591061dfc3
Signed-off-by: Martin Bobak <mbobak@cisco.com>
9 years agoIntroduced OutboundQueue from OFJ for outbound messages processing 73/20173/8
Martin Bobak [Tue, 12 May 2015 18:17:37 +0000 (20:17 +0200)]
Introduced OutboundQueue from OFJ for outbound messages processing

BarrierProcessor and related classes are removed
Device static info gathered trough OutboundQueue
Outbound queue used in CommonService and SalFlowService

Change-Id: Ieeff15184aac44cdfd0a902b2f3ae89bfa149461
Signed-off-by: Martin Bobak <mbobak@cisco.com>
9 years agoDo not use InstanceIdentifier.builder() 02/20502/2
Robert Varga [Tue, 12 May 2015 10:26:05 +0000 (12:26 +0200)]
Do not use InstanceIdentifier.builder()

Adding a single node to a InstanceIdentifier is much faster than
instantiating a builder.

Change-Id: I9a41aa2c46b9a7977bdc579577852b23e6804a0e
Signed-off-by: Robert Varga <rovarga@cisco.com>
Signed-off-by: Michal Rehak <mirehak@cisco.com>
9 years agoadded missing empty method 47/20347/3
Martin Bobak [Thu, 14 May 2015 07:57:23 +0000 (09:57 +0200)]
added missing empty method

Change-Id: I64bc561758f73f74278c824ddfe2f7f0c4adc44b
Signed-off-by: Martin Bobak <mbobak@cisco.com>
9 years agoEnsuring exclusive access to flow registry. 94/20494/2
Jozef Gloncak [Fri, 15 May 2015 11:25:24 +0000 (13:25 +0200)]
Ensuring exclusive access to flow registry.

Ensure that checking of existence of flow and writing not
existing flow is exclusive.

Change-Id: I39db4dba23928bbf42cbe7801b4d67be82bcc652
Signed-off-by: Jozef Gloncak <jgloncak@cisco.com>
9 years agoMerge "Multipart processing - gett id from device context."
michal rehak [Fri, 15 May 2015 11:28:47 +0000 (11:28 +0000)]
Merge "Multipart processing - gett id from device context."

9 years agoMerge "Improving logging."
michal rehak [Fri, 15 May 2015 11:27:19 +0000 (11:27 +0000)]
Merge "Improving logging."

9 years agoImproving logging. 85/20485/1
Jozef Gloncak [Fri, 15 May 2015 09:25:45 +0000 (11:25 +0200)]
Improving logging.

Change-Id: Ic4b8d30eccbaf175f6352b775aa2f80f31c425b5
Signed-off-by: Jozef Gloncak <jgloncak@cisco.com>
9 years agoAlien flows in operational datastore. 95/20395/2
Jozef Gloncak [Thu, 14 May 2015 14:55:36 +0000 (16:55 +0200)]
Alien flows in operational datastore.

If statistics from device were too fast while batch of flows
it caused that for some of them (somethimes all) wasn't generated
flow ID. Thus flows from statistic didn't have ID only alien ID.

In this fix operational datastore with all flows is deleted everytime
when flow statistics are received. Flows from statistics are looked up
in flow registry. If found then stored ID is used, if not then new
alien ID is generated.

Change-Id: I039daac851208d60c5c7c63d65a7ffba58ae6a6a
Signed-off-by: Jozef Gloncak <jgloncak@cisco.com>
9 years agoBug 3208: Add actions SetNsch[1-4] and matches Nsch[1-4] 55/20155/7
Ed Warnicke [Sat, 2 May 2015 05:38:36 +0000 (22:38 -0700)]
Bug 3208: Add actions SetNsch[1-4] and matches Nsch[1-4]

Change-Id: Ifd8788dc171b9071b6141f4108edf801a54aff9a
Signed-off-by: Ed Warnicke <hagbard@gmail.com>
9 years agoMultipart processing - gett id from device context. 37/20237/1
Jozef Gloncak [Wed, 13 May 2015 11:32:20 +0000 (13:32 +0200)]
Multipart processing - gett id from device context.

For deleting of meter, group and flow statistics was used attitude,
where node id was get from statistic data.
This patch changed it to get node id from device context.

Change-Id: I0dbad1c246347b3fd9be7a097adda9c2c2f10bd1
Signed-off-by: Jozef Gloncak <jgloncak@cisco.com>
9 years agoMerge "fix parital multipart processing"
michal rehak [Wed, 13 May 2015 11:11:18 +0000 (11:11 +0000)]
Merge "fix parital multipart processing"

9 years agofix parital multipart processing 50/20150/4
Jozef Gloncak [Wed, 13 May 2015 10:23:47 +0000 (12:23 +0200)]
fix parital multipart processing

Change-Id: I7428a7df9e448d766a491f15535356c9ace7f0d9
Signed-off-by: Martin Bobak <mbobak@cisco.com>
Signed-off-by: Jozef Gloncak <jgloncak@cisco.com>
9 years agoAdaptive throttling 77/20177/2
Jozef Gloncak [Wed, 13 May 2015 08:09:11 +0000 (10:09 +0200)]
Adaptive throttling

  - throttling is based on md-sal publishing capacity
  - regulation is based on ability to offer new nottification
  - close now throws only SecurityException

Change-Id: Ia29b78ea9bec6bd544a62a61c0dc358cfb01936d
Signed-off-by: Martin Bobak <mbobak@cisco.com>
Signed-off-by: Jozef Gloncak <jgloncak@cisco.com>
9 years agoadapted to notificationProvider API 76/20176/1
Martin Bobak [Tue, 12 May 2015 13:43:43 +0000 (15:43 +0200)]
adapted to notificationProvider API

Change-Id: I50ceba80dd8125b0037e7ae970e0150615f086be
Signed-off-by: Martin Bobak <mbobak@cisco.com>
9 years agoMerge "Explicitly set git-review branch to master"
michal rehak [Tue, 12 May 2015 15:45:20 +0000 (15:45 +0000)]
Merge "Explicitly set git-review branch to master"

9 years agoExplicitly set git-review branch to master 39/20139/1
Thanh Ha [Tue, 12 May 2015 14:32:42 +0000 (10:32 -0400)]
Explicitly set git-review branch to master

Change-Id: I667e4b078afe82d492857ceb6b1f363d2ead98e4
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
9 years agofix npe when calculating IpMatchHash 34/20134/1
Martin Bobak [Tue, 12 May 2015 14:03:38 +0000 (16:03 +0200)]
fix npe when calculating IpMatchHash

Change-Id: I32a0af1b840cb1716be40f8a7596e1fa235f51b8
Signed-off-by: Martin Bobak <mbobak@cisco.com>
9 years agohashed wheel timer lenght prolonged 32/20132/2
Martin Bobak [Tue, 12 May 2015 13:37:11 +0000 (15:37 +0200)]
hashed wheel timer lenght prolonged

Change-Id: I934f028f4a9c7f962143e08f4b282ba1d005e2ee
Signed-off-by: Martin Bobak <mbobak@cisco.com>
9 years agoMerge "un - throttle connection interval set to 10ms"
michal rehak [Tue, 12 May 2015 13:36:59 +0000 (13:36 +0000)]
Merge "un - throttle connection interval set to 10ms"

9 years agoMerge "HashedWheel timer tick duration set to 10ms"
michal rehak [Tue, 12 May 2015 13:36:47 +0000 (13:36 +0000)]
Merge "HashedWheel timer tick duration set to 10ms"

9 years agoMerge "DeviceFlowRegistryImpl uses HashSet instead of ArrayList"
michal rehak [Tue, 12 May 2015 13:35:54 +0000 (13:35 +0000)]
Merge "DeviceFlowRegistryImpl uses HashSet instead of ArrayList"

9 years agoMerge "DeviceContextImpl uses HashSet instead of ArrayList"
michal rehak [Tue, 12 May 2015 13:35:34 +0000 (13:35 +0000)]
Merge "DeviceContextImpl uses HashSet instead of ArrayList"

9 years agoMerge "StatisticsContextImpl uses HashSet instead of ArrayList"
michal rehak [Tue, 12 May 2015 13:34:58 +0000 (13:34 +0000)]
Merge "StatisticsContextImpl uses HashSet instead of ArrayList"

9 years agoMerge "RpcContextImpl uses HashSet instead of ArrayList"
michal rehak [Tue, 12 May 2015 13:34:31 +0000 (13:34 +0000)]
Merge "RpcContextImpl uses HashSet instead of ArrayList"

9 years agoMerge "changed log level to debug"
michal rehak [Tue, 12 May 2015 13:33:43 +0000 (13:33 +0000)]
Merge "changed log level to debug"

9 years agoun - throttle connection interval set to 10ms 22/20122/1
Martin Bobak [Tue, 12 May 2015 11:26:08 +0000 (13:26 +0200)]
un - throttle connection interval set to 10ms

Change-Id: I887ddf453c06203f107db12fbb082a9b7c3ca793
Signed-off-by: Martin Bobak <mbobak@cisco.com>
(cherry picked from commit 199e8cd252cf5dfde1e4c161d50eeb6876b692f3)

9 years agoHashedWheel timer tick duration set to 10ms 21/20121/1
Martin Bobak [Tue, 12 May 2015 11:25:39 +0000 (13:25 +0200)]
HashedWheel timer tick duration set to 10ms

Change-Id: I29221888dabbf856de0e26304824ad28c3bd760f
Signed-off-by: Martin Bobak <mbobak@cisco.com>
(cherry picked from commit 67d4ef643b1a16f26abc5a0f006e1c4e8a7fa806)

9 years agoDeviceFlowRegistryImpl uses HashSet instead of ArrayList 20/20120/1
Martin Bobak [Tue, 12 May 2015 09:56:08 +0000 (11:56 +0200)]
DeviceFlowRegistryImpl uses HashSet instead of ArrayList

Change-Id: I333031330279e5d56b2cedef5be29614cec47c5b
Signed-off-by: Martin Bobak <mbobak@cisco.com>
(cherry picked from commit c7d744538d466aa20c5d6bf117e6a4549efe0386)

9 years agoDeviceContextImpl uses HashSet instead of ArrayList 19/20119/1
Martin Bobak [Tue, 12 May 2015 09:54:37 +0000 (11:54 +0200)]
DeviceContextImpl uses HashSet instead of ArrayList

Change-Id: If1a0606bc0cfad7c48f6c0172b1a4ab3b26d6ff9
Signed-off-by: Martin Bobak <mbobak@cisco.com>
(cherry picked from commit 7936b51a1ff5671c268da6149d9fea3b0cf36048)

9 years agoStatisticsContextImpl uses HashSet instead of ArrayList 18/20118/1
Martin Bobak [Tue, 12 May 2015 09:54:03 +0000 (11:54 +0200)]
StatisticsContextImpl uses HashSet instead of ArrayList

Change-Id: Ib962a35f5323db0670c016220ff6d0b3ad5ee0b9
Signed-off-by: Martin Bobak <mbobak@cisco.com>
(cherry picked from commit ad090d357d4545947a6a34a6c01f39c4f309e664)

9 years agoRpcContextImpl uses HashSet instead of ArrayList 17/20117/1
Martin Bobak [Tue, 12 May 2015 09:53:23 +0000 (11:53 +0200)]
RpcContextImpl uses HashSet instead of ArrayList

Change-Id: I78b5c4f02e1318e0562c8bd6595c63b21c39e3ea
Signed-off-by: Martin Bobak <mbobak@cisco.com>
(cherry picked from commit deba865e660aab31820f51df6cc9d7c53d36d7d7)

9 years agochanged log level to debug 16/20116/1
Martin Bobak [Tue, 12 May 2015 09:52:36 +0000 (11:52 +0200)]
changed log level to debug

Change-Id: I1820ebd13c9166d198a87e5f1f8d3b4e64891008
Signed-off-by: Martin Bobak <mbobak@cisco.com>
(cherry picked from commit 53121333e59c9096b9647bb46303d1cf22be2019)

9 years agoBUG 2429 - not releasing dead connection threads 15/20115/1
Jozef Gloncak [Tue, 12 May 2015 09:19:31 +0000 (11:19 +0200)]
BUG 2429 - not releasing dead connection threads

Implementation of fix for this bug was added also to
Lithium codebase.

Change-Id: Id807d54b0f7f0eec0e83f078579f893f818fe0e1
Signed-off-by: Jozef Gloncak <jgloncak@cisco.com>
(cherry picked from commit 1510a4b08068939f3fb3342c5d47d5b42a629f6f)

9 years agoMerge "Adding required capabilities for LLDP Speaker."
michal rehak [Tue, 12 May 2015 07:35:38 +0000 (07:35 +0000)]
Merge "Adding required capabilities for LLDP Speaker."

9 years agoAdding required capabilities for LLDP Speaker. 05/20005/2
Jozef Gloncak [Mon, 11 May 2015 09:33:06 +0000 (11:33 +0200)]
Adding required capabilities for LLDP Speaker.

Adding required capabilities tags to xml of LLDP Speaker
for config subsystem.

Change-Id: Ie5a713ab5845651fd16c0897adfecadab6e0d106
Signed-off-by: Jozef Gloncak <jgloncak@cisco.com>
9 years agoAdding required capabilities for FRM. 01/20001/3
Jozef Gloncak [Mon, 11 May 2015 08:37:44 +0000 (10:37 +0200)]
Adding required capabilities for FRM.

Adding required capabilities tags to xml of FRM for config subsystem.

Change-Id: I77a35265c4529ce289c6a76fdc64ac7d2f676c66
Signed-off-by: Jozef Gloncak <jgloncak@cisco.com>
9 years agobinding thread pools in drop test to target node 43/20043/1
Martin Bobak [Mon, 11 May 2015 15:42:23 +0000 (17:42 +0200)]
binding thread pools in drop test to target node

Change-Id: I593fb2d9dee8d991522d7538a8144b6c74c4417a
Signed-off-by: Martin Bobak <mbobak@cisco.com>