openflowplugin.git
9 years agoBUG 2723 - Topology spoofing via LLDP - hash check in topology-discovery 97/16697/6
Jozef Gloncak [Tue, 17 Mar 2015 13:35:57 +0000 (14:35 +0100)]
BUG 2723 - Topology spoofing via LLDP - hash check in topology-discovery

Checking of CustomSec (TLV field in LLDP packet). Value of CustomSec from LLDP
packet has to be equal to hash value which is computed in
topology-lldp-discovery artifact. Hash value is obtained as MD5 value
calculated from concatenation of strings:
 - node connector ID
 - pseudo PID of running JAVA karaf

Method getValueForLLDPPacketIntegrityEnsuring() prepare array of bytes which
will be after hashing used to check integrity of LLDP packets. Ensuring that
LLDP packet wasn't modified. (extra authenticator; CVE-2015-1611 CVE-2015-1612)

Change-Id: Ic8f50c88e7d8e3722d8d83a01ffa94a96bde313f
Signed-off-by: Jozef Gloncak <jgloncak@cisco.com>
(cherry picked from commit 67eed66d24b20d03645140d40b44d16ce53e1210)

9 years agoVersion bump for master after cutting of stable/lithium branch 16/20316/2
Ed Warnicke [Thu, 14 May 2015 01:32:15 +0000 (18:32 -0700)]
Version bump for master after cutting of stable/lithium branch

Change-Id: Id6e3567a6e2e19174881d8090ee60ae7130f99a9
Signed-off-by: Ed Warnicke <hagbard@gmail.com>
9 years agoMerge "Speed up packetin throttling"
michal rehak [Tue, 26 May 2015 19:47:00 +0000 (19:47 +0000)]
Merge "Speed up packetin throttling"

9 years agoMerge "Bug 3328: Set icmpv4-match into OF10 match."
michal rehak [Tue, 26 May 2015 19:13:20 +0000 (19:13 +0000)]
Merge "Bug 3328: Set icmpv4-match into OF10 match."

9 years agoSpeed up packetin throttling 78/20978/14
Robert Varga [Fri, 22 May 2015 11:17:51 +0000 (13:17 +0200)]
Speed up packetin throttling

Perform an atomic operation instead of taking a lock in the fast path.

Change-Id: If204594f375aa2f9f7295cc5321236756f01c258
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoMerge "Clean TransactionChainManager"
michal rehak [Tue, 26 May 2015 15:43:15 +0000 (15:43 +0000)]
Merge "Clean TransactionChainManager"

9 years agoMerge "Change StatisticsContext"
michal rehak [Tue, 26 May 2015 14:49:02 +0000 (14:49 +0000)]
Merge "Change StatisticsContext"

9 years agoClean TransactionChainManager 04/20904/8
Vaclav Demcak [Thu, 21 May 2015 14:26:09 +0000 (16:26 +0200)]
Clean TransactionChainManager

Note: We don't need to check time or nr. of operations for
WriteTransaction. We would like to submit all collected stats
to DataStore ASAP.

* remove timer from TransactionChainManager
* remove calc nr. of operations
* add visible submitTransaction method

TODO: fix commeted-out tests

Change-Id: I88558a903c22ea804c7020a922320a947b865980
Signed-off-by: Vaclav Demcak <vdemcak@cisco.com>
9 years agoschedule next poll only after previous is done 20/21120/2
Martin Bobak [Tue, 26 May 2015 11:22:53 +0000 (13:22 +0200)]
schedule next poll only after previous is done

Statistics will be gathered only after previous run was completed.

Change-Id: I3316a3ac541d53a268829de99b4d6a2116405a17
Signed-off-by: Martin Bobak <mbobak@cisco.com>
9 years agoMerge "Statistics polling is scheduled per one device"
michal rehak [Tue, 26 May 2015 13:16:53 +0000 (13:16 +0000)]
Merge "Statistics polling is scheduled per one device"

