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

Benjamin Herrenschmidt benh at kernel.crashing.org
Thu Aug 10 21:30:24 AEST 2017


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).

Cheers,
Ben.



More information about the openbmc mailing list