1. 22 May, 2017 29 commits
  2. 21 May, 2017 11 commits
    • Eric Dumazet's avatar
      tcp: fix tcp_probe_timer() for TCP_USER_TIMEOUT · 4ab68879
      Eric Dumazet authored
      TCP_USER_TIMEOUT is still converted to jiffies value in
      icsk_user_timeout
      
      So we need to make a conversion for the cases HZ != 1000
      
      Fixes: 9a568de4 ("tcp: switch TCP TS option (RFC 7323) to 1ms clock")
      Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
      Acked-by: default avatarSoheil Hassas Yeganeh <soheil@google.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      4ab68879
    • stephen hemminger's avatar
      ipv6: drop unused variables in seg6_genl_dumphac · 0a9fc39e
      stephen hemminger authored
      THe seg6_pernet_data variable was set but never used.
      Signed-off-by: default avatarStephen Hemminger <sthemmin@microsoft.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      0a9fc39e
    • stephen hemminger's avatar
      fou: make local function static · 9dc621af
      stephen hemminger authored
      The build header functions are not used by any other code.
      
      net/ipv6/fou6.c:36:5: warning: no previous prototype for ‘fou6_build_header’ [-Wmissing-prototypes]
      net/ipv6/fou6.c:54:5: warning: no previous prototype for ‘gue6_build_header’ [-Wmissing-prototypes]
      
      Need to do some code rearranging to satisfy different Kconfig possiblities.
      Signed-off-by: default avatarStephen Hemminger <sthemmin@microsoft.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      9dc621af
    • stephen hemminger's avatar
      tcpnv: do not export local function · c718c6d6
      stephen hemminger authored
      The TCP New Vegas congestion control was exporting an internal
      function tcpnv_get_info which is not used by any other in tree
      kernel code. Make it static.
      Signed-off-by: default avatarStephen Hemminger <sthemmin@microsoft.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      c718c6d6
    • stephen hemminger's avatar
      inet: fix warning about missing prototype · 9691724e
      stephen hemminger authored
      The prototype for inet_rcv_saddr_equal was not being included.
      Signed-off-by: default avatarStephen Hemminger <sthemmin@microsoft.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      9691724e
    • stephen hemminger's avatar
      ila: propagate error code in ila_output · 9e7b19c5
      stephen hemminger authored
      This warning:
      net/ipv6/ila/ila_lwt.c: In function ‘ila_output’:
      net/ipv6/ila/ila_lwt.c:42:6: warning: variable ‘err’ set but not used [-Wunused-but-set-variable]
      
      It looks like the code attempts to set propagate different error
      values, but always returned -EINVAL.
      
      Compile tested only. Needs review by original author.
      Signed-off-by: default avatarStephen Hemminger <sthemmin@microsoft.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      9e7b19c5
    • stephen hemminger's avatar
      dcb: enforce minimum length on IEEE_APPS attribute · 332b4fc8
      stephen hemminger authored
      Found by reviewing the warning about unused policy table.
      The code implies that it meant to check for size, but since
      it unrolled the loop for attribute validation that is never used.
      Instead do explicit check for attribute.
      
      Compile tested only. Needs review by original author.
      Signed-off-by: default avatarStephen Hemminger <sthemmin@microsoft.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      332b4fc8
    • David S. Miller's avatar
      Merge branch 'net-extend-socket-timestamping-API' · dae37055
      David S. Miller authored
      Miroslav Lichvar says:
      
      ====================
      Extend socket timestamping API
      
      Changes v5->v6:
      - fixed skb_is_swtx_tstamp() when OPT_TX_SWHW is disabled and improved
        its description
      - improved OPT_PKTINFO documentation
      - improved scm_timestamping documentation
      
      Changes v4->v5:
      - fixed initialization of reserved fields in struct scm_ts_pktinfo
      
      Changes v3->v4:
      - added reserved fields to struct scm_ts_pktinfo
      - replaced patch fixing false SW timestamps with a documentation fix
      - updated OPT_TX_SWHW patch to handle false SW timestamps
      
      Changes v2->v3:
      - modified struct scm_ts_pktinfo to use fixed-width integer types
      - added WARN_ON_ONCE for missing RCU lock in dev_get_by_napi_id()
      - modified dev_get_by_napi_id() to not return dev in unexpected branch
      - modified recv to return SCM_TIMESTAMPING_PKTINFO even if the interface
        index is unknown
      
      Changes v1->v2:
      - added separate patch for new NAPI functions
      - split code from __sock_recv_timestamp() for better readability
      - fixed RCU locking
      - fixed compiler warning (missing case in switch in first patch)
      - inline sw_tx_timestamp() in its only user
      
      Changes RFC->v1:
      - reworked SOF_TIMESTAMPING_OPT_PKTINFO patch to not add new fields to
        skb shared info (net device is now looked up by napi_id), not require
        any changes in drivers, and restrict the cmsg to incoming packets
      - renamed SOF_TIMESTAMPING_OPT_MULTIMSG to SOF_TIMESTAMPING_OPT_TX_SWHW
        and fixed its description
      - moved struct scm_ts_pktinfo from errqueue.h to net_tstamp.h as it
        can't be received from the error queue anymore
      - improved commit descriptions and removed incorrect comment
      
      This patchset adds new options to the timestamping API that will be
      useful for NTP implementations and possibly other applications.
      
      The first patch specifies a timestamp filter for NTP packets. The second
      patch updates drivers that can timestamp all packets, or need to list
      the filter as unsupported. There is no attempt to add the support to the
      phyter driver.
      
      The third patch adds two helper functions working with NAPI ID, which is
      needed by the next patch. The fourth patch adds a new option to get a
      new control message with the L2 length and interface index for incoming
      packets with hardware timestamps.
      
      The fifth patch fixes documentation on number of non-zero fields in
      scm_timestamping and warns about false software timestamps when
      SO_TIMESTAMP(NS) is combined with SCM_TIMESTAMPING.
      
      The sixth patch adds a new option to request both software and hardware
      timestamps for outgoing packets. The seventh patch updates drivers that
      assumed software timestamping cannot be used together with hardware
      timestamping.
      
      The patches have been tested on x86_64 machines with igb and e1000e
      drivers.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      dae37055
    • Miroslav Lichvar's avatar
      net: ethernet: update drivers to make both SW and HW TX timestamps · 74abc9b1
      Miroslav Lichvar authored
      Some drivers were calling the skb_tx_timestamp() function only when
      a hardware timestamp was not requested. Now that applications can use
      the SOF_TIMESTAMPING_OPT_TX_SWHW option to request both software and
      hardware timestamps, the drivers need to be modified to unconditionally
      call skb_tx_timestamp().
      
      CC: Richard Cochran <richardcochran@gmail.com>
      CC: Willem de Bruijn <willemb@google.com>
      Signed-off-by: default avatarMiroslav Lichvar <mlichvar@redhat.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      74abc9b1
    • Miroslav Lichvar's avatar
      net: allow simultaneous SW and HW transmit timestamping · b50a5c70
      Miroslav Lichvar authored
      Add SOF_TIMESTAMPING_OPT_TX_SWHW option to allow an outgoing packet to
      be looped to the socket's error queue with a software timestamp even
      when a hardware transmit timestamp is expected to be provided by the
      driver.
      
      Applications using this option will receive two separate messages from
      the error queue, one with a software timestamp and the other with a
      hardware timestamp. As the hardware timestamp is saved to the shared skb
      info, which may happen before the first message with software timestamp
      is received by the application, the hardware timestamp is copied to the
      SCM_TIMESTAMPING control message only when the skb has no software
      timestamp or it is an incoming packet.
      
      While changing sw_tx_timestamp(), inline it in skb_tx_timestamp() as
      there are no other users.
      
      CC: Richard Cochran <richardcochran@gmail.com>
      CC: Willem de Bruijn <willemb@google.com>
      Signed-off-by: default avatarMiroslav Lichvar <mlichvar@redhat.com>
      Acked-by: default avatarWillem de Bruijn <willemb@google.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      b50a5c70
    • Miroslav Lichvar's avatar
      net: fix documentation of struct scm_timestamping · 67953d47
      Miroslav Lichvar authored
      The scm_timestamping struct may return multiple non-zero fields, e.g.
      when both software and hardware RX timestamping is enabled, or when the
      SO_TIMESTAMP(NS) option is combined with SCM_TIMESTAMPING and a false
      software timestamp is generated in the recvmsg() call in order to always
      return a SCM_TIMESTAMP(NS) message.
      
      CC: Richard Cochran <richardcochran@gmail.com>
      CC: Willem de Bruijn <willemb@google.com>
      Signed-off-by: default avatarMiroslav Lichvar <mlichvar@redhat.com>
      Acked-by: default avatarWillem de Bruijn <willemb@google.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      67953d47