OSDN Git Service

dpaa2-eth: Add flow steering support without masking
authorIoana Ciocoi Radulescu <ruxandra.radulescu@nxp.com>
Tue, 16 Apr 2019 17:13:30 +0000 (17:13 +0000)
committerDavid S. Miller <davem@davemloft.net>
Wed, 17 Apr 2019 04:46:19 +0000 (21:46 -0700)
commit2d6802374c6900a8cd1f92aa917cb632b15f9374
treeef7e53eccd70f1b6249f27fcb0f01264ce90d67c
parent3a1e6b84ad2e05877a798be6f03bee4bf52f4f50
dpaa2-eth: Add flow steering support without masking

On platforms that lack a TCAM (like LS1088A), masking of
flow steering keys is not supported. Until now we didn't
offer flow steering capabilities at all on these platforms,
since our driver implementation configured a "comprehensive"
FS key (containing all supported header fields), with masks
used to ignore the fields not present in the rules provided
by the user.

We now allow ethtool rules that share a common key (i.e. have
the same header fields). The FS key is now kept in the driver
private data and initialized when the first rule is added to
an empty table, rather than at probe time. If a rule with a new
composition key is wanted, the user must first manually delete
all previous rules.

When building a FS table entry to pass to firmware, we still use
the old building algorithm, which assumes an all-supported-fields
key, and later collapse the fields which aren't actually needed.

Masked rules are not supported; if provided, the mask value
will be ignored. For firmware versions older than MC10.7.0
(that only offer the legacy ABIs for configuring distribution
keys) flow steering without masking support remains unavailable.

Signed-off-by: Ioana Radulescu <ruxandra.radulescu@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c
drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.h
drivers/net/ethernet/freescale/dpaa2/dpaa2-ethtool.c