From a2b7fd3fa66e1b3eddc4dfc437d7d9eec4670cfb Mon Sep 17 00:00:00 2001 From: Pravin B Shelar Date: Mon, 15 Jul 2013 12:45:20 -0700 Subject: [PATCH] datapath: Revert "datapath: rhel: Account for RHEL specific backports" This reverts commit 752378e1cd1f133a8366fbacec3b281a45ff8268 (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: [] netdev_send+0x77/0x340 [openvswitch] <4>[ 924.855849] *pdpt = 000000011bc66027 *pde = 0000000000000000 <0>[ 924.855895] Oops: 0000 [#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 #1) VMware Virtual Platform <4>[ 924.856618] EIP: 0061:[] 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] [] ? flex_array_get+0x51/0x70 [openvswitch] <4>[ 924.860189] [] ? ovs_vport_send+0x12/0x50 [openvswitch] <4>[ 924.860806] [] ? do_output+0x34/0x50 [openvswitch] <4>[ 924.861444] [] ? do_execute_actions+0x4f/0x830 [openvswitch] <4>[ 924.862047] [] ? ovs_execute_actions+0x70/0xd0 [openvswitch] <4>[ 924.862636] [] ? ovs_dp_process_received_packet+0x8f/0xf0 [openvswitch] <4>[ 924.863774] [] ? ovs_vport_receive+0x5e/0x70 [openvswitch] <4>[ 924.864354] [] ? netdev_frame_hook+0x4f/0x90 [openvswitch] <4>[ 924.864918] [] ? netif_receive_skb+0x1bb/0x6a0 <4>[ 924.865469] [] ? vlan_gro_common+0x10f/0x230 <4>[ 924.866007] [] ? napi_skb_finish+0x38/0x40 <4>[ 924.866533] [] ? vlan_gro_receive+0x76/0x80 <4>[ 924.867055] [] ? e1000_receive_skb+0x74/0x80 [e1000] <4>[ 924.867571] [] ? e1000_clean_rx_irq+0x1f7/0x3e0 [e1000] <4>[ 924.868084] [] ? e1000_clean_rx_irq+0x0/0x3e0 [e1000] <4>[ 924.869025] [] ? e1000_poll+0x4c/0x1f0 [e1000] --snip-- Signed-off-by: Pravin B Shelar Acked-by: Jesse Gross --- acinclude.m4 | 3 --- datapath/linux/compat/include/linux/netdevice.h | 6 +----- 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/acinclude.m4 b/acinclude.m4 index d9fddf87e..717c68166 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -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], diff --git a/datapath/linux/compat/include/linux/netdevice.h b/datapath/linux/compat/include/linux/netdevice.h index 176d1e679..ba1fc593e 100644 --- a/datapath/linux/compat/include/linux/netdevice.h +++ b/datapath/linux/compat/include/linux/netdevice.h @@ -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) { -- 2.43.0