[RFC PATCH 1/3] ftgmac: Include NETIF_F_HW_VLAN_CTAG_FILTER in features

Joel Stanley joel at jms.id.au
Fri Aug 11 10:05:28 AEST 2017


On Thu, Aug 10, 2017 at 9:00 PM, Benjamin Herrenschmidt
<benh at kernel.crashing.org> wrote:
> On Thu, 2017-08-10 at 17:19 +0930, Joel Stanley wrote:
>> > --- a/drivers/net/ethernet/faraday/ftgmac100.c
>> > +++ b/drivers/net/ethernet/faraday/ftgmac100.c
>> > @@ -1837,6 +1837,9 @@ static int ftgmac100_probe(struct platform_device *pdev)
>> >                  NETIF_F_GRO | NETIF_F_SG | NETIF_F_HW_VLAN_CTAG_RX |
>> >                  NETIF_F_HW_VLAN_CTAG_TX;
>> >
>> > +       if (priv->use_ncsi)
>> > +               netdev->hw_features |= NETIF_F_HW_VLAN_CTAG_FILTER;
>>
>> I'm a VLAN noob. Why is this conditional on ncsi?
>>
>> Can the ftgmac100 support vlan with a directly attached PHY?
>
> ftgmac100 supports vlans fine. This flag is telling the network stack
> that we can offload the filtering so we need to get notified of vlans
> being added or removed.
>
> There is no point setting it when not doing ncsi. The HW doesn't have a
> filter in that case (we do have HW vlan tag extraction and injection,
> which my driver supports, but that's different flags).

Thanks for the explanation. Makes sense.

Sam, that might make a good addition to the commit message.

Cheers,

Joel


More information about the openbmc mailing list