114 Commits

Author SHA1 Message Date
Charles Chan
1588e7bda9 Bugfix for multicast in multiple instances environment
Only the master of the source device do path calculations

Change-Id: I29f6d49f039d61014f0ff8ddce73db2ad18eb6e4
(cherry picked from commit a7da388b2f8d1601e71d915618509b03478a4a9b)
2016-07-01 18:19:42 +00:00
Charles Chan
a061fb3f42 Bugfix: store entry is not removed properly after device disconnected
Change-Id: I4c967a1d98208b5d3eee0e7b00dfd4ed2fddde01
2016-06-18 00:27:35 +00:00
Charles Chan
35fd1a7305 CORD-77 Dynamic Access Agent Config
This commit depends on https://gerrit.opencord.org/#/c/56/

Change-Id: I6084621c36046ae8b6262cab52c49825d3e0d0d1
2016-06-15 22:26:51 +00:00
Charles Chan
fc5c780fa1 CORD-61 Dynamic XConnect support
- Add new XConnectConfig with unit test
- Gather XConnect features into XConnectHandler
- Introduce ObjectiveError.Type.GROUPREMOVALFAILED
- Rename
    - NetworkConfigEventHandler -> AppConfigHandler
    - XConnectNextObjectiveStoreKey -> XConnectStoreKey
    - Test json file
- Refactor

Change-Id: I8ca3176ed976c71ce9e28b7f3722ce80d49c816f
2016-06-14 15:06:11 -07:00
Saurav Das
b5c236e2eb In this commit:
Bug fix when optimized SR re-routing fails, do full re-route
   Bug fix filtering objectives should be called for new device even if there is an existing grouphandler
   Bug fix NPE in ofdpa driver due to null check on the wrong variable
   New cli command for debugging flow-objectives for pending next-objectives
   Flow objective cli commands now start with "obj-"

Change-Id: I819f82d1d67769cb9fbbde60f099d29b8e7f7c9e
2016-06-14 21:08:22 +00:00
Saurav Das
251908110a In this commit:
Bug fix where filtering objectives are not installed due to available ports becoming enabled later.
   Bug fix where flow objective store had no listener for notifications from drivers across multiple instances of the controller.
   NPE fix in ofdpa driver for non-existing groups.
   Preventing ofdpa driver from sending spurious pass notification to app.
   Incrementing retry filter timer from 1 to 5 secs in default routing handler.
   Made several debug messages clearer.

Change-Id: I828671ee4c8bcfe03c946d051e1d1aac9d8f68dd
2016-06-08 17:01:12 +00:00
Charles Chan
b3007e1442 CORD-180 Changed the way how learnt hosts are suppressed in gerrit 9195
Change-Id: I086ba82147ef716c076cb6140b03da2886515c32
2016-05-24 15:24:46 -07:00
Charles Chan
eefdedfb50 Remove redundent byte[].class registration
Also added names to some serializer for debugging purpose

Change-Id: I0997b61a5d08df84c85ca28f6a5ed23417fb8c22
2016-05-24 00:09:42 +00:00
Charles Chan
8d44986c3b CORD-135 Support Multicast Source on a Configured Port
Missing part of gerrit #9230
Forwarding objective need to check the existing VLAN as well

Change-Id: I8e9cadc57c332a20567eaeaa2030901fc2dbf5b8
2016-05-22 22:45:15 -07:00
Charles Chan
6ea94fc6b5 CORD-73 Change the way we configure host learning in segment routing
hostLearning config
    - true: enable host learning
    - false or not provided: disable host learning
suppressHost config
    - all connect points listed here will be ignored
    - no effect if hostLearning is false
    - accept all hosts if this config is not provided

Change-Id: Id4a60bd47cac1f226ab8ba5391931ad2fb798529
2016-05-17 21:47:23 +00:00
Charles Chan
f0994cc539 CORD-135 Support Multicast Source on a Configured Port
Change-Id: I71965dbb649a798cd1991bcb4d921919a30420d5
2016-05-13 17:03:57 +00:00
Charles Chan
93e71ba993 CORD-60 Support dynamic vSG creation/deletion
We no longer need to configure /32 IP in interfaces.
SR will push a per-host route when discovering a host
with IP address(es) that does not belong to configured subnet.

