aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/vxlan.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2012-12-26net/vxlan: Use the underlying device index when joining/leaving multicast groupsYan Burman1-2/+4
The socket calls from vxlan to join/leave multicast group aren't using the index of the underlying device, as a result the stack uses the first interface that is up. This results in vxlan being non functional over a device which isn't the 1st to be up. Fix this by providing the iflink field to the vxlan instance to the multicast calls. Signed-off-by: Yan Burman <yanb@mellanox.com> Acked-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-12-09vxlan: Add capability of Rx checksum offload for inner packetJoseph Gasparakis1-2/+14
This patch adds capability in vxlan to identify received checksummed inner packets and signal them to the upper layers of the stack. The driver needs to set the skb->encapsulation bit and also set the skb->ip_summed to CHECKSUM_UNNECESSARY. Signed-off-by: Joseph Gasparakis <joseph.gasparakis@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-12-09vxlan: capture inner headers during encapsulationJoseph Gasparakis1-1/+9
Allow VXLAN to make use of Tx checksum offloading and Tx scatter-gather. The advantage to these two changes is that it also allows the VXLAN to make use of GSO. Signed-off-by: Joseph Gasparakis <joseph.gasparakis@intel.com> Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com> Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-11-20add DOVE extensions for VXLANDavid Stevens1-25/+231
This patch provides extensions to VXLAN for supporting Distributed Overlay Virtual Ethernet (DOVE) networks. The patch includes: + a dove flag per VXLAN device to enable DOVE extensions + ARP reduction, whereby a bridge-connected VXLAN tunnel endpoint answers ARP requests from the local bridge on behalf of remote DOVE clients + route short-circuiting (aka L3 switching). Known destination IP addresses use the corresponding destination MAC address for switching rather than going to a (possibly remote) router first. + netlink notification messages for forwarding table and L3 switching misses Changes since v2 - combined bools into "u32 flags" - replaced loop with !is_zero_ether_addr() Signed-off-by: David L Stevens <dlstevens@us.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-11-17vxlan: remove unused variable.Rami Rosen1-1/+0
This patch removes addrexceeded member from vxlan_dev struct as it is unused. Signed-off-by: Rami Rosen <ramirose@gmail.com> Acked-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-11-17Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/netDavid S. Miller1-3/+7
Minor line offset auto-merges. Signed-off-by: David S. Miller <davem@davemloft.net>
2012-11-14net: convert __IPTUNNEL_XMIT() to an inline functionAmerigo Wang1-1/+1
__IPTUNNEL_XMIT() is an ugly macro, convert it to a static inline function, so make it more readable. IPTUNNEL_XMIT() is unused, just remove it. Cc: David S. Miller <davem@davemloft.net> Signed-off-by: Cong Wang <amwang@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-11-13vxlan: Update hard_header_len based on lowerdev when instantiating VXLANAlexander Duyck1-0/+4
In the event of a VXLAN device being linked to a device that has a hard_header_len greater than that of standard ethernet we could end up with the hard_header_len not being large enough for outgoing frames. In order to prevent this we should update the length when a lowerdev is provided. Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Acked-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-11-13vxlan: fix a typo.Rami Rosen1-1/+1
Use eXtensible and not eXtensiable in the comment on top. Signed-off-by: Rami Rosen <ramirose@gmail.com> Acked-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-11-13vxlan: Fix error that was resulting in VXLAN MTU size being 10 bytes too largeAlexander Duyck1-2/+2
This change fixes an issue I found where VXLAN frames were fragmented when they were up to the VXLAN MTU size. I root caused the issue to the fact that the headroom was 4 + 20 + 8 + 8. This math doesn't appear to be correct because we are not inserting a VLAN header, but instead a 2nd Ethernet header. As such the math for the overhead should be 20 + 8 + 8 + 14 to account for the extra headers that are inserted for VXLAN. Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-11-10Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/netDavid S. Miller1-1/+1
Conflicts: drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c Minor conflict between the BCM_CNIC define removal in net-next and a bug fix added to net. Based upon a conflict resolution patch posted by Stephen Rothwell. Signed-off-by: David S. Miller <davem@davemloft.net>
2012-11-03vxlan: allow a user to set TTL valueVincent Bernat1-0/+3
"ip link add ... type vxlan ... ttl X" allows a user to set the TTL used by a VXLAN for encapsulation. The provided value was ignored by vxlan module and the default value of 1 was used when encapsulating multicast packets. Signed-off-by: Vincent Bernat <bernat@luffy.cx> Acked-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-10-31vxlan: don't expire permanent entriesstephen hemminger1-1/+1
VXLAN confused flag versus bitmap on state. Based on part of a earlier patch by David Stevens. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-10-10vxlan: fix oops when give unknown ifindexstephen hemminger1-6/+10
If vxlan is created and the ifindex is passed; there are two cases which are incorrectly handled by the existing code. The ifindex could be zero (i.e. no device) or there could be no device with that ifindex. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-10-10vxlan: fix receive checksum handlingstephen hemminger1-2/+1
Vxlan was trying to use postpull_rcsum to allow receive checksum offload to work on drivers using CHECKSUM_COMPLETE method. But this doesn't work correctly. Just force full receive checksum on received packet. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-10-10vxlan: add additional headroomstephen hemminger1-0/+1
Tell upper layer protocols to allocate skb with additional headroom. This avoids allocation and copy in local packet sends. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-10-10vxlan: allow configuring port rangestephen hemminger1-5/+57
VXLAN bases source UDP port based on flow to help the receiver to be able to load balance based on outer header flow. This patch restricts the port range to the normal UDP local ports, and allows overriding via configuration. It also uses jhash of Ethernet header when looking at flows with out know L3 header. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-10-10vxlan: associate with tunnel socket on transmitstephen hemminger1-0/+19
When tunnelling a skb, associate it with the tunnel socket. This allows parameters set on tunnel socket (like multicast loop flag), to be picked up by ip_output. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-10-10vxlan: use ip_route_outputstephen hemminger1-4/+8
Select source address for VXLAN packet based on route destination and don't lie to route code. VXLAN is not GRE. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-10-10vxlan: fix byte order in hash functionstephen hemminger1-2/+2
Shift was wrong direction causing packets to hash based on other parts of the ethernet header, not the address. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-10-10vxlan: minor output refactoringstephen hemminger1-11/+20
Move code to find destination to a small function. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-10-08vxlan: fix more sparse warningsStephen Hemminger1-2/+2
Fix a couple harmless sparse warnings reported by Fengguang Wu. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-10-07vxlan: remove unused including <linux/version.h>Wei Yongjun1-1/+0
Remove including <linux/version.h> that don't need it. dpatch engine is used to auto generate this patch. (https://github.com/weiyj/dpatch) Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-10-02vxlan: put UDP socket in correct namespacestephen hemminger1-3/+5
Move vxlan UDP socket to correct network namespace Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Acked-by: "Eric W. Biederman" <ebiederm@xmission.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-10-01vxlan: virtual extensible lanstephen hemminger1-0/+1217
This is an implementation of Virtual eXtensible Local Area Network as described in draft RFC: http://tools.ietf.org/html/draft-mahalingam-dutt-dcops-vxlan-02 The driver integrates a Virtual Tunnel Endpoint (VTEP) functionality that learns MAC to IP address mapping. This implementation has not been tested only against the Linux userspace implementation using TAP, not against other vendor's equipment. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>