Skip to content

Commit

Permalink
datapath: Revert "datapath: rhel: Account for RHEL specific backports"
Browse files Browse the repository at this point in the history
This reverts commit 752378e
(datapath: rhel: Account for RHEL specific backports).
Change related to netif_needs_gso() is cuasing panic on RHEL
and Xen platforms.  This way we revert back to use of ovs
skb_gso_segment() and netif_skb_features() which has required
compat code for gso for kernel older than 2.6.38.

<1>[  924.855722] BUG: unable to handle kernel NULL pointer dereference
at 000000a0
<1>[  924.855789] IP: [<f0337fb7>] netdev_send+0x77/0x340 [openvswitch]
<4>[  924.855849] *pdpt = 000000011bc66027 *pde = 0000000000000000
<0>[  924.855895] Oops: 0000 [openvswitch#1] SMP
<0>[  924.855927] last sysfs file: /sys/class/net/lo/carrier
<4>[  924.856551] Pid: 17937, comm: vif Not tainted
(2.6.32.43-0.4.1.xs1.6.10.734.170748xen openvswitch#1) VMware Virtual Platform
<4>[  924.856618] EIP: 0061:[<f0337fb7>] EFLAGS: 00010246 CPU: 0
<4>[  924.856659] EIP is at netdev_send+0x77/0x340 [openvswitch]
<4>[  924.856697] EAX: 00000000 EBX: dd4fb800 ECX: 00000000 EDX:
00000289
<4>[  924.856749] ESI: edd55a40 EDI: 000005dc EBP: df287aa8 ESP:
df287a7c
<4>[  924.856790]  DS: 007b ES: 007b FS: 00d8 GS: 0033 SS: 0069
<0>[  924.856825] Process vif (pid: 17937, ti=df286000 task=ee88d570
task.ti=df286000)
<0>[  924.856880] Stack:
<4>[  924.856902]  00000000 be8b9067 00000000 e9b02000 dd523ac0 dd523b50
f033aef1 b2e77c64
<4>[  924.856966] <0> dd523ac0 ee902840 dd4fc58c df287ab8 f0336162
edd55a40 ee902840 df287ac8
<4>[  924.857043] <0> f032d684 0000001e ee10a300 df287b34 f032d6ef
0000001c 00000000 00000000
<0>[  924.858942] Call Trace:
<4>[  924.859553]  [<f033aef1>] ? flex_array_get+0x51/0x70 [openvswitch]
<4>[  924.860189]  [<f0336162>] ? ovs_vport_send+0x12/0x50 [openvswitch]
<4>[  924.860806]  [<f032d684>] ? do_output+0x34/0x50 [openvswitch]
<4>[  924.861444]  [<f032d6ef>] ? do_execute_actions+0x4f/0x830
[openvswitch]
<4>[  924.862047]  [<f032dfa0>] ? ovs_execute_actions+0x70/0xd0
[openvswitch]
<4>[  924.862636]  [<f032fd3f>] ?
ovs_dp_process_received_packet+0x8f/0xf0 [openvswitch]
<4>[  924.863774]  [<f033690e>] ? ovs_vport_receive+0x5e/0x70
[openvswitch]
<4>[  924.864354]  [<f0337d9f>] ? netdev_frame_hook+0x4f/0x90
[openvswitch]
<4>[  924.864918]  [<c034f7ab>] ? netif_receive_skb+0x1bb/0x6a0
<4>[  924.865469]  [<c03c193f>] ? vlan_gro_common+0x10f/0x230
<4>[  924.866007]  [<c034fd58>] ? napi_skb_finish+0x38/0x40
<4>[  924.866533]  [<c03c1e86>] ? vlan_gro_receive+0x76/0x80
<4>[  924.867055]  [<f05adba4>] ? e1000_receive_skb+0x74/0x80 [e1000]
<4>[  924.867571]  [<f05b2b67>] ? e1000_clean_rx_irq+0x1f7/0x3e0 [e1000]
<4>[  924.868084]  [<f05b2970>] ? e1000_clean_rx_irq+0x0/0x3e0 [e1000]
<4>[  924.869025]  [<f05b06ac>] ? e1000_poll+0x4c/0x1f0 [e1000]

--snip--

Signed-off-by: Pravin B Shelar <[email protected]>
Acked-by: Jesse Gross <[email protected]>
  • Loading branch information
Pravin B Shelar committed Jul 15, 2013
1 parent fab52e1 commit a2b7fd3
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 8 deletions.
3 changes: 0 additions & 3 deletions acinclude.m4
Original file line number Diff line number Diff line change
Expand Up @@ -225,10 +225,7 @@ AC_DEFUN([OVS_CHECK_LINUX_COMPAT], [
OVS_GREP_IFELSE([$KSRC/include/linux/netdevice.h], [dev_get_stats])
OVS_GREP_IFELSE([$KSRC/include/linux/netdevice.h], [dev_get_by_index_rcu])
OVS_GREP_IFELSE([$KSRC/include/linux/netdevice.h], [__skb_gso_segment])
OVS_GREP_IFELSE([$KSRC/include/linux/netdevice.h], [skb_gso_segment])
OVS_GREP_IFELSE([$KSRC/include/linux/netdevice.h], [can_checksum_protocol])
OVS_GREP_IFELSE([$KSRC/include/linux/netdevice.h], [netif_skb_features])
OVS_GREP_IFELSE([$KSRC/include/linux/netdevice.h], [netif_needs_gso])
OVS_GREP_IFELSE([$KSRC/include/linux/rcupdate.h], [rcu_read_lock_held], [],
[OVS_GREP_IFELSE([$KSRC/include/linux/rtnetlink.h],
Expand Down
6 changes: 1 addition & 5 deletions datapath/linux/compat/include/linux/netdevice.h
Original file line number Diff line number Diff line change
Expand Up @@ -161,17 +161,13 @@ static inline struct net_device *dev_get_by_index_rcu(struct net *net, int ifind
#define NETIF_F_V6_CSUM (NETIF_F_GEN_CSUM | NETIF_F_IPV6_CSUM)
#endif

#ifndef HAVE_SKB_GSO_SEGMENT
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,38)
#define skb_gso_segment rpl_skb_gso_segment
struct sk_buff *rpl_skb_gso_segment(struct sk_buff *skb, u32 features);
#endif

#ifndef HAVE_NETIF_SKB_FEATURES
#define netif_skb_features rpl_netif_skb_features
u32 rpl_netif_skb_features(struct sk_buff *skb);
#endif

#ifndef HAVE_NETIF_NEEDS_GSO
#define netif_needs_gso rpl_netif_needs_gso
static inline int rpl_netif_needs_gso(struct sk_buff *skb, int features)
{
Expand Down

0 comments on commit a2b7fd3

Please sign in to comment.