Also includes:
- HostHandler refactoring

Change-Id: Ic1ad42d1ccdfee32be85f49e6fc94d9026000ffc
2016-05-11 13:19:08 -07:00
Jian Li
c2a542bcab Explicitly return NO CONTENT type response for http DELETE request
Change-Id: I920084b92197bb1687e7d978ad350b2e1290ecbc
2016-05-10 22:24:39 +00:00
Charles Chan
2199c30c6e CORD-348 Fabric multicast support - error handling
Automatically failover to backup spine if
- ingress - transit link down
- transit - egress link down
- transit device down

Can recover from fatal error with human involved
- ingress switch down
- egress switch down
- all links to spine down

Scan through McastRouteStore when
- SR activate
- link up

Also include following features
- Use flow objective context in McastHandler
- Update Mcast VLAN config sample

Change-Id: I75007d9efd7646e7c4e57fa6d3fc6943543153cf
2016-05-03 19:09:52 +00:00
Saurav Das
59232cf8f8 Changes include:
bug fix for host IP and MAC flows not being generated sometimes in multi-controller scenarios
      bug fix for filtering objectives not being sent sometimes when ports become available later
      npe fixes in ofdpa driver for cases where selectors or treatments may not be available
      new cli command to manually trigger routing and rule population
      portstats option on cli to display only those ports with non-zero stats
      group cli command tab completion displays choices in lower case (similar to flows)
      segment routing cli commands now start with sr-

Change-Id: Idcd641882d180acbd304e5560ed3483b5a943f96
2016-05-03 00:52:58 +00:00
Charles Chan
216e3c856b Refactoring SegmentRouting, OFDPA driver and Group Store
- Replace SRNextObjectiveContext with DefaultObjectiveContext
- Move several log messages to lower log level

Change-Id: Ice2fb598b8e4502cb4acee1a95235551ec7c8db7
2016-04-26 16:57:23 +00:00
Charles Chan
d299036a4d Segment Routing refactoring
- Change name: McastEventHandler -> McastHandler
- Separate HostHandler from SRManager
- Move storekeys to a dedicated package
- Replace SRObjevtiveContext and BridgeTableObjectiveContext with DefaultObjectiveContext

Change-Id: Iab25529487004759105e5ba60c1d2a3852ac45e6
2016-04-23 22:25:26 +00:00
Charles Chan
d55e84de33 CORD-348 multicast support in SegmentRouting and vRouter
In this submission:
* Setup/teardown multicast route according to SinkAdded/SinkRemoved event
    - ingressVlan and egressVlan is configurable through network config
* Change behavior of OFDPA VLAN assignment
    - Always use the VLAN in metadata if present
* Bugfix of writing immutable object

NOT in this submission (coming soon):
* Error handling (e.g. link/device failure recovery)

Change-Id: I9be11af04eb2d6456b865c7e59e96cc02370f846
2016-04-18 20:06:57 +00:00
Jonathan Hart
c19f7c191e Register API in segment routing Kryo serializers.
Also use a different builder instance for each map.

Change-Id: Id594ea708d7bc2cfa06d514f50273dd0f8cb45f6
2016-04-12 15:39:44 -07:00
Brian O'Connor
7cbbbb7009 Adding Copyright notice to files that are missing it
Change-Id: Ic08aad8906dbd4dd062e7adcec7465475cf2bdda
2016-04-09 09:51:27 +00:00
Brian O'Connor
5ab426f9ff Updating copyrights
New format: 'Copyright .year-present Open Networking Laboratory'

