* [PATCH net] i40e: flower: check if TC offload is enabled on a netdev
@ 2018-01-23 8:08 Jakub Kicinski
2018-01-23 8:26 ` Jiri Pirko
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Jakub Kicinski @ 2018-01-23 8:08 UTC (permalink / raw)
To: davem
Cc: netdev, oss-drivers, jeffrey.t.kirsher, amritha.nambiar, jiri,
alexander.h.duyck, Jakub Kicinski
Since TC block changes drivers are required to check if
the TC hw offload flag is set on the interface themselves.
Fixes: 2f4b411a3d67 ("i40e: Enable cloud filters via tc-flower")
Fixes: 44ae12a768b7 ("net: sched: move the can_offload check from binding phase to rule insertion phase")
Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Reviewed-by: Simon Horman <simon.horman@netronome.com>
---
drivers/net/ethernet/intel/i40e/i40e_main.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethernet/intel/i40e/i40e_main.c
index 42dcaefc4c19..af792112a2d3 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_main.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_main.c
@@ -7505,6 +7505,8 @@ static int i40e_setup_tc_cls_flower(struct i40e_netdev_priv *np,
{
struct i40e_vsi *vsi = np->vsi;
+ if (!tc_can_offload(vsi->netdev))
+ return -EOPNOTSUPP;
if (cls_flower->common.chain_index)
return -EOPNOTSUPP;
--
2.15.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH net] i40e: flower: check if TC offload is enabled on a netdev
2018-01-23 8:08 [PATCH net] i40e: flower: check if TC offload is enabled on a netdev Jakub Kicinski
@ 2018-01-23 8:26 ` Jiri Pirko
2018-01-23 9:10 ` Nambiar, Amritha
2018-01-23 16:47 ` Jeff Kirsher
2 siblings, 0 replies; 5+ messages in thread
From: Jiri Pirko @ 2018-01-23 8:26 UTC (permalink / raw)
To: Jakub Kicinski
Cc: davem, netdev, oss-drivers, jeffrey.t.kirsher, amritha.nambiar,
alexander.h.duyck
Tue, Jan 23, 2018 at 09:08:40AM CET, jakub.kicinski@netronome.com wrote:
>Since TC block changes drivers are required to check if
>the TC hw offload flag is set on the interface themselves.
>
>Fixes: 2f4b411a3d67 ("i40e: Enable cloud filters via tc-flower")
>Fixes: 44ae12a768b7 ("net: sched: move the can_offload check from binding phase to rule insertion phase")
>Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
>Reviewed-by: Simon Horman <simon.horman@netronome.com>
Acked-by: Jiri Pirko <jiri@mellanox.com>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH net] i40e: flower: check if TC offload is enabled on a netdev
2018-01-23 8:08 [PATCH net] i40e: flower: check if TC offload is enabled on a netdev Jakub Kicinski
2018-01-23 8:26 ` Jiri Pirko
@ 2018-01-23 9:10 ` Nambiar, Amritha
2018-01-23 16:47 ` Jeff Kirsher
2 siblings, 0 replies; 5+ messages in thread
From: Nambiar, Amritha @ 2018-01-23 9:10 UTC (permalink / raw)
To: Jakub Kicinski, davem
Cc: netdev, oss-drivers, jeffrey.t.kirsher, jiri, alexander.h.duyck
On 1/23/2018 12:08 AM, Jakub Kicinski wrote:
> Since TC block changes drivers are required to check if
> the TC hw offload flag is set on the interface themselves.
>
> Fixes: 2f4b411a3d67 ("i40e: Enable cloud filters via tc-flower")
> Fixes: 44ae12a768b7 ("net: sched: move the can_offload check from binding phase to rule insertion phase")
> Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
> Reviewed-by: Simon Horman <simon.horman@netronome.com>
Acked-by: Amritha Nambiar <amritha.nambiar@intel.com>
> ---
> drivers/net/ethernet/intel/i40e/i40e_main.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethernet/intel/i40e/i40e_main.c
> index 42dcaefc4c19..af792112a2d3 100644
> --- a/drivers/net/ethernet/intel/i40e/i40e_main.c
> +++ b/drivers/net/ethernet/intel/i40e/i40e_main.c
> @@ -7505,6 +7505,8 @@ static int i40e_setup_tc_cls_flower(struct i40e_netdev_priv *np,
> {
> struct i40e_vsi *vsi = np->vsi;
>
> + if (!tc_can_offload(vsi->netdev))
> + return -EOPNOTSUPP;
> if (cls_flower->common.chain_index)
> return -EOPNOTSUPP;
>
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH net] i40e: flower: check if TC offload is enabled on a netdev
2018-01-23 8:08 [PATCH net] i40e: flower: check if TC offload is enabled on a netdev Jakub Kicinski
2018-01-23 8:26 ` Jiri Pirko
2018-01-23 9:10 ` Nambiar, Amritha
@ 2018-01-23 16:47 ` Jeff Kirsher
2018-01-24 21:51 ` David Miller
2 siblings, 1 reply; 5+ messages in thread
From: Jeff Kirsher @ 2018-01-23 16:47 UTC (permalink / raw)
To: Jakub Kicinski, davem
Cc: netdev, oss-drivers, amritha.nambiar, jiri, alexander.h.duyck
[-- Attachment #1: Type: text/plain, Size: 673 bytes --]
On Tue, 2018-01-23 at 00:08 -0800, Jakub Kicinski wrote:
> Since TC block changes drivers are required to check if
> the TC hw offload flag is set on the interface themselves.
>
> Fixes: 2f4b411a3d67 ("i40e: Enable cloud filters via tc-flower")
> Fixes: 44ae12a768b7 ("net: sched: move the can_offload check from
> binding phase to rule insertion phase")
> Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
> Reviewed-by: Simon Horman <simon.horman@netronome.com>
> ---
> drivers/net/ethernet/intel/i40e/i40e_main.c | 2 ++
> 1 file changed, 2 insertions(+)
Acked-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Dave, feel free to pick this up.
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH net] i40e: flower: check if TC offload is enabled on a netdev
2018-01-23 16:47 ` Jeff Kirsher
@ 2018-01-24 21:51 ` David Miller
0 siblings, 0 replies; 5+ messages in thread
From: David Miller @ 2018-01-24 21:51 UTC (permalink / raw)
To: jeffrey.t.kirsher
Cc: jakub.kicinski, netdev, oss-drivers, amritha.nambiar, jiri,
alexander.h.duyck
From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Date: Tue, 23 Jan 2018 08:47:29 -0800
> On Tue, 2018-01-23 at 00:08 -0800, Jakub Kicinski wrote:
>> Since TC block changes drivers are required to check if
>> the TC hw offload flag is set on the interface themselves.
>>
>> Fixes: 2f4b411a3d67 ("i40e: Enable cloud filters via tc-flower")
>> Fixes: 44ae12a768b7 ("net: sched: move the can_offload check from
>> binding phase to rule insertion phase")
>> Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
>> Reviewed-by: Simon Horman <simon.horman@netronome.com>
>> ---
>> drivers/net/ethernet/intel/i40e/i40e_main.c | 2 ++
>> 1 file changed, 2 insertions(+)
>
> Acked-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
>
> Dave, feel free to pick this up.
Ok, done. Thanks.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2018-01-24 21:51 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-01-23 8:08 [PATCH net] i40e: flower: check if TC offload is enabled on a netdev Jakub Kicinski
2018-01-23 8:26 ` Jiri Pirko
2018-01-23 9:10 ` Nambiar, Amritha
2018-01-23 16:47 ` Jeff Kirsher
2018-01-24 21:51 ` David Miller
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).