#
2bb2f755 |
| 21-May-2024 |
Stephen Hemminger <stephen@networkplumber.org> |
net/tap: use libbpf to load new BPF program
There were multiple issues in the RSS queue support in the TAP driver. This required extensive rework of the BPF support.
Change the BPF loading to use b
net/tap: use libbpf to load new BPF program
There were multiple issues in the RSS queue support in the TAP driver. This required extensive rework of the BPF support.
Change the BPF loading to use bpftool to create a skeleton header file, and load with libbpf. The BPF is always compiled from source so less chance that source and instructions diverge. Also resolves issue where libbpf and source get out of sync. The program is only loaded once, so if multiple rules are created only one BPF program is loaded in kernel.
The new BPF program only needs a single action. No need for action and re-classification step.
It also fixes the missing bits from the original. - supports setting RSS key per flow - level of hash can be L3 or L3/L4.
Bugzilla ID: 1329
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org> Acked-by: Ferruh Yigit <ferruh.yigit@amd.com>
show more ...
|
#
36d4adfa |
| 21-May-2024 |
Stephen Hemminger <stephen@networkplumber.org> |
net/tap: validate and setup parameters for BPF RSS
The flow RSS support via BPF was not using the key, or hash type parameters. Which is good because they were never properly setup.
Fix the setup a
net/tap: validate and setup parameters for BPF RSS
The flow RSS support via BPF was not using the key, or hash type parameters. Which is good because they were never properly setup.
Fix the setup and validate the flow parameters, the BPF side gets fixed later.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org> Acked-by: Ferruh Yigit <ferruh.yigit@amd.com>
show more ...
|
#
801fee5c |
| 21-May-2024 |
Stephen Hemminger <stephen@networkplumber.org> |
net/tap: remove unused fields
The driver doesn't support these other hash types, and there is no reason to implement these in future. The rss_flows list was set but never used.
Signed-off-by: Steph
net/tap: remove unused fields
The driver doesn't support these other hash types, and there is no reason to implement these in future. The rss_flows list was set but never used.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org> Acked-by: Ferruh Yigit <ferruh.yigit@amd.com>
show more ...
|
#
4e679a5f |
| 01-Nov-2023 |
Stephen Hemminger <stephen@networkplumber.org> |
net/tap: add infrastructure to build BPF filter
Move the BPF program related code into a subdirectory. And add a Makefile for building it.
The code depends on include files from iproute2. But these
net/tap: add infrastructure to build BPF filter
Move the BPF program related code into a subdirectory. And add a Makefile for building it.
The code depends on include files from iproute2. But these are not public headers which iproute2 exports as a package API. Therefore make a local copy here.
The standalone build was also broken because by commit ef5baf3486e0 ("replace packed attributes") which introduced __rte_packed into this code.
Add a python program to extract the resulting BPF into a format that can be consumed by the TAP driver.
Update the documentation.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org> Acked-by: Ferruh Yigit <ferruh.yigit@amd.com>
show more ...
|
#
295968d1 |
| 22-Oct-2021 |
Ferruh Yigit <ferruh.yigit@intel.com> |
ethdev: add namespace
Add 'RTE_ETH' namespace to all enums & macros in a backward compatible way. The macros for backward compatibility can be removed in next LTS. Also updated some struct names to
ethdev: add namespace
Add 'RTE_ETH' namespace to all enums & macros in a backward compatible way. The macros for backward compatibility can be removed in next LTS. Also updated some struct names to have 'rte_eth' prefix.
All internal components switched to using new names.
Syntax fixed on lines that this patch touches.
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com> Acked-by: Tyler Retzlaff <roretzla@linux.microsoft.com> Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru> Acked-by: Ajit Khaparde <ajit.khaparde@broadcom.com> Acked-by: Jerin Jacob <jerinj@marvell.com> Acked-by: Wisam Jaddo <wisamm@nvidia.com> Acked-by: Rosen Xu <rosen.xu@intel.com> Acked-by: Chenbo Xia <chenbo.xia@intel.com> Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com> Acked-by: Somnath Kotur <somnath.kotur@broadcom.com>
show more ...
|
#
ef5baf34 |
| 09-Feb-2020 |
Thomas Monjalon <thomas@monjalon.net> |
replace packed attributes
There is a common macro __rte_packed for packing structs, which is now used where appropriate for consistency.
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
|
#
2f5045c5 |
| 10-May-2018 |
Ophir Munk <ophirmu@mellanox.com> |
net/tap: support RSS hash update
Add RSS hash update callback to eth_dev_ops.
Signed-off-by: Ophir Munk <ophirmu@mellanox.com> Acked-by: Keith Wiles <keith.wiles@intel.com>
|
#
8d54ede7 |
| 08-May-2018 |
Ophir Munk <ophirmu@mellanox.com> |
net/tap: report on supported RSS hash functions
Report on TAP supported RSS functions as part of dev_infos_get callback: ETH_RSS_IP, ETH_RSS_UDP and ETH_RSS_TCP. Known limitation: TAP supports all o
net/tap: report on supported RSS hash functions
Report on TAP supported RSS functions as part of dev_infos_get callback: ETH_RSS_IP, ETH_RSS_UDP and ETH_RSS_TCP. Known limitation: TAP supports all of the above hash functions together and not in partial combinations. Previous to this commit RSS support was reported as none. Since the introduction of [1] it is required that all RSS configurations will be verified.
[1] commit 8863a1fbfc66 ("ethdev: add supported hash function check")
Signed-off-by: Ophir Munk <ophirmu@mellanox.com> Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
show more ...
|
#
5feecc57 |
| 20-Mar-2018 |
Shahaf Shuler <shahafs@mellanox.com> |
align SPDX Mellanox copyrights
Aligning Mellanox SPDX copyrights to a single format. In addition replace to SPDX licence files which were missed.
Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
align SPDX Mellanox copyrights
Aligning Mellanox SPDX copyrights to a single format. In addition replace to SPDX licence files which were missed.
Signed-off-by: Shahaf Shuler <shahafs@mellanox.com> Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
show more ...
|
#
036d721a |
| 20-Jan-2018 |
Ophir Munk <ophirmu@mellanox.com> |
net/tap: implement RSS using eBPF
TAP PMD is required to support RSS queue mapping based on rte_flow API. An example usage for this requirement is failsafe transparent switching from a PCI device to
net/tap: implement RSS using eBPF
TAP PMD is required to support RSS queue mapping based on rte_flow API. An example usage for this requirement is failsafe transparent switching from a PCI device to TAP device while keep redirecting packets to the same RSS queues on both devices.
TAP RSS implementation is based on eBPF programs sent to Linux kernel through BPF system calls and using netlink messages to reference the programs as part of traffic control commands.
TC uses eBPF programs as classifiers and actions. eBPF classification: packets marked with an RSS queue will be directed to this queue using TC with "skbedit" action. BPF classifiers are downloaded to the kernel once on TAP creation for each TAP Rx queue.
eBPF action: calculate the Toeplitz RSS hash based on L3 addresses and L4 ports. Mark the packet with the RSS queue according the resulting RSS hash, then reclassify the packet. BPF actions are downloaded to the kernel for each new RSS rule.
TAP eBPF requires Linux version 4.9 configured with BPF. TAP PMD will successfully compile on systems with old or non-BPF configured kernels but RSS rules creation on TAP devices will not be successful
Signed-off-by: Ophir Munk <ophirmu@mellanox.com> Acked-by: Pascal Mazon <pascal.mazon@6wind.com>
show more ...
|