From: Jakub Kicinski <kuba@kernel.org>
To: Tony Nguyen <anthony.l.nguyen@intel.com>
Cc: davem@davemloft.net, pabeni@redhat.com, edumazet@google.com,
Sudheer Mogilappagari <sudheer.mogilappagari@intel.com>,
netdev@vger.kernel.org, Jun Zhang <xuejun.zhang@intel.com>,
Bharathi Sreenivas <bharathi.sreenivas@intel.com>
Subject: Re: [PATCH net 3/3] iavf: enable tc filter configuration only if hw-tc-offload is on
Date: Mon, 25 Jul 2022 19:45:47 -0700 [thread overview]
Message-ID: <20220725194547.0702bd73@kernel.org> (raw)
In-Reply-To: <20220725170452.920964-4-anthony.l.nguyen@intel.com>
On Mon, 25 Jul 2022 10:04:52 -0700 Tony Nguyen wrote:
> From: Sudheer Mogilappagari <sudheer.mogilappagari@intel.com>
>
> Allow configuration of tc filter only if NETIF_F_HW_TC is set for the
> device.
>
> Fixes: 0075fa0fadd0 ("i40evf: Add support to apply cloud filters")
> Signed-off-by: Sudheer Mogilappagari <sudheer.mogilappagari@intel.com>
> Signed-off-by: Jun Zhang <xuejun.zhang@intel.com>
> Tested-by: Bharathi Sreenivas <bharathi.sreenivas@intel.com>
> Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
> ---
> drivers/net/ethernet/intel/iavf/iavf_main.c | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/drivers/net/ethernet/intel/iavf/iavf_main.c b/drivers/net/ethernet/intel/iavf/iavf_main.c
> index 3dbfaead2ac7..9279bb37e4aa 100644
> --- a/drivers/net/ethernet/intel/iavf/iavf_main.c
> +++ b/drivers/net/ethernet/intel/iavf/iavf_main.c
> @@ -3802,6 +3802,12 @@ static int iavf_configure_clsflower(struct iavf_adapter *adapter,
> return -EINVAL;
> }
>
> + if (!(adapter->netdev->features & NETIF_F_HW_TC)) {
> + dev_err(&adapter->pdev->dev,
> + "Can't apply TC flower filters, turn ON hw-tc-offload and try again");
> + return -EOPNOTSUPP;
> + }
> +
> filter = kzalloc(sizeof(*filter), GFP_KERNEL);
> if (!filter)
> return -ENOMEM;
tc_can_offload() checks this in the core already, no?
next prev parent reply other threads:[~2022-07-26 2:45 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-25 17:04 [PATCH net 0/3][pull request] Intel Wired LAN Driver Updates 2022-07-25 Tony Nguyen
2022-07-25 17:04 ` [PATCH net 1/3] iavf: Fix max_rate limiting Tony Nguyen
2022-07-25 17:04 ` [PATCH net 2/3] iavf: Fix 'tc qdisc show' listing too many queues Tony Nguyen
2022-07-25 17:04 ` [PATCH net 3/3] iavf: enable tc filter configuration only if hw-tc-offload is on Tony Nguyen
2022-07-26 2:45 ` Jakub Kicinski [this message]
2022-07-27 23:37 ` Mogilappagari, Sudheer
2022-07-28 1:10 ` Jakub Kicinski
2022-07-28 19:57 ` Mogilappagari, Sudheer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220725194547.0702bd73@kernel.org \
--to=kuba@kernel.org \
--cc=anthony.l.nguyen@intel.com \
--cc=bharathi.sreenivas@intel.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=sudheer.mogilappagari@intel.com \
--cc=xuejun.zhang@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).