]> git.baikalelectronics.ru Git - kernel.git/commit
Merge branch 'ionic-vlanid-mgmt'
authorDavid S. Miller <davem@davemloft.net>
Sun, 10 Oct 2021 09:42:47 +0000 (10:42 +0100)
committerDavid S. Miller <davem@davemloft.net>
Sun, 10 Oct 2021 09:42:47 +0000 (10:42 +0100)
commit3b118f02c5f669ecf61edbf6505000eee7505624
tree4f439df91be95340fd720df340df92160c1d4dae
parent63dbfa09376c64ead1d280567ec2312693a0f48d
parentae4f76431659fab7d2b14e90576c8d0f754a3893
Merge branch 'ionic-vlanid-mgmt'

Shannon Nelson says:

====================
ionic: add vlanid overflow management

Add vlans to the existing rx_filter_sync mechanics currently
used for managing mac filters.

Older versions of our firmware had no enforced limits on the
number of vlans that the driver could request, but requesting
large numbers of vlans caused issues in FW memory management,
so an arbitrary limit was added in the FW.  The FW now
returns -ENOSPC when it hits that limit, which the driver
needs to handle.

Unfortunately, the FW doesn't advertise the vlan id limit,
as it does with mac filters, so the driver won't know the
limit until it bumps into it.  We'll grab the current vlan id
count and use that as the limit from there on and thus prevent
getting any more -ENOSPC errors.

Just as is done for the mac filters, the device puts the device
into promiscuous mode when -ENOSPC is seen for vlan ids, and
the driver will track the vlans that aren't synced to the FW.
When vlans are removed, the driver will retry the un-synced
vlans.  If all outstanding vlans are synced, the promiscuous
mode will be disabled.

The first 6 patches rework the existing filter management to
make it flexible enough for additional filter types.  Next
we add the vlan ids into the management.  The last 2 patches
allow us to catch the max vlan -ENOSPC error without adding
an unnecessary error message to the kernel log.
====================

Signed-off-by: David S. Miller <davem@davemloft.net>