2018-08-31 07:16:05 +00:00
|
|
|
# SPDX-License-Identifier: BSD-3-Clause
|
|
|
|
# Copyright 2018 6WIND S.A.
|
|
|
|
# Copyright 2018 Mellanox Technologies, Ltd
|
|
|
|
|
2020-06-03 15:05:56 +00:00
|
|
|
if not (is_linux or is_windows)
|
2021-04-20 10:22:25 +00:00
|
|
|
build = false
|
|
|
|
reason = 'only supported on Linux and Windows'
|
|
|
|
subdir_done()
|
2019-07-08 07:18:04 +00:00
|
|
|
endif
|
|
|
|
|
2020-01-29 12:38:27 +00:00
|
|
|
deps += ['hash', 'common_mlx5']
|
2021-07-18 10:29:16 +00:00
|
|
|
headers = files('rte_pmd_mlx5.h')
|
2020-01-29 12:38:27 +00:00
|
|
|
sources = files(
|
2021-04-20 10:22:25 +00:00
|
|
|
'mlx5.c',
|
|
|
|
'mlx5_ethdev.c',
|
|
|
|
'mlx5_flow.c',
|
2022-02-24 13:40:39 +00:00
|
|
|
'mlx5_dr.c',
|
2021-04-20 10:22:25 +00:00
|
|
|
'mlx5_flow_meter.c',
|
|
|
|
'mlx5_flow_dv.c',
|
net/mlx5: introduce hardware steering operation
The Connect-X steering is a lookup hardware mechanism that accesses flow
tables, matches packets to the rules, and performs specified actions.
Historically, mlx5 PMD implements several software engines to manage
steering hardware facility:
- FW Steering - Verbs/Direct Verbs, uses FW calls to manage flows
- SW Steering - DevX/mlx5dv, uses WQEs to access table memory directly
However, there are still some disadvantages:
- performance is limited, we should invoke firmware either to
manage the entire flow, or to handle some internal steering objects
- organizing and preparing flow infrastructure (actions, matchers,
groups, etc.) on the flow inserting is sure to cause slow flow
insertion
- security, exposing the low-level steering entries directly to the
userspace may cause security risks
A new hardware WQE based steering operation with codename "HW Steering"
is going to be introduced to get rid of the security risks. And it will
take advantage of the recently new introduced async queue-based rte_flow
APIs to prepare everything in advance to achieve high insertion rate.
In this new HW steering engine, the original SW steering rte_flow API
will not be supported in the first implementation, only the new async
queue-based flow operations is going to be supported. A new steering
mode parameter for dv_flow_en will be introduced and user will be
able to engage the new steering engine.
This commit adds the basic driver operation.
Signed-off-by: Suanming Mou <suanmingm@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
2022-02-24 13:40:38 +00:00
|
|
|
'mlx5_flow_hw.c',
|
2021-04-20 10:55:17 +00:00
|
|
|
'mlx5_flow_aso.c',
|
2021-11-02 08:53:42 +00:00
|
|
|
'mlx5_flow_flex.c',
|
2021-04-20 10:22:25 +00:00
|
|
|
'mlx5_mac.c',
|
|
|
|
'mlx5_rss.c',
|
|
|
|
'mlx5_rx.c',
|
|
|
|
'mlx5_rxmode.c',
|
|
|
|
'mlx5_rxq.c',
|
|
|
|
'mlx5_rxtx.c',
|
|
|
|
'mlx5_stats.c',
|
|
|
|
'mlx5_trigger.c',
|
|
|
|
'mlx5_tx.c',
|
|
|
|
'mlx5_tx_empw.c',
|
|
|
|
'mlx5_tx_mpw.c',
|
|
|
|
'mlx5_tx_nompw.c',
|
|
|
|
'mlx5_tx_txpp.c',
|
|
|
|
'mlx5_txq.c',
|
|
|
|
'mlx5_txpp.c',
|
|
|
|
'mlx5_vlan.c',
|
|
|
|
'mlx5_utils.c',
|
|
|
|
'mlx5_devx.c',
|
2020-01-29 12:38:27 +00:00
|
|
|
)
|
2020-12-28 09:54:07 +00:00
|
|
|
|
|
|
|
if is_linux
|
2021-04-20 10:22:25 +00:00
|
|
|
sources += files(
|
|
|
|
'mlx5_flow_verbs.c',
|
|
|
|
)
|
|
|
|
if (dpdk_conf.has('RTE_ARCH_X86_64')
|
|
|
|
or dpdk_conf.has('RTE_ARCH_ARM64')
|
|
|
|
or dpdk_conf.has('RTE_ARCH_PPC_64'))
|
|
|
|
sources += files('mlx5_rxtx_vec.c')
|
|
|
|
endif
|
2018-08-31 07:16:05 +00:00
|
|
|
endif
|
2020-12-28 09:54:07 +00:00
|
|
|
|
2020-01-29 12:38:27 +00:00
|
|
|
cflags_options = [
|
2021-04-20 10:22:25 +00:00
|
|
|
'-std=c11',
|
|
|
|
'-Wno-strict-prototypes',
|
|
|
|
'-D_BSD_SOURCE',
|
|
|
|
'-D_DEFAULT_SOURCE',
|
|
|
|
'-D_XOPEN_SOURCE=600',
|
2020-01-29 12:38:27 +00:00
|
|
|
]
|
|
|
|
foreach option:cflags_options
|
2021-04-20 10:22:25 +00:00
|
|
|
if cc.has_argument(option)
|
|
|
|
cflags += option
|
|
|
|
endif
|
2018-08-31 07:16:05 +00:00
|
|
|
endforeach
|
2020-01-29 12:38:27 +00:00
|
|
|
if get_option('buildtype').contains('debug')
|
2021-04-20 10:22:25 +00:00
|
|
|
cflags += [ '-pedantic', '-DPEDANTIC' ]
|
2020-01-29 12:38:27 +00:00
|
|
|
else
|
2021-04-20 10:22:25 +00:00
|
|
|
cflags += [ '-UPEDANTIC' ]
|
2018-08-31 07:16:05 +00:00
|
|
|
endif
|
2020-06-03 15:05:56 +00:00
|
|
|
subdir(exec_env)
|