diff options
| author | Przemyslaw Patynowski <[email protected]> | 2022-06-08 11:52:48 +0000 |
|---|---|---|
| committer | Tony Nguyen <[email protected]> | 2022-07-22 17:01:00 +0000 |
| commit | 2313e69c84c024a85d017a60ae925085de47530a (patch) | |
| tree | f34bfd79652afe71c9320563ff9532601254faa6 /drivers/net/ethernet/intel/i40e/i40e.h | |
| parent | net: add missing includes and forward declarations under net/ (diff) | |
| download | kernel-2313e69c84c024a85d017a60ae925085de47530a.tar.gz kernel-2313e69c84c024a85d017a60ae925085de47530a.zip | |
i40e: Refactor tc mqprio checks
Refactor bitwise checks for whether TC MQPRIO is enabled
into one single method for improved readability.
Signed-off-by: Przemyslaw Patynowski <[email protected]>
Signed-off-by: Jan Sokolowski <[email protected]>
Tested-by: Bharathi Sreenivas <[email protected]>
Signed-off-by: Tony Nguyen <[email protected]>
Diffstat (limited to 'drivers/net/ethernet/intel/i40e/i40e.h')
| -rw-r--r-- | drivers/net/ethernet/intel/i40e/i40e.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/drivers/net/ethernet/intel/i40e/i40e.h b/drivers/net/ethernet/intel/i40e/i40e.h index 97c574a33ba0..d86b6d349ea9 100644 --- a/drivers/net/ethernet/intel/i40e/i40e.h +++ b/drivers/net/ethernet/intel/i40e/i40e.h @@ -1292,4 +1292,18 @@ int i40e_add_del_cloud_filter(struct i40e_vsi *vsi, int i40e_add_del_cloud_filter_big_buf(struct i40e_vsi *vsi, struct i40e_cloud_filter *filter, bool add); + +/** + * i40e_is_tc_mqprio_enabled - check if TC MQPRIO is enabled on PF + * @pf: pointer to a pf. + * + * Check and return value of flag I40E_FLAG_TC_MQPRIO. + * + * Return: I40E_FLAG_TC_MQPRIO set state. + **/ +static inline u32 i40e_is_tc_mqprio_enabled(struct i40e_pf *pf) +{ + return pf->flags & I40E_FLAG_TC_MQPRIO; +} + #endif /* _I40E_H_ */ |
