[PATCH v3 01/17] net/txgbe: support flow filter for VF
Stephen Hemminger
stephen at networkplumber.org
Tue Jul 1 16:38:58 CEST 2025
On Fri, 13 Jun 2025 16:41:43 +0800
Jiawen Wu <jiawenwu at trustnetic.com> wrote:
> +bool txgbe_is_pf(struct txgbe_hw *hw)
> +{
> + switch (hw->mac.type) {
> + case txgbe_mac_raptor:
> + return true;
> + default:
> + return false;
> + }
> +}
> +
This is ok as is, but you could make it much simpler as:
bool txgbe_is_pf(const struct txgbe_hw *hw)
{
return hw->mac.type == txgbe_mac_raptor;
}
Or are you planning for future hardware?
More information about the dev
mailing list