forked from torvalds/linux
-
Notifications
You must be signed in to change notification settings - Fork 407
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge tag 'mlx5-updates-2021-08-02' of git://git.kernel.org/pub/scm/l…
…inux/kernel/git/saeed/linux Saeed Mahameed says: ==================== This patch-set changes the TTC (Traffic Type Classification) logic to be independent from the mlx5 ethernet driver by renaming the traffic types enums and making the TTC API generic to the mlx5 core driver. It allows to decouple TTC logic from mlx5e and reused by other parts of mlx5 drivers, namely ADQ and lag TX steering hashing. Patches overview: 1 - Rename traffic type enums to be mlx5 generic. 2 - Rename related TTC arguments and functions. 3 - Remove dependency in the mlx5e driver from the TTC implementation. 4 - Move TTC logic to fs_ttc. 5 - Embed struct mlx5_ttc_table in fs_ttc. The refactoring series is followed by misc' cleanup patches. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
- Loading branch information
Showing
30 changed files
with
1,852 additions
and
1,535 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
// SPDX-License-Identifier: GPL-2.0 OR Linux-OpenIB | ||
/* Copyright (c) 2021, Mellanox Technologies inc. All rights reserved. */ | ||
|
||
#include "channels.h" | ||
#include "en.h" | ||
#include "en/ptp.h" | ||
|
||
unsigned int mlx5e_channels_get_num(struct mlx5e_channels *chs) | ||
{ | ||
return chs->num; | ||
} | ||
|
||
void mlx5e_channels_get_regular_rqn(struct mlx5e_channels *chs, unsigned int ix, u32 *rqn) | ||
{ | ||
struct mlx5e_channel *c; | ||
|
||
WARN_ON(ix >= mlx5e_channels_get_num(chs)); | ||
c = chs->c[ix]; | ||
|
||
*rqn = c->rq.rqn; | ||
} | ||
|
||
bool mlx5e_channels_get_xsk_rqn(struct mlx5e_channels *chs, unsigned int ix, u32 *rqn) | ||
{ | ||
struct mlx5e_channel *c; | ||
|
||
WARN_ON(ix >= mlx5e_channels_get_num(chs)); | ||
c = chs->c[ix]; | ||
|
||
if (!test_bit(MLX5E_CHANNEL_STATE_XSK, c->state)) | ||
return false; | ||
|
||
*rqn = c->xskrq.rqn; | ||
return true; | ||
} | ||
|
||
bool mlx5e_channels_get_ptp_rqn(struct mlx5e_channels *chs, u32 *rqn) | ||
{ | ||
struct mlx5e_ptp *c = chs->ptp; | ||
|
||
if (!c || !test_bit(MLX5E_PTP_STATE_RX, c->state)) | ||
return false; | ||
|
||
*rqn = c->rq.rqn; | ||
return true; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
/* SPDX-License-Identifier: GPL-2.0 OR Linux-OpenIB */ | ||
/* Copyright (c) 2021, Mellanox Technologies inc. All rights reserved. */ | ||
|
||
#ifndef __MLX5_EN_CHANNELS_H__ | ||
#define __MLX5_EN_CHANNELS_H__ | ||
|
||
#include <linux/kernel.h> | ||
|
||
struct mlx5e_channels; | ||
|
||
unsigned int mlx5e_channels_get_num(struct mlx5e_channels *chs); | ||
void mlx5e_channels_get_regular_rqn(struct mlx5e_channels *chs, unsigned int ix, u32 *rqn); | ||
bool mlx5e_channels_get_xsk_rqn(struct mlx5e_channels *chs, unsigned int ix, u32 *rqn); | ||
bool mlx5e_channels_get_ptp_rqn(struct mlx5e_channels *chs, u32 *rqn); | ||
|
||
#endif /* __MLX5_EN_CHANNELS_H__ */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.