DRAFT: mpls: store nhlfe instructions as nlattr

- less code as we don't need to convert it to anything
- it is going to be faster as all the instruction data (even nexthop
  address, and push values) are going to be in same cache line
- dumping is just copying the same bits back to nlmsg
- comparing will be a plain memcmp
- less kalloc()'s causing less fragmentation
- applying attributes changed to switch so we avoid call-by-pointer
  which is more expensive than call with address and allows inlining
  the opcode implementation

Things to fix are marked with FIXME (most of them are valid even
current mpls master).

Additionally should think if we want really struct sockaddr_in[6] in
MPLSA_NEXTHOP_ADDR, or if we should keep the raw address there only.

Signed-off-by: Timo Teräs <timo.teras@iki.fi>
trivial: ws fixes
include: linux: Declare src parameter of list_replace as const

We can declare it as const, since we're not modifying it in this function.
net: ipv6: When manually deleting IPv6 route, delete non-cached route first
net: ipv6: Reflow function ip6_push_pending_frames

Function ip6_push_pending_frames was split in to two functions:
- ip6_finish_skb - which creates skb from the struct sock
- ip6_send_skb - which sends created skb
include: uapi: linux: Add MPLS if flag

If this flag is set, interface can forward/receive MPLS traffic.
net: {ipv4/ipv6}: Introduce flag for finding MPLS enabled route

Introduced flowi_flag:

FLOWI_FLAG_MPLS

and rt6_lookup flag:

RT6_LOOKUP_F_MPLS

If those flags are set, we're searching for route that's going through MPLS enabled interface.
net: mpls: Take care about the IFF_MPLS flag

We're searching IP routes that go only through MPLS enabled interface.
Also we can only receive MPLS traffic through MPLS enabled interface.
net: mpls: Introduce functions for netns handling
net: ipv6: Enable creation of IPv6 MPLS routes
lib: Introduced NLA_PROHIBIT flag

Introduced NLA_PROHIBIT flag as standard attribute type to specify nla validation policy.
It's used to explicitly prohibit use of some nlattr.

When validating policy, if nlattr has this attribute, -EINVAL is signaled back.
net: Large number of fixes and improvements

1. nhlfe don't hold nlattr but each instruction has it field.
At the end of the NHLFE we store MPLS labels, that are network ready.
If we have swap instruction, first label is for swaping.
Other labels are for pushing. NHLFE is ALIGNED to sizeof(long long)
2. MPLSCB now contains IPCB and IP6CB structs inside of itself. That way
we can pass sizeof MPLS stack to the ip{,6}_fragment function. Size of MPLSCB
must not be larger then the size of sk_buff member cb!
3. Fixed sending of ICMP packets and fragmentation of MPLS packets
4. Fixed error handling on the MPLS packet path (skb's were freed
twice in case of error, etc.)
5. Netns handling is tested and looks ok
net: mpls: Use dead member as a starting point for nhlfe comparisons
net: mpls: Introduced pop all instruction
net: Introduce nf_mpls struct

Struct nf_mpls is now caried inside of struct sk_buff as one of its members.

It's used the same way as nf_brudge is used. It carries MPLS private data,
as nexthop addr, sizeof MPLS stack, MPLS stack, pointers to nhlfe and to incoming net_device.

Nexthop addr is needed in the IPv{4,6} layer so the packet would be sent to the appropriate nexthop.
Sizeof MPLS stack, MPLS stack, nhlfe and dev are needed when we're fragmenting MPLS packet, or when we're
sending ICMP messages from MPLS tunnel.

This patch should be revisited in terms that changes specific to non-MPLS code
should be separated from other changes.
net: In fib{,6}_config fc_nhlfe is struct nhlfe

By changing fc_nhlfe to be struct nhlfe instead of struct nlattr,
we have faster comparison of nhlfe entries when building and deleting routes.
net: mpls: Delete netns ilm entries by passing through hash
net: mpls: Disallow nhlfe building if dev is down or isn't MPLS enabled
net: mpls: Add ILM netdev notifier
net: mpls: Added netdev notifiers for mpls devices