1. 04 Nov, 2020 36 commits
  2. 03 Nov, 2020 4 commits
    • Ido Schimmel's avatar
      vxlan: Use a per-namespace nexthop listener instead of a global one · 626d667b
      Ido Schimmel authored
      The nexthop notification chain is a per-namespace chain and not a global
      one like the netdev notification chain.
      
      Therefore, a single (global) listener cannot be registered to all these
      chains simultaneously as it will result in list corruptions whenever
      listeners are registered / unregistered.
      
      Instead, register a different listener in each namespace.
      
      Currently this is not an issue because only the VXLAN driver registers a
      listener to this chain, but this is going to change with netdevsim and
      mlxsw also registering their own listeners.
      Signed-off-by: default avatarIdo Schimmel <idosch@nvidia.com>
      Reviewed-by: default avatarDavid Ahern <dsahern@kernel.org>
      Link: https://lore.kernel.org/r/20201101113926.705630-1-idosch@idosch.orgSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      626d667b
    • Jakub Kicinski's avatar
      Merge branch 'net-hdlc_fr-improve-fr_rx-and-add-support-for-any-ethertype' · 12c9ee3c
      Jakub Kicinski authored
      Xie He says:
      
      ====================
      net: hdlc_fr: Improve fr_rx and add support for any Ethertype
      
      The main purpose of this series is the last patch. The previous 4 patches
      are just code clean-ups so that the last patch will not make the code too
      messy. The patches must be applied in sequence.
      
      The receiving code of this driver doesn't support arbitrary Ethertype
      values. It only recognizes a few known Ethertypes when receiving and drops
      skbs with other Ethertypes.
      
      However, the standard document RFC 2427 allows Frame Relay to support any
      Ethertype values. This series adds support for this.
      
      Change from v6:
      Remove the explanation about why only a 2-byte address field is accepted
      because I think it is inadequate and unnecessary.
      
      Change from v5:
      Small fix to the commit messages.
      
      Change from v4:
      Drop the change related to the stats.rx_dropped count.
      Improve the commit message by stating why only a 2-byte address field
      is accepted.
      
      Change from v3:
      Split the last patch into 2 patches.
      Improve the commit message about the stats.rx_dropped count.
      
      Change from v2:
      Small fix to the commit messages.
      
      Change from v1:
      Small fix to the commit messages.
      ====================
      
      Link: https://lore.kernel.org/r/20201031181043.805329-1-xie.he.0141@gmail.comSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      12c9ee3c
    • Xie He's avatar
      net: hdlc_fr: Add support for any Ethertype · 54b77a77
      Xie He authored
      Change the fr_rx function to make this driver support any Ethertype
      when receiving skbs on normal (non-Ethernet-emulating) PVC devices.
      (This driver is already able to handle any Ethertype when sending.)
      
      Originally in the fr_rx function, the code that parses the long (10-byte)
      header only recognizes a few Ethertype values and drops frames with other
      Ethertype values. This patch replaces this code to make fr_rx support
      any Ethertype. This patch also creates a new function fr_snap_parse as
      part of the new code.
      
      Cc: Krzysztof Halasa <khc@pm.waw.pl>
      Signed-off-by: default avatarXie He <xie.he.0141@gmail.com>
      Acked-by: default avatarWillem de Bruijn <willemb@google.com>
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      54b77a77
    • Xie He's avatar
      net: hdlc_fr: Improve the initial checks when we receive an skb · 77124c44
      Xie He authored
      1.
      Change the skb->len check from "<= 4" to "< 4".
      At first we only need to ensure a 4-byte header is present. We indeed
      normally need the 5th byte, too, but it'd be more logical and cleaner
      to check its existence when we actually need it.
      
      2.
      Add an fh->ea2 check to the initial checks in fr_rx. fh->ea2 == 1 means
      the second address byte is the final address byte. We only support the
      case where the address length is 2 bytes.
      
      Cc: Krzysztof Halasa <khc@pm.waw.pl>
      Signed-off-by: default avatarXie He <xie.he.0141@gmail.com>
      Acked-by: default avatarWillem de Bruijn <willemb@google.com>
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      77124c44