remarkable-linux/net/openvswitch
Florian Westphal 23014011ba 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@strlen.de>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
2016-07-22 17:04:55 +02:00
..
actions.c openvswitch: Add packet truncation support. 2016-06-10 17:58:03 -07:00
conntrack.c netfilter: conntrack: support a fixed size of 128 distinct labels 2016-07-22 17:04:55 +02:00
conntrack.h openvswitch: Interface with NAT. 2016-03-14 23:47:29 +01:00
datapath.c openvswitch: Add packet len info to upcall. 2016-06-22 16:34:39 -04:00
datapath.h openvswitch: Add packet truncation support. 2016-06-10 17:58:03 -07:00
dp_notify.c
flow.c
flow.h ip_tunnels, bpf: define IP_TUNNEL_OPTS_MAX and use it 2016-03-18 19:38:46 -04:00
flow_netlink.c openvswitch: Add packet truncation support. 2016-06-10 17:58:03 -07:00
flow_netlink.h
flow_table.c
flow_table.h
Kconfig openvswitch: call only into reachable nf-nat code 2016-03-28 17:58:59 +02:00
Makefile
vport-geneve.c Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2016-03-17 21:38:27 -07:00
vport-gre.c
vport-internal_dev.c ovs: set name assign type of internal port 2016-06-02 18:05:47 -04:00
vport-internal_dev.h
vport-netdev.c net: use skb_postpush_rcsum instead of own implementations 2016-02-19 23:43:10 -05:00
vport-netdev.h
vport-vxlan.c lwt: fix rx checksum setting for lwt devices tunneling over ipv6 2016-02-19 15:39:30 -05:00
vport.c openvswitch: Add packet truncation support. 2016-06-10 17:58:03 -07:00
vport.h net: use skb_postpush_rcsum instead of own implementations 2016-02-19 23:43:10 -05:00