1. 16 11月, 2021 7 次提交
    • E
      net: remove sk_route_forced_caps · d0d598ca
      Eric Dumazet 提交于
      We were only using one bit, and we can replace it by sk_is_tcp()
      Signed-off-by: NEric Dumazet <edumazet@google.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      d0d598ca
    • E
      net: use sk_is_tcp() in more places · 42f67eea
      Eric Dumazet 提交于
      Move sk_is_tcp() to include/net/sock.h and use it where we can.
      Signed-off-by: NEric Dumazet <edumazet@google.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      42f67eea
    • E
      tcp: small optimization in tcp_v6_send_check() · 37354402
      Eric Dumazet 提交于
      For TCP flows, inet6_sk(sk)->saddr has the same value
      than sk->sk_v6_rcv_saddr.
      
      Using sk->sk_v6_rcv_saddr increases data locality.
      Signed-off-by: NEric Dumazet <edumazet@google.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      37354402
    • E
      tcp: remove dead code in __tcp_v6_send_check() · 283c6b54
      Eric Dumazet 提交于
      For some reason, I forgot to change __tcp_v6_send_check() at
      the same time I removed (ip_summed == CHECKSUM_PARTIAL) check
      in __tcp_v4_send_check()
      
      Fixes: 98be9b12 ("tcp: remove dead code after CHECKSUM_PARTIAL adoption")
      Signed-off-by: NEric Dumazet <edumazet@google.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      283c6b54
    • E
      tcp: minor optimization in tcp_add_backlog() · d519f350
      Eric Dumazet 提交于
      If packet is going to be coalesced, sk_sndbuf/sk_rcvbuf values
      are not used. Defer their access to the point we need them.
      Signed-off-by: NEric Dumazet <edumazet@google.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      d519f350
    • S
      net: macb: Fix several edge cases in validate · 3ad4b7c8
      Sean Anderson 提交于
      There were several cases where validate() would return bogus supported
      modes with unusual combinations of interfaces and capabilities. For
      example, if state->interface was 10GBASER and the macb had HIGH_SPEED
      and PCS but not GIGABIT MODE, then 10/100 modes would be set anyway. In
      another case, SGMII could be enabled even if the mac was not a GEM
      (despite this being checked for later on in mac_config()). These
      inconsistencies make it difficult to refactor this function cleanly.
      
      There is still the open question of what exactly the requirements for
      SGMII and 10GBASER are, and what SGMII actually supports. If someone
      from Cadence (or anyone else with access to the GEM/MACB datasheet)
      could comment on this, it would be greatly appreciated. In particular,
      what is supported by Cadence vs. vendor extension/limitation?
      
      To address this, the current logic is split into three parts. First, we
      determine what we support, then we eliminate unsupported interfaces, and
      finally we set the appropriate link modes. There is still some cruft
      related to NA, but this can be removed in a future patch.
      Signed-off-by: NSean Anderson <sean.anderson@seco.com>
      Reviewed-by: NParshuram Thombare <pthombar@cadence.com>
      Reviewed-by: NRussell King (Oracle) <rmk+kernel@armlinux.org.uk>
      Link: https://lore.kernel.org/r/20211112190400.1937855-1-sean.anderson@seco.comSigned-off-by: NJakub Kicinski <kuba@kernel.org>
      3ad4b7c8
    • J
      Merge https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next · a5bdc363
      Jakub Kicinski 提交于
      Daniel Borkmann says:
      
      ====================
      pull-request: bpf-next 2021-11-15
      
      We've added 72 non-merge commits during the last 13 day(s) which contain
      a total of 171 files changed, 2728 insertions(+), 1143 deletions(-).
      
      The main changes are:
      
      1) Add btf_type_tag attributes to bring kernel annotations like __user/__rcu to
         BTF such that BPF verifier will be able to detect misuse, from Yonghong Song.
      
      2) Big batch of libbpf improvements including various fixes, future proofing APIs,
         and adding a unified, OPTS-based bpf_prog_load() low-level API, from Andrii Nakryiko.
      
      3) Add ingress_ifindex to BPF_SK_LOOKUP program type for selectively applying the
         programmable socket lookup logic to packets from a given netdev, from Mark Pashmfouroush.
      
      4) Remove the 128M upper JIT limit for BPF programs on arm64 and add selftest to
         ensure exception handling still works, from Russell King and Alan Maguire.
      
      5) Add a new bpf_find_vma() helper for tracing to map an address to the backing
         file such as shared library, from Song Liu.
      
      6) Batch of various misc fixes to bpftool, fixing a memory leak in BPF program dump,
         updating documentation and bash-completion among others, from Quentin Monnet.
      
      7) Deprecate libbpf bpf_program__get_prog_info_linear() API and migrate its users as
         the API is heavily tailored around perf and is non-generic, from Dave Marchevsky.
      
      8) Enable libbpf's strict mode by default in bpftool and add a --legacy option as an
         opt-out for more relaxed BPF program requirements, from Stanislav Fomichev.
      
      9) Fix bpftool to use libbpf_get_error() to check for errors, from Hengqi Chen.
      
      * https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next: (72 commits)
        bpftool: Use libbpf_get_error() to check error
        bpftool: Fix mixed indentation in documentation
        bpftool: Update the lists of names for maps and prog-attach types
        bpftool: Fix indent in option lists in the documentation
        bpftool: Remove inclusion of utilities.mak from Makefiles
        bpftool: Fix memory leak in prog_dump()
        selftests/bpf: Fix a tautological-constant-out-of-range-compare compiler warning
        selftests/bpf: Fix an unused-but-set-variable compiler warning
        bpf: Introduce btf_tracing_ids
        bpf: Extend BTF_ID_LIST_GLOBAL with parameter for number of IDs
        bpftool: Enable libbpf's strict mode by default
        docs/bpf: Update documentation for BTF_KIND_TYPE_TAG support
        selftests/bpf: Clarify llvm dependency with btf_tag selftest
        selftests/bpf: Add a C test for btf_type_tag
        selftests/bpf: Rename progs/tag.c to progs/btf_decl_tag.c
        selftests/bpf: Test BTF_KIND_DECL_TAG for deduplication
        selftests/bpf: Add BTF_KIND_TYPE_TAG unit tests
        selftests/bpf: Test libbpf API function btf__add_type_tag()
        bpftool: Support BTF_KIND_TYPE_TAG
        libbpf: Support BTF_KIND_TYPE_TAG
        ...
      ====================
      
      Link: https://lore.kernel.org/r/20211115162008.25916-1-daniel@iogearbox.netSigned-off-by: NJakub Kicinski <kuba@kernel.org>
      a5bdc363
  2. 15 11月, 2021 27 次提交
  3. 14 11月, 2021 3 次提交
  4. 13 11月, 2021 3 次提交