Change-Id: I1a9e58b355b775e75245ad875a2d7a4df3f03098
2016-04-09 01:20:21 -07:00
Ray Milkey
d4334dbdc1 Javadoc warning fixes
Change-Id: I30b3398b849da5d528f2bce58004d190ca17ad50
2016-04-06 17:37:12 +00:00
Saurav Das
7a1ffca581 Fixing a couple of NPEs
Change-Id: I19b5a2787b26e67e05640f6c64a13b58f2dc089a
2016-03-29 22:14:41 +00:00
Saurav Das
80980c7382 CORD-45 CORD-394
Bugfix in group store - group delete state updated correctly.
SR app no longer deletes buckets in existing groups - workaround for OFDPA bug.
Instead it invalidates the entire group, thereby forcing new group creation.
Also incorporating Charles' changes to remove state from group and flow stores,
and the SR app when device goes offline.

Change-Id: I162d3fb6bf709a8f02b01b8d57e131c2bac9b46b
2016-03-28 20:21:35 +00:00
Jian Li
9d61649f0f [ONOS-4042] Bump up Jersey from 1.19 to 2.22.2
- Fix unit test errors of web/api
- Fix default page redirection problem
- Fix compilation errors of web/gui
- Fix configuration of aaa, acl, cordfabric, cord-gui, dhcp, mfwd,
  olt, openstack, segmentrouting, vtn, virtualbng, xos-integration
- Fix unit test errors of cpman, vtn, acl, faultmanagement
- Fix compilation errors of openstack, virtualbng, xos-integration,
  REST SB controller
- Rearrange features.xml to resolve bundle dependencies
- Remove all of stale Jersey 1.x libraries
- Rearrange web.xml to point new Jersey 2.x servlet

Change-Id: Ic17f461ede0aa36fa8d470546d8069152dc1d134
2016-03-24 18:54:28 +00:00
Charles Chan
2196a92c5f Bugfix and improvement of SR config loading
Change-Id: If17af7ff1fbd3cb712e59cce930ef11146bdbf2e
2016-03-07 17:32:07 +00:00
Charles Chan
3e783d0b7b Fix NPE in SegmentRoutingManager
NetworkConfigEventHandler must be initialized before adding NetworkConfigEventListener

Change-Id: I8eb40c8b7345b915e613a678df8e8c103980ee21
2016-02-27 07:12:39 +00:00
Charles Chan
a35b02c148 Extract test json to separate files
Change-Id: Ica815b7c5ff0a77f411e621bbb6cfc8b78fcd012
2016-02-23 07:55:03 +00:00
Charles Chan
d9681e7d54 Improve SegmentRoutingAppConfig
- Separate host and subnet suppression
- Use port instead of interface to specify which SR should ignore

Change-Id: Ie6491950cddf0860924565f081504b4f4d788179
2016-02-23 03:52:22 +00:00
Charles Chan
d0fd5dc1bd CORD-546 Push L3 unicast rules for bgp peers when they are learned
- Change L3 unicast group id/key generation to include src MAC
- Note: Only flows are removed when a peer is gone
  since the group may still be referenced by routes announced by peer.
  It does no harm even if the group is not referenced.
- Note: We assume that peer does not move or update IP

Also fix several SR/VR integration issues, including
- Do not push broadcast group for /32

Change-Id: Ifb03601f5341f8b7717ea1fbccbc569b07f66476
2016-02-19 23:36:19 +00:00
Jonathan Hart
00cdddaa60 Send PIM Join/Prune messages based on events from the McastService.
Also change Interface to return a list of addresses rather than a set
to allow applications to rely on the order of configuration

Change-Id: Ie7f62fee507639325ee0a77b8db4088dae34597e
2016-02-19 18:53:12 +00:00
Charles Chan
116188d056 Cleanup interface constant
Change-Id: Ief110d6db88889e5c01c43b5d410330114c65ad9
2016-02-18 22:53:51 +00:00
Charles Chan
b54e8ba3e9 Fix javadoc error
Change-Id: Ica9ef8f921aa7b8ce891e17a6839bfec6f444068
2016-02-18 18:45:36 +00:00
Charles Chan
f2565a9cbc CORD-508 SegmentRouting / vRouter integration
- Added excludePorts config to SegmentRouting
    SR does not push VLAN filtering rule to excluded ports
    SR ignores hosts learned from excluded ports
- Use separate default route config
    Don't need to config 0/0 on the interface anymore