9 years agoMerge "Un-obfuscate srcVlanMatch"
michal rehak [Tue, 26 May 2015 12:58:03 +0000 (12:58 +0000)]
Merge "Un-obfuscate srcVlanMatch"

9 years agoMerge "Use an ImmutableMaps for constant lookups"
michal rehak [Tue, 26 May 2015 12:56:55 +0000 (12:56 +0000)]
Merge "Use an ImmutableMaps for constant lookups"

9 years agoMerge "Fix TableFeaturesConvertor table"
michal rehak [Tue, 26 May 2015 12:53:47 +0000 (12:53 +0000)]
Merge "Fix TableFeaturesConvertor table"

9 years agoMerge "Use constants for Ordering objects"
michal rehak [Tue, 26 May 2015 12:52:48 +0000 (12:52 +0000)]
Merge "Use constants for Ordering objects"

9 years agoMerge "Make OrderComparator.build() use generic arguments"
michal rehak [Tue, 26 May 2015 12:52:06 +0000 (12:52 +0000)]
Merge "Make OrderComparator.build() use generic arguments"

9 years agoMerge "Add VLAN match constants"
michal rehak [Tue, 26 May 2015 12:50:46 +0000 (12:50 +0000)]
Merge "Add VLAN match constants"

9 years agoMerge "Optimize FlowConvertor"
michal rehak [Tue, 26 May 2015 12:47:06 +0000 (12:47 +0000)]
Merge "Optimize FlowConvertor"

9 years agoMerge "Make MatchReactor a proper constant"
michal rehak [Tue, 26 May 2015 12:45:28 +0000 (12:45 +0000)]
Merge "Make MatchReactor a proper constant"

9 years agoMerge "Simplify CommonService interface"
michal rehak [Tue, 26 May 2015 12:44:59 +0000 (12:44 +0000)]
Merge "Simplify CommonService interface"

9 years agoMerge "HashUtil erradicated"
michal rehak [Tue, 26 May 2015 11:24:14 +0000 (11:24 +0000)]
Merge "HashUtil erradicated"

9 years agoStatistics polling is scheduled per one device 19/21119/1
Martin Bobak [Tue, 26 May 2015 10:52:29 +0000 (12:52 +0200)]
Statistics polling is scheduled per one device

Change-Id: Ic28ea509445ab6f557438337be2a5db9650efd03
Signed-off-by: Martin Bobak <mbobak@cisco.com>
9 years agoHashUtil erradicated 97/21097/1
Martin Bobak [Tue, 26 May 2015 09:16:15 +0000 (11:16 +0200)]
HashUtil erradicated

Hashing flow values for its future identification is not done anymore. We
use repective object's haschode and equals methods.

Change-Id: Id977b85df565869e13ed902230a20e742945a261
Signed-off-by: Martin Bobak <mbobak@cisco.com>
9 years agoUn-obfuscate srcVlanMatch 82/21082/3
Robert Varga [Tue, 26 May 2015 01:07:58 +0000 (03:07 +0200)]
Un-obfuscate srcVlanMatch

Eclipse complains about the possibility of a null-derefence. While it is
not possible, rewrite the code to make that obvious. Also move to
MoreObjects to remove deprecation warning.

Change-Id: I039fb0d3aaefc9fce69252d880dbad4459437e7c
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoUse an ImmutableMaps for constant lookups 81/21081/4
Robert Varga [Tue, 26 May 2015 00:30:39 +0000 (02:30 +0200)]
Use an ImmutableMaps for constant lookups

The lookup maps are meant to be immutable, make sure that is the case.

Change-Id: Ia706459fad8e068de55617e51b5a357f2f1b2353
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoFix TableFeaturesConvertor table 83/21083/2
Robert Varga [Tue, 26 May 2015 01:17:36 +0000 (03:17 +0200)]
Fix TableFeaturesConvertor table

This mapping problem has gone unnoticed until conversion to ImmuableMap.
Fix it here so it can be cherry-picked.

