linux/drivers/net
Guillaume Nault 58cff782cc flow_dissector: Parse multiple MPLS Label Stack Entries
The current MPLS dissector only parses the first MPLS Label Stack
Entry (second LSE can be parsed too, but only to set a key_id).

This patch adds the possibility to parse several LSEs by making
__skb_flow_dissect_mpls() return FLOW_DISSECT_RET_PROTO_AGAIN as long
as the Bottom Of Stack bit hasn't been seen, up to a maximum of
FLOW_DIS_MPLS_MAX entries.

FLOW_DIS_MPLS_MAX is arbitrarily set to 7. This should be enough for
many practical purposes, without wasting too much space.

To record the parsed values, flow_dissector_key_mpls is modified to
store an array of stack entries, instead of just the values of the
first one. A bit field, "used_lses", is also added to keep track of
the LSEs that have been set. The objective is to avoid defining a
new FLOW_DISSECTOR_KEY_MPLS_XX for each level of the MPLS stack.

TC flower is adapted for the new struct flow_dissector_key_mpls layout.
Matching on several MPLS Label Stack Entries will be added in the next
patch.

The NFP and MLX5 drivers are also adapted: nfp_flower_compile_mac() and
mlx5's parse_tunnel() now verify that the rule only uses the first LSE
and fail if it doesn't.

Finally, the behaviour of the FLOW_DISSECTOR_KEY_MPLS_ENTROPY key is
slightly modified. Instead of recording the first Entropy Label, it
now records the last one. This shouldn't have any consequences since
there doesn't seem to have any user of FLOW_DISSECTOR_KEY_MPLS_ENTROPY
in the tree. We'd probably better do a hash of all parsed MPLS labels
instead (excluding reserved labels) anyway. That'd give better entropy
and would probably also simplify the code. But that's not the purpose
of this patch, so I'm keeping that as a future possible improvement.

Signed-off-by: Guillaume Nault <gnault@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2020-05-26 15:22:58 -07:00
..
appletalk docs: networking: convert ltpc.txt to ReST 2020-04-30 12:56:36 -07:00
arcnet docs: networking: convert arcnet.txt to ReST 2020-04-28 14:38:38 -07:00
bonding Merge branch 'mlx5-next' of git://git.kernel.org/pub/scm/linux/kernel/git/mellanox/linux 2020-05-09 01:05:30 -07:00
caif docs: networking: convert caif files to ReST 2020-04-28 14:38:38 -07:00
can net: Fix return value about devm_platform_ioremap_resource() 2020-05-23 16:28:25 -07:00
dsa Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2020-05-24 13:47:27 -07:00
ethernet flow_dissector: Parse multiple MPLS Label Stack Entries 2020-05-26 15:22:58 -07:00
fddi docs: networking: convert skfp.txt to ReST 2020-04-30 12:56:38 -07:00
fjes
hamradio Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2020-05-15 13:48:59 -07:00
hippi
hyperv xsk: Remove MEM_TYPE_ZERO_COPY and corresponding code 2020-05-21 17:31:27 -07:00
ieee802154
ipa drivers: ipa: print dev_err info accurately 2020-05-25 18:03:56 -07:00
ipvlan net: partially revert dynamic lockdep key changes 2020-05-04 12:05:56 -07:00
netdevsim netdevsim: Ensure policer drop counter always increases 2020-05-22 16:05:42 -07:00
phy Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2020-05-24 13:47:27 -07:00
plip docs: networking: convert PLIP.txt to ReST 2020-04-30 12:56:37 -07:00
ppp Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2020-05-15 13:48:59 -07:00
slip
team net: partially revert dynamic lockdep key changes 2020-05-04 12:05:56 -07:00
usb Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2020-05-24 13:47:27 -07:00
vmxnet3
wan docs: networking: convert framerelay.txt to ReST 2020-04-28 14:39:46 -07:00
wimax
wireguard wireguard: noise: separate receive counter from send counter 2020-05-20 20:55:09 -07:00
wireless wireless-drivers-next patches for v5.8 2020-05-25 18:15:16 -07:00
xen-netback
bareudp.c net: bareudp: avoid uninitialized variable warning 2020-05-07 17:28:18 -07:00
dummy.c
eql.c
geneve.c
gtp.c gtp: set NLM_F_MULTI flag in gtp_genl_dump_pdp() 2020-05-01 15:34:09 -07:00
ifb.c
Kconfig docs: networking: device drivers: convert sb1000.txt to ReST 2020-05-01 12:24:42 -07:00
LICENSE.SRC
loopback.c
macsec.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2020-05-06 22:10:13 -07:00
macvlan.c netpoll: accept NULL np argument in netpoll_send_skb() 2020-05-07 18:11:07 -07:00
macvtap.c
Makefile
mdio.c
mii.c
net_failover.c
netconsole.c
nlmon.c
ntb_netdev.c
rionet.c rionet: Fix use correct return type for ndo_start_xmit() 2020-04-30 12:15:13 -07:00
sb1000.c
Space.c
sungem_phy.c
tap.c
thunderbolt.c
tun.c tun: Add XDP frame size 2020-05-14 21:21:55 -07:00
veth.c veth: Xdp using frame_sz in veth driver 2020-05-14 21:21:54 -07:00
virtio_net.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2020-05-15 13:48:59 -07:00
vrf.c net: partially revert dynamic lockdep key changes 2020-05-04 12:05:56 -07:00
vsockmon.c
vxlan.c vxlan: Do not assume RTNL is held in vxlan_fdb_info() 2020-05-24 19:34:11 -07:00
xen-netfront.c