Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/jesse/openvswitch
Jesse Gross says:
====================
A few bug fixes and small enhancements for net-next/3.6.
...
Ansis Atteka (1):
openvswitch: Do not send notification if ovs_vport_set_options() failed
Ben Pfaff (1):
openvswitch: Check gso_type for correct sk_buff in queue_gso_packets().
Jesse Gross (2):
openvswitch: Enable retrieval of TCP flags from IPv6 traffic.
openvswitch: Reset upper layer protocol info on internal devices.
Leo Alterman (1):
openvswitch: Fix typo in documentation.
Pravin B Shelar (1):
openvswitch: Check currect return value from skb_gso_segment()
Raju Subramanian (1):
openvswitch: Replace Nicira Networks.
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
@@ -118,7 +118,7 @@ essentially like this, ignoring metadata:
|
|||||||
Naively, to add VLAN support, it makes sense to add a new "vlan" flow
|
Naively, to add VLAN support, it makes sense to add a new "vlan" flow
|
||||||
key attribute to contain the VLAN tag, then continue to decode the
|
key attribute to contain the VLAN tag, then continue to decode the
|
||||||
encapsulated headers beyond the VLAN tag using the existing field
|
encapsulated headers beyond the VLAN tag using the existing field
|
||||||
definitions. With this change, an TCP packet in VLAN 10 would have a
|
definitions. With this change, a TCP packet in VLAN 10 would have a
|
||||||
flow key much like this:
|
flow key much like this:
|
||||||
|
|
||||||
eth(...), vlan(vid=10, pcp=0), eth_type(0x0800), ip(proto=6, ...), tcp(...)
|
eth(...), vlan(vid=10, pcp=0), eth_type(0x0800), ip(proto=6, ...), tcp(...)
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2007-2012 Nicira Networks.
|
* Copyright (c) 2007-2012 Nicira, Inc.
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or
|
* This program is free software; you can redistribute it and/or
|
||||||
* modify it under the terms of version 2 of the GNU General Public
|
* modify it under the terms of version 2 of the GNU General Public
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2007-2012 Nicira Networks.
|
* Copyright (c) 2007-2012 Nicira, Inc.
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or
|
* This program is free software; you can redistribute it and/or
|
||||||
* modify it under the terms of version 2 of the GNU General Public
|
* modify it under the terms of version 2 of the GNU General Public
|
||||||
@@ -263,14 +263,15 @@ err:
|
|||||||
static int queue_gso_packets(int dp_ifindex, struct sk_buff *skb,
|
static int queue_gso_packets(int dp_ifindex, struct sk_buff *skb,
|
||||||
const struct dp_upcall_info *upcall_info)
|
const struct dp_upcall_info *upcall_info)
|
||||||
{
|
{
|
||||||
|
unsigned short gso_type = skb_shinfo(skb)->gso_type;
|
||||||
struct dp_upcall_info later_info;
|
struct dp_upcall_info later_info;
|
||||||
struct sw_flow_key later_key;
|
struct sw_flow_key later_key;
|
||||||
struct sk_buff *segs, *nskb;
|
struct sk_buff *segs, *nskb;
|
||||||
int err;
|
int err;
|
||||||
|
|
||||||
segs = skb_gso_segment(skb, NETIF_F_SG | NETIF_F_HW_CSUM);
|
segs = skb_gso_segment(skb, NETIF_F_SG | NETIF_F_HW_CSUM);
|
||||||
if (IS_ERR(skb))
|
if (IS_ERR(segs))
|
||||||
return PTR_ERR(skb);
|
return PTR_ERR(segs);
|
||||||
|
|
||||||
/* Queue all of the segments. */
|
/* Queue all of the segments. */
|
||||||
skb = segs;
|
skb = segs;
|
||||||
@@ -279,7 +280,7 @@ static int queue_gso_packets(int dp_ifindex, struct sk_buff *skb,
|
|||||||
if (err)
|
if (err)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
if (skb == segs && skb_shinfo(skb)->gso_type & SKB_GSO_UDP) {
|
if (skb == segs && gso_type & SKB_GSO_UDP) {
|
||||||
/* The initial flow key extracted by ovs_flow_extract()
|
/* The initial flow key extracted by ovs_flow_extract()
|
||||||
* in this case is for a first fragment, so we need to
|
* in this case is for a first fragment, so we need to
|
||||||
* properly mark later fragments.
|
* properly mark later fragments.
|
||||||
@@ -1649,7 +1650,9 @@ static int ovs_vport_cmd_set(struct sk_buff *skb, struct genl_info *info)
|
|||||||
|
|
||||||
if (!err && a[OVS_VPORT_ATTR_OPTIONS])
|
if (!err && a[OVS_VPORT_ATTR_OPTIONS])
|
||||||
err = ovs_vport_set_options(vport, a[OVS_VPORT_ATTR_OPTIONS]);
|
err = ovs_vport_set_options(vport, a[OVS_VPORT_ATTR_OPTIONS]);
|
||||||
if (!err && a[OVS_VPORT_ATTR_UPCALL_PID])
|
if (err)
|
||||||
|
goto exit_unlock;
|
||||||
|
if (a[OVS_VPORT_ATTR_UPCALL_PID])
|
||||||
vport->upcall_pid = nla_get_u32(a[OVS_VPORT_ATTR_UPCALL_PID]);
|
vport->upcall_pid = nla_get_u32(a[OVS_VPORT_ATTR_UPCALL_PID]);
|
||||||
|
|
||||||
reply = ovs_vport_cmd_build_info(vport, info->snd_pid, info->snd_seq,
|
reply = ovs_vport_cmd_build_info(vport, info->snd_pid, info->snd_seq,
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2007-2011 Nicira Networks.
|
* Copyright (c) 2007-2012 Nicira, Inc.
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or
|
* This program is free software; you can redistribute it and/or
|
||||||
* modify it under the terms of version 2 of the GNU General Public
|
* modify it under the terms of version 2 of the GNU General Public
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2007-2011 Nicira Networks.
|
* Copyright (c) 2007-2012 Nicira, Inc.
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or
|
* This program is free software; you can redistribute it and/or
|
||||||
* modify it under the terms of version 2 of the GNU General Public
|
* modify it under the terms of version 2 of the GNU General Public
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2007-2011 Nicira Networks.
|
* Copyright (c) 2007-2011 Nicira, Inc.
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or
|
* This program is free software; you can redistribute it and/or
|
||||||
* modify it under the terms of version 2 of the GNU General Public
|
* modify it under the terms of version 2 of the GNU General Public
|
||||||
@@ -182,7 +182,8 @@ void ovs_flow_used(struct sw_flow *flow, struct sk_buff *skb)
|
|||||||
{
|
{
|
||||||
u8 tcp_flags = 0;
|
u8 tcp_flags = 0;
|
||||||
|
|
||||||
if (flow->key.eth.type == htons(ETH_P_IP) &&
|
if ((flow->key.eth.type == htons(ETH_P_IP) ||
|
||||||
|
flow->key.eth.type == htons(ETH_P_IPV6)) &&
|
||||||
flow->key.ip.proto == IPPROTO_TCP &&
|
flow->key.ip.proto == IPPROTO_TCP &&
|
||||||
likely(skb->len >= skb_transport_offset(skb) + sizeof(struct tcphdr))) {
|
likely(skb->len >= skb_transport_offset(skb) + sizeof(struct tcphdr))) {
|
||||||
u8 *tcp = (u8 *)tcp_hdr(skb);
|
u8 *tcp = (u8 *)tcp_hdr(skb);
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2007-2011 Nicira Networks.
|
* Copyright (c) 2007-2011 Nicira, Inc.
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or
|
* This program is free software; you can redistribute it and/or
|
||||||
* modify it under the terms of version 2 of the GNU General Public
|
* modify it under the terms of version 2 of the GNU General Public
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2007-2011 Nicira Networks.
|
* Copyright (c) 2007-2012 Nicira, Inc.
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or
|
* This program is free software; you can redistribute it and/or
|
||||||
* modify it under the terms of version 2 of the GNU General Public
|
* modify it under the terms of version 2 of the GNU General Public
|
||||||
@@ -24,6 +24,9 @@
|
|||||||
#include <linux/ethtool.h>
|
#include <linux/ethtool.h>
|
||||||
#include <linux/skbuff.h>
|
#include <linux/skbuff.h>
|
||||||
|
|
||||||
|
#include <net/dst.h>
|
||||||
|
#include <net/xfrm.h>
|
||||||
|
|
||||||
#include "datapath.h"
|
#include "datapath.h"
|
||||||
#include "vport-internal_dev.h"
|
#include "vport-internal_dev.h"
|
||||||
#include "vport-netdev.h"
|
#include "vport-netdev.h"
|
||||||
@@ -209,6 +212,11 @@ static int internal_dev_recv(struct vport *vport, struct sk_buff *skb)
|
|||||||
int len;
|
int len;
|
||||||
|
|
||||||
len = skb->len;
|
len = skb->len;
|
||||||
|
|
||||||
|
skb_dst_drop(skb);
|
||||||
|
nf_reset(skb);
|
||||||
|
secpath_reset(skb);
|
||||||
|
|
||||||
skb->dev = netdev;
|
skb->dev = netdev;
|
||||||
skb->pkt_type = PACKET_HOST;
|
skb->pkt_type = PACKET_HOST;
|
||||||
skb->protocol = eth_type_trans(skb, netdev);
|
skb->protocol = eth_type_trans(skb, netdev);
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2007-2011 Nicira Networks.
|
* Copyright (c) 2007-2011 Nicira, Inc.
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or
|
* This program is free software; you can redistribute it and/or
|
||||||
* modify it under the terms of version 2 of the GNU General Public
|
* modify it under the terms of version 2 of the GNU General Public
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2007-2011 Nicira Networks.
|
* Copyright (c) 2007-2012 Nicira, Inc.
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or
|
* This program is free software; you can redistribute it and/or
|
||||||
* modify it under the terms of version 2 of the GNU General Public
|
* modify it under the terms of version 2 of the GNU General Public
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2007-2011 Nicira Networks.
|
* Copyright (c) 2007-2011 Nicira, Inc.
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or
|
* This program is free software; you can redistribute it and/or
|
||||||
* modify it under the terms of version 2 of the GNU General Public
|
* modify it under the terms of version 2 of the GNU General Public
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2007-2011 Nicira Networks.
|
* Copyright (c) 2007-2012 Nicira, Inc.
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or
|
* This program is free software; you can redistribute it and/or
|
||||||
* modify it under the terms of version 2 of the GNU General Public
|
* modify it under the terms of version 2 of the GNU General Public
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2007-2011 Nicira Networks.
|
* Copyright (c) 2007-2012 Nicira, Inc.
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or
|
* This program is free software; you can redistribute it and/or
|
||||||
* modify it under the terms of version 2 of the GNU General Public
|
* modify it under the terms of version 2 of the GNU General Public
|
||||||
|
|||||||
Reference in New Issue
Block a user