net: ethernet: ti: ale: add static configuration
authorGrygorii Strashko <grygorii.strashko@ti.com>
Thu, 10 Sep 2020 20:28:00 +0000 (23:28 +0300)
committerDavid S. Miller <davem@davemloft.net>
Sat, 12 Sep 2020 00:34:39 +0000 (17:34 -0700)
commit6a68df930c6310d18ca7aab4344520b859bf7e11
treeb0a33138efceecb7eeba4b394d87b805ecac0eb3
parentb574bf0c6a8da461dcbe1c266ddd7e5ee10584a1
net: ethernet: ti: ale: add static configuration

As existing, as newly introduced CPSW ALE versions have differences in
supported features and ALE table formats. Especially it's actual for the
recent AM65x/J721E/J7200 SoC and feature AM64x, which supports features
like: auto-aging, classifiers, Link aggregation, additional hw filtering,
etc.

Existing ALE configuration interface is not practical in terms of adding
new features and requires consumers to program a lot static parameters. Any
attempt to add new options will case endless adding and maintaining
different combination of flags and options.

Hence CPSW ALE configuration is static and fixed for SoC (or set of SoC) It
is reasonable to add support for static ALE configurations inside ALE
module. This patch adds static ALE configuration table for different ALE
versions and provides option for consumers to select required ALE
configuration by providing ALE const char *dev_id identifier.

This feature is not enabled by default until existing CPSW drivers will be
modified by follow up patches.

Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/ti/cpsw_ale.c
drivers/net/ethernet/ti/cpsw_ale.h