Change-Id: Iea75d60c2d5f5368e79652b1bf192a6ced49030d
2016-02-18 17:32:30 +00:00
Charles Chan
5270ed0088 CORD-512 Support vSG <-> vRouter default route
- Support multiple subnets per port. getIpPort() will only return the first non-/32 and non-/0 subnet
    /32 is used as vSG subnet
    /0 is used as default gateway
- Support multiple L3 unicast group on a single port
    Change the way to generate the group ID and group key
- Special case for 0.0.0.0 host. Push a /0 to IP table instead of /32
- Implement vRouterConfig
    Put VR MAC to TMAC table of all leaves when config added
        When processEthDst see PortNumber.ANY in key, match ETH_DST only
- For OFDPA, wipe existing instruction before sending to controller
    So packet that misses L3 unicast table won't be sent to controller twice
- For SpringOpenTTP, pop VLAN before sending to controller
- Move several constant definitions to SegmentRoutingService
- Add minimum priority for IP rules such that /0 won't collide with zero priority default rules
- Update the config sample
    Use VLAN=-1 for hosts
    Add example for default route

Change-Id: Id751697ce36a7e5c13b3859350ff21b585c38525
2016-02-18 17:30:19 +00:00
Charles Chan
17d38f4c59 Remove OFDPA /32 -> ECMP workaround
OFDPA software build 12.1.1+accton1.7-1 fixes this issue.
This workaround is no longer required.

Change-Id: I9952d8739cf0f72d671bbc217dabc09edf8820cc
2016-02-05 22:37:57 +00:00
Saurav Das
49831644a9 Two fixes: 1) cpqd emulation of ofdpa pops off internal vlan before sending to controller
2) Arp handler does not need to send flowmod to switch as hostmanager listener is doing that

Change-Id: I5460aa36bcb3cfce3bc1887e304a63b2221495b9
2016-02-05 13:18:01 -08:00
Charles Chan
14967c2731 CORD-389 Fix for Accton 6712 deployment
Related to this topic:
- Disable the meter collector since right now it is not supported
- Implement extension VLAN ID selector/treatment for OFDPA
    Since it requires two special flow entries to match untagged packets
        0x1ffe/no mask (filtering rule, need to go first)
        0x0000/0x1fff setvid 0x0ffe (assignment rule, need to go second)
- Not able to point /32 IP address to ECMP group. Use /31 instead.

In addition:
- Implement serializer for ExtensionCriterion

Change-Id: I621b3ad14014d7e6945c014cdae4f7cd2939288e
2016-01-27 06:39:45 +00:00
Ray Milkey
2693bdab3e Add a builder for DefaultLink to hide multiplying constructors
Change-Id: Iaf073d07989c398a8f44541ffdb8dd93e5715162
2016-01-26 21:33:28 +00:00
Charles Chan
e849c19398 CORD-349 Support VLAN cross-connect traffic
Change related to this topic:
- Support VLAN cross-connect traffic
    Utilize ports subjectClass to achieve. For non-xConnect port, set interface VLAN to -1
- Remove VLAN checking since we have multiple VLANs per port
- Hash the L2 interface group key generation to include VLAN as well
- Update the network-cfg.json sample

Other refactoring changes:
- Read next objective stores from srManager directly
- Use constant for flow priority
- CORD-267 Javadoc fix

Change-Id: I4ca8c2d9c8b3633a4a0101c5070d19343f7e5b90
2016-01-21 00:04:49 +00:00
Flavio Castro
6816f25a94 Added debug info to ArpHandler and priorities to RoutingPopulator
Change-Id: I079c5d50b12602ef620dbc6c5812d4508fa0b58d
2016-01-15 19:17:14 +00:00
Charles Chan
188ebf53fc Segment Routing bug fix and enhancement
Bugfix:
- Add MPLS BOS matching
- Fix NPE caused by race between filter objective and broadcast next objective

Enhancement:
- Move group handler out from OFDPA pipeline
- Move ARP request from rule populator to packet request

