Fix vrouter compilation issues for >3.15 kernels

* SET_ETHTOOL_OPS macro is removed in 3.16 kernels
* rxhash of sk_buff has been renamed to hash in 3.15 kernels.

This patch fixes this issue.

Change-Id: Ic0de873d0a5d869624ad9d5b883586222e8119cc
Closes-bug: #1383647
linux tunnel interface support in vrouter

For tunnel interface support, packets that ingresses and egresses the
tunnel interface will have network header rather than ethernet header
as vrouter today expects. vrouter will look the encap of the device
that is added to vrouter to see whether the interface supports an
ethernet encap or not. For now, if the interface does not support an
ethernet encap, vrouter will assume that the interface is a tunnel
interface.

TODO: segmentation and addition of ethernet header for packets that
go to vhost interface during vrouter reset

Bug:#1391051
Change-Id: I47717f4a9e332b8fcfbb2878c4659a5eead54ffb
Allow parallel build via scons -jNN
- Avoid use of chdir= in scons Command()
- Add .gitignore for files generated during build

Change-Id: I256a12da17ac0940a5ded81d2c2dec88abc3ca14
Merge "linux tunnel interface support in vrouter"
Merge "Allow parallel build via scons -jNN - Avoid use of chdir= in scons Command() - Add .gitignore for files generated during build"
Change the location from where we try to pull the outer headers

The function that pulls outer headers assumes that the packet data
points at layer 2 header. While this is true in case of ubuntu, the
commit that made this assumption did not reposition the call for
Centos, resulting in pull failures.

Change-Id: Iaae280817820feb87a525db8c028bcba4e905bb1
Closes-BUG: #1393730
Fixes neighbor solicit issue in ubuntu/Centos

In linux_pull_outer_headers(), ICMP header size was counted twice before skb_pull. this resulted in skb_pull
failing for the neighbor solicit packets. This bug fixes the same.

Change-Id: I878d6ae0d63ac5e7446a82aa462718f0589cb367
Closes-Bug: 1392638
Merge "Fix vrouter compilation issues for >3.15 kernels"
Merge "Fixes neighbor solicit issue in ubuntu/Centos"
Fix a double free error in vr_message_process_response

This patch fixes a double free error and introduces
user land unit test for the vrouter code. The cmocka
unit test framework is used for that purpose.

A first unit test is provided that check this fixes.

Change-Id: Ic8c84d076d078a87adaf6d4398373c368db0361c
Closes-bug: #1394147
Layer 3 unicast nexthops should update layer 2 protocol fields only if
layer 2 information needs to be added.

Layer 3 unicast nexthops is shared across ipv4 and ipv6. The layer 2
protocol field of the rewrite information is updated every time a packet hits
the nexthop, based on whether the packet is ipv4 or ipv6. There are a couple
of issues with this way of doing things. One is that it is not MP safe and
other is that the protocol field should be updated only if there is any rewrite
information to be added.

There will not be any rewrite information for packets egressing a tunnel interface,
and hence the layer 2 protocol information should not be added.

Closes-BUG: #1394461
Change-Id: If06c41127501ed1f5971228269cfbc8a533518c6
Remove the vhost tap if the physical interface corresponsing to a vhost
interface changes

If before a vrouter soft reset the physical interface was different and
post reset agent adds a different physical interface (corresponding to a
particular vhost), then a system crash is possible subsequently when
somebody tries to remove the module. (This situation can happen  because
interfaces mentioned in agent_param and contrail-vrouter-agent.conf are
different. Unlikely, but possible).

The system crash is because during reset we install a handler on the
physical interface that directly shunts the packet to vhost interface in
the kernel. Post reset, if the interface changes, we don't remove this tap.
If we then remove the vrouter module, the tap points to the module function
and hence an invalid memory.

Change-Id: I28d4a7691d7caea81f849110edf7c7f7170b0bc5
Closes-BUG: #1394473
Merge "Fix a double free error in vr_message_process_response"
Merge "Remove the vhost tap if the physical interface corresponsing to a vhost interface changes"
IPv6 changes
(on behalf of Prabhakaran)

Change-Id: I16d47e843bbe85b7de8438205c76ae29d41c14a5
Fix build issue in mainline

Change-Id: If62ea3f0c554da7e6d52f7d4f0f23f5a6de7214e
Fix for https://bugs.launchpad.net/juniperopenstack/+bug/1372262 a separate port list of link local services in Vrouter, which will be loked up before handing over the packet to Flow processing after Receive NH. If the lookup fails, packet will not be subjected to any flow processing leading to a better perforance for Vhost non-link local packets. This database is built using flow entry addition by Agent

Change-Id: I603ebb60adcdb5199ac545575179c52e90774b9b
    vrouter changes to support ping and traceroute diagnostics

    - Packets with transport header checksum of 0xffff are marked as
    diagnostic packets and trapped to agent for further processing
    - vrouter now decrements ttl for every packet forwarded
    - for diagnostic packets, vrouter copies the ttl from the inner
    packet to outer header
    - if ttl goes to zero, packets are trapped to agent so that ICMP
    errors are sent to the source
fix typo : use dport instead of sport
- For ICMP error packets that come from intermediate routers and meant
to be processed by agent, pull only the first 4 bytes of the error payload
transport header, since we are guaranteed only the first 8 bytes of
transport header

- When transmitting the final packet, make the outer ip header's ip id to
be the same as that of the inner ip header. This behavior is needed by
agent, which uses this id to correlate diagnostic requests with responses
(and specifically critical for icmp errors generated by intermediate routers,
where only the first 8 bytes of the transport header is available)

- Do not forward packets with zero ttl