Change-Id: I41df518816e854c200ee05005e6ab0c591ef002c
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoUse constants for Ordering objects 80/21080/1
Robert Varga [Tue, 26 May 2015 00:23:51 +0000 (02:23 +0200)]
Use constants for Ordering objects

These objects are used heavily, make sure we share instances.

Change-Id: I81fd8cac22d5f32643e58199ede545b909934100
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoMake OrderComparator.build() use generic arguments 79/21079/1
Robert Varga [Tue, 26 May 2015 00:14:25 +0000 (02:14 +0200)]
Make OrderComparator.build() use generic arguments

This is a simple trick, but fixes a few warnings in users.

Change-Id: Iba6b022c39c756f335e88849baefbaaf9e12a2bc
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoAdd VLAN match constants 78/21078/1
Robert Varga [Tue, 26 May 2015 00:08:06 +0000 (02:08 +0200)]
Add VLAN match constants

These matchers are used very frequently, add them as constants and
reuse.

Change-Id: Ieeab6388fbb58d9439f284acce950e9e122d219f
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoOptimize FlowConvertor 77/21077/1
Robert Varga [Mon, 25 May 2015 23:47:20 +0000 (01:47 +0200)]
Optimize FlowConvertor

Do not copy collections needlessly in toFlowModInputs(). Also bail from
isSetVlanIdActionCasePresent() as soon as we find a match. In
handleSetVlanIdForOF13() we know we are returning at most two elements,
so allocate the array accordingly.

Change-Id: I121893068827fe9f3d7bfc156d5fd334d2550c80
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoMake MatchReactor a proper constant 76/21076/1
Robert Varga [Mon, 25 May 2015 23:43:27 +0000 (01:43 +0200)]
Make MatchReactor a proper constant

Singleton instance was not constant, fix that.

Change-Id: I65a4943481c68428e963846516e0324b17706e00
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoSimplify CommonService interface 69/21069/4
Robert Varga [Mon, 25 May 2015 18:07:46 +0000 (20:07 +0200)]
Simplify CommonService interface

Introduce utility RequestCallback classes, which encapsulate common
FutureCallbackFunctionality.

Instead of transforming functions, introduce sendRequest() abstract
method. This method is invoked once the request has been allocated and
it is responsible for building the request payload and calling
commitRequest() with the payload and appropriate callback.

Also introduce AbstractVoidService, which maps responses to Void and
ensures the slot is always committed. It also enqueues a
VoidFutureCallback to complete the request.

AbstractSimpleService handles remapping of result to the appropriate
class, if it is present.

AbstractMultipartService handles gathering of multipart requests.

Change-Id: I047ff873f09a5dd7e95d8dc101429f7c3ee248a1
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoMake sure RpcResultBuilder is local 66/21066/4
Robert Varga [Mon, 25 May 2015 14:33:36 +0000 (16:33 +0200)]
Make sure RpcResultBuilder is local

There is no need for it to be a field.

Change-Id: Ia046491699f8c9af8b9b1a3e5e45734567d55d67
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoRpcManagerImpl should take an integer 67/21067/4
Robert Varga [Mon, 25 May 2015 14:34:18 +0000 (16:34 +0200)]
RpcManagerImpl should take an integer

A long is not really appropriate, cap it to an integer.

Change-Id: Ie0a4e3819904e8e4aad16a37b2fddbecf3fd1248
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoMerge "HashUtils are not used anymore"
michal rehak [Mon, 25 May 2015 15:27:32 +0000 (15:27 +0000)]
Merge "HashUtils are not used anymore"

9 years agoMerge "code cleanup : removed unused parts of code"
michal rehak [Mon, 25 May 2015 15:23:56 +0000 (15:23 +0000)]
Merge "code cleanup : removed unused parts of code"

9 years agoChange StatisticsContext 47/21047/2
Vaclav Demcak [Mon, 25 May 2015 11:58:54 +0000 (13:58 +0200)]
Change StatisticsContext

