Robert Varga [Mon, 25 May 2015 07:56:31 +0000 (09:56 +0200)]
Add a generic type argument
OutboundQueueHandlerRegistration is generic, silence an eclipse
warning.
Change-Id: I7896b424534e8acff20be24b50dd2e2567ace9c1
Signed-off-by: Robert Varga <rovarga@cisco.com>
michal rehak [Mon, 25 May 2015 09:22:41 +0000 (09:22 +0000)]
Merge "Bug-3085:StatisticsManager drops nodeadded operations when exceptions occur"
Vaclav Demcak [Mon, 25 May 2015 08:56:54 +0000 (10:56 +0200)]
Bug-3085:StatisticsManager drops nodeadded operations when exceptions occur
Currently nodeAdded and all stat notifications are fed to a queue as datastore operations and submitted in batches of 100.
If one of the tx chain submit fails the node added operation also gets discarded, along with the rest.
Queuing node added operations along with rest of the stat notifications causes stats for the new nodes to get collected quite late, as the number of devices increase.
Also when a node gets removed, the datastore operations that are queued for the removed node get submitted which might clash with the inventory-manager’s transaction.
So this patch ignores operations queued up for removed node.
Also it ignores for the stale stat notification operations which are collected for a node which got reconnected. This is done by marking the stat operations via UUIDs, created during node-added.
path6: rebase and fix conflicts
Change-Id: I5564627857c1834658ca0a0f2d530e129b7db953
Signed-off-by: Vaclav Demcak <vdemcak@cisco.com>
Robert Varga [Fri, 22 May 2015 14:18:06 +0000 (16:18 +0200)]
simplify MultiMsgCollector
Collection task is bound to a particular request, hence we do not need
to perform lookups and can easily simplify the code.
Change-Id: I4ce59348da13f15c9e537dd4c57e65dcb85e2ad9
Signed-off-by: Vaclav Demcak <vdemcak@cisco.com>
Signed-off-by: Robert Varga <rovarga@cisco.com>
Tony Tkacik [Fri, 22 May 2015 13:58:02 +0000 (15:58 +0200)]
Fixed Ipv6 usage in unit tests to use valid addresses / prefixes.
Change-Id: I4291b9759079184548586e6ad0ddf8728ab43db2
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
Anton Ivanov [Tue, 19 May 2015 08:43:37 +0000 (08:43 +0000)]
BUG-3051 IpAdderess != IpPrefix
1. Unify some (not all) utility classes. There were up to 3 classes serving the same function in different
plugin parts
2. Provide utility classes for prefix creation in a single place (if yangtools grow up to provide binary/accel
interfaces this will allow to leverage them quickly).
3. Fix testcases
TODO:
1. Additional test coverage. Most v6 testcases were broken across the board. This does a "quick fix" on them, additional
test coverage is neded
2. Further cleanup and unification. There are still utility classes lurking around which do dupplicate functions as well
as inline
3. Cleanup and improve interfaces
NOT ADDRESSED:
1. This does not address the can of worms created by trying to use buggy and incorrect representations (because of 2825)
in the new Lithium Hashing code. It only provides some of the means to make it work correctly
2. In the absense of 2825 and with a buggy and broken (relative to the RFC it should comply to model/core) the plugin
should have a "ignore/warn/refuse" toggle northbound with regards to non-canonical IpAddresses and Prefixes passed by
other applications. Once again - this should be taken care of the controller core, but as that is not taking care of it
the plugin will have to - otherwise there will be hash mismatches and mismatches in opstate/confstate.
Signed-off-by: Anton Ivanov <aivanov@brocade.com>
Martin Bobak [Fri, 22 May 2015 11:46:20 +0000 (13:46 +0200)]
FlowHash renamed to FlowRegistryKey
This object serves as key to local flow registry and is not a hash in
the strict sense. Therefore it is renamed and will be changed in next
commits to avoid flow hash computation using HashUtils.
Change-Id: Ife23394cfe2c28149932ccdfe7c7e441466d5d59
Signed-off-by: Martin Bobak <mbobak@cisco.com>
Martin Bobak [Fri, 22 May 2015 11:34:47 +0000 (13:34 +0200)]
some drop tests statistics were not cleaned on clearstats command
Change-Id: I58f7831f7d6f90dcc5a04d948f80bae152d7e2a1
Signed-off-by: Martin Bobak <mbobak@cisco.com>
Martin Bobak [Fri, 22 May 2015 10:06:02 +0000 (12:06 +0200)]
DeviceDataException erradicated
OFJ's DeviceRequestFailedException is used instead of ofp own exception
that just wrapped exception from OFJ.
Change-Id: I53f118782ed677a82958a6ad42dedf37b6aee109
Signed-off-by: Martin Bobak <mbobak@cisco.com>
Martin Bobak [Thu, 21 May 2015 15:32:27 +0000 (17:32 +0200)]
registration of outbound queue handler simplified
Change-Id: Idfd809354c9f9cd6455662b6ea4de7b5ea449439
Signed-off-by: Martin Bobak <mbobak@cisco.com>
Martin Bobak [Thu, 21 May 2015 13:30:26 +0000 (15:30 +0200)]
Limit drop-test queue limit
- limited to 10k
- blocking behavior
- internal statistics cleaned
Change-Id: I02590b194f5e9dafc9b8a5503e369b33ffd86ac2
Signed-off-by: Michal Rehak <mirehak@cisco.com>
Signed-off-by: Martin Bobak <mbobak@cisco.com>
Martin Bobak [Thu, 21 May 2015 14:25:47 +0000 (16:25 +0200)]
added missing information in droptest stats output
Change-Id: I68340ea8144bb9c0f5fea28dbc3f258e64e39e28
Signed-off-by: Martin Bobak <mbobak@cisco.com>
michal rehak [Thu, 21 May 2015 16:03:50 +0000 (16:03 +0000)]
Merge "openflow plugin internal statistics available trough karaf commands"
michal rehak [Thu, 21 May 2015 15:58:33 +0000 (15:58 +0000)]
Merge "more logging in drop test added"
michal rehak [Thu, 21 May 2015 15:34:36 +0000 (15:34 +0000)]
Merge "Returning of future from request context - SalMeterService."
michal rehak [Thu, 21 May 2015 15:34:17 +0000 (15:34 +0000)]
Merge "Returning of future from request context - SalGroupService."
Martin Bobak [Thu, 21 May 2015 13:42:18 +0000 (15:42 +0200)]
openflow plugin internal statistics available trough karaf commands
Change-Id: I8d5b6ce4dd897a1f1af9d223a977641e0353eecd
Signed-off-by: Martin Bobak <mbobak@cisco.com>
Martin Bobak [Thu, 21 May 2015 12:58:01 +0000 (14:58 +0200)]
more logging in drop test added
Change-Id: Idce5769c4440e1192ebbd355d0ec154aa36e9a5a
Signed-off-by: Martin Bobak <mbobak@cisco.com>
Jozef Gloncak [Wed, 20 May 2015 13:14:39 +0000 (15:14 +0200)]
Returning of future from request context - SalGroupService.
Change-Id: I510ee97435596ee6940afad630362727e6311a47
Signed-off-by: Jozef Gloncak <jgloncak@cisco.com>
Jozef Gloncak [Wed, 20 May 2015 13:08:51 +0000 (15:08 +0200)]
Returning of future from request context - SalMeterService.
Change-Id: I7815d6eed2979833380e1d7fd41b1819d0a2cc73
Signed-off-by: Jozef Gloncak <jgloncak@cisco.com>
Jozef Gloncak [Wed, 20 May 2015 12:58:51 +0000 (14:58 +0200)]
Returning of future from request context - SalPortService.
Change-Id: I8e0060d74ef49984a2798efd9eae15a639c99e96
Signed-off-by: Jozef Gloncak <jgloncak@cisco.com>
Martin Bobak [Thu, 21 May 2015 09:23:07 +0000 (11:23 +0200)]
Fixed result processing in several services.
- statistics gathering service doesn't set result to req. context
on future's success that's multi message collector's job
- SalTableService doesn't use settable future instead of request
context's future
- added missing statistics counter to salFlowService
Change-Id: If2107099602abb935f91c5f65bd84e079316798a
Signed-off-by: Martin Bobak <mbobak@cisco.com>
Martin Bobak [Wed, 20 May 2015 18:33:10 +0000 (20:33 +0200)]
added statistics counters for drop test future's result
Change-Id: I471d4d6c6cae53995c84af2ebafb0726a39b66d2
Signed-off-by: Martin Bobak <mbobak@cisco.com>
Martin Bobak [Wed, 20 May 2015 16:28:21 +0000 (18:28 +0200)]
PacketProcessingService uses future from requestContext
Change-Id: I0a04f8f19042073ab60d3cb4bce4f16f0f0d673a
Signed-off-by: Martin Bobak <mbobak@cisco.com>
Martin Bobak [Wed, 20 May 2015 16:25:03 +0000 (18:25 +0200)]
SGService uses future from requestContext
Change-Id: I6afa88210e0bb40c96ac6e2bf764eba1ce83cdf4
Signed-off-by: Martin Bobak <mbobak@cisco.com>
Martin Bobak [Wed, 20 May 2015 15:56:23 +0000 (17:56 +0200)]
device context holds OQHandler registration
Handler registration is closed when device context is closed.
Change-Id: Ib4a58c943789c5505542858767e5b6311bea3f3b
Signed-off-by: Martin Bobak <mbobak@cisco.com>
michal rehak [Thu, 21 May 2015 10:30:19 +0000 (10:30 +0000)]
Merge "Do not register OpenflowProtocolListenerFullImpl in constructor"
michal rehak [Thu, 21 May 2015 10:12:55 +0000 (10:12 +0000)]
Merge "Returning of future from request context - FlowCapableTransactionService."
michal rehak [Thu, 21 May 2015 10:12:42 +0000 (10:12 +0000)]
Merge "Returning of future from request context - SalEchoService."
michal rehak [Thu, 21 May 2015 10:12:28 +0000 (10:12 +0000)]
Merge "Returning of future from request context - NodeConfigService."
michal rehak [Thu, 21 May 2015 10:10:32 +0000 (10:10 +0000)]
Merge "Returning of future from request context - PacketProcessingService."
michal rehak [Thu, 21 May 2015 10:09:55 +0000 (10:09 +0000)]
Merge "Rework of handleServiceCall method"
Robert Varga [Wed, 20 May 2015 14:53:37 +0000 (16:53 +0200)]
Do not register OpenflowProtocolListenerFullImpl in constructor
This is hard to read, as the caller of the constructor does not see the
leaked reference. Move registration out.
Change-Id: I01cb6419ec9f42af5cb4959411fc52281a0d9fdb
Signed-off-by: Robert Varga <rovarga@cisco.com>
Robert Varga [Wed, 20 May 2015 21:05:05 +0000 (23:05 +0200)]
Remove a potential NPE
If the packet is null, it will throw NPE, fix that.
Change-Id: I513161e0ebe996c1dfa7ce405c303b1d0f7e3bf4
Signed-off-by: Robert Varga <rovarga@cisco.com>
Robert Varga [Wed, 20 May 2015 14:56:44 +0000 (16:56 +0200)]
Fix generic warnings
RequesstContext is generic, hence eclipse gives warnings.
Change-Id: I5e831565e0861d8444025072a82fd1f4828c03e9
Signed-off-by: Robert Varga <rovarga@cisco.com>
Jozef Gloncak [Wed, 20 May 2015 13:35:04 +0000 (15:35 +0200)]
Returning of future from request context - FlowCapableTransactionService.
Change-Id: Ie0d56eea35035378e96cc61c620de46f2e14fc4f
Signed-off-by: Jozef Gloncak <jgloncak@cisco.com>
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>
Jozef Gloncak [Wed, 20 May 2015 13:23:13 +0000 (15:23 +0200)]
Returning of future from request context - SalEchoService.
Change-Id: I1096e5e605deddb0e8c1caf2f8407239a9c5cc34
Signed-off-by: Jozef Gloncak <jgloncak@cisco.com>
Jozef Gloncak [Wed, 20 May 2015 13:31:53 +0000 (15:31 +0200)]
Returning of future from request context - PacketProcessingService.
Change-Id: I3404fb48b937c948f6ae1bd152f50a9e69cba721
Signed-off-by: Jozef Gloncak <jgloncak@cisco.com>
Robert Varga [Wed, 20 May 2015 14:37:38 +0000 (16:37 +0200)]
Remove unused variable
This variable is not used anywhere, remove it.
Change-Id: Iec929c0b8f0029f79974f07f7720d95ff57d8ea8
Signed-off-by: Robert Varga <rovarga@cisco.com>
Robert Varga [Wed, 20 May 2015 14:33:55 +0000 (16:33 +0200)]
Make methods static
The two methods can be made static, so do that to increase clarity.
Change-Id: I2063a28db722d11ab83c7bf4361c61d7a43360f5
Signed-off-by: Robert Varga <rovarga@cisco.com>
Robert Varga [Wed, 20 May 2015 14:30:24 +0000 (16:30 +0200)]
Move invariants out of the loop
Instead of performing lookup inside the loop, cache the results.
Change-Id: I88f735ff4589a853a12250692f48090379311f85
Signed-off-by: Robert Varga <rovarga@cisco.com>
Martin Bobak [Tue, 19 May 2015 12:03:47 +0000 (14:03 +0200)]
Rework of handleServiceCall method
Second type parameter of method was removed.
Change-Id: I447fae85a8e2142a0c755d67f838f0c7326a1bd9
Signed-off-by: Jozef Gloncak <jgloncak@cisco.com>
Signed-off-by: Martin Bobak <mbobak@cisco.com>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
michal rehak [Tue, 19 May 2015 11:57:19 +0000 (11:57 +0000)]
Merge "flow descriptors should be always stored when addFlow is called"
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"
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>
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>
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>
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>
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>
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>
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>
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>
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>
michal rehak [Mon, 18 May 2015 13:59:40 +0000 (13:59 +0000)]
Merge "RequestContext's are not held by DeviceContext anymore"
michal rehak [Mon, 18 May 2015 13:48:53 +0000 (13:48 +0000)]
Merge "fix callback handling"
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
michal rehak [Fri, 15 May 2015 20:07:44 +0000 (20:07 +0000)]
Merge "Speed FlowUtil up a bit"
michal rehak [Fri, 15 May 2015 20:05:25 +0000 (20:05 +0000)]
Merge "Explicitly deal with rejected offer operation"
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>
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>
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>
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>
michal rehak [Fri, 15 May 2015 18:33:39 +0000 (18:33 +0000)]
Merge "Do not use InstanceIdentifier.builder()"
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>