diff mbox series

[next-queue,3/8] igb: Enable the hardware traffic class feature bit for igb models

Message ID 20180224012036.5834-4-vinicius.gomes@intel.com
State Awaiting Upstream, archived
Delegated to: David Miller
Headers show
Series igb: offloading of receive filters | expand

Commit Message

Vinicius Costa Gomes Feb. 24, 2018, 1:20 a.m. UTC
This will allow functionality depending on the hardware being traffic
class aware to work. In particular the tc-flower offloading checks
verifies that this bit is set.

Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@intel.com>
---
 drivers/net/ethernet/intel/igb/igb_main.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

Comments

Alexander H Duyck Feb. 25, 2018, 10:37 p.m. UTC | #1
On Fri, Feb 23, 2018 at 5:20 PM, Vinicius Costa Gomes
<vinicius.gomes@intel.com> wrote:
> This will allow functionality depending on the hardware being traffic
> class aware to work. In particular the tc-flower offloading checks
> verifies that this bit is set.
>
> Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@intel.com>
> ---
>  drivers/net/ethernet/intel/igb/igb_main.c | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/net/ethernet/intel/igb/igb_main.c b/drivers/net/ethernet/intel/igb/igb_main.c
> index 0ea32be07d71..543aa99892eb 100644
> --- a/drivers/net/ethernet/intel/igb/igb_main.c
> +++ b/drivers/net/ethernet/intel/igb/igb_main.c
> @@ -2820,8 +2820,10 @@ static int igb_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
>                                NETIF_F_HW_VLAN_CTAG_TX |
>                                NETIF_F_RXALL;
>
> -       if (hw->mac.type >= e1000_i350)
> -               netdev->hw_features |= NETIF_F_NTUPLE;
> +       if (hw->mac.type >= e1000_i350) {
> +               netdev->hw_features |= (NETIF_F_NTUPLE | NETIF_F_HW_TC);
> +               netdev->features |= NETIF_F_HW_TC;

The parens aren't needed.

Also you might consider moving this block up to where we have a
similar one for 82576. Then you wouldn't need to set both features and
hw_features in the case of the HW_TC flag.

> +       }
>
>         if (pci_using_dac)
>                 netdev->features |= NETIF_F_HIGHDMA;
> --
> 2.16.2
>
> _______________________________________________
> Intel-wired-lan mailing list
> Intel-wired-lan@osuosl.org
> https://lists.osuosl.org/mailman/listinfo/intel-wired-lan
Vinicius Costa Gomes Feb. 26, 2018, 6:49 p.m. UTC | #2
Hi,

Alexander Duyck <alexander.duyck@gmail.com> writes:

> On Fri, Feb 23, 2018 at 5:20 PM, Vinicius Costa Gomes
> <vinicius.gomes@intel.com> wrote:
>> This will allow functionality depending on the hardware being traffic
>> class aware to work. In particular the tc-flower offloading checks
>> verifies that this bit is set.
>>
>> Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@intel.com>
>> ---
>>  drivers/net/ethernet/intel/igb/igb_main.c | 6 ++++--
>>  1 file changed, 4 insertions(+), 2 deletions(-)
>>
>> diff --git a/drivers/net/ethernet/intel/igb/igb_main.c b/drivers/net/ethernet/intel/igb/igb_main.c
>> index 0ea32be07d71..543aa99892eb 100644
>> --- a/drivers/net/ethernet/intel/igb/igb_main.c
>> +++ b/drivers/net/ethernet/intel/igb/igb_main.c
>> @@ -2820,8 +2820,10 @@ static int igb_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
>>                                NETIF_F_HW_VLAN_CTAG_TX |
>>                                NETIF_F_RXALL;
>>
>> -       if (hw->mac.type >= e1000_i350)
>> -               netdev->hw_features |= NETIF_F_NTUPLE;
>> +       if (hw->mac.type >= e1000_i350) {
>> +               netdev->hw_features |= (NETIF_F_NTUPLE | NETIF_F_HW_TC);
>> +               netdev->features |= NETIF_F_HW_TC;
>
> The parens aren't needed.
>
> Also you might consider moving this block up to where we have a
> similar one for 82576. Then you wouldn't need to set both features and
> hw_features in the case of the HW_TC flag.

Cool. Will fix.

>
>> +       }
>>
>>         if (pci_using_dac)
>>                 netdev->features |= NETIF_F_HIGHDMA;
>> --
>> 2.16.2
>>
>> _______________________________________________
>> Intel-wired-lan mailing list
>> Intel-wired-lan@osuosl.org
>> https://lists.osuosl.org/mailman/listinfo/intel-wired-lan


Cheers,
--
Vinicius
diff mbox series

Patch

diff --git a/drivers/net/ethernet/intel/igb/igb_main.c b/drivers/net/ethernet/intel/igb/igb_main.c
index 0ea32be07d71..543aa99892eb 100644
--- a/drivers/net/ethernet/intel/igb/igb_main.c
+++ b/drivers/net/ethernet/intel/igb/igb_main.c
@@ -2820,8 +2820,10 @@  static int igb_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
 			       NETIF_F_HW_VLAN_CTAG_TX |
 			       NETIF_F_RXALL;
 
-	if (hw->mac.type >= e1000_i350)
-		netdev->hw_features |= NETIF_F_NTUPLE;
+	if (hw->mac.type >= e1000_i350) {
+		netdev->hw_features |= (NETIF_F_NTUPLE | NETIF_F_HW_TC);
+		netdev->features |= NETIF_F_HW_TC;
+	}
 
 	if (pci_using_dac)
 		netdev->features |= NETIF_F_HIGHDMA;