Note: Running all stats for all device statistics in one time is
realy not good idea. So we'd like to bring a possibility for
scalable statistics aproach.

* implement getherDinamicData with MultipartType as input

TODO in future commits:
* modify StatisticManagerImpl.pollStatistcs for one statType for all devices
* add separate statChain for new Devices stat collecting (one stat in one time)
* scale flowStats for table

Change-Id: I3d1a29ba94ddbb81ce9ee98eb9fdcfe97149a278
Signed-off-by: Vaclav Demcak <vdemcak@cisco.com>
9 years agoMerge "Fix stats for extension actions"
michal rehak [Mon, 25 May 2015 15:03:21 +0000 (15:03 +0000)]
Merge "Fix stats for extension actions"

9 years agoHashUtils are not used anymore 53/21053/1
Martin Bobak [Mon, 25 May 2015 10:02:55 +0000 (12:02 +0200)]
HashUtils are not used anymore

We will be using Match object when calculating identifier for flow in local flow registry.
This identifier will be normalized as soon as normalization will be introduced. That
will result into device flow registry holding normalized flow keys.

Change-Id: Ieeaf1b573a34fd94c8cd2d7e932d4db8fb5ca83e
Signed-off-by: Martin Bobak <mbobak@cisco.com>
9 years agocode cleanup : removed unused parts of code 41/21041/3
Martin Bobak [Fri, 22 May 2015 14:16:00 +0000 (16:16 +0200)]
code cleanup : removed unused parts of code

Change-Id: I3b7034a579fb83edcc5a07de72f02b3e0c51692d
Signed-off-by: Martin Bobak <mbobak@cisco.com>
9 years agoRemoved unwanted preconditions check 50/21050/1
Martin Bobak [Mon, 25 May 2015 13:25:40 +0000 (15:25 +0200)]
Removed unwanted preconditions check

Change-Id: I426dc98a88e34fe28041bffdca103139d7b99658
Signed-off-by: Martin Bobak <mbobak@cisco.com>
9 years agoAdd a generic type argument 38/21038/3
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>
9 years agoFix stats for extension actions 75/19475/2
Ed Warnicke [Sat, 2 May 2015 06:00:00 +0000 (23:00 -0700)]
Fix stats for extension actions

Extension actions were not showing up in OPER.
This fixes that.

Change-Id: I484b9bb477296e9a7f74a04d4d4d01401d8e486b
Signed-off-by: Ed Warnicke <hagbard@gmail.com>
9 years agoMerge "Bug-3085:StatisticsManager drops nodeadded operations when exceptions occur"
michal rehak [Mon, 25 May 2015 09:22:41 +0000 (09:22 +0000)]
Merge "Bug-3085:StatisticsManager drops nodeadded operations when exceptions occur"

9 years agoBug-3085:StatisticsManager drops nodeadded operations when exceptions occur 60/19360/6
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>
9 years agosimplify MultiMsgCollector 60/20860/12
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>
9 years agoFixed Ipv6 usage in unit tests to use valid addresses / prefixes. 85/20985/2
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>
9 years agoBUG-3051 IpAdderess != IpPrefix 04/20704/4
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>
9 years agoFlowHash renamed to FlowRegistryKey 81/20981/1
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>
9 years agosome drop tests statistics were not cleaned on clearstats command 76/20976/2
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>
9 years agoDeviceDataException erradicated 48/20948/2
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>
9 years agoregistration of outbound queue handler simplified 44/20944/1
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>
9 years agoLimit drop-test queue limit 03/20903/3
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>
9 years agoBug 3328: Set icmpv4-match into OF10 match. 12/20912/1
Shigeru Yasuda [Thu, 21 May 2015 17:20:13 +0000 (02:20 +0900)]
Bug 3328: Set icmpv4-match into OF10 match.

