mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-01-06 05:06:29 +00:00
mlx5-fixes-2023-08-16
-----BEGIN PGP SIGNATURE----- iQEzBAABCAAdFiEEGhZs6bAKwk/OTgTpSD+KveBX+j4FAmTdNAEACgkQSD+KveBX +j76qQf+PO4Po2ihQifANqZdJ75PumJxvHw3GUtroq0ELt2CqUx4cFwnVVoy2+6Y fYctk0UpFu5yRHkPUv5jVgP8ixDgLiJ8wLR15evCi3iDKxi0Ta/e+8EsTfKBrtI4 GXK7wYTL+awZz5QDyerkMjqDSDDJ8KBgL4p2B1jpKgPMvd5gYWxqG+6MC5b/AAFe jqZAB6vocCYH6TGRBn7Gn2b6jnWhG35HBViv+nUCjZKRpVrkNq4wbh9RfeAgOaqz 8rEBII19EnbaBj+RpJrLNgSINmv5TQCd4PY0CLkhqFYtJw6nlYEYcuMkdfi8VUO8 P2UNhznOnCtJqai0Unsz2tR6H20uzQ== =BUoK -----END PGP SIGNATURE----- Merge tag 'mlx5-fixes-2023-08-16' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux Saeed Mahameed says: ==================== mlx5 fixes 2023-08-16 This series provides bug fixes to mlx5 driver. * tag 'mlx5-fixes-2023-08-16' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux: net/mlx5: Fix mlx5_cmd_update_root_ft() error flow net/mlx5e: XDP, Fix fifo overrun on XDP_REDIRECT ==================== Link: https://lore.kernel.org/r/20230816204108.53819-1-saeed@kernel.org Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
commit
e9bbd60169
@ -84,6 +84,8 @@ enum mlx5e_xdp_xmit_mode {
|
||||
* MLX5E_XDP_XMIT_MODE_XSK:
|
||||
* none.
|
||||
*/
|
||||
#define MLX5E_XDP_FIFO_ENTRIES2DS_MAX_RATIO 4
|
||||
|
||||
union mlx5e_xdp_info {
|
||||
enum mlx5e_xdp_xmit_mode mode;
|
||||
union {
|
||||
|
@ -1298,11 +1298,13 @@ static int mlx5e_alloc_xdpsq_fifo(struct mlx5e_xdpsq *sq, int numa)
|
||||
{
|
||||
struct mlx5e_xdp_info_fifo *xdpi_fifo = &sq->db.xdpi_fifo;
|
||||
int wq_sz = mlx5_wq_cyc_get_size(&sq->wq);
|
||||
int entries = wq_sz * MLX5_SEND_WQEBB_NUM_DS * 2; /* upper bound for maximum num of
|
||||
* entries of all xmit_modes.
|
||||
*/
|
||||
int entries;
|
||||
size_t size;
|
||||
|
||||
/* upper bound for maximum num of entries of all xmit_modes. */
|
||||
entries = roundup_pow_of_two(wq_sz * MLX5_SEND_WQEBB_NUM_DS *
|
||||
MLX5E_XDP_FIFO_ENTRIES2DS_MAX_RATIO);
|
||||
|
||||
size = array_size(sizeof(*xdpi_fifo->xi), entries);
|
||||
xdpi_fifo->xi = kvzalloc_node(size, GFP_KERNEL, numa);
|
||||
if (!xdpi_fifo->xi)
|
||||
|
@ -245,12 +245,20 @@ static int mlx5_cmd_update_root_ft(struct mlx5_flow_root_namespace *ns,
|
||||
mlx5_lag_is_shared_fdb(dev) &&
|
||||
mlx5_lag_is_master(dev)) {
|
||||
struct mlx5_core_dev *peer_dev;
|
||||
int i;
|
||||
int i, j;
|
||||
|
||||
mlx5_lag_for_each_peer_mdev(dev, peer_dev, i) {
|
||||
err = mlx5_cmd_set_slave_root_fdb(dev, peer_dev, !disconnect,
|
||||
(!disconnect) ? ft->id : 0);
|
||||
if (err && !disconnect) {
|
||||
mlx5_lag_for_each_peer_mdev(dev, peer_dev, j) {
|
||||
if (j < i)
|
||||
mlx5_cmd_set_slave_root_fdb(dev, peer_dev, 1,
|
||||
ns->root_ft->id);
|
||||
else
|
||||
break;
|
||||
}
|
||||
|
||||
MLX5_SET(set_flow_table_root_in, in, op_mod, 0);
|
||||
MLX5_SET(set_flow_table_root_in, in, table_id,
|
||||
ns->root_ft->id);
|
||||
|
Loading…
Reference in New Issue
Block a user