Skip to content
Permalink
luizluca-gmail…
Switch branches/tags

Commits on Dec 16, 2021

  1. net: dsa: realtek: rtl8367c: add RTL8367S support

    Realtek's RTL8367S, a 5+2 port 10/100/1000M Ethernet switch.
    It shares the same driver family (RTL8367C) with other models
    as the RTL8365MB-VC. Its compatible string is "realtek,rtl8367s".
    
    It was tested only with MDIO interface (realtek-mdio), although it might
    work out-of-the-box with SMI interface (using realtek-smi).
    
    This patch was based on an unpublished patch from Alvin Šipraga
    <alsi@bang-olufsen.dk>.
    
    Tested-by: Arınç ÜNAL <arinc.unal@arinc9.com>
    Signed-off-by: Luiz Angelo Daros de Luca <luizluca@gmail.com>
    luizluca authored and intel-lab-lkp committed Dec 16, 2021
  2. net: dsa: realtek: rtl8367c: use DSA CPU port

    Instead of a fixed CPU port, assume that DSA is correct.
    
    Tested-by: Arınç ÜNAL <arinc.unal@arinc9.com>
    Signed-off-by: Luiz Angelo Daros de Luca <luizluca@gmail.com>
    luizluca authored and intel-lab-lkp committed Dec 16, 2021
  3. net: dsa: realtek: rtl8367c: use GENMASK(n-1,0) instead of BIT(n)-1

    Tested-by: Arınç ÜNAL <arinc.unal@arinc9.com>
    Signed-off-by: Luiz Angelo Daros de Luca <luizluca@gmail.com>
    luizluca authored and intel-lab-lkp committed Dec 16, 2021
  4. net: dsa: realtek: rtl8367c: rename extport to extint, add "realtek,e…

    …xt-int"
    
    "extport" 0, 1, 2 was used to reference external ports (ext0,
    ext1, ext2). Meanwhile, port 0..9 is used as switch ports,
    including external ports. "extport" was renamed to extint to
    make it clear it does not mean the port number but the external
    interface number.
    
    The macros that map extint numbers to registers addresses now
    use inline ifs instead of binary arithmetic.
    
    "extint" was hardcoded to 1. Now it can be defined with a device-tree
    port property "realtek,ext-int";
    
    Tested-by: Arınç ÜNAL <arinc.unal@arinc9.com>
    Signed-off-by: Luiz Angelo Daros de Luca <luizluca@gmail.com>
    luizluca authored and intel-lab-lkp committed Dec 16, 2021
  5. dt-bindings: net: dsa: realtek-mdio: document new interface

    realtek-mdio is a new mdio driver for realtek switches that use
    mdio (instead of SMI) interface.
    
    Reviewed-by: Arınç ÜNAL <arinc.unal@arinc9.com>
    Signed-off-by: Luiz Angelo Daros de Luca <luizluca@gmail.com>
    luizluca authored and intel-lab-lkp committed Dec 16, 2021
  6. net: dsa: realtek: add new mdio interface for drivers

    This driver is a mdio_driver instead of a platform driver (like
    realtek-smi).
    
    Tested-by: Arınç ÜNAL <arinc.unal@arinc9.com>
    Signed-off-by: Luiz Angelo Daros de Luca <luizluca@gmail.com>
    luizluca authored and intel-lab-lkp committed Dec 16, 2021
  7. net: dsa: rtl8365mb: rename rtl8365mb to rtl8367c

    rtl8365mb refers to a single device supported by the driver.
    The rtl8367c does not refer to any real device, but it is the
    driver version name used by Realtek.
    
    Tested-by: Arınç ÜNAL <arinc.unal@arinc9.com>
    Signed-off-by: Luiz Angelo Daros de Luca <luizluca@gmail.com>
    luizluca authored and intel-lab-lkp committed Dec 16, 2021
  8. net: dsa: rtl8365mb: move rtl8365mb.c to rtl8367c.c

    Tested-by: Arınç ÜNAL <arinc.unal@arinc9.com>
    Signed-off-by: Luiz Angelo Daros de Luca <luizluca@gmail.com>
    luizluca authored and intel-lab-lkp committed Dec 16, 2021
  9. net: dsa: realtek: use phy_read in ds->ops

    The ds->ops->phy_read will only be used if the ds->slave_mii_bus
    was not initialized. Calling realtek_smi_setup_mdio will create a
    ds->slave_mii_bus, making ds->ops->phy_read dormant.
    
    Using ds->ops->phy_read will allow switches connected through non-SMI
    interfaces (like mdio) to let ds allocate slave_mii_bus and reuse the
    same code.
    
    Tested-by: Arınç ÜNAL <arinc.unal@arinc9.com>
    Signed-off-by: Luiz Angelo Daros de Luca <luizluca@gmail.com>
    luizluca authored and intel-lab-lkp committed Dec 16, 2021
  10. net: dsa: realtek: convert subdrivers into modules

    Preparing for multiple interfaces support, the drivers
    must be independent of realtek-smi.
    
    Tested-by: Arınç ÜNAL <arinc.unal@arinc9.com>
    Signed-off-by: Luiz Angelo Daros de Luca <luizluca@gmail.com>
    luizluca authored and intel-lab-lkp committed Dec 16, 2021
  11. net: dsa: realtek: rename realtek_smi to realtek_priv

    In preparation to adding other interfaces, the private data structure
    was renamed to priv. Also the only two direct calls from subdrivers
    to realtek-smi lib were converted into references inside priv.
    
    Tested-by: Arınç ÜNAL <arinc.unal@arinc9.com>
    Signed-off-by: Luiz Angelo Daros de Luca <luizluca@gmail.com>
    luizluca authored and intel-lab-lkp committed Dec 16, 2021
  12. net: dsa: realtek-smi: move to subdirectory

    Tested-by: Arınç ÜNAL <arinc.unal@arinc9.com>
    Signed-off-by: Luiz Angelo Daros de Luca <luizluca@gmail.com>
    luizluca authored and intel-lab-lkp committed Dec 16, 2021
  13. dt-bindings: net: dsa: realtek-smi: remove unsupported switches

    Remove some switch models that are not cited in the code. Although rtl8366s
    was kept, it looks like a stub driver (with a FIXME comment).
    
    Reviewed-by: Arınç ÜNAL <arinc.unal@arinc9.com>
    Signed-off-by: Luiz Angelo Daros de Luca <luizluca@gmail.com>
    luizluca authored and intel-lab-lkp committed Dec 16, 2021
  14. Merge branch 'fib-merge-nl-policies'

    Florian Westphal says:
    
    ====================
    fib: merge nl policies
    
    v4: resend with fixed subject line.  I preserved review tags
        from David Ahern.
    v3: drop first two patches, otherwise unchanged.
    
    This series merges the different (largely identical) nla policies.
    
    v2 also squashed the ->suppress() implementation, I've dropped this.
    Problem is that it needs ugly ifdef'ry to avoid build breakage
    with CONFIG_INET=n || IPV6=n.
    
    Given that even microbenchmark doesn't show any noticeable improvement
    when ->suppress is inlined (it uses INDIRECT_CALLABLE) i decided to toss
    the patch instead of adding more ifdefs.
    ====================
    
    Link: https://lore.kernel.org/r/20211216120507.3299-1-fw@strlen.de
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    Jakub Kicinski committed Dec 16, 2021
  15. fib: expand fib_rule_policy

    Now that there is only one fib nla_policy there is no need to
    keep the macro around.  Place it where its used.
    
    Signed-off-by: Florian Westphal <fw@strlen.de>
    Reviewed-by: David Ahern <dsahern@kernel.org>
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    Florian Westphal authored and Jakub Kicinski committed Dec 16, 2021
  16. fib: rules: remove duplicated nla policies

    The attributes are identical in all implementations so move the ipv4 one
    into the core and remove the per-family nla policies.
    
    Signed-off-by: Florian Westphal <fw@strlen.de>
    Reviewed-by: David Ahern <dsahern@kernel.org>
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    Florian Westphal authored and Jakub Kicinski committed Dec 16, 2021
  17. net: prestera: flower template support

    Add user template explicit support. At this moment, max
    TCAM rule size is utilized for all rules, doesn't matter
    which and how much flower matches are provided by user. It
    means that some of TCAM space is wasted, which impacts
    the number of filters that can be offloaded.
    
    Introducing the template, allows to have more HW offloaded
    filters by specifying the template explicitly.
    
    Example:
      tc qd add dev PORT clsact
      tc chain add dev PORT ingress protocol ip \
        flower dst_ip 0.0.0.0/16
      tc filter add dev PORT ingress protocol ip \
        flower skip_sw dst_ip 1.2.3.4/16 action drop
    
    NOTE: chain 0 is the default chain id for "tc chain" & "tc filter"
          command, so it is omitted in the example above.
    
    This patch adds only template support for default chain 0 suppoerted
    by prestera driver at this moment. Chains are not supported yet,
    and will be added later.
    
    Signed-off-by: Volodymyr Mytnyk <vmytnyk@marvell.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Volodymyr Mytnyk authored and davem330 committed Dec 16, 2021
  18. net: dsa: rtl8365mb: add GMII as user port mode

    Recent net-next fails to initialize ports with:
    
     realtek-smi switch: phy mode gmii is unsupported on port 0
     realtek-smi switch lan5 (uninitialized): validation of gmii with
     support 0000000,00000000,000062ef and advertisement
     0000000,00000000,000062ef failed: -22
     realtek-smi switch lan5 (uninitialized): failed to connect to PHY:
     -EINVAL
     realtek-smi switch lan5 (uninitialized): error -22 setting up PHY
     for tree 1, switch 0, port 0
    
    Current net branch(3dd7d40) is not
    affected.
    
    I also noticed the same issue before with older versions but using
    a MDIO interface driver, not realtek-smi.
    
    Tested-by: Arınç ÜNAL <arinc.unal@arinc9.com>
    Signed-off-by: Luiz Angelo Daros de Luca <luizluca@gmail.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    luizluca authored and davem330 committed Dec 16, 2021
  19. Merge branch 'gve-improvements'

    Jeroen de Borst says:
    
    ====================
    gve improvements
    
    This patchset consists of unrelated changes:
    
    A bug fix for an issue that disabled jumbo-frame support, a few code
    improvements and minor funcitonal changes and 3 new features:
      Supporting tx|rx-coalesce-usec for DQO
      Suspend/resume/shutdown
      Optional metadata descriptors
    ====================
    
    Signed-off-by: David S. Miller <davem@davemloft.net>
    davem330 committed Dec 16, 2021
  20. gve: Add tx|rx-coalesce-usec for DQO

    Adding ethtool support for changing rx-coalesce-usec and tx-coalesce-usec
    when using the DQO queue format.
    
    Signed-off-by: Tao Liu <xliutaox@google.com>
    Signed-off-by: Jeroen de Borst <jeroendb@google.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    xliutaox-g authored and davem330 committed Dec 16, 2021
  21. gve: Add consumed counts to ethtool stats

    Being able to see how many descriptors are in-use is helpful
    when diagnosing certain issues.
    
    Signed-off-by: Jeroen de Borst <jeroendb@google.com>
    Signed-off-by: Jordan Kim <jrkim@google.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Jordan Kim authored and davem330 committed Dec 16, 2021
  22. gve: Implement suspend/resume/shutdown

    Add support for suspend, resume and shutdown.
    
    Signed-off-by: Catherine Sullivan <csully@google.com>
    Signed-off-by: David Awogbemila <awogbemila@google.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    catSully012 authored and davem330 committed Dec 16, 2021
  23. gve: Add optional metadata descriptor type GVE_TXD_MTD

    Allow drivers to pass metadata along with packet data to the device.
    Introduce a new metadata descriptor type
    
    * GVE_TXD_MTD
    
    This descriptor is optional. If present it immediate follows the
    packet descriptor and precedes the segment descriptor.
    
    This descriptor may be repeated. Multiple metadata descriptors may
    follow. There are no immediate uses for this, this is for future
    proofing. At present devices allow only 1 MTD descriptor.
    
    The lower four bits of the type_flags field encode GVE_TXD_MTD.
    The upper four bits of the type_flags field encodes a *sub*type.
    
    Introduce one such metadata descriptor subtype
    
    * GVE_MTD_SUBTYPE_PATH
    
    This shares path information with the device for network failure
    discovery and robust response:
    
    Linux derives ipv6 flowlabel and ECMP multipath from sk->sk_txhash,
    and updates this field on error with sk_rethink_txhash. Allow the host
    stack to do the same. Pass the tx_hash value if set. Also communicate
    whether the path hash is set, or more exactly, what its type is. Define
    two common types
    
      GVE_MTD_PATH_HASH_NONE
      GVE_MTD_PATH_HASH_L4
    
    Concrete examples of error conditions that are resolved are
    mentioned in the commits that add sk_rethink_txhash calls. Such as
    commit 7788174 ("tcp: change IPv6 flow-label upon receiving
    spurious retransmission").
    
    Experimental results mirror what the theory suggests: where IPv6
    FlowLabel is included in path selection (e.g., LAG/ECMP), flowlabel
    rotation on TCP timeout avoids the vast majority of TCP disconnects
    that would otherwise have occurred during link failures in long-haul
    backbones, when an alternative path is available.
    
    Rotation can be applied to various bad connection signals, such as
    timeouts and spurious retransmissions. In aggregate, such flow level
    signals can help locate network issues. Define initial common states:
    
      GVE_MTD_PATH_STATE_DEFAULT
      GVE_MTD_PATH_STATE_TIMEOUT
      GVE_MTD_PATH_STATE_CONGESTION
      GVE_MTD_PATH_STATE_RETRANSMIT
    
    Signed-off-by: Willem de Bruijn <willemb@google.com>
    Signed-off-by: David Awogbemila <awogbemila@google.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    wdebruij authored and davem330 committed Dec 16, 2021
  24. gve: remove memory barrier around seqno

    No longer needed after we introduced the barrier in gve_napi_poll.
    
    Signed-off-by: Catherine Sullivan <csully@google.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    catSully012 authored and davem330 committed Dec 16, 2021
  25. gve: Update gve_free_queue_page_list signature

    The id field should be a u32 not a signed int.
    
    Signed-off-by: Catherine Sullivan <csully@google.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    catSully012 authored and davem330 committed Dec 16, 2021
  26. gve: Move the irq db indexes out of the ntfy block struct

    Giving the device access to other kernel structs is not ideal.
    Move the indexes into their own array and just keep pointers to
    them in the ntfy block struct.
    
    Signed-off-by: Catherine Sullivan <csully@google.com>
    Signed-off-by: David Awogbemila <awogbemila@google.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    catSully012 authored and davem330 committed Dec 16, 2021
  27. gve: Correct order of processing device options

    The legacy raw addressing device option was processed before the
    new RDA queue format option.  This caused the supported features mask,
    which is provided only on the RDA queue format option, not to be set.
    
    This disabled jumbo-frame support when using raw adressing.
    
    Fixes: 255489f ("gve: Add a jumbo-frame device option")
    Signed-off-by: Jeroen de Borst <jeroendb@google.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Jeroen de Borst authored and davem330 committed Dec 16, 2021
  28. Merge branch 'phylink-pcs-validation'

    Russell King says:
    
    ====================
    net: phylink: add PCS validation
    
    This series allows phylink to include the PCS in its validation step.
    There are two reasons to make this change:
    
    1. Some of the network drivers that are making use of the split PCS
       support are already manually calling into their PCS drivers to
       perform validation. E.g. stmmac with xpcs.
    
    2. Logically, some network drivers such as mvneta and mvpp2, the
       restriction we impose in the validate() callback is a property of
       the "PCS" block that we provide rather than the MAC.
    
    This series:
    
    1. Gives phylink a mechanism to query the MAC driver which PCS is
       wishes to use for the PHY interface mode. This is necessary to allow
       the PCS to be involved in the validation step without making changes
       to the configuration.
    
    2. Provide a pcs_validate() method that PCS can implement. This follows
       a similar model to the MAC's validate() callback, but with some minor
       differences due to observations from the various implementations.
       E.g. returning an error code for not-supported and the way the
       advertising bitmap is masked.
    
    3. Convert mvpp2 and mvneta to this as examples of its use. Further
       Conversions are in the pipeline, including for stmmac+xpcs, as well
       as some DSA drivers. Note that DSA conversion to this is conditional
       upon all DSA drivers populating their supported_interfaces bitmap,
       since this is required before mac_select_pcs() can be used.
    
    Existing drivers that set a PCS in mac_prepare() or mac_config(), or
    shortly after phylink_create() will continue to work. However, it should
    be noted that mac_select_pcs() will be called during phylink_create(),
    and thus any PCS returned by mac_select_pcs() must be available by this
    time - or we drop the check in phylink_create().
    
    v2: fix kerneldoc typo in patch 1.
    ====================
    
    Signed-off-by: David S. Miller <davem@davemloft.net>
    davem330 committed Dec 16, 2021
  29. net: mvneta: convert to pcs_validate() and phylink_generic_validate()

    Convert mvneta to validate the autoneg state for 1000base-X in the
    pcs_validate() operation, rather than the MAC validate() operation.
    This allows us to switch the MAC validate() to use
    phylink_generic_validate().
    
    Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Russell King (Oracle) authored and davem330 committed Dec 16, 2021
  30. net: mvneta: convert to phylink pcs operations

    An initial stab at converting mvneta to PCS operations.  There's a few
    FIXMEs to be solved.
    
    Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Russell King authored and davem330 committed Dec 16, 2021
  31. net: mvneta: convert to use mac_prepare()/mac_finish()

    Convert mvneta to use the mac_prepare() and mac_finish() methods in
    preparation to converting mvneta to split-PCS support.
    
    Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Russell King authored and davem330 committed Dec 16, 2021
  32. net: mvpp2: convert to pcs_validate() and phylink_generic_validate()

    Convert mvpp2 to validate the autoneg state for 1000base-X in the
    pcs_validate() operation, rather than the MAC validate() operation.
    This allows us to switch the MAC validate() to use
    phylink_generic_validate().
    
    Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Russell King (Oracle) authored and davem330 committed Dec 16, 2021
  33. net: mvpp2: use .mac_select_pcs() interface

    Use the mac_select_pcs() method to choose between the GMAC and XLG
    PCS implementations.
    
    Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Russell King (Oracle) authored and davem330 committed Dec 16, 2021
  34. net: phylink: add pcs_validate() method

    Add a hook for PCS to validate the link parameters. This avoids MAC
    drivers having to have knowledge of their PCS in their validate()
    method, thereby allowing several MAC drivers to be simplfied.
    
    Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Russell King (Oracle) authored and davem330 committed Dec 16, 2021
  35. net: phylink: add mac_select_pcs() method to phylink_mac_ops

    mac_select_pcs() allows us to have an explicit point to query which
    PCS the MAC wishes to use for a particular PHY interface mode, thereby
    allowing us to add support to validate the link settings with the PCS.
    
    Phylink will also use this to select the PCS to be used during a major
    configuration event without the MAC driver needing to call
    phylink_set_pcs().
    
    Note that if mac_select_pcs() is present, the supported_interfaces
    bitmap must be filled in; this avoids mac_select_pcs() being called
    with PHY_INTERFACE_MODE_NA when we want to get support for all
    interface types. Phylink will return an error in phylink_create()
    unless this condition is satisfied.
    
    Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Russell King (Oracle) authored and davem330 committed Dec 16, 2021
Older