projects
/
openvswitch
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
ovs-bugtool: Add an OVSDB snapshot to ovs-bugtool output.
[openvswitch]
/
datapath
/
datapath.c
diff --git
a/datapath/datapath.c
b/datapath/datapath.c
index e2846f2099cea1f9c0dd5f058899f131a6b08f42..d1493445721ce3a40109b5923744a935e8666731 100644
(file)
--- a/
datapath/datapath.c
+++ b/
datapath/datapath.c
@@
-53,6
+53,11
@@
#include "vlan.h"
#include "vport-internal_dev.h"
#include "vlan.h"
#include "vport-internal_dev.h"
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,18) || \
+ LINUX_VERSION_CODE >= KERNEL_VERSION(3,1,0)
+#error Kernels before 2.6.18 or after 3.0 are not supported by this version of Open vSwitch.
+#endif
+
int (*dp_ioctl_hook)(struct net_device *dev, struct ifreq *rq, int cmd);
EXPORT_SYMBOL(dp_ioctl_hook);
int (*dp_ioctl_hook)(struct net_device *dev, struct ifreq *rq, int cmd);
EXPORT_SYMBOL(dp_ioctl_hook);
@@
-284,7
+289,7
@@
void dp_process_received_packet(struct vport *p, struct sk_buff *skb)
}
if (is_frag && dp->drop_frags) {
}
if (is_frag && dp->drop_frags) {
-
kfre
e_skb(skb);
+
consum
e_skb(skb);
stats_counter_off = offsetof(struct dp_stats_percpu, n_frags);
goto out;
}
stats_counter_off = offsetof(struct dp_stats_percpu, n_frags);
goto out;
}
@@
-394,23
+399,20
@@
int dp_upcall(struct datapath *dp, struct sk_buff *skb, const struct dp_upcall_i
WARN_ON_ONCE(skb_shared(skb));
WARN_ON_ONCE(skb_shared(skb));
- forward_ip_summed(skb);
-
- err = vswitch_skb_checksum_setup(skb);
- if (err)
- goto err_kfree_skb;
+ forward_ip_summed(skb, true);
/* Break apart GSO packets into their component pieces. Otherwise
* userspace may try to stuff a 64kB packet into a 1500-byte MTU. */
if (skb_is_gso(skb)) {
struct sk_buff *nskb = skb_gso_segment(skb, NETIF_F_SG | NETIF_F_HW_CSUM);
/* Break apart GSO packets into their component pieces. Otherwise
* userspace may try to stuff a 64kB packet into a 1500-byte MTU. */
if (skb_is_gso(skb)) {
struct sk_buff *nskb = skb_gso_segment(skb, NETIF_F_SG | NETIF_F_HW_CSUM);
- kfree_skb(skb);
- skb = nskb;
- if (IS_ERR(skb)) {
- err = PTR_ERR(skb);
+ if (IS_ERR(nskb)) {
+ kfree_skb(skb);
+ err = PTR_ERR(nskb);
goto err;
}
goto err;
}
+ consume_skb(skb);
+ skb = nskb;
}
err = queue_control_packets(dp, skb, upcall_info);
}
err = queue_control_packets(dp, skb, upcall_info);
@@
-419,8
+421,6
@@
int dp_upcall(struct datapath *dp, struct sk_buff *skb, const struct dp_upcall_i
return 0;
return 0;
-err_kfree_skb:
- kfree_skb(skb);
err:
local_bh_disable();
stats = per_cpu_ptr(dp->stats_percpu, smp_processor_id());
err:
local_bh_disable();
stats = per_cpu_ptr(dp->stats_percpu, smp_processor_id());
@@
-507,7
+507,7
@@
static int queue_control_packets(struct datapath *dp, struct sk_buff *skb,
if (err)
goto err_kfree_skbs;
if (err)
goto err_kfree_skbs;
-
kfre
e_skb(skb);
+
consum
e_skb(skb);
skb = nskb;
} while (skb);
return 0;
skb = nskb;
} while (skb);
return 0;