summaryrefslogtreecommitdiffstats
path: root/drivers/net/vxlan.c
Commit message (Collapse)AuthorAgeFilesLines
* vxlan: Update hard_header_len based on lowerdev when instantiating VXLANAlexander Duyck2012-11-141-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>
* vxlan: fix a typo.Rami Rosen2012-11-131-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>
* vxlan: Fix error that was resulting in VXLAN MTU size being 10 bytes too largeAlexander Duyck2012-11-131-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>
* vxlan: don't expire permanent entriesstephen hemminger2012-10-311-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>
* vxlan: fix oops when give unknown ifindexstephen hemminger2012-10-111-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>
* vxlan: fix receive checksum handlingstephen hemminger2012-10-111-2/+1Star
| | | | | | | | | | 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>
* vxlan: add additional headroomstephen hemminger2012-10-111-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>
* vxlan: allow configuring port rangestephen hemminger2012-10-111-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>
* vxlan: associate with tunnel socket on transmitstephen hemminger2012-10-111-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>
* vxlan: use ip_route_outputstephen hemminger2012-10-111-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>
* vxlan: fix byte order in hash functionstephen hemminger2012-10-111-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>
* vxlan: minor output refactoringstephen hemminger2012-10-111-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>
* vxlan: fix more sparse warningsStephen Hemminger2012-10-081-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>
* vxlan: remove unused including <linux/version.h>Wei Yongjun2012-10-071-1/+0Star
| | | | | | | | | | 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>
* vxlan: put UDP socket in correct namespacestephen hemminger2012-10-021-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>
* vxlan: virtual extensible lanstephen hemminger2012-10-021-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>