Change-Id: Id636a75ebff08fd3899081d3f1efe98dacb15970
Signed-off-by: Shigeru Yasuda <s-yasuda@da.jp.nec.com>
9 years agoadded missing information in droptest stats output 00/20900/4
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>
9 years agoMerge "openflow plugin internal statistics available trough karaf commands"
michal rehak [Thu, 21 May 2015 16:03:50 +0000 (16:03 +0000)]
Merge "openflow plugin internal statistics available trough karaf commands"

9 years agoMerge "more logging in drop test added"
michal rehak [Thu, 21 May 2015 15:58:33 +0000 (15:58 +0000)]
Merge "more logging in drop test added"

9 years agoMerge "Returning of future from request context - SalMeterService."
michal rehak [Thu, 21 May 2015 15:34:36 +0000 (15:34 +0000)]
Merge "Returning of future from request context - SalMeterService."

9 years agoMerge "Returning of future from request context - SalGroupService."
michal rehak [Thu, 21 May 2015 15:34:17 +0000 (15:34 +0000)]
Merge "Returning of future from request context - SalGroupService."

9 years agoopenflow plugin internal statistics available trough karaf commands 98/20898/2
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>
9 years agomore logging in drop test added 97/20897/2
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>
9 years agoReturning of future from request context - SalGroupService. 10/20810/4
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>
9 years agoReturning of future from request context - SalMeterService. 09/20809/5
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>
9 years agoReturning of future from request context - SalPortService. 08/20808/3
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>
9 years agoFixed result processing in several services. 80/20880/2
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>
9 years agoadded statistics counters for drop test future's result 76/20876/3
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>
9 years agoPacketProcessingService uses future from requestContext 39/20839/3
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>
9 years agoSGService uses future from requestContext 38/20838/3
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>
9 years agodevice context holds OQHandler registration 37/20837/3
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>
9 years agoMerge "Do not register OpenflowProtocolListenerFullImpl in constructor"
michal rehak [Thu, 21 May 2015 10:30:19 +0000 (10:30 +0000)]
Merge "Do not register OpenflowProtocolListenerFullImpl in constructor"

9 years agoMerge "Returning of future from request context - FlowCapableTransactionService."
michal rehak [Thu, 21 May 2015 10:12:55 +0000 (10:12 +0000)]
Merge "Returning of future from request context - FlowCapableTransactionService."

9 years agoMerge "Returning of future from request context - SalEchoService."
michal rehak [Thu, 21 May 2015 10:12:42 +0000 (10:12 +0000)]
Merge "Returning of future from request context - SalEchoService."

9 years agoMerge "Returning of future from request context - NodeConfigService."
michal rehak [Thu, 21 May 2015 10:12:28 +0000 (10:12 +0000)]
Merge "Returning of future from request context - NodeConfigService."

9 years agoMerge "Returning of future from request context - PacketProcessingService."
michal rehak [Thu, 21 May 2015 10:10:32 +0000 (10:10 +0000)]
Merge "Returning of future from request context - PacketProcessingService."

9 years agoMerge "Rework of handleServiceCall method"
michal rehak [Thu, 21 May 2015 10:09:55 +0000 (10:09 +0000)]
Merge "Rework of handleServiceCall method"

9 years agoDo not register OpenflowProtocolListenerFullImpl in constructor 26/20826/3
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>
9 years agoRemove a potential NPE 59/20859/2
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>
9 years agoFix generic warnings 27/20827/4
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>
9 years agoReturning of future from request context - FlowCapableTransactionService. 15/20815/2
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>
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 agoReturning of future from request context - SalEchoService. 11/20811/2
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>
9 years agoReturning of future from request context - PacketProcessingService. 14/20814/2
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>
9 years agoRemove unused variable 23/20823/1
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>
9 years agoMake methods static 22/20822/1
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>
9 years agoMove invariants out of the loop 21/20821/1
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>
9 years agoRework of handleServiceCall method 28/20728/8
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>
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>