linux-hardened/drivers/net/ethernet/mellanox/mlx5/core
Or Gerlitz d79b6df6b1 net/mlx5e: Add parsing of TC pedit actions to HW format
Parse/translate a set of TC pedit actions to be formed in the HW API format.

User-space provides set of keys where each one of them is made of: command (add or
set), header-type, byte offset within that header along with a 32 bit mask and value.

The mask dictates what bits in the 32 bit word that starts on the offset we should
be dealing with, but under negative polarity (unset bits are to be modified).

We do a 1st pass over the set of keys while using the header-type and offset to
fill the masks and the values into a data-structure containting all the
supported network headers.

We then do a 2nd pass over the set of fields to re-write supported by the HW,
where for each such candidate field, we use the masks filled on the 1st pass to
realize if we should offloading re-write it.

In case offloading is required, we fill a HW descriptor with the following:

(1) the header field to modify
(2) the bit offset within the field from where to modify (set command only)
(3) the value to set/add
(4) the length in bits 1...32 to modify (set command only)

Note that it's possible for a given pedit mask to dictate modifying the
same header field multiple times or to modify multiple header fields.
Currently such combinations are not supported for offloading, hence, for set
commands, the offset within the field is always zero, and the length to modify
is the field size.

Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
Reviewed-by: Amir Vadai <amir@vadai.me>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
2017-03-28 15:34:07 +03:00
..
alloc.c net/mlx5e: use %pad format string for dma_addr_t 2016-12-08 21:30:54 -05:00
cmd.c net/mlx5: Introduce alloc/dealloc modify header context commands 2017-03-28 15:34:05 +03:00
cq.c IB/mlx5: Support 4k UAR for libmlx5 2017-01-09 20:25:09 +02:00
debugfs.c
dev.c {net,IB}/mlx5: Refactor page fault handling 2017-01-02 15:51:20 -05:00
en.h net/mlx5e: Fail safe mtu and lro setting 2017-03-27 15:08:24 +03:00
en_arfs.c net/mlx5: Add helper to initialize a flow steering actions struct instance 2017-03-28 15:34:01 +03:00
en_clock.c net/mlx5e: Fail safe cqe compressing/moderation mode setting 2017-03-27 15:08:22 +03:00
en_common.c net/mlx5e: Refactor refresh TIRs 2017-03-27 15:08:16 +03:00
en_dcbnl.c net/mlx5e: remove IEEE/CEE mode check when setting DCBX mode 2017-03-10 10:03:26 -08:00
en_ethtool.c net/mlx5e: Fail safe mtu and lro setting 2017-03-27 15:08:24 +03:00
en_fs.c net/mlx5: Add helper to initialize a flow steering actions struct instance 2017-03-28 15:34:01 +03:00
en_fs_ethtool.c net/mlx5e: Isolate open_channels from priv->params 2017-03-27 15:08:18 +03:00
en_main.c net/mlx5e: Fail safe mtu and lro setting 2017-03-27 15:08:24 +03:00
en_rep.c net/mlx5e: Minimize mlx5e_{open/close}_locked 2017-03-27 15:08:19 +03:00
en_rx.c net/mlx5e: Fail safe cqe compressing/moderation mode setting 2017-03-27 15:08:22 +03:00
en_rx_am.c net/mlx5e: CQ and RQ don't need priv pointer 2017-03-27 15:08:18 +03:00
en_selftest.c net/mlx5e: Refactor refresh TIRs 2017-03-27 15:08:16 +03:00
en_stats.h net/mlx5e: Expose PCIe statistics to ethtool 2017-01-19 23:20:02 +02:00
en_tc.c net/mlx5e: Add parsing of TC pedit actions to HW format 2017-03-28 15:34:07 +03:00
en_tc.h
en_tx.c net/mlx5e: Isolate open_channels from priv->params 2017-03-27 15:08:18 +03:00
en_txrx.c net/mlx5e: CQ and RQ don't need priv pointer 2017-03-27 15:08:18 +03:00
eq.c net/mlx5: Add MTPPS and MTPPSE registers infrastructure 2017-01-19 23:19:53 +02:00
eswitch.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2017-02-02 16:54:00 -05:00
eswitch.h net/mlx5: Introduce modify header structures, commands and steering action definitions 2017-03-28 15:34:04 +03:00
eswitch_offloads.c net/mlx5e: Properly deal with resource cleanup when adding TC flow fails 2017-03-28 15:34:00 +03:00
fs_cmd.c net/mlx5: Introduce alloc/dealloc modify header context commands 2017-03-28 15:34:05 +03:00
fs_cmd.h
fs_core.c net/mlx5: Introduce modify header structures, commands and steering action definitions 2017-03-28 15:34:04 +03:00
fs_core.h net/mlx5: Introduce modify header structures, commands and steering action definitions 2017-03-28 15:34:04 +03:00
fs_counters.c net/mlx5: use rb_entry() 2016-12-20 14:22:48 -05:00
fw.c net/mlx5: Query and cache PCAM, MCAM registers on initialization 2017-01-19 23:19:59 +02:00
health.c net/mlx5: Fix version printout in case of health issue 2017-01-19 23:19:52 +02:00
Kconfig net/mlx5e: add IPV6 dependency 2017-03-07 12:25:24 -08:00
lag.c
mad.c
main.c net/mlx5: Increase number of max QPs in default profile 2017-03-22 12:11:13 -07:00
Makefile net/mlx5e: Add support for ethtool self diagnostics test 2016-11-28 15:09:35 -05:00
mcg.c
mlx5_core.h net/mlx5: Introduce alloc/dealloc modify header context commands 2017-03-28 15:34:05 +03:00
mr.c
pagealloc.c
pd.c
port.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2017-02-02 16:54:00 -05:00
qp.c {net,IB}/mlx5: Refactor page fault handling 2017-01-02 15:51:20 -05:00
rl.c
sriov.c
srq.c
transobj.c
uar.c IB/mlx5: Support 4k UAR for libmlx5 2017-01-09 20:25:09 +02:00
vport.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2017-02-02 16:54:00 -05:00
vxlan.c
vxlan.h
wq.c net/mlx5e: Implement Fragmented Work Queue (WQ) 2016-12-02 10:47:01 -05:00
wq.h net/mlx5e: Implement Fragmented Work Queue (WQ) 2016-12-02 10:47:01 -05:00