linux/drivers/net/ethernet/netronome/nfp
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
..
abm nfp: abm: fix error return code in nfp_abm_vnic_alloc() 2020-05-08 18:39:36 -07:00
bpf netronome: Replace zero-length array with flexible-array member 2020-02-24 15:26:17 -08:00
crypto nfp: tls: implement the stream sync RX resync 2019-12-19 17:46:51 -08:00
flower flow_dissector: Parse multiple MPLS Label Stack Entries 2020-05-26 15:22:58 -07:00
nfpcore Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2020-03-25 18:58:11 -07:00
nic treewide: remove dummy Makefiles for single targets 2019-08-21 21:05:21 +09:00
ccm_mbox.c nfp: ccm: increase message limits 2019-07-08 20:21:09 -07:00
ccm.c nfp: add support for sending control messages via mailbox 2019-06-06 14:13:39 -07:00
ccm.h nfp: tls: implement the stream sync RX resync 2019-12-19 17:46:51 -08:00
devlink_param.c nfp: devlink: set unknown fw_load_policy 2019-09-11 15:10:05 +01:00
Makefile nfp: add devlink param infrastructure 2019-09-10 17:29:27 +01:00
nfp_abi.h
nfp_app_nic.c
nfp_app.c
nfp_app.h
nfp_asm.c
nfp_asm.h
nfp_devlink.c devlink: promote "fw.bundle_id" to a generic info version 2020-03-21 00:57:16 -07:00
nfp_hwmon.c
nfp_main.c net/nfp: Update driver to use global kernel version 2020-04-21 13:27:37 -07:00
nfp_main.h netronome: Replace zero-length array with flexible-array member 2020-02-24 15:26:17 -08:00
nfp_net_common.c nfp: Add XDP frame size to netronome driver 2020-05-14 21:21:55 -07:00
nfp_net_ctrl.c nfp: tls: implement the stream sync RX resync 2019-12-19 17:46:51 -08:00
nfp_net_ctrl.h nfp: tls: implement the stream sync RX resync 2019-12-19 17:46:51 -08:00
nfp_net_debugdump.c netronome: Replace zero-length array with flexible-array member 2020-02-24 15:26:17 -08:00
nfp_net_debugfs.c nfp: no need to check return value of debugfs_create functions 2019-08-10 15:25:48 -07:00
nfp_net_ethtool.c nfp: don't check lack of RX/TX channels 2020-05-16 13:56:30 -07:00
nfp_net_main.c nfp: add devlink param infrastructure 2019-09-10 17:29:27 +01:00
nfp_net_repr.c net: partially revert dynamic lockdep key changes 2020-05-04 12:05:56 -07:00
nfp_net_repr.h netronome: Replace zero-length array with flexible-array member 2020-02-24 15:26:17 -08:00
nfp_net_sriov.c
nfp_net_sriov.h
nfp_net.h nfp: tls: implement the stream sync RX resync 2019-12-19 17:46:51 -08:00
nfp_netvf_main.c remove ioremap_nocache and devm_ioremap_nocache 2020-01-06 09:45:59 +01:00
nfp_port.c
nfp_port.h
nfp_shared_buf.c