1. 14 4月, 2017 10 次提交
  2. 13 4月, 2017 1 次提交
    • I
      gso: Support frag_list splitting with head_frag · eaffadbb
      Ilan Tayari 提交于
      A driver may use build_skb() for received packets.
      These SKBs then have a head_frag.
      
      Since commit d7e8883c ("net: make GRO aware of
      skb->head_frag"), GRO may build frag_list SKBs out of
      head_frag received SKBs.
      In such a case, the chained SKBs end up with a head_frag.
      
      Commit 07b26c94 ("gso: Support partial splitting at
      the frag_list pointer") adds partial segmentation of frag_list
      SKB chains into individual SKBs.
      However, this is not done if the chained SKBs have any
      linear part, because the device may not be able to DMA
      the private linear buffer.
      
      A chained frag_list SKB with head_frag is wrongfully
      detected in this case as having a private linear part
      and thus falls back to software GSO, while in fact the
      linear part is backed by a DMA page just like any other frag.
      
      This causes low performance when forwarding those packets
      that were built with build_skb()
      
      Allow partial segmentation at the frag_list pointer for
      chained SKBs with head_frag.
      
      Note that such SKBs can only be created by GRO, when applied
      to received packets with head_frag.
      Also note that this change only affects the data path that
      performs the partial segmentation at frag_list pointer, and
      not any of the other more common data paths.
      Signed-off-by: NIlan Tayari <ilant@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      eaffadbb
  3. 12 4月, 2017 17 次提交
  4. 10 4月, 2017 1 次提交
  5. 09 4月, 2017 3 次提交
  6. 08 4月, 2017 2 次提交
  7. 07 4月, 2017 4 次提交
    • F
      net: ipv4: fix multipath RTM_GETROUTE behavior when iif is given · bbadb9a2
      Florian Larysch 提交于
      inet_rtm_getroute synthesizes a skeletal ICMP skb, which is passed to
      ip_route_input when iif is given. If a multipath route is present for
      the designated destination, fib_multipath_hash ends up being called with
      that skb. However, as that skb contains no information beyond the
      protocol type, the calculated hash does not match the one we would see
      for a real packet.
      
      There is currently no way to fix this for layer 4 hashing, as
      RTM_GETROUTE doesn't have the necessary information to create layer 4
      headers. To fix this for layer 3 hashing, set appropriate saddr/daddrs
      in the skb and also change the protocol to UDP to avoid special
      treatment for ICMP.
      Signed-off-by: NFlorian Larysch <fl@n621.de>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      bbadb9a2
    • R
      L2TP:Adjust intf MTU, add underlay L3, L2 hdrs. · b784e7eb
      R. Parameswaran 提交于
      Existing L2TP kernel code does not derive the optimal MTU for Ethernet
      pseudowires and instead leaves this to a userspace L2TP daemon or
      operator. If an MTU is not specified, the existing kernel code chooses
      an MTU that does not take account of all tunnel header overheads, which
      can lead to unwanted IP fragmentation. When L2TP is used without a
      control plane (userspace daemon), we would prefer that the kernel does a
      better job of choosing a default pseudowire MTU, taking account of all
      tunnel header overheads, including IP header options, if any. This patch
      addresses this.
      
      Change-set here uses the new kernel function, kernel_sock_ip_overhead(),
      to factor the outer IP overhead on the L2TP tunnel socket (including
      IP Options, if any) when calculating the default MTU for an Ethernet
      pseudowire, along with consideration of the inner Ethernet header.
      Signed-off-by: NR. Parameswaran <rparames@brocade.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      b784e7eb
    • R
      New kernel function to get IP overhead on a socket. · 113c3075
      R. Parameswaran 提交于
      A new function, kernel_sock_ip_overhead(), is provided
      to calculate the cumulative overhead imposed by the IP
      Header and IP options, if any, on a socket's payload.
      The new function returns an overhead of zero for sockets
      that do not belong to the IPv4 or IPv6 address families.
      This is used in the L2TP code path to compute the
      total outer IP overhead on the L2TP tunnel socket when
      calculating the default MTU for Ethernet pseudowires.
      Signed-off-by: NR. Parameswaran <rparames@brocade.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      113c3075
    • K
      af_unix: Use designated initializers · 82fe0d2b
      Kees Cook 提交于
      Prepare to mark sensitive kernel structures for randomization by making
      sure they're using designated initializers. These were identified during
      allyesconfig builds of x86, arm, and arm64, and the initializer fixes
      were extracted from grsecurity. In this case, NULL initialize with { }
      instead of undesignated NULLs.
      Signed-off-by: NKees Cook <keescook@chromium.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      82fe0d2b
  8. 06 4月, 2017 2 次提交