Skip to content

Commit 135c5fd

Browse files
committed
tgupdate: merge t/upstream base into t/upstream
2 parents 9681677 + 939d812 commit 135c5fd

File tree

36 files changed

+266
-116
lines changed

36 files changed

+266
-116
lines changed

Documentation/networking/ethtool-netlink.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1934,7 +1934,7 @@ ETHTOOL_A_RSS_INDIR attribute returns RSS indirection table where each byte
19341934
indicates queue number.
19351935
ETHTOOL_A_RSS_INPUT_XFRM attribute is a bitmap indicating the type of
19361936
transformation applied to the input protocol fields before given to the RSS
1937-
hfunc. Current supported option is symmetric-xor.
1937+
hfunc. Current supported options are symmetric-xor and symmetric-or-xor.
19381938

19391939
PLCA_GET_CFG
19401940
============

Documentation/networking/scaling.rst

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,14 +49,21 @@ destination address) and TCP/UDP (source port, destination port) tuples
4949
are swapped, the computed hash is the same. This is beneficial in some
5050
applications that monitor TCP/IP flows (IDS, firewalls, ...etc) and need
5151
both directions of the flow to land on the same Rx queue (and CPU). The
52-
"Symmetric-XOR" is a type of RSS algorithms that achieves this hash
53-
symmetry by XORing the input source and destination fields of the IP
54-
and/or L4 protocols. This, however, results in reduced input entropy and
55-
could potentially be exploited. Specifically, the algorithm XORs the input
52+
"Symmetric-XOR" and "Symmetric-OR-XOR" are types of RSS algorithms that
53+
achieve this hash symmetry by XOR/ORing the input source and destination
54+
fields of the IP and/or L4 protocols. This, however, results in reduced
55+
input entropy and could potentially be exploited.
56+
57+
Specifically, the "Symmetric-XOR" algorithm XORs the input
5658
as follows::
5759

5860
# (SRC_IP ^ DST_IP, SRC_IP ^ DST_IP, SRC_PORT ^ DST_PORT, SRC_PORT ^ DST_PORT)
5961

62+
The "Symmetric-OR-XOR" algorithm, on the other hand, transforms the input as
63+
follows::
64+
65+
# (SRC_IP | DST_IP, SRC_IP ^ DST_IP, SRC_PORT | DST_PORT, SRC_PORT ^ DST_PORT)
66+
6067
The result is then fed to the underlying RSS algorithm.
6168

6269
Some advanced NICs allow steering packets to queues based on

drivers/net/ethernet/apm/xgene/xgene_enet_xgmac.c

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,14 @@
66
* Keyur Chudgar <[email protected]>
77
*/
88

9-
#include <linux/of_gpio.h>
10-
#include <linux/gpio.h>
9+
#include <linux/acpi.h>
10+
#include <linux/clk.h>
11+
#include <linux/err.h>
12+
#include <linux/gpio/consumer.h>
13+
#include <linux/io.h>
14+
#include <linux/types.h>
15+
#include <linux/workqueue.h>
16+
1117
#include "xgene_enet_main.h"
1218
#include "xgene_enet_hw.h"
1319
#include "xgene_enet_xgmac.h"

drivers/net/ethernet/cisco/enic/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,6 @@
66
config ENIC
77
tristate "Cisco VIC Ethernet NIC Support"
88
depends on PCI
9+
select PAGE_POOL
910
help
1011
This enables the support for the Cisco VIC Ethernet card.

