* [PATCH net] i40e: Fix I40E_FLAG_VF_VLAN_PRUNING value
@ 2023-10-18 11:26 Ivan Vecera
2023-10-18 12:30 ` Przemek Kitszel
2023-10-19 9:15 ` Simon Horman
0 siblings, 2 replies; 6+ messages in thread
From: Ivan Vecera @ 2023-10-18 11:26 UTC (permalink / raw)
To: netdev
Cc: Mateusz Palczewski, Jesse Brandeburg, Tony Nguyen,
David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
moderated list:INTEL ETHERNET DRIVERS, open list
Commit c87c938f62d8f1 ("i40e: Add VF VLAN pruning") added new
PF flag I40E_FLAG_VF_VLAN_PRUNING but its value collides with
existing I40E_FLAG_TOTAL_PORT_SHUTDOWN_ENABLED flag.
Move the affected flag at the end of the flags and fix its value.
Cc: Mateusz Palczewski <mateusz.palczewski@intel.com>
Signed-off-by: Ivan Vecera <ivecera@redhat.com>
---
drivers/net/ethernet/intel/i40e/i40e.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/intel/i40e/i40e.h b/drivers/net/ethernet/intel/i40e/i40e.h
index 6e310a53946782..55bb0b5310d5b4 100644
--- a/drivers/net/ethernet/intel/i40e/i40e.h
+++ b/drivers/net/ethernet/intel/i40e/i40e.h
@@ -580,7 +580,6 @@ struct i40e_pf {
#define I40E_FLAG_DISABLE_FW_LLDP BIT(24)
#define I40E_FLAG_RS_FEC BIT(25)
#define I40E_FLAG_BASE_R_FEC BIT(26)
-#define I40E_FLAG_VF_VLAN_PRUNING BIT(27)
/* TOTAL_PORT_SHUTDOWN
* Allows to physically disable the link on the NIC's port.
* If enabled, (after link down request from the OS)
@@ -603,6 +602,7 @@ struct i40e_pf {
* in abilities field of i40e_aq_set_phy_config structure
*/
#define I40E_FLAG_TOTAL_PORT_SHUTDOWN_ENABLED BIT(27)
+#define I40E_FLAG_VF_VLAN_PRUNING BIT(28)
struct i40e_client_instance *cinst;
bool stat_offsets_loaded;
--
2.41.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH net] i40e: Fix I40E_FLAG_VF_VLAN_PRUNING value
2023-10-18 11:26 [PATCH net] i40e: Fix I40E_FLAG_VF_VLAN_PRUNING value Ivan Vecera
@ 2023-10-18 12:30 ` Przemek Kitszel
2023-10-19 19:20 ` Jacob Keller
2023-10-19 9:15 ` Simon Horman
1 sibling, 1 reply; 6+ messages in thread
From: Przemek Kitszel @ 2023-10-18 12:30 UTC (permalink / raw)
To: Ivan Vecera, netdev
Cc: Mateusz Palczewski, Jesse Brandeburg, Tony Nguyen,
David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
moderated list:INTEL ETHERNET DRIVERS, open list
On 10/18/23 13:26, Ivan Vecera wrote:
> Commit c87c938f62d8f1 ("i40e: Add VF VLAN pruning") added new
> PF flag I40E_FLAG_VF_VLAN_PRUNING but its value collides with
> existing I40E_FLAG_TOTAL_PORT_SHUTDOWN_ENABLED flag.
>
> Move the affected flag at the end of the flags and fix its value.
>
> Cc: Mateusz Palczewski <mateusz.palczewski@intel.com>
> Signed-off-by: Ivan Vecera <ivecera@redhat.com>
> ---
> drivers/net/ethernet/intel/i40e/i40e.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/ethernet/intel/i40e/i40e.h b/drivers/net/ethernet/intel/i40e/i40e.h
> index 6e310a53946782..55bb0b5310d5b4 100644
> --- a/drivers/net/ethernet/intel/i40e/i40e.h
> +++ b/drivers/net/ethernet/intel/i40e/i40e.h
> @@ -580,7 +580,6 @@ struct i40e_pf {
> #define I40E_FLAG_DISABLE_FW_LLDP BIT(24)
> #define I40E_FLAG_RS_FEC BIT(25)
> #define I40E_FLAG_BASE_R_FEC BIT(26)
> -#define I40E_FLAG_VF_VLAN_PRUNING BIT(27)
> /* TOTAL_PORT_SHUTDOWN
> * Allows to physically disable the link on the NIC's port.
> * If enabled, (after link down request from the OS)
> @@ -603,6 +602,7 @@ struct i40e_pf {
such mistake happened only because list of flags is dispersed so much :/
> * in abilities field of i40e_aq_set_phy_config structure
> */
> #define I40E_FLAG_TOTAL_PORT_SHUTDOWN_ENABLED BIT(27)
> +#define I40E_FLAG_VF_VLAN_PRUNING BIT(28)
>
> struct i40e_client_instance *cinst;
> bool stat_offsets_loaded;
Reviewed-by: Przemek Kitszel <przemyslaw.kitszel@intel.com>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH net] i40e: Fix I40E_FLAG_VF_VLAN_PRUNING value
2023-10-18 11:26 [PATCH net] i40e: Fix I40E_FLAG_VF_VLAN_PRUNING value Ivan Vecera
2023-10-18 12:30 ` Przemek Kitszel
@ 2023-10-19 9:15 ` Simon Horman
2023-10-19 16:35 ` Ivan Vecera
1 sibling, 1 reply; 6+ messages in thread
From: Simon Horman @ 2023-10-19 9:15 UTC (permalink / raw)
To: Ivan Vecera
Cc: netdev, Mateusz Palczewski, Jesse Brandeburg, Tony Nguyen,
David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
moderated list:INTEL ETHERNET DRIVERS, open list
On Wed, Oct 18, 2023 at 01:26:20PM +0200, Ivan Vecera wrote:
> Commit c87c938f62d8f1 ("i40e: Add VF VLAN pruning") added new
> PF flag I40E_FLAG_VF_VLAN_PRUNING but its value collides with
> existing I40E_FLAG_TOTAL_PORT_SHUTDOWN_ENABLED flag.
>
> Move the affected flag at the end of the flags and fix its value.
>
> Cc: Mateusz Palczewski <mateusz.palczewski@intel.com>
> Signed-off-by: Ivan Vecera <ivecera@redhat.com>
Hi Ivan,
I agree with the correctness of this patch and that it was
introduced by the cited commit.
However, I do wonder if, as a fix for 'net':
1) The patch description could include some discussion of
what problem is resolved, and, ideally, how I user might
get into such a situation.
2) The following fixes tag is appropriate.
Fixes: c87c938f62d8 ("i40e: Add VF VLAN pruning")
...
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH net] i40e: Fix I40E_FLAG_VF_VLAN_PRUNING value
2023-10-19 9:15 ` Simon Horman
@ 2023-10-19 16:35 ` Ivan Vecera
0 siblings, 0 replies; 6+ messages in thread
From: Ivan Vecera @ 2023-10-19 16:35 UTC (permalink / raw)
To: Simon Horman
Cc: netdev, Mateusz Palczewski, Jesse Brandeburg, Tony Nguyen,
David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
moderated list:INTEL ETHERNET DRIVERS, open list
On 19. 10. 23 11:15, Simon Horman wrote:
> On Wed, Oct 18, 2023 at 01:26:20PM +0200, Ivan Vecera wrote:
>> Commit c87c938f62d8f1 ("i40e: Add VF VLAN pruning") added new
>> PF flag I40E_FLAG_VF_VLAN_PRUNING but its value collides with
>> existing I40E_FLAG_TOTAL_PORT_SHUTDOWN_ENABLED flag.
>>
>> Move the affected flag at the end of the flags and fix its value.
>>
>> Cc: Mateusz Palczewski <mateusz.palczewski@intel.com>
>> Signed-off-by: Ivan Vecera <ivecera@redhat.com>
>
> Hi Ivan,
>
> I agree with the correctness of this patch and that it was
> introduced by the cited commit.
>
> However, I do wonder if, as a fix for 'net':
>
> 1) The patch description could include some discussion of
> what problem is resolved, and, ideally, how I user might
> get into such a situation.
>
> 2) The following fixes tag is appropriate.
>
> Fixes: c87c938f62d8 ("i40e: Add VF VLAN pruning")
>
Ahh, thanks Simon! I forgot to add Fixes: tag.
Will fix it by v2 and add the reproducer.
Thanks,
Ivan
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH net] i40e: Fix I40E_FLAG_VF_VLAN_PRUNING value
2023-10-18 12:30 ` Przemek Kitszel
@ 2023-10-19 19:20 ` Jacob Keller
[not found] ` <CAAVpwAu9KmuHFOGXWd9b2hgxeXfs6_Dy7APuwZhHzqiE0hNFqA@mail.gmail.com>
0 siblings, 1 reply; 6+ messages in thread
From: Jacob Keller @ 2023-10-19 19:20 UTC (permalink / raw)
To: Przemek Kitszel, Ivan Vecera, netdev
Cc: Mateusz Palczewski, Jesse Brandeburg, Tony Nguyen,
David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
moderated list:INTEL ETHERNET DRIVERS, open list
On 10/18/2023 5:30 AM, Przemek Kitszel wrote:
> On 10/18/23 13:26, Ivan Vecera wrote:
>> Commit c87c938f62d8f1 ("i40e: Add VF VLAN pruning") added new
>> PF flag I40E_FLAG_VF_VLAN_PRUNING but its value collides with
>> existing I40E_FLAG_TOTAL_PORT_SHUTDOWN_ENABLED flag.
>>
>> Move the affected flag at the end of the flags and fix its value.
>>
>> Cc: Mateusz Palczewski <mateusz.palczewski@intel.com>
>> Signed-off-by: Ivan Vecera <ivecera@redhat.com>
>> ---
>> drivers/net/ethernet/intel/i40e/i40e.h | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/net/ethernet/intel/i40e/i40e.h b/drivers/net/ethernet/intel/i40e/i40e.h
>> index 6e310a53946782..55bb0b5310d5b4 100644
>> --- a/drivers/net/ethernet/intel/i40e/i40e.h
>> +++ b/drivers/net/ethernet/intel/i40e/i40e.h
>> @@ -580,7 +580,6 @@ struct i40e_pf {
>> #define I40E_FLAG_DISABLE_FW_LLDP BIT(24)
>> #define I40E_FLAG_RS_FEC BIT(25)
>> #define I40E_FLAG_BASE_R_FEC BIT(26)
>> -#define I40E_FLAG_VF_VLAN_PRUNING BIT(27)
>> /* TOTAL_PORT_SHUTDOWN
>> * Allows to physically disable the link on the NIC's port.
>> * If enabled, (after link down request from the OS)
>> @@ -603,6 +602,7 @@ struct i40e_pf {
>
> such mistake happened only because list of flags is dispersed so much :/
Better yet if we didn't hard-code the bits, and instead defined them via
an enumeration so that its not possible :D These aren't even ABI so
there's not a backwards compatibility risk either.
Thanks,
Jake
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH net] i40e: Fix I40E_FLAG_VF_VLAN_PRUNING value
[not found] ` <CAAVpwAu9KmuHFOGXWd9b2hgxeXfs6_Dy7APuwZhHzqiE0hNFqA@mail.gmail.com>
@ 2023-10-19 22:34 ` Jacob Keller
0 siblings, 0 replies; 6+ messages in thread
From: Jacob Keller @ 2023-10-19 22:34 UTC (permalink / raw)
To: Ivan Vecera
Cc: Przemek Kitszel, netdev, Mateusz Palczewski, Jesse Brandeburg,
Tony Nguyen, David S. Miller, Eric Dumazet, Jakub Kicinski,
Paolo Abeni, moderated list:INTEL ETHERNET DRIVERS, open list
On 10/19/2023 12:48 PM, Ivan Vecera wrote:
> Dne čt 19. 10. 2023 21:24 uživatel Jacob Keller <jacob.e.keller@intel.com>
> napsal:
>
>>
>>
>> On 10/18/2023 5:30 AM, Przemek Kitszel wrote:
>>> On 10/18/23 13:26, Ivan Vecera wrote:
>>>> Commit c87c938f62d8f1 ("i40e: Add VF VLAN pruning") added new
>>>> PF flag I40E_FLAG_VF_VLAN_PRUNING but its value collides with
>>>> existing I40E_FLAG_TOTAL_PORT_SHUTDOWN_ENABLED flag.
>>>>
>>>> Move the affected flag at the end of the flags and fix its value.
>>>>
>>>> Cc: Mateusz Palczewski <mateusz.palczewski@intel.com>
>>>> Signed-off-by: Ivan Vecera <ivecera@redhat.com>
>>>> ---
>>>> drivers/net/ethernet/intel/i40e/i40e.h | 2 +-
>>>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>>>
>>>> diff --git a/drivers/net/ethernet/intel/i40e/i40e.h
>> b/drivers/net/ethernet/intel/i40e/i40e.h
>>>> index 6e310a53946782..55bb0b5310d5b4 100644
>>>> --- a/drivers/net/ethernet/intel/i40e/i40e.h
>>>> +++ b/drivers/net/ethernet/intel/i40e/i40e.h
>>>> @@ -580,7 +580,6 @@ struct i40e_pf {
>>>> #define I40E_FLAG_DISABLE_FW_LLDP BIT(24)
>>>> #define I40E_FLAG_RS_FEC BIT(25)
>>>> #define I40E_FLAG_BASE_R_FEC BIT(26)
>>>> -#define I40E_FLAG_VF_VLAN_PRUNING BIT(27)
>>>> /* TOTAL_PORT_SHUTDOWN
>>>> * Allows to physically disable the link on the NIC's port.
>>>> * If enabled, (after link down request from the OS)
>>>> @@ -603,6 +602,7 @@ struct i40e_pf {
>>>
>>> such mistake happened only because list of flags is dispersed so much :/
>>
>> Better yet if we didn't hard-code the bits, and instead defined them via
>> an enumeration so that its not possible :D These aren't even ABI so
>> there's not a backwards compatibility risk either.
>>
>> Thanks,
>> Jake
>>
>
> Hi Jake,
> I have been preparing another series for iwl-next that covers this
> conversion. I will submit it tomorrow or on the weekend.
>
> Ivan
>
Great, thanks!
-Jake
>>
>
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2023-10-19 22:34 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-10-18 11:26 [PATCH net] i40e: Fix I40E_FLAG_VF_VLAN_PRUNING value Ivan Vecera
2023-10-18 12:30 ` Przemek Kitszel
2023-10-19 19:20 ` Jacob Keller
[not found] ` <CAAVpwAu9KmuHFOGXWd9b2hgxeXfs6_Dy7APuwZhHzqiE0hNFqA@mail.gmail.com>
2023-10-19 22:34 ` Jacob Keller
2023-10-19 9:15 ` Simon Horman
2023-10-19 16:35 ` Ivan Vecera
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).