openflowplugin.git
9 years agoBug 2862 - flow ID is unknown value in operational store. (e.g. id: #UF*200-3) 81/21981/2
Anil Vishnoi [Fri, 5 Jun 2015 13:08:48 +0000 (18:38 +0530)]
Bug 2862 - flow ID is unknown value in operational store. (e.g. id: #UF*200-3)

Fix for old Helium code base.
This issue only occurs when user don't set cookie value while installing the flow
and that's valid flow.

Cookie is used in flow comparison for the applications using match extensions
in their flow body. As of now openflowplugin don't use match extensions
in flow comparison, that can create a scenario where more then one stored flow
can match to any stats flow, if stored flows differ only by match extension.
Once match extensions are part of flow comparison, we should remove cookie
from flow comparison.

Cookie is an optional field, so user might not set it, but if switch
get flow without cookie value , it will use 0 as a default cookie value
and return cookie=0 when openflowplugin fetch the flow stats from switch.
In this scenario flow comparison will fail. This fix make sure that
if user didn't set cookie value while flow installation, skip the cookie
comparison while augmenting flow stats.

Signed-off-by: Anil Vishnoi <vishnoianil@gmail.com>
9 years agoBUG-3592: topology not starting (Li) 41/21941/1
Michal Rehak [Fri, 5 Jun 2015 10:49:46 +0000 (12:49 +0200)]
BUG-3592: topology not starting (Li)

 - added config subsystem files to Li features

Change-Id: Ibcdfa83ab47777a6b3d739b024a1453d17b48791
Signed-off-by: Michal Rehak <mirehak@cisco.com>
9 years agoMerge "Bug:3048-Handle duplicate nodeRemoved and nodeConnectorUpdated notifications...
michal rehak [Fri, 5 Jun 2015 10:56:01 +0000 (10:56 +0000)]
Merge "Bug:3048-Handle duplicate nodeRemoved and nodeConnectorUpdated notifications to prevent tx failures" into stable/lithium

9 years agoBUG-3580: statistics teardown improvement 23/21923/1
Martin Bobak [Thu, 4 Jun 2015 14:03:34 +0000 (16:03 +0200)]
BUG-3580: statistics teardown improvement

 - statistics context cancels next scheduled statistics poll

Change-Id: I3a4c1fb63d32f8ecc660da38455284bb142a62c6
Signed-off-by: Martin Bobak <mbobak@cisco.com>
9 years agoBUG-3579: device disconnection cleanup 22/21922/2
Martin Bobak [Thu, 4 Jun 2015 07:19:33 +0000 (09:19 +0200)]
BUG-3579: device disconnection cleanup

 - connection + handshake revisited
 - device, rpc, statistics contexts/managers revisited
 - cleaned up logging
 - adapted tests
 - added propagating to connectionCtx close for timeout

Change-Id: I990012ecb34fd3a229c1988cbd1c2b71af6ec98e
Signed-off-by: Michal Rehak <mirehak@cisco.com>
Signed-off-by: Martin Bobak <mbobak@cisco.com>
9 years agoBug:3048-Handle duplicate nodeRemoved and nodeConnectorUpdated notifications to preve... 15/21915/1
Kamal Rameshan [Fri, 5 Jun 2015 00:36:02 +0000 (17:36 -0700)]
Bug:3048-Handle duplicate nodeRemoved and nodeConnectorUpdated notifications to prevent tx failures

NodeRemoved notifications are received twice by the InventoryManager, in quick successions
If the duplicate node removal operation is clubbed with other node-removal operations in transaction chain, it fails the whole tx chain even
though we retry one time.

This patch caches the deleted nodes in-order to ignore the duplicate notifications. The cache entries are expired after 10s, to reduce the memory consumption.

Signed-off-by: Kamal Rameshan <kramesha@cisco.com>
9 years agoBUG 2862 - alien flow ID when priority is missing. 51/21851/1
Jozef Gloncak [Thu, 4 Jun 2015 07:45:19 +0000 (09:45 +0200)]
BUG 2862 - alien flow ID when priority is missing.

Problem was:
- flow was sent to device
- attempt to write flow registry - fails (NPE) because missing priority
- flow was written to device
- statistics bring info about flow
- flow isn't found in flow registry therefore alien ID is generated for it.

Solution:
- sending of flow to device is executed only after storing flow to flow
registry. If it is unsuccessful then nothing is sent to device. Flow is thus
stored only in config DS.

Change-Id: I371d4030c41ac0866fb3615b8c2380aef5b283e2
Signed-off-by: Jozef Gloncak <jgloncak@cisco.com>
9 years agoBUG-2668: Handshake Exception 48/21648/2
Michal Rehak [Tue, 2 Jun 2015 09:01:47 +0000 (11:01 +0200)]
BUG-2668: Handshake Exception

 - fixing bunch of exception by checking connection state before
   processing fist hello message from device

Change-Id: I8fcf9e9eeeb163e4fee30e9dabef810aabf1bf67
Signed-off-by: Michal Rehak <mirehak@cisco.com>
9 years agoMerge "Bug 3564 - Li - ofp when transaction chain manager exists in WORKING state...
michal rehak [Wed, 3 Jun 2015 16:06:33 +0000 (16:06 +0000)]
Merge "Bug 3564 - Li - ofp when transaction chain manager exists in WORKING state, drop new connection" into stable/lithium

9 years agoMerge "Bug-3104: Bypassing MultimessageCollector" into stable/lithium
michal rehak [Wed, 3 Jun 2015 16:05:24 +0000 (16:05 +0000)]
Merge "Bug-3104: Bypassing MultimessageCollector" into stable/lithium

9 years agoMerge "Bug 2862 - alien flows after flow update." into stable/lithium
michal rehak [Wed, 3 Jun 2015 16:03:11 +0000 (16:03 +0000)]
Merge "Bug 2862 - alien flows after flow update." into stable/lithium

9 years agoBug 3564 - Li - ofp when transaction chain manager exists in WORKING state, drop... 85/21785/2
Martin Bobak [Wed, 3 Jun 2015 14:23:52 +0000 (16:23 +0200)]
Bug 3564 - Li - ofp when transaction chain manager exists in WORKING state, drop new connection

Change-Id: I75810f705774a75264558166bd7570eb9bae41e6
Signed-off-by: Martin Bobak <mbobak@cisco.com>
9 years agoBug-3104: Bypassing MultimessageCollector 56/21756/1
Martin Bobak [Tue, 2 Jun 2015 13:14:27 +0000 (15:14 +0200)]
Bug-3104: Bypassing MultimessageCollector

 - added service for on-the-fly processing (flow stats only)

Change-Id: I6308bc1b38009deb6187ac2ee57b94a9b3d29145
Signed-off-by: Martin Bobak <mbobak@cisco.com>
9 years agoBug 3557 - Li -ofp when device reconnects, it has to wait for previous transaction... 28/21728/3
Martin Bobak [Wed, 3 Jun 2015 06:52:49 +0000 (08:52 +0200)]
Bug 3557 - Li -ofp when device reconnects, it has to wait for previous transaction chain to complete

TransactionChain should be checked for its lifecycle status when device reconnects

Change-Id: I272da2eae4d81802c0dc3e70308989daa6dd8162
Signed-off-by: Martin Bobak <mbobak@cisco.com>
9 years agoBug 2862 - alien flows after flow update. 24/21624/6
Jozef Gloncak [Tue, 2 Jun 2015 08:10:31 +0000 (10:10 +0200)]
Bug 2862 - alien flows after flow update.

In Helium OF plugin is mapping of flow hashes to flow IDs stored
in operational DS. If flow data which are used for hash creating
(e. g. match) are changed then it isn't possible to find flow ID
in mapping stored in operational DS. Therefore deletion of hash
was added directly to update handling method - updateFlow.

Change-Id: If2f12d52d4bb8ca484ce31f1545f7493fe14364b
Signed-off-by: Jozef Gloncak <jgloncak@cisco.com>
9 years agoBug 3341: Fix feature pom dependency issue 06/21706/2
Ed Warnicke [Wed, 3 Jun 2015 01:31:01 +0000 (18:31 -0700)]
Bug 3341: Fix feature pom dependency issue

Change-Id: Ia9c3fecd2c5edcd080829bf5654c278c77c5bb0a
Signed-off-by: Ed Warnicke <hagbard@gmail.com>
9 years agoBug 3341: Partial fix, wires topology-manager 13/21513/4
Ed Warnicke [Sun, 31 May 2015 16:38:47 +0000 (09:38 -0700)]
Bug 3341: Partial fix, wires topology-manager

This patch is a partial fix to Bug 3341.
It wires topology-manager with the config subsystem,
and makes it require-capabilities the models it depends on.

Change-Id: I26baef419534f7d05d56350847d2248844f91a1d
Signed-off-by: Ed Warnicke <hagbard@gmail.com>
9 years agoBug 3341: Partial fix, wires topology-lldp-discovery 93/21493/4
Ed Warnicke [Sun, 31 May 2015 04:19:34 +0000 (21:19 -0700)]
Bug 3341: Partial fix, wires topology-lldp-discovery

This patch is a partial fix to Bug 3341.
It wires topology-lldp-discovery with the config subsystem,
and makes it require-capabilities the models it depends on.

Change-Id: I9a70ea5bda5b5720e86d4591f29737eaa4d7ea7a
Signed-off-by: Ed Warnicke <hagbard@gmail.com>
9 years agoBug 3341: Partial fix, wires inventory-manager 92/21492/4
Ed Warnicke [Sun, 31 May 2015 03:05:57 +0000 (20:05 -0700)]
Bug 3341: Partial fix, wires inventory-manager

This patch is a partial fix to Bug 3341.
It wires inventory-manager with the config subsystem,
and makes it require-capabilities the models it depends on.

Change-Id: Id0f2891b47e0290411a382eb2ef2bc82c0a53c9e
Signed-off-by: Ed Warnicke <hagbard@gmail.com>
9 years agoMerge "Bug 3350 - Provide override for features detected during handshake" into stabl...
michal rehak [Tue, 2 Jun 2015 13:13:40 +0000 (13:13 +0000)]
Merge "Bug 3350 - Provide override for features detected during handshake" into stable/lithium

9 years agoBug 3350 - Provide override for features detected during handshake 58/21658/1
Martin Bobak [Tue, 2 Jun 2015 08:03:51 +0000 (10:03 +0200)]
Bug 3350 - Provide override for features detected during handshake

Some devices doesn't provide features considered by OF protocol as
mandatory. We introduce configurable variable that overrides features
check.

Change-Id: I8f7fe9c31f00b785bd19b5f0e79b8162fa7a2a4b
Signed-off-by: Martin Bobak <mbobak@cisco.com>
9 years agoMerge "Do not user CopyOnWriteArrayList" into stable/lithium
michal rehak [Tue, 2 Jun 2015 11:37:06 +0000 (11:37 +0000)]
Merge "Do not user CopyOnWriteArrayList" into stable/lithium

9 years agoMerge "Revert "Bug 3104 - Bypassing MultimessageCollector"" into stable/lithium
michal rehak [Tue, 2 Jun 2015 10:57:47 +0000 (10:57 +0000)]
Merge "Revert "Bug 3104 - Bypassing MultimessageCollector"" into stable/lithium

9 years agoDo not user CopyOnWriteArrayList 34/21634/1
Robert Varga [Tue, 2 Jun 2015 10:33:09 +0000 (12:33 +0200)]
Do not user CopyOnWriteArrayList

Filling it is expensive, use a simple ArrayList.

Change-Id: I231ee15e177d4c689f1729dc7e55f19f4e286222
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoRevert "Bug 3104 - Bypassing MultimessageCollector" 30/21630/1
michal rehak [Tue, 2 Jun 2015 09:57:56 +0000 (09:57 +0000)]
Revert "Bug 3104 - Bypassing MultimessageCollector"

This change approved that processing stats on the fly increases maximum amount of reportable flows.
But unfortunately this change needs to be properly worked in which is easier from scratch.

This reverts commit 6a9d40c73abbdd5417db0634ef5695d0d57545ac.

Change-Id: I61ba7c972a6d667c1b74bf6847bdf678c853aca2
Signed-off-by: Michal Rehak <mirehak@cisco.com>
Signed-off-by: Vaclav Demcak <vdemcak@cisco.com>
9 years agoMerge "Bug 3104 - Bypassing MultimessageCollector" into stable/lithium
michal rehak [Mon, 1 Jun 2015 11:27:45 +0000 (11:27 +0000)]
Merge "Bug 3104 - Bypassing MultimessageCollector" into stable/lithium

9 years agoBUG-3157: performance tuning - NodeConnectorRef cache 40/21540/1
Vaclav Demcak [Mon, 1 Jun 2015 09:37:44 +0000 (11:37 +0200)]
BUG-3157: performance tuning - NodeConnectorRef cache

 - introducing port number to NodeConnectorRef cache in deviceContext

Change-Id: I805f8d54967331b1f42924c7d9f0e24a24f24749
Signed-off-by: Vaclav Demcak <vdemcak@cisco.com>
9 years agoMerge "BUG-3157: performance tuning - Cleanup IpConversionUtil" into stable/lithium
michal rehak [Mon, 1 Jun 2015 08:46:40 +0000 (08:46 +0000)]
Merge "BUG-3157: performance tuning - Cleanup IpConversionUtil" into stable/lithium

9 years agoBUG-3157: performance tuning - Cleanup IpConversionUtil 26/21526/2
Robert Varga [Tue, 26 May 2015 10:06:58 +0000 (12:06 +0200)]
BUG-3157: performance tuning - Cleanup IpConversionUtil

Follow JLS modifier ordering, do not use string concat to coerce
Strings, do not open-code unsigned byte-to-int conversion, remove
trailing whitespace.

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

9 years agoBUG-3157: performance tuning - Skip int->Integer boxing 24/21524/1
Robert Varga [Tue, 26 May 2015 17:16:30 +0000 (19:16 +0200)]
BUG-3157: performance tuning - Skip int->Integer boxing

We really need the integer object, so don't keep it as a primitive type.
Also make sure we run equals on a constant reference. Finally do not
instantiate a zero integer.

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

9 years agoBug 3104 - Bypassing MultimessageCollector 19/21419/4
Vaclav Demcak [Thu, 28 May 2015 16:35:47 +0000 (18:35 +0200)]
Bug 3104 - Bypassing MultimessageCollector

Note: We don't need MultimessageCollector for statistics
because we've implemented polling one stats for one device
in one time. So we are able to use Transaction like
multimessage collector and every MultiMsg could be translated
and adds to transaction in delivery time.

* processingMultipartMsg method in MultiMsgCollector is used
  for bypassing multimessageCollector for MultipartReply
  for standard statCollecting cycle
* StatisticsGatheringUtils needs more help methods

TODO:
* think about possibility to have unconsistante state for
  statistics for RPC submit calls in Transaction

Change-Id: I74bb7477cd74e20aac432992b6e52c0816e5e05b
Signed-off-by: Vaclav Demcak <vdemcak@cisco.com>
9 years agoBug-3431:NullPointerException from OpenflowPlugin.application.StatisticsManagerImpl 31/21431/1
Kamal Rameshan [Fri, 29 May 2015 16:34:37 +0000 (09:34 -0700)]
Bug-3431:NullPointerException from OpenflowPlugin.application.StatisticsManagerImpl

Signed-off-by: Kamal Rameshan <kramesha@cisco.com>
9 years agoMerge "Bug 3437 - clean event time measurement average value of extreme values" into...
michal rehak [Fri, 29 May 2015 15:34:35 +0000 (15:34 +0000)]
Merge "Bug 3437 - clean event time measurement average value of extreme values" into stable/lithium

9 years agoMerge "BUG-3157: perfomance tuning - cache translator lookups" into stable/lithium
michal rehak [Fri, 29 May 2015 14:07:05 +0000 (14:07 +0000)]
Merge "BUG-3157: perfomance tuning - cache translator lookups" into stable/lithium

9 years agoBug 3437 - clean event time measurement average value of extreme values 15/21415/2
Martin Bobak [Fri, 29 May 2015 12:37:54 +0000 (14:37 +0200)]
Bug 3437 - clean event time measurement average value of extreme values

Change-Id: Icc131dd1443ee2e76f2aeaee42bbe65a3c22786d
Signed-off-by: Martin Bobak <mbobak@cisco.com>
9 years agoBUG-3157: perfomance tuning - cache translator lookups 12/21412/1
Martin Bobak [Fri, 22 May 2015 09:43:46 +0000 (11:43 +0200)]
BUG-3157: perfomance tuning - cache translator lookups

Once a DeviceContext is instantiated, it has a fixed version, so we can
pre-cache the two most-used translators.

Change-Id: I9d324f14e3003301bf9107e2e6c12a189c0b6c80
Signed-off-by: Robert Varga <rovarga@cisco.com>
Signed-off-by: Martin Bobak <mbobak@cisco.com>
9 years agoBug 3435 - add time counter for selected operations on device 05/21405/3
Martin Bobak [Thu, 28 May 2015 16:23:28 +0000 (18:23 +0200)]
Bug 3435 - add time counter for selected operations on device

Change-Id: Ie96860f8a253b57b82a8fb7e9577a8774b09a31f
Signed-off-by: Martin Bobak <mbobak@cisco.com>
9 years agoMerge "BUG 2723 - Topology spoofing via LLDP - LLDPSpeaker" into stable/lithium
michal rehak [Fri, 29 May 2015 07:44:01 +0000 (07:44 +0000)]
Merge "BUG 2723 - Topology spoofing via LLDP - LLDPSpeaker" into stable/lithium

9 years agoMerge "BUG 2723 - Topology spoofing via LLDP - hash check in topology-discovery"...
michal rehak [Fri, 29 May 2015 07:40:37 +0000 (07:40 +0000)]
Merge "BUG 2723 - Topology spoofing via LLDP - hash check in topology-discovery" into stable/lithium

9 years agoMerge "Bug 3367 - StatManagerImpl scalable statPolling per stat type on device" into...
michal rehak [Thu, 28 May 2015 14:38:33 +0000 (14:38 +0000)]
Merge "Bug 3367 - StatManagerImpl scalable statPolling per stat type on device" into stable/lithium

9 years agoMerge "Bug 3367 - StatManagerImpl scalable statPolling per stat type on device" into...
michal rehak [Thu, 28 May 2015 14:38:27 +0000 (14:38 +0000)]
Merge "Bug 3367 - StatManagerImpl scalable statPolling per stat type on device" into stable/lithium

9 years agoMerge "BUG-3157: Use InstanceIdentifier.firstIdentifierOf()" into stable/lithium
michal rehak [Thu, 28 May 2015 13:17:20 +0000 (13:17 +0000)]
Merge "BUG-3157: Use InstanceIdentifier.firstIdentifierOf()" into stable/lithium

9 years agoMerge "BUG-3157: Fix a generic warning in DropTestRpcSender" into stable/lithium
michal rehak [Thu, 28 May 2015 13:17:14 +0000 (13:17 +0000)]
Merge "BUG-3157: Fix a generic warning in  DropTestRpcSender" into stable/lithium

9 years agoBug 3367 - StatManagerImpl scalable statPolling per stat type on device 86/21186/2
Vaclav Demcak [Wed, 27 May 2015 09:43:26 +0000 (11:43 +0200)]
Bug 3367 - StatManagerImpl scalable statPolling per stat type on device

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 (one stat in one device in one time).

* remove gatherDynamicData(MultipartType multipartType) method

Change-Id: I3078cfe871b28fd11c09b7001f783b8e2cfbaa0d
Signed-off-by: Vaclav Demcak <vdemcak@cisco.com>
9 years agoBug 3367 - StatManagerImpl scalable statPolling per stat type on device 84/21184/3
Vaclav Demcak [Mon, 25 May 2015 14:41:19 +0000 (16:41 +0200)]
Bug 3367 - StatManagerImpl scalable statPolling per stat type on device

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 (one stat in one device in one time).

* change getherDynamicData() like a chain for device statistics

Change-Id: Iaad3270a6a80b47ed9977b16362ec77bec55966f
Signed-off-by: Vaclav Demcak <vdemcak@cisco.com>
9 years agoBUG-3157: Use InstanceIdentifier.firstIdentifierOf() 89/21189/3
Robert Varga [Wed, 27 May 2015 10:10:35 +0000 (12:10 +0200)]
BUG-3157: Use InstanceIdentifier.firstIdentifierOf()

Instead of instantiating multiple instance identifiers, make sure to
express our intent in terms of the InstanceIdentifier API. In this
particular case we are looking for the identifier capped at the
specified key.

Change-Id: I0284c582959fb00527116335b0def93e71fa535e
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoBUG-3157: Fix a generic warning in DropTestRpcSender 88/21188/2
Robert Varga [Wed, 27 May 2015 10:04:11 +0000 (12:04 +0200)]
BUG-3157: Fix a generic warning in  DropTestRpcSender

Not adding generic arguments is just being lazy.

Change-Id: Ib43a5c68a60ac838c8b3ab458af4aaaa7fbbbaba
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoBug 3412 - Device should not be propagated if initial stats collection fails 00/21300/2
Martin Bobak [Thu, 28 May 2015 08:33:56 +0000 (10:33 +0200)]
Bug 3412 - Device should not be propagated if initial stats collection fails

Change-Id: Ib9bf397331f9011e6909caeefa8cf403747d005f
Signed-off-by: Martin Bobak <mbobak@cisco.com>
9 years agoBug 3407 - Don't reconnect Node without a full clean of OPERATIONAL DataStore. 60/21260/6
Vaclav Demcak [Wed, 27 May 2015 20:11:59 +0000 (22:11 +0200)]
Bug 3407 - Don't reconnect Node without a full clean of OPERATIONAL DataStore.

Note: A reconnection scenario could bring some problem with TransactionChain for a huge data sets.
So we have to stop all PostHandShake processes as soon as is possible and wait for a full Node
disconnecting what includes OPERATIONAL DataStore clean too.

* add checkExisteingNode method in TransactionChainManager
* add synchronized check for tx in submit method
* fix tests

Change-Id: Ib2b772f6800528860ce881204d53bbec35e09b97
Signed-off-by: Vaclav Demcak <vdemcak@cisco.com>
9 years agoBUG 2723 - Topology spoofing via LLDP - LLDPSpeaker 94/21194/4
Jozef Gloncak [Mon, 9 Mar 2015 16:40:09 +0000 (17:40 +0100)]
BUG 2723 - Topology spoofing via LLDP - LLDPSpeaker

 - added extra authorizer to LLDP payload
 - used version property
 - added logging
 - fixed it and features test

Add TLV CustomSec field to creation of LLDP packet.

REMARK:
controller patch https://git.opendaylight.org/gerrit/#/c/21174/ has to
be merged first

Change-Id: I234305e827817aef2dcec820869bddca91fc2b33
Signed-off-by: Jozef Gloncak <jgloncak@cisco.com>
Signed-off-by: Michal Rehak <mirehak@cisco.com>
(cherry picked from commit e20d25cfda275b06826538726595682d88f92182)
(cherry picked from commit 041211583c485316c432eb33801c60fe33a05daa)

9 years agoBUG 2723 - Topology spoofing via LLDP - hash check in topology-discovery 79/21179/3
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 4951c6a8106fa404e3715a7d2addd0c838cf90bc)

9 years agoBug 3393 - don't silence exceptions in tx chain manager 29/21229/2
Martin Bobak [Wed, 27 May 2015 15:24:08 +0000 (17:24 +0200)]
Bug 3393 - don't silence exceptions in tx chain manager

Log events where tx chain operations fail.
Also do not print stacktrace in info level.

Change-Id: I50af32d2fa802506fddb4a218193f4ce9fac0278
Signed-off-by: Martin Bobak <mbobak@cisco.com>
9 years agoBug 3390 - schedule statistics polling instead of polling right away 12/21212/2
Martin Bobak [Wed, 27 May 2015 10:18:33 +0000 (12:18 +0200)]
Bug 3390 - schedule statistics polling instead of polling right away

After successfull initial statistics gathering we don't
want to poll next statistics gathering right away. We schedule
polling job instead.

Change-Id: I1ed68227f33ca53fc58ce7e3d69aa345d65fdd57
Signed-off-by: Martin Bobak <mbobak@cisco.com>
9 years agoBug 3389 - Scheduling time adaptation calculated per device 11/21211/2
Martin Bobak [Wed, 27 May 2015 08:42:50 +0000 (10:42 +0200)]
Bug 3389 - Scheduling time adaptation calculated per device

Calculated time should not be shorter than basic timer
delay which is currently 3000 ms.

Change-Id: I9e534e9268e462b3b572a2bc12a8f80d7de97146
Signed-off-by: Martin Bobak <mbobak@cisco.com>
9 years agoUpdate gitreview for stable/lithium 12/20312/3
Ed Warnicke [Thu, 14 May 2015 00:39:39 +0000 (17:39 -0700)]
Update gitreview for stable/lithium

Change-Id: I1726281c59f4105adcadcef2375ed78e96f0a1ac
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>