1. 07 May, 2019 3 commits
    • Hauke Mehrtens's avatar
      net: dsa: lantiq: Add VLAN unaware bridge offloading · 8206e0ce
      Hauke Mehrtens authored
      This allows to offload bridges with DSA to the switch hardware and do
      the packet forwarding in hardware.
      
      This implements generic functions to access the switch hardware tables,
      which are used to control many features of the switch.
      
      This patch activates the MAC learning by removing the MAC address table
      lock, to prevent uncontrolled forwarding of packets between all the LAN
      ports, they are added into individual bridge tables entries with
      individual flow ids and the switch will do the MAC learning for each
      port separately before they are added to a real bridge.
      
      Each bridge consist of an entry in the active VLAN table and the VLAN
      mapping table, table entries with the same index are matching. In the
      VLAN unaware mode we configure everything with VLAN ID 0, but we use
      different flow IDs, the switch should handle all VLANs as normal payload
      and ignore them. When the hardware looks for the port of the destination
      MAC address it only takes the entries which have the same flow ID of the
      ingress packet.
      
      The bridges are configured with 64 possible entries with these
      information:
      Table Index, 0...63
      VLAN ID, 0...4095: VLAN ID 0 is untagged
      flow ID, 0..63: Same flow IDs share entries in MAC learning table
      port map, one bit for each port number
      tagged port map, one bit for each port number
      Signed-off-by: default avatarHauke Mehrtens <hauke@hauke-m.de>
      Reviewed-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      8206e0ce
    • Hauke Mehrtens's avatar
      net: dsa: lantiq: Allow special tags only on CPU port · 30d89383
      Hauke Mehrtens authored
      Allow the special tag in ingress only on the CPU port and not on all
      ports. A packet with a special tag could circumvent the hardware
      forwarding and should only be allowed on the CPU port where Linux
      controls the port.
      
      Fixes: 14fceff4 ("net: dsa: Add Lantiq / Intel DSA driver for vrx200)"
      Signed-off-by: default avatarHauke Mehrtens <hauke@hauke-m.de>
      Reviewed-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      30d89383
    • David S. Miller's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next · 14cfbdac
      David S. Miller authored
      Daniel Borkmann says:
      
      ====================
      pull-request: bpf-next 2019-05-06
      
      The following pull-request contains BPF updates for your *net-next* tree.
      
      The main changes are:
      
      1) Two AF_XDP libbpf fixes for socket teardown; first one an invalid
         munmap and the other one an invalid skmap cleanup, both from Björn.
      
      2) More graceful CONFIG_DEBUG_INFO_BTF handling when pahole is not
         present in the system to generate vmlinux btf info, from Andrii.
      
      3) Fix libbpf and thus fix perf build error with uClibc on arc
         architecture, from Vineet.
      
      4) Fix missing libbpf_util.h header install in libbpf, from William.
      
      5) Exclude bash-completion/bpftool from .gitignore pattern, from Masahiro.
      
      6) Fix up rlimit in test_libbpf_open kselftest test case, from Yonghong.
      
      7) Minor misc cleanups.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      14cfbdac
  2. 06 May, 2019 37 commits