drivers/net/ethernet/intel/iavf/iavf_ethtool.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1808,7 +1808,7 @@ static int iavf_set_rxfh(struct net_device *netdev,
18081808
static const struct ethtool_ops iavf_ethtool_ops = {
18091809
.supported_coalesce_params = ETHTOOL_COALESCE_USECS |
18101810
ETHTOOL_COALESCE_USE_ADAPTIVE,
1811-
.cap_rss_sym_xor_supported = true,
1811+
.supported_input_xfrm = RXH_XFRM_SYM_XOR,
18121812
.get_drvinfo = iavf_get_drvinfo,
18131813
.get_link = ethtool_op_get_link,
18141814
.get_ringparam = iavf_get_ringparam,

drivers/net/ethernet/intel/ice/ice_ethtool.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4770,7 +4770,7 @@ static const struct ethtool_ops ice_ethtool_ops = {
47704770
.supported_coalesce_params = ETHTOOL_COALESCE_USECS |
47714771
ETHTOOL_COALESCE_USE_ADAPTIVE |
47724772
ETHTOOL_COALESCE_RX_USECS_HIGH,
4773-
.cap_rss_sym_xor_supported = true,
4773+
.supported_input_xfrm = RXH_XFRM_SYM_XOR,
47744774
.rxfh_per_ctx_key = true,
47754775
.get_link_ksettings = ice_get_link_ksettings,
47764776
.set_link_ksettings = ice_set_link_ksettings,

drivers/net/ethernet/marvell/octeontx2/af/cgx.c

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,18 @@ static int cgx_fwi_link_change(struct cgx *cgx, int lmac_id, bool en);
6666
/* Supported devices */
6767
static const struct pci_device_id cgx_id_table[] = {
6868
{ PCI_DEVICE(PCI_VENDOR_ID_CAVIUM, PCI_DEVID_OCTEONTX2_CGX) },
69-
{ PCI_DEVICE(PCI_VENDOR_ID_CAVIUM, PCI_DEVID_CN10K_RPM) },
70-
{ PCI_DEVICE(PCI_VENDOR_ID_CAVIUM, PCI_DEVID_CN10KB_RPM) },
69+
{ PCI_DEVICE_SUB(PCI_VENDOR_ID_CAVIUM, PCI_DEVID_CN10K_RPM,
70+
PCI_ANY_ID, PCI_SUBSYS_DEVID_CN10K_A) },
71+
{ PCI_DEVICE_SUB(PCI_VENDOR_ID_CAVIUM, PCI_DEVID_CN10K_RPM,
72+
PCI_ANY_ID, PCI_SUBSYS_DEVID_CNF10K_A) },
73+
{ PCI_DEVICE_SUB(PCI_VENDOR_ID_CAVIUM, PCI_DEVID_CN10K_RPM,
74+
PCI_ANY_ID, PCI_SUBSYS_DEVID_CNF10K_B) },
75+
{ PCI_DEVICE_SUB(PCI_VENDOR_ID_CAVIUM, PCI_DEVID_CN10KB_RPM,
76+
PCI_ANY_ID, PCI_SUBSYS_DEVID_CN10K_B) },
77+
{ PCI_DEVICE_SUB(PCI_VENDOR_ID_CAVIUM, PCI_DEVID_CN10KB_RPM,
78+
PCI_ANY_ID, PCI_SUBSYS_DEVID_CN20KA) },
79+
{ PCI_DEVICE_SUB(PCI_VENDOR_ID_CAVIUM, PCI_DEVID_CN10KB_RPM,
80+
PCI_ANY_ID, PCI_SUBSYS_DEVID_CNF20KA) },
7181
{ 0, } /* end of table */
7282
};
7383

drivers/net/ethernet/marvell/octeontx2/af/rvu.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@
3030
#define PCI_SUBSYS_DEVID_CNF10K_A 0xBA00
3131
#define PCI_SUBSYS_DEVID_CNF10K_B 0xBC00
3232
#define PCI_SUBSYS_DEVID_CN10K_B 0xBD00
33+
#define PCI_SUBSYS_DEVID_CN20KA 0xC220
34+
#define PCI_SUBSYS_DEVID_CNF20KA 0xC320
3335

3436
/* PCI BAR nos */
3537
#define PCI_AF_REG_BAR_NUM 0

drivers/net/ethernet/mellanox/mlx5/core/en/rss.c

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,7 @@ static void mlx5e_rss_params_init(struct mlx5e_rss *rss)
161161
{
162162
enum mlx5_traffic_types tt;
163163

164+
rss->hash.symmetric = true;
164165
rss->hash.hfunc = ETH_RSS_HASH_TOP;
165166
netdev_rss_key_fill(rss->hash.toeplitz_hash_key,
166167
sizeof(rss->hash.toeplitz_hash_key));
@@ -566,7 +567,7 @@ int mlx5e_rss_packet_merge_set_param(struct mlx5e_rss *rss,
566567
return final_err;
567568
}
568569

569-
int mlx5e_rss_get_rxfh(struct mlx5e_rss *rss, u32 *indir, u8 *key, u8 *hfunc)
570+
int mlx5e_rss_get_rxfh(struct mlx5e_rss *rss, u32 *indir, u8 *key, u8 *hfunc, bool *symmetric)
570571
{
571572
if (indir)
572573
memcpy(indir, rss->indir.table,
@@ -579,11 +580,14 @@ int mlx5e_rss_get_rxfh(struct mlx5e_rss *rss, u32 *indir, u8 *key, u8 *hfunc)
579580
if (hfunc)
580581
*hfunc = rss->hash.hfunc;
581582

583+
if (symmetric)
584+
*symmetric = rss->hash.symmetric;
585+
582586
return 0;
583587
}
584588

585589
int mlx5e_rss_set_rxfh(struct mlx5e_rss *rss, const u32 *indir,
586-
const u8 *key, const u8 *hfunc,
590+
const u8 *key, const u8 *hfunc, const bool *symmetric,
587591
u32 *rqns, u32 *vhca_ids, unsigned int num_rqns)
588592
{
589593
bool changed_indir = false;
@@ -623,6 +627,11 @@ int mlx5e_rss_set_rxfh(struct mlx5e_rss *rss, const u32 *indir,
623627
rss->indir.actual_table_size * sizeof(*rss->indir.table));
624628
}
625629

630+
if (symmetric) {
631+
rss->hash.symmetric = *symmetric;
632+
changed_hash = true;
633+
}
634+
626635
if (changed_indir && rss->enabled) {
627636
err = mlx5e_rss_apply(rss, rqns, vhca_ids, num_rqns);
628637
if (err) {

drivers/net/ethernet/mellanox/mlx5/core/en/rss.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,9 @@ void mlx5e_rss_disable(struct mlx5e_rss *rss);
4747

4848
int mlx5e_rss_packet_merge_set_param(struct mlx5e_rss *rss,
4949
struct mlx5e_packet_merge_param *pkt_merge_param);
50-
int mlx5e_rss_get_rxfh(struct mlx5e_rss *rss, u32 *indir, u8 *key, u8 *hfunc);
50+
int mlx5e_rss_get_rxfh(struct mlx5e_rss *rss, u32 *indir, u8 *key, u8 *hfunc, bool *symmetric);
5151
int mlx5e_rss_set_rxfh(struct mlx5e_rss *rss, const u32 *indir,
52-
const u8 *key, const u8 *hfunc,
52+
const u8 *key, const u8 *hfunc, const bool *symmetric,
5353
u32 *rqns, u32 *vhca_ids, unsigned int num_rqns);
5454
struct mlx5e_rss_params_hash mlx5e_rss_get_hash(struct mlx5e_rss *rss);
5555
u8 mlx5e_rss_get_hash_fields(struct mlx5e_rss *rss, enum mlx5_traffic_types tt);

0 commit comments

Comments
 (0)