[ovs-git] [openvswitch/ovs] 69b45f: datapath: Support a fixed size of 128 distinct lab...

GitHub noreply at github.com
Thu Oct 20 22:29:13 UTC 2016


  Branch: refs/heads/branch-2.6
  Home:   https://github.com/openvswitch/ovs
  Commit: 69b45ff1782266a202e6ddb3b7adf976e70ada98
      https://github.com/openvswitch/ovs/commit/69b45ff1782266a202e6ddb3b7adf976e70ada98
  Author: Jarno Rajahalme <jarno at ovn.org>
  Date:   2016-10-20 (Thu, 20 Oct 2016)

  Changed paths:
    M acinclude.m4
    M datapath/conntrack.c

  Log Message:
  -----------
  datapath: Support a fixed size of 128 distinct labels.

Port upstream change in conntrack labels extension.  Add a new
configure macro HAVE_NF_CONN_LABELS_WITH_WORDS to detect the old
definition.  Unfortunately there is no conntrack API to hide the
difference, so the this makes conntrack.c deviate from upstream source
a bit.

Upstream commit:
    commit 23014011ba4209a086931ff402eac1c41abbe456
    Author: Florian Westphal <fw at strlen.de>
    Date:   Thu Jul 21 12:51:16 2016 +0200

    netfilter: conntrack: support a fixed size of 128 distinct labels

    The conntrack label extension is currently variable-sized, e.g. if
    only 2 labels are used by iptables rules then the labels->bits[] array
    will only contain one element.

    We track size of each label storage area in the 'words' member.

    But in nftables and openvswitch we always have to ask for worst-case
    since we don't know what bit will be used at configuration time.

    As most arches are 64bit we need to allocate 24 bytes in this case:

    struct nf_conn_labels {
  u8            words;   /*     0     1 */
  /* XXX 7 bytes hole, try to pack */
  long unsigned bits[2]; /*     8     24 */

    Make bits a fixed size and drop the words member, it simplifies
    the code and only increases memory requirements on x86 when
    less than 64bit labels are required.

    We still only allocate the extension if its needed.

    Signed-off-by: Florian Westphal <fw at strlen.de>
    Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>

Signed-off-by: Jarno Rajahalme <jarno at ovn.org>
Acked-by: Pravin B Shelar <pshelar at ovn.org>


  Commit: 2bd981c0d4f5e8bd483436337109b578bbf1c679
      https://github.com/openvswitch/ovs/commit/2bd981c0d4f5e8bd483436337109b578bbf1c679
  Author: Jarno Rajahalme <jarno at ovn.org>
  Date:   2016-10-20 (Thu, 20 Oct 2016)

  Changed paths:
    M acinclude.m4

  Log Message:
  -----------
  configure: Support compiling with Linux 4.8.

Datapath should now compile and work with Linux 4.8.

Signed-off-by: Jarno Rajahalme <jarno at ovn.org>
Acked-by: Pravin B Shelar <pshelar at ovn.org>


Compare: https://github.com/openvswitch/ovs/compare/478cec82203b...2bd981c0d4f5


More information about the git mailing list