diff options
Diffstat (limited to 'net/openvswitch')
-rw-r--r-- | net/openvswitch/datapath.c | 5 | ||||
-rw-r--r-- | net/openvswitch/vport-internal_dev.c | 3 | ||||
-rw-r--r-- | net/openvswitch/vport-netdev.c | 16 |
3 files changed, 12 insertions, 12 deletions
diff --git a/net/openvswitch/datapath.c b/net/openvswitch/datapath.c index f996db343247..9dc537df46c4 100644 --- a/net/openvswitch/datapath.c +++ b/net/openvswitch/datapath.c | |||
@@ -301,7 +301,7 @@ static int queue_gso_packets(struct net *net, int dp_ifindex, | |||
301 | struct sk_buff *segs, *nskb; | 301 | struct sk_buff *segs, *nskb; |
302 | int err; | 302 | int err; |
303 | 303 | ||
304 | segs = skb_gso_segment(skb, NETIF_F_SG | NETIF_F_HW_CSUM); | 304 | segs = __skb_gso_segment(skb, NETIF_F_SG | NETIF_F_HW_CSUM, false); |
305 | if (IS_ERR(segs)) | 305 | if (IS_ERR(segs)) |
306 | return PTR_ERR(segs); | 306 | return PTR_ERR(segs); |
307 | 307 | ||
@@ -1989,10 +1989,9 @@ static struct pernet_operations ovs_net_ops = { | |||
1989 | 1989 | ||
1990 | static int __init dp_init(void) | 1990 | static int __init dp_init(void) |
1991 | { | 1991 | { |
1992 | struct sk_buff *dummy_skb; | ||
1993 | int err; | 1992 | int err; |
1994 | 1993 | ||
1995 | BUILD_BUG_ON(sizeof(struct ovs_skb_cb) > sizeof(dummy_skb->cb)); | 1994 | BUILD_BUG_ON(sizeof(struct ovs_skb_cb) > FIELD_SIZEOF(struct sk_buff, cb)); |
1996 | 1995 | ||
1997 | pr_info("Open vSwitch switching datapath\n"); | 1996 | pr_info("Open vSwitch switching datapath\n"); |
1998 | 1997 | ||
diff --git a/net/openvswitch/vport-internal_dev.c b/net/openvswitch/vport-internal_dev.c index 5d460c37df07..0531de6c7a4a 100644 --- a/net/openvswitch/vport-internal_dev.c +++ b/net/openvswitch/vport-internal_dev.c | |||
@@ -69,7 +69,6 @@ static int internal_dev_mac_addr(struct net_device *dev, void *p) | |||
69 | 69 | ||
70 | if (!is_valid_ether_addr(addr->sa_data)) | 70 | if (!is_valid_ether_addr(addr->sa_data)) |
71 | return -EADDRNOTAVAIL; | 71 | return -EADDRNOTAVAIL; |
72 | dev->addr_assign_type &= ~NET_ADDR_RANDOM; | ||
73 | memcpy(dev->dev_addr, addr->sa_data, dev->addr_len); | 72 | memcpy(dev->dev_addr, addr->sa_data, dev->addr_len); |
74 | return 0; | 73 | return 0; |
75 | } | 74 | } |
@@ -98,7 +97,7 @@ static int internal_dev_stop(struct net_device *netdev) | |||
98 | static void internal_dev_getinfo(struct net_device *netdev, | 97 | static void internal_dev_getinfo(struct net_device *netdev, |
99 | struct ethtool_drvinfo *info) | 98 | struct ethtool_drvinfo *info) |
100 | { | 99 | { |
101 | strcpy(info->driver, "openvswitch"); | 100 | strlcpy(info->driver, "openvswitch", sizeof(info->driver)); |
102 | } | 101 | } |
103 | 102 | ||
104 | static const struct ethtool_ops internal_dev_ethtool_ops = { | 103 | static const struct ethtool_ops internal_dev_ethtool_ops = { |
diff --git a/net/openvswitch/vport-netdev.c b/net/openvswitch/vport-netdev.c index a9327e2e48ce..670cbc3518de 100644 --- a/net/openvswitch/vport-netdev.c +++ b/net/openvswitch/vport-netdev.c | |||
@@ -35,10 +35,11 @@ | |||
35 | /* Must be called with rcu_read_lock. */ | 35 | /* Must be called with rcu_read_lock. */ |
36 | static void netdev_port_receive(struct vport *vport, struct sk_buff *skb) | 36 | static void netdev_port_receive(struct vport *vport, struct sk_buff *skb) |
37 | { | 37 | { |
38 | if (unlikely(!vport)) { | 38 | if (unlikely(!vport)) |
39 | kfree_skb(skb); | 39 | goto error; |
40 | return; | 40 | |
41 | } | 41 | if (unlikely(skb_warn_if_lro(skb))) |
42 | goto error; | ||
42 | 43 | ||
43 | /* Make our own copy of the packet. Otherwise we will mangle the | 44 | /* Make our own copy of the packet. Otherwise we will mangle the |
44 | * packet for anyone who came before us (e.g. tcpdump via AF_PACKET). | 45 | * packet for anyone who came before us (e.g. tcpdump via AF_PACKET). |
@@ -50,6 +51,10 @@ static void netdev_port_receive(struct vport *vport, struct sk_buff *skb) | |||
50 | 51 | ||
51 | skb_push(skb, ETH_HLEN); | 52 | skb_push(skb, ETH_HLEN); |
52 | ovs_vport_receive(vport, skb); | 53 | ovs_vport_receive(vport, skb); |
54 | return; | ||
55 | |||
56 | error: | ||
57 | kfree_skb(skb); | ||
53 | } | 58 | } |
54 | 59 | ||
55 | /* Called with rcu_read_lock and bottom-halves disabled. */ | 60 | /* Called with rcu_read_lock and bottom-halves disabled. */ |
@@ -169,9 +174,6 @@ static int netdev_send(struct vport *vport, struct sk_buff *skb) | |||
169 | goto error; | 174 | goto error; |
170 | } | 175 | } |
171 | 176 | ||
172 | if (unlikely(skb_warn_if_lro(skb))) | ||
173 | goto error; | ||
174 | |||
175 | skb->dev = netdev_vport->dev; | 177 | skb->dev = netdev_vport->dev; |
176 | len = skb->len; | 178 | len = skb->len; |
177 | dev_queue_xmit(skb); | 179 | dev_queue_xmit(skb); |