Change-Id: I0ba40e10f7cb7f97277df86725fbd2546a62e890
2016-01-11 12:11:58 -08:00
Saurav Das
423fe2b487 CORD-354 OF-DPA support for link-failures.
Bug fix in flowObjectives store. Adding a removeNextGroup API to the store.

Change-Id: I5890411e5b4eabdc057402687ada26e539500f8f
2015-12-11 17:00:52 +00:00
Shashikanth VH
013a7bc06c Naming convention
Change-Id: I2e2bbce6397dd95e841bcdc67ee125c1626671b3
2015-12-10 20:43:14 +00:00
Saurav Das
4ce4596d62 CORD-367 L2 bridging and L3 routing support with internal VLANs in OF-DPA.
Also includes:
     All forwarding in app is now via nextObjectives (not treatments) - Spring Open driver converts
     non-ECMP forwarding to flow-actions, while OF-DPA driver continues to use groups.
     Convert 'setMeta' methods to 'withMeta' in Flow Objectives API.
     Bug fix in Flow Objective Manager - set of PendingNext is now threadsafe.
     Bug fix in ArpHandler - now recognizes routerIp in addition to gatewayIps
     Removed a bunch of testcode
     Added group count in CLI

Change-Id: Id3b879c5dda78151ca0ec359179f1604066d39fc
2015-12-04 19:49:00 +00:00
Charles Chan
531a78b802 CORD-352 Refactoring SegmentRoutingConfig
- Add Javadoc and fix function name convention
- Add setAdjancencySids method
- Change return value of getAdjacencySids from List to ImmutableSet
- Validate config value
- Add unit test for SegmentRoutingConfig

Change-Id: Ic43ac31a49da8a9d62131d7803930280cf9994d2
2015-12-02 22:41:44 +00:00
Charles Chan
d6d581a469 CORD-339 Network config host provider
* Implement new application org.onosproject.netcfghost
* Implement BasicHostConfig to include IP and location information
    - Update network-cfg.json to add host config example
    - Add network-cfg-2x2-leaf-spine.json for 2x2 leaf-spine network in SegmentRouting
* Update Segment Rounting
    - Punt ARP packets
      (which is done by HostLocationProvider previously)
    - Check existing hosts when device connected or configured

Change-Id: I03986ddc8203d740b5bf26903e3dbf866d4d4600
2015-12-02 20:27:46 +00:00
Saurav Das
8a0732e8ae CORD-48 Implementation of hashing Next Objective in OF-DPA driver. Major changes to ensure multi-ONOS-instance group-chain installation.
Also includes:
     Changes to Next Objective that adds metadata field for applications to optionally send auxillary info to drivers
     Changes to Next Objective that allows more explicit modification of the next objective
     Changes to Forwarding Objective and PendingNext to include hashCode() and equals() method
     MplsBosInstruction included in kryo serializer
     GroupKey's byte[] represented as a hex string
     Bug fix in mpls flow installation to report failure in install
     Bug fix in linkUp in SR app to disallow non-masters to modify groups
     Bug fix in ordering of actions in group

Change-Id: I3e7003f55724c2de79589e43e11d05ff4815a81d
2015-11-30 19:00:42 +00:00
Charles Chan
68aa62d743 [CORD-46] Implement L2 switching in Segment Routing
DONE
- Update SpringOpenTTP to support bridging table emulation
- Populate low priority subnet broadcast entry for bridging table
- Move IP entry population to host event handler as well
- Update ArpHandler to handle intra-rack ARP forwarding/flooding
- Move TTL_OUT action from IP table to corresponding group
    Since hardware does not support TTL_OUT in the IP table
- Populate entries to bridging table (MAC learning)
- Emulate src mac table

Not in this submission
- Emulate src-mac table behavior
- Pop vlan in the group instead of the flow

Change-Id: Ib69357c1889ccddaa4daa272d9f5843790ee1a3c
2015-11-19 22:42:01 +00:00
Saurav Das
4f98008c10 CORD-48 Added support for broadcast next objective in OFDPA driver.
Changed groupid to show in hex for cli command 'groups'

Change-Id: I86474912a9fd775c36d5bc49545eaa58ecc46b47
2015-11-06 23:41:10 +00:00