1. 19 10月, 2009 1 次提交
    • E
      inet: rename some inet_sock fields · c720c7e8
      Eric Dumazet 提交于
      In order to have better cache layouts of struct sock (separate zones
      for rx/tx paths), we need this preliminary patch.
      
      Goal is to transfert fields used at lookup time in the first
      read-mostly cache line (inside struct sock_common) and move sk_refcnt
      to a separate cache line (only written by rx path)
      
      This patch adds inet_ prefix to daddr, rcv_saddr, dport, num, saddr,
      sport and id fields. This allows a future patch to define these
      fields as macros, like sk_refcnt, without name clashes.
      Signed-off-by: NEric Dumazet <eric.dumazet@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      c720c7e8
  2. 07 10月, 2009 1 次提交
    • B
      Use sk_mark for IPv6 routing lookups · 51953d5b
      Brian Haley 提交于
      Atis Elsts wrote:
      > Not sure if there is need to fill the mark from skb in tunnel xmit functions. In any case, it's not done for GRE or IPIP tunnels at the moment.
      
      Ok, I'll just drop that part, I'm not sure what should be done in this case.
      
      > Also, in this patch you are doing that for SIT (v6-in-v4) tunnels only, and not doing it for v4-in-v6 or v6-in-v6 tunnels. Any reason for that?
      
      I just sent that patch out too quickly, here's a better one with the updates.
      
      Add support for IPv6 route lookups using sk_mark.
      Signed-off-by: NBrian Haley <brian.haley@hp.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      51953d5b
  3. 01 10月, 2009 1 次提交
  4. 14 8月, 2009 2 次提交
    • G
      inet6: Set default traffic class · 26ced1e4
      Gerrit Renker 提交于
      This patch addresses:
       * assigning -1 to np->tclass as it is currently done is not very meaningful,
         since it turns into 0xff;
       * RFC 3542, 6.5 allows -1 for clearing the sticky IPV6_TCLASS option
         and specifies -1 to mean "use kernel default":
         - RFC 2460, 7. requires that the default traffic class must be zero for
           all 8 bits,
         - this is consistent with RFC 2474, 4.1 which recommends a default PHB of 0,
           in combination with a value of the ECN field of "non-ECT" (RFC 3168, 5.).
      
      This patch changes the meaning of -1 from assigning 255 to mean the RFC 2460
      default, which at the same time allows to satisfy clearing the sticky TCLASS
      option as per RFC 3542, 6.5.
      
      (When passing -1 as ancillary data, the fallback remains np->tclass, which
       has either been set via socket options, or contains the default value.)
      Signed-off-by: NGerrit Renker <gerrit@erg.abdn.ac.uk>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      26ced1e4
    • G
      inet6: Conversion from u8 to int · e651f03a
      Gerrit Renker 提交于
      This replaces assignments of the type "int on LHS" = "u8 on RHS" with
      simpler code. The LHS can express all of the unsigned right hand side
      values, hence the assigned value can not be negative.
      Signed-off-by: NGerrit Renker <gerrit@erg.abdn.ac.uk>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      e651f03a
  5. 14 4月, 2009 1 次提交
  6. 25 2月, 2009 1 次提交
  7. 05 1月, 2009 1 次提交
  8. 16 12月, 2008 2 次提交
    • Y
      ipv6: fix the return interface index when get it while no message is received · f250dcda
      Yang Hongyang 提交于
      When get receiving interface index while no message is received,
      the the value seted with setsockopt() should be returned.
      
      RFC 3542:
         Issuing getsockopt() for the above options will return the sticky
         option value i.e., the value set with setsockopt().  If no sticky
         option value has been set getsockopt() will return the following
         values:
      
         -  For the IPV6_PKTINFO option, it will return an in6_pktinfo
            structure with ipi6_addr being in6addr_any and ipi6_ifindex being
            zero.
      Signed-off-by: NYang Hongyang <yanghy@cn.fujitsu.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      f250dcda
    • Y
      ipv6: Add IPV6_PKTINFO sticky option support to setsockopt() · b24a2516
      Yang Hongyang 提交于
      There are three reasons for me to add this support:
      1.When no interface is specified in an IPV6_PKTINFO ancillary data
        item, the interface specified in an IPV6_PKTINFO sticky optionis 
        is used.
      
      RFC3542:
      6.7.  Summary of Outgoing Interface Selection
      
         This document and [RFC-3493] specify various methods that affect the
         selection of the packet's outgoing interface.  This subsection
         summarizes the ordering among those in order to ensure deterministic
         behavior.
      
         For a given outgoing packet on a given socket, the outgoing interface
         is determined in the following order:
      
         1. if an interface is specified in an IPV6_PKTINFO ancillary data
            item, the interface is used.
      
         2. otherwise, if an interface is specified in an IPV6_PKTINFO sticky
            option, the interface is used.
      
      2.When no IPV6_PKTINFO ancillary data is received,getsockopt() should 
        return the sticky option value which set with setsockopt().
      
      RFC 3542:
         Issuing getsockopt() for the above options will return the sticky
         option value i.e., the value set with setsockopt().  If no sticky
         option value has been set getsockopt() will return the following
         values:
      
      3.Make the setsockopt implementation POSIX compliant.
      Signed-off-by: NYang Hongyang <yanghy@cn.fujitsu.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      b24a2516
  9. 13 11月, 2008 1 次提交
    • B
      ipv6: routing header fixes · 6e093d9d
      Brian Haley 提交于
      This patch fixes two bugs:
      
      1. setsockopt() of anything but a Type 2 routing header should return
      EINVAL instead of EPERM.  Noticed by Shan Wei
      (shanwei@cn.fujitsu.com).
      
      2. setsockopt()/sendmsg() of a Type 2 routing header with invalid
      length or segments should return EINVAL.  These values are statically
      fixed in RFC 3775, unlike the variable Type 0 was.
      Signed-off-by: NBrian Haley <brian.haley@hp.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      6e093d9d
  10. 18 8月, 2008 1 次提交
  11. 04 8月, 2008 1 次提交
  12. 20 7月, 2008 1 次提交
  13. 19 7月, 2008 1 次提交
  14. 20 6月, 2008 1 次提交
  15. 12 6月, 2008 4 次提交
  16. 05 6月, 2008 5 次提交
  17. 01 5月, 2008 1 次提交
  18. 29 4月, 2008 1 次提交
  19. 28 4月, 2008 1 次提交
  20. 14 4月, 2008 1 次提交
  21. 12 4月, 2008 2 次提交
  22. 11 4月, 2008 1 次提交
    • Y
      [IPV6]: Sparse: Reuse previous delaration where appropriate. · a9f83bf3
      YOSHIFUJI Hideaki 提交于
      | net/ipv6/ipv6_sockglue.c:162:16: warning: symbol 'net' shadows an earlier one
      | net/ipv6/ipv6_sockglue.c:111:13: originally declared here
      | net/ipv6/ipv6_sockglue.c:175:16: warning: symbol 'net' shadows an earlier one
      | net/ipv6/ipv6_sockglue.c:111:13: originally declared here
      | net/ipv6/ip6mr.c:1241:10: warning: symbol 'ret' shadows an earlier one
      | net/ipv6/ip6mr.c:1163:6: originally declared here
      Signed-off-by: NYOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
      a9f83bf3
  23. 05 4月, 2008 1 次提交
  24. 01 4月, 2008 1 次提交
  25. 26 3月, 2008 1 次提交
  26. 25 3月, 2008 2 次提交
  27. 08 3月, 2008 1 次提交
  28. 07 3月, 2008 1 次提交
    • D
      [UDP]: Revert udplite and code split. · db8dac20
      David S. Miller 提交于
      This reverts commit db1ed684 ("[IPV6]
      UDP: Rename IPv6 UDP files."), commit
      8be8af8f ("[IPV4] UDP: Move
      IPv4-specific bits to other file.") and commit
      e898d4db ("[UDP]: Allow users to
      configure UDP-Lite.").
      
      First, udplite is of such small cost, and it is a core protocol just
      like TCP and normal UDP are.
      
      We spent enormous amounts of effort to make udplite share as much code
      with core UDP as possible.  All of that work is less valuable if we're
      just going to slap a config option on udplite support.
      
      It is also causing build failures, as reported on linux-next, showing
      that the changeset was not tested very well.  In fact, this is the
      second build failure resulting from the udplite change.
      
      Finally, the config options provided was a bool, instead of a modular
      option.  Meaning the udplite code does not even get build tested
      by allmodconfig builds, and furthermore the user is not presented
      with a reasonable modular build option which is particularly needed
      by distribution vendors.
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      db8dac20
  29. 04 3月, 2008 1 次提交