1. 29 4月, 2009 1 次提交
    • C
      SUNRPC: Fix error return value of svc_addr_len() · abc5c44d
      Chuck Lever 提交于
      The svc_addr_len() helper function returns -EAFNOSUPPORT if it doesn't
      recognize the address family of the passed-in socket address.  However,
      the return type of this function is size_t, which means -EAFNOSUPPORT
      is turned into a very large positive value in this case.
      
      The check in svc_udp_recvfrom() to see if the return value is less
      than zero therefore won't work at all.
      
      Additionally, handle_connect_req() passes this value directly to
      memset().  This could cause memset() to clobber a large chunk of memory
      if svc_addr_len() has returned an error.  Currently the address family
      of these addresses, however, is known to be supported long before
      handle_connect_req() is called, so this isn't a real risk.
      
      Change the error return value of svc_addr_len() to zero, which fits in
      the range of size_t, and is safer to pass to memset() directly.
      Signed-off-by: NChuck Lever <chuck.lever@oracle.com>
      Signed-off-by: NJ. Bruce Fields <bfields@citi.umich.edu>
      abc5c44d
  2. 02 4月, 2009 1 次提交
  3. 29 3月, 2009 3 次提交
  4. 19 3月, 2009 1 次提交
    • O
      svcrpc: take advantage of tcp autotuning · 47a14ef1
      Olga Kornievskaia 提交于
      Allow the NFSv4 server to make use of TCP autotuning behaviour, which
      was previously disabled by setting the sk_userlocks variable.
      
      Set the receive buffers to be big enough to receive the whole RPC
      request, and set this for the listening socket, not the accept socket.
      
      Remove the code that readjusts the receive/send buffer sizes for the
      accepted socket. Previously this code was used to influence the TCP
      window management behaviour, which is no longer needed when autotuning
      is enabled.
      
      This can improve IO bandwidth on networks with high bandwidth-delay
      products, where a large tcp window is required.  It also simplifies
      performance tuning, since getting adequate tcp buffers previously
      required increasing the number of nfsd threads.
      Signed-off-by: NOlga Kornievskaia <aglo@citi.umich.edu>
      Cc: Jim Rees <rees@umich.edu>
      Signed-off-by: NJ. Bruce Fields <bfields@citi.umich.edu>
      47a14ef1
  5. 08 1月, 2009 2 次提交
  6. 07 1月, 2009 1 次提交
  7. 25 11月, 2008 1 次提交
  8. 31 10月, 2008 1 次提交
  9. 05 10月, 2008 1 次提交
  10. 30 9月, 2008 1 次提交
    • C
      SUNRPC: Set V6ONLY socket option for RPC listener sockets · b6632339
      Chuck Lever 提交于
      My plan is to use an AF_INET listener on systems that support only IPv4,
      and an AF_INET6 listener on systems that can support IPv6. Incoming
      IPv4 packets will be posted to an AF_INET6 listener with a mapped IPv4
      address.
      
      Max Matveev <makc@sgi.com> says:
        Creating a single listener can be dangerous - if net.ipv6.bindv6only
        is enabled then it's possible to create another listener in v4
        namespace on the same port and steal the traffic from the "unifed"
        listener. You need to disable V6ONLY explicitly via a sockopt to stop
        that.
      
      Set appropriate socket option on RPC server listener sockets to prevent
      this.
      Signed-off-by: NChuck Lever <chuck.lever@oracle.com>
      Signed-off-by: NJ. Bruce Fields <bfields@citi.umich.edu>
      b6632339
  11. 24 4月, 2008 3 次提交
  12. 22 2月, 2008 1 次提交
  13. 02 2月, 2008 23 次提交