datapath: ipfrag: reassemble fragmens

This series of patches handles IPv4 fragmentation and reassembly,
preserving the maximum fragment size of all fragments across
inbound and outbound physical vports so that Path MTU Discovery
works properly traversing an OVS network.

This patch introduces reassembly of IPv4 fragments and allows flow
matching L4 fields using fully reassembled, entire packets.
An attribute flag, OVS_VPORT_ATTR_IPV4_REASM is added to vport to
enable/disable reassembly. Disabled by default. Note that the flag
works only on NETDEV or INTERNAL vports with this patch. For others,
it's going to be covered by later patches.

The burden of handling reassembling is largely tossed to the kernel
networking infrastructure, ip_defrag in net/ipv4/ip_fragment.c,
which saves the maximum fragment size in IPCB which is non-zero if
at least one fragment had DF (Don't Fragment) set.

Signed-off-by: Takayuki Usui <takayuki@midokura.com>
datapath: ipfrag: reassemble fragmens (GRE/GRE64 vport)

The patch allows reassembly of IPv4 fragments on GRE/GRE64 vports;
update mac and network headers pointing to the inner frame, then
call ip_defrag as physical vports.

Signed-off-by: Takayuki Usui <takayuki@midokura.com>
datapath: ipfrag: fragment packets

This patch fragments packets outgoing from NETDEV or INTERNAL
vports. MTU is extracted from the corresponding physical device.

Signed-off-by: Takayuki Usui <takayuki@midokura.com>
datapath: ipfrag: fragment packets (802.1Q interface)

This patch handles fragmentation of packets outgoing to VLAN
interface; Untag 802.1Q frames just being sent, build fragments
preserving 802.1Q stuff in skb and send them executing the same
path as non-VLAN ethernet frames.

Signed-off-by: Takayuki Usui <takayuki@midokura.com>
datapath: ipfrag: extend flow key with maximum fragment size

This patch extends flow key with the maximum fragment size which is
non-zero if at least one fragment had DF set. It's a metadata, since
it doesn't occupy IP header. The maximum fragment size is used when
a packet is fragmented in order to preserve the maximum fragment size
of the packet across inbound and outbound physical vports.

Because the maximum fragment size is stored in OVS_CB as part of
a flow key, it's always available at outgoing vports.

Signed-off-by: Takayuki Usui <takayuki@midokura.com>
datapath: ipfrag: generate ICMP for Path MTU Discovery

This patch (re)introduces another attribute flag on vport
OVS_VPORT_ATTR_IPV4_PMTUD which is disabled by default.
If an outgoing packet is larger than the MTU of the egress vport,
it generates ICMP (Fragmentation Needed) message. This enables
Path MTU Discovery across an OVS network preserving the maximum
fragment size in fragmentation and reassembly.

Signed-off-by: Takayuki Usui <takayuki@midokura.com>
datapath: ipfrag: generate ICMP for Path MTU Discovery (802.1Q)

This patch generates ICMP (Fragmentation Needed) message to VLAN
interface.

Signed-off-by: Takayuki Usui <takayuki@midokura.com>