numam-dpdk/lib
Patrice Buriez a09b359dac kni: fix build on Ubuntu 14.04
Recent Ubuntu kernel 3.13.0-30.54, although based on Linux kernel 3.13.11,
already provides skb_set_hash() inline function, slightly different than
the one provided by lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h

Ubuntu kernel 3.13.0-30.54 provides:
    * i40e/i40evf: i40e implementation for skb_set_hash
    - https://bugs.launchpad.net/bugs/1328037
    - http://changelogs.ubuntu.com/changelogs/pool/main/l/linux/linux_3.13.0-30.54/changelog

As a result, the implementation provided by kcompat.h must be skipped.
It is not appropriate to test whether LINUX_VERSION_CODE >= KERNEL_VERSION(3,13,11)
because previous Ubuntu kernel 3.13.0-29.53, already based on 3.13.11, needs to
get the implementation provided by kcompat.h

So the full Ubuntu kernel version numbering scheme must be tested:
<base kernel version>-<ABI number>.<upload number>-<flavour>
See "What does a specific Ubuntu kernel version number mean?"
and "How can we determine the version of the running kernel?"
at: https://wiki.ubuntu.com/Kernel/FAQ

Unlike RHEL_RELEASE_CODE, there is no such UBUNTU_RELEASE_CODE available out of
the box, so it needs to be crafted from the Makefile
Similarly, UBUNTU_KERNEL_CODE is generated with ABI and upload numbers.

`lsb_release -si` is first used to check whether we are running Ubuntu
`lsb_release -sr` provides release number 14.04, then converted to integer 1404
/proc/version_signature is parsed to get base kernel version, ABI and upload
numbers, and flavour is dropped

UBUNTU_KERNEL_CODE is indirectly defined using the UBUNTU_KERNEL_VERSION macro,
which in turn is defined in kcompat.h
This makes a single place to define the Ubuntu kernel version numbering scheme,
which is slightly different than the usual "shift by 8" scheme: ABI numbers can
be big (see: https://wiki.ubuntu.com/Kernel/Dev/TopicBranches), so 16-bits have
been reserved for them.

Finally, the implementaion of skb_set_hash is skipped in kcompat.h if we are
running Ubuntu 14.04 with an Ubuntu kernel >= 3.13.0-30.54

Signed-off-by: Patrice Buriez <patrice.buriez@intel.com>
[Thomas: simpler form, use tr instead of subst]
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2014-08-01 14:43:18 +02:00
..
librte_acl acl: make tailq fully local 2014-07-22 19:42:23 +02:00
librte_cfgfile eal: deprecate rte_snprintf 2014-06-27 02:31:24 +02:00
librte_cmdline eal: deprecate rte_snprintf 2014-06-27 02:31:24 +02:00
librte_distributor eal: deprecate rte_snprintf 2014-06-27 02:31:24 +02:00
librte_eal kni: fix build on Ubuntu 14.04 2014-08-01 14:43:18 +02:00
librte_ether ethdev: fix build of named allocation debug 2014-07-02 22:32:26 +02:00
librte_hash hash: make tailq fully local 2014-07-22 19:42:23 +02:00
librte_ip_frag ip_frag: custom memmove 2014-06-26 22:51:30 +02:00
librte_ivshmem eal: deprecate rte_snprintf 2014-06-27 02:31:24 +02:00
librte_kni eal: deprecate rte_snprintf 2014-06-27 02:31:24 +02:00
librte_kvargs kvargs: fix build with gcc 4.5.1 2014-06-17 19:01:59 +02:00
librte_lpm lpm: make tailq fully local 2014-07-22 19:42:23 +02:00
librte_malloc eal: deprecate rte_snprintf 2014-06-27 02:31:24 +02:00
librte_mbuf mbuf: add new packet flags for i40e 2014-06-17 18:22:02 +02:00
librte_mempool mempool: make tailq fully local 2014-07-22 19:42:23 +02:00
librte_meter remove trailing whitespaces 2014-06-11 00:29:34 +02:00
librte_net remove trailing whitespaces 2014-06-11 00:29:34 +02:00
librte_pipeline eal: deprecate rte_snprintf 2014-06-27 02:31:24 +02:00
librte_pmd_bond bond: fix variable initialization 2014-07-19 01:53:38 +02:00
librte_pmd_e1000 eal: deprecate rte_snprintf 2014-06-27 02:31:24 +02:00
librte_pmd_i40e i40e/base: disable some clang warnings 2014-07-19 01:54:12 +02:00
librte_pmd_ixgbe ixgbe/base: disable some clang warnings 2014-07-19 01:54:07 +02:00
librte_pmd_pcap pcap: fix build 2014-07-02 22:32:34 +02:00
librte_pmd_ring ring: remove extra devices creation with --vdev option 2014-07-22 16:43:04 +02:00
librte_pmd_virtio virtio: simplify the hardware structure 2014-07-22 15:00:01 +02:00
librte_pmd_vmxnet3 vmxnet3: remove useless adapter wrapper 2014-07-22 16:40:55 +02:00
librte_pmd_xenvirt xen: fix build 2014-07-03 16:12:39 +02:00
librte_port port: fix doxygen comment 2014-07-16 09:45:47 +02:00
librte_power eal: deprecate rte_snprintf 2014-06-27 02:31:24 +02:00
librte_ring ring: make tailq fully local 2014-07-22 19:42:18 +02:00
librte_sched remove trailing whitespaces 2014-06-11 00:29:34 +02:00
librte_table eal: deprecate rte_snprintf 2014-06-27 02:31:24 +02:00
librte_timer remove trailing whitespaces 2014-06-11 00:29:34 +02:00
Makefile bond: new link bonding library 2014-07-01 16:25:12 +02:00