From: Manjunath Govindashetty Date: Thu, 10 Dec 2015 02:10:58 +0000 (-0800) Subject: KABI: padding optimization X-Git-Tag: v4.1.12-92~217^2 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=78bee68ce5212bfb08e0ae2af4f49010004e9e7b;p=users%2Fjedix%2Flinux-maple.git KABI: padding optimization Orabug : 22239883 Removed pads affecting the network datapath in sock , sk_buff net , pci_dev and iptunnel Signed-off-by: Manjunath Govindashetty --- diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h index d22c8ad2c1a1..d78df14d857f 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h @@ -308,12 +308,11 @@ struct queue_limits { unsigned char cluster; unsigned char discard_zeroes_data; unsigned char raid_partial_stripes_expensive; - /* Oracle inc use only - * - * The following padding has been inserted before ABI freeze to - * allow extending the structure while preserving ABI. - */ - + /* Oracle inc use only + * + * The following padding has been inserted before ABI freeze to + * allow extending the structure while preserving ABI. + */ UEK_KABI_RESERVED(1) UEK_KABI_RESERVED(2) }; diff --git a/include/linux/mm_types.h b/include/linux/mm_types.h index f41302bfd50d..169b38195168 100644 --- a/include/linux/mm_types.h +++ b/include/linux/mm_types.h @@ -1,7 +1,6 @@ #ifndef _LINUX_MM_TYPES_H #define _LINUX_MM_TYPES_H -#include #include #include #include @@ -11,6 +10,7 @@ #include #include #include +#include #include #include #include @@ -314,7 +314,7 @@ struct vm_area_struct { #ifdef CONFIG_NUMA struct mempolicy *vm_policy; /* NUMA policy for the VMA */ #endif - /* Oracle inc use only + /* Oracle inc use only * The following padding has been inserted before ABI freeze to * allow extending the structure while preserving ABI. */ diff --git a/include/linux/pci.h b/include/linux/pci.h index 90a6ffe468c8..2882e4f4056a 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h @@ -33,7 +33,6 @@ #include #include -#include /* * The PCI interface treats multi-function devices as independent @@ -380,14 +379,6 @@ struct pci_dev { phys_addr_t rom; /* Physical address of ROM if it's not from the BAR */ size_t romlen; /* Length of ROM if it's not from the BAR */ char *driver_override; /* Driver name to force a match */ -/* - * Oracle Specific Extension to accomodate future upstream changes to this structure - * yet maintain KABI. For Oracle internal use only! - */ - UEK_KABI_EXTEND(u8 uek_reserved1) - UEK_KABI_EXTEND(u16 uek_reserved2) - UEK_KABI_EXTEND(unsigned int uek_reserved3) - UEK_KABI_EXTEND(u64 uek_reserved4) }; static inline struct pci_dev *pci_physfn(struct pci_dev *dev) diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index fcd05bcfba54..f15154a879c7 100644 --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h @@ -34,7 +34,6 @@ #include #include #include -#include #include /* A. Checksumming of received packets by device. @@ -608,7 +607,6 @@ struct sk_buff { __u8 csum_valid:1; __u8 csum_complete_sw:1; __u8 csum_level:2; - __u8 csum_pad:1; __u8 csum_bad:1; #ifdef CONFIG_IPV6_NDISC_NODETYPE @@ -677,13 +675,6 @@ struct sk_buff { *data; unsigned int truesize; atomic_t users; - /* Oracle inc use only - * - * The following padding has been inserted before ABI freeze to - * allow extending the structure while preserving ABI. - */ - UEK_KABI_RESERVED(1) - UEK_KABI_RESERVED(2) }; #ifdef __KERNEL__ diff --git a/include/linux/user_namespace.h b/include/linux/user_namespace.h index 78d1148ca6b6..54d88cb22391 100644 --- a/include/linux/user_namespace.h +++ b/include/linux/user_namespace.h @@ -40,11 +40,11 @@ struct user_namespace { struct key *persistent_keyring_register; struct rw_semaphore persistent_keyring_register_sem; #endif - /* Oracle use only - * - * The following padding has been inserted before ABI freeze to - * allow extending the structure while preserve ABI. - */ + /* Oracle use only + * + * The following padding has been inserted before ABI freeze to + * allow extending the structure while preserve ABI. + */ UEK_KABI_EXTEND(bool may_mount_sysfs) UEK_KABI_EXTEND(bool may_mount_proc) }; diff --git a/include/net/ip_tunnels.h b/include/net/ip_tunnels.h index 95ceb532447c..d8214cb88bbc 100644 --- a/include/net/ip_tunnels.h +++ b/include/net/ip_tunnels.h @@ -5,7 +5,6 @@ #include #include #include -#include #include #include #include @@ -85,13 +84,6 @@ struct ip_tunnel { unsigned int prl_count; /* # of entries in PRL */ int ip_tnl_net_id; struct gro_cells gro_cells; - /* Oracle inc use only - * - * The following padding has been inserted before ABI freeze to - * allow extending the structure while preserving ABI. - */ - UEK_KABI_RESERVED(1) - UEK_KABI_RESERVED(2) }; #define TUNNEL_CSUM __cpu_to_be16(0x01) diff --git a/include/net/net_namespace.h b/include/net/net_namespace.h index ee2e43512b3d..f733656404de 100644 --- a/include/net/net_namespace.h +++ b/include/net/net_namespace.h @@ -28,7 +28,6 @@ #include #include #include -#include struct user_namespace; struct proc_dir_entry; @@ -134,18 +133,6 @@ struct net { #endif struct sock *diag_nlsk; atomic_t fnhe_genid; - /* Oracle use only - * - * The following padding has been inserted before ABI freeze to - * allow extending the structure while preserving ABI. - */ - UEK_KABI_EXTEND(int sysctl_ip_no_pmtu_disc) - UEK_KABI_EXTEND(int sysctl_ip_fwd_use_pmtu) - /* upstream has this as part of netns_ipv4 */ - UEK_KABI_EXTEND(struct local_ports ipv4_sysctl_local_ports) - UEK_KABI_EXTEND(spinlock_t nsid_lock) - /* upstream has this as part of netns_ipv4 */ - UEK_KABI_EXTEND(struct sock * __percpu *ipv4_tcp_sk) }; #include diff --git a/include/net/sock.h b/include/net/sock.h index 6f91ef2f02e2..3a4898ec8c67 100644 --- a/include/net/sock.h +++ b/include/net/sock.h @@ -62,7 +62,6 @@ #include #include #include -#include #include #include @@ -439,14 +438,6 @@ struct sock { int (*sk_backlog_rcv)(struct sock *sk, struct sk_buff *skb); void (*sk_destruct)(struct sock *sk); - /* Oracle specific - * padding inserted before ABI freeze to - * allow extending the structure while preserving ABI. Feel free - * to replace reserved slots with required structure field - * additions of your backport. - */ - UEK_KABI_RESERVED(1) - UEK_KABI_RESERVED(2) }; #define __sk_user_data(sk) ((*((void __rcu **)&(sk)->sk_user_data))) diff --git a/include/scsi/scsi_host.h b/include/scsi/scsi_host.h index 910aa0279395..77ddd61a374b 100644 --- a/include/scsi/scsi_host.h +++ b/include/scsi/scsi_host.h @@ -760,7 +760,7 @@ struct Scsi_Host { * alignment to a long boundary. */ unsigned long hostdata[0] /* Used for storage of host specific stuff */ - __attribute__ ((aligned (sizeof(unsigned long)))); + __attribute__ ((aligned (sizeof(unsigned long)))); }; #define class_to_shost(d) \