1. 04 Nov, 2016 34 commits
  2. 03 Nov, 2016 6 commits
    • Simon Horman's avatar
      net/sched: cls_flower: Support matching on SCTP ports · 5976c5f4
      Simon Horman authored
      Support matching on SCTP ports in the same way that matching
      on TCP and UDP ports is already supported.
      
      Example usage:
      
      tc qdisc add dev eth0 ingress
      
      tc filter add dev eth0 protocol ip parent ffff: \
              flower indev eth0 ip_proto sctp dst_port 80 \
              action drop
      Signed-off-by: default avatarSimon Horman <simon.horman@netronome.com>
      Acked-by: default avatarJiri Pirko <jiri@mellanox.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      5976c5f4
    • Elad Raz's avatar
      mlxsw: pci: Fix the FW ready mask length · 5e5f89e7
      Elad Raz authored
      The system-status register is actually 16-bit wide and not 8 bit-wide.
      
      Fixes: 233fa44b ("mlxsw: pci: Implement reset done check")
      Signed-off-by: default avatarElad Raz <eladr@mellanox.com>
      Signed-off-by: default avatarJiri Pirko <jiri@mellanox.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      5e5f89e7
    • David S. Miller's avatar
      Merge branch 'ip-recvfragsize-cmsg' · a7991268
      David S. Miller authored
      Willem de Bruijn says:
      
      ====================
      ip: add RECVFRAGSIZE cmsg
      
      On IP datagrams and raw sockets, when packets arrive fragmented,
      expose the largest received fragment size through a new cmsg.
      
      Protocols implemented on top of these sockets may use this, for
      instance, to inform peers to lower MSS on platforms that silently
      allow send calls to exceed PMTU and cause fragmentation.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      a7991268
    • Willem de Bruijn's avatar
      ipv6: on reassembly, record frag_max_size · dbd1759e
      Willem de Bruijn authored
      IP6CB and IPCB have a frag_max_size field. In IPv6 this field is
      filled in when packets are reassembled by the connection tracking
      code. Also fill in when reassembling in the input path, to expose
      it through cmsg IPV6_RECVFRAGSIZE in all cases.
      Signed-off-by: default avatarWillem de Bruijn <willemb@google.com>
      Acked-by: default avatarEric Dumazet <edumazet@google.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      dbd1759e
    • Willem de Bruijn's avatar
      ipv6: add IPV6_RECVFRAGSIZE cmsg · 0cc0aa61
      Willem de Bruijn authored
      When reading a datagram or raw packet that arrived fragmented, expose
      the maximum fragment size if recorded to allow applications to
      estimate receive path MTU.
      
      At this point, the field is only recorded when ipv6 connection
      tracking is enabled. A follow-up patch will record this field also
      in the ipv6 input path.
      
      Tested using the test for IP_RECVFRAGSIZE plus
      
        ip netns exec to ip addr add dev veth1 fc07::1/64
        ip netns exec from ip addr add dev veth0 fc07::2/64
      
        ip netns exec to ./recv_cmsg_recvfragsize -6 -u -p 6000 &
        ip netns exec from nc -q 1 -u fc07::1 6000 < payload
      
      Both with and without enabling connection tracking
      
        ip6tables -A INPUT -m state --state NEW -p udp -j LOG
      Signed-off-by: default avatarWillem de Bruijn <willemb@google.com>
      Acked-by: default avatarEric Dumazet <edumazet@google.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      0cc0aa61
    • Willem de Bruijn's avatar
      ipv4: add IP_RECVFRAGSIZE cmsg · 70ecc248
      Willem de Bruijn authored
      The IP stack records the largest fragment of a reassembled packet
      in IPCB(skb)->frag_max_size. When reading a datagram or raw packet
      that arrived fragmented, expose the value to allow applications to
      estimate receive path MTU.
      
      Tested:
        Sent data over a veth pair of which the source has a small mtu.
        Sent data using netcat, received using a dedicated process.
      
        Verified that the cmsg IP_RECVFRAGSIZE is returned only when
        data arrives fragmented, and in that cases matches the veth mtu.
      
          ip link add veth0 type veth peer name veth1
      
          ip netns add from
          ip netns add to
      
          ip link set dev veth1 netns to
          ip netns exec to ip addr add dev veth1 192.168.10.1/24
          ip netns exec to ip link set dev veth1 up
      
          ip link set dev veth0 netns from
          ip netns exec from ip addr add dev veth0 192.168.10.2/24
          ip netns exec from ip link set dev veth0 up
          ip netns exec from ip link set dev veth0 mtu 1300
          ip netns exec from ethtool -K veth0 ufo off
      
          dd if=/dev/zero bs=1 count=1400 2>/dev/null > payload
      
          ip netns exec to ./recv_cmsg_recvfragsize -4 -u -p 6000 &
          ip netns exec from nc -q 1 -u 192.168.10.1 6000 < payload
      
        using github.com/wdebruij/kerneltools/blob/master/tests/recvfragsize.c
      Signed-off-by: default avatarWillem de Bruijn <willemb@google.com>
      Acked-by: default avatarEric Dumazet <edumazet@google.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      70ecc248