1. 13 6月, 2013 16 次提交
    • J
      net: Convert uses of typedef ctl_table to struct ctl_table · fe2c6338
      Joe Perches 提交于
      Reduce the uses of this unnecessary typedef.
      
      Done via perl script:
      
      $ git grep --name-only -w ctl_table net | \
        xargs perl -p -i -e '\
      	sub trim { my ($local) = @_; $local =~ s/(^\s+|\s+$)//g; return $local; } \
              s/\b(?<!struct\s)ctl_table\b(\s*\*\s*|\s+\w+)/"struct ctl_table " . trim($1)/ge'
      
      Reflow the modified lines that now exceed 80 columns.
      Signed-off-by: NJoe Perches <joe@perches.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      fe2c6338
    • F
      net: make all team port device link events urgent · 194f4a6d
      Flavio Leitner 提交于
      Since team functionality relies heavily on userspace daemon, we need to
      deliver event to userspace via Netlink as quick as possible. So make all
      team port device link events urgent.
      Signed-off-by: NFlavio Leitner <fbl@redhat.com>
      Signed-off-by: NJiri Pirko <jiri@resnulli.us>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      194f4a6d
    • W
      net: ping_check_bind_addr() etc. can be static · a06a2d37
      Wu Fengguang 提交于
      net/ipv4/ping.c:286:5: sparse: symbol 'ping_check_bind_addr' was not declared. Should it be static?
      net/ipv4/ping.c:355:6: sparse: symbol 'ping_set_saddr' was not declared. Should it be static?
      net/ipv4/ping.c:370:6: sparse: symbol 'ping_clear_saddr' was not declared. Should it be static?
      
      net/ipv6/ping.c:60:5: sparse: symbol 'dummy_ipv6_recv_error' was not declared. Should it be static?
      net/ipv6/ping.c:64:5: sparse: symbol 'dummy_ip6_datagram_recv_ctl' was not declared. Should it be static?
      net/ipv6/ping.c:69:5: sparse: symbol 'dummy_icmpv6_err_convert' was not declared. Should it be static?
      net/ipv6/ping.c:73:6: sparse: symbol 'dummy_ipv6_icmp_error' was not declared. Should it be static?
      net/ipv6/ping.c:75:5: sparse: symbol 'dummy_ipv6_chk_addr' was not declared. Should it be static?
      net/ipv6/ping.c:201:5: sparse: symbol 'ping_v6_seq_show' was not declared. Should it be static?
      Signed-off-by: NFengguang Wu <fengguang.wu@intel.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      a06a2d37
    • B
      cxgb4: Do not set net_device::dev_id to VI index · 8c367fcb
      Ben Hutchings 提交于
      net_device::dev_id should not be used merely to indicate a VI index,
      as it affects the way the local part of IPv6 addresses is normally
      generated.
      
      This field was intended for use where multiple devices may share a
      single assigned MAC address and need to have different IPv6 addresses.
      T4 VIs each have their own MAC address.
      Signed-off-by: NBen Hutchings <bhutchings@solarflare.com>
      Acked-by: NDimitris Michailidis <dm@chelsio.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      8c367fcb
    • J
      macvtap: fix uninitialized return value macvtap_ioctl_set_queue() · f57855a5
      Jason Wang 提交于
      Return -EINVAL on illegal flag instead of uninitialized value. This fixes the
      kbuild test warning.
      Signed-off-by: NJason Wang <jasowang@redhat.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      f57855a5
    • J
      macvtap: slient sparse warnings · d9a90a31
      Jason Wang 提交于
      This patch silents the following sparse warnings:
      
      drivers/net/macvtap.c:98:9: warning: incorrect type in assignment (different
      address spaces)
      drivers/net/macvtap.c:98:9:    expected struct macvtap_queue *<noident>
      drivers/net/macvtap.c:98:9:    got struct macvtap_queue [noderef]
      <asn:4>*<noident>
      drivers/net/macvtap.c:120:9: warning: incorrect type in assignment (different
      address spaces)
      drivers/net/macvtap.c:120:9:    expected struct macvtap_queue *<noident>
      drivers/net/macvtap.c:120:9:    got struct macvtap_queue [noderef]
      <asn:4>*<noident>
      drivers/net/macvtap.c:151:22: error: incompatible types in comparison expression
      (different address spaces)
      drivers/net/macvtap.c:233:23: error: incompatible types in comparison expression
      (different address spaces)
      drivers/net/macvtap.c:243:23: error: incompatible types in comparison expression
      (different address spaces)
      drivers/net/macvtap.c:247:15: error: incompatible types in comparison expression
      (different address spaces)
        CC [M]  drivers/net/macvtap.o
      drivers/net/macvlan.c:232:24: error: incompatible types in comparison expression
      (different address spaces)
      Signed-off-by: NJason Wang <jasowang@redhat.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      d9a90a31
    • S
      sctp: Correct byte order of access to skb->{network, transport}_header · 2c928e0e
      Simon Horman 提交于
      Corrects an byte order conflict introduced by
      158874ca
      ("sctp: Correct access to skb->{network, transport}_header").
      The values in question are host byte order.
      Signed-off-by: NSimon Horman <horms@verge.net.au>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      2c928e0e
    • G
      netlink: make compare exist all the time · ca15febf
      Gao feng 提交于
      Commit da12c90e
      "netlink: Add compare function for netlink_table"
      only set compare at the time we create kernel netlink,
      and reset compare to NULL at the time we finially
      release netlink socket, but netlink_lookup wants
      the compare exist always.
      
      So we should set compare after we allocate nl_table,
      and never reset it. make comapre exist all the time.
      Reported-by: NFengguang Wu <fengguang.wu@intel.com>
      Signed-off-by: NGao feng <gaofeng@cn.fujitsu.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      ca15febf
    • C
      net: add doc for ip_early_demux sysctl · e3d73bce
      Cong Wang 提交于
      commit 6648bd7e (ipv4: Add sysctl knob to control
      early socket demux) introduced such sysctl, but forgot to add
      doc into Documentation/networking/ip-sysctl.txt. This patch adds it.
      
      Basically I grab the doc from the description of commit 41063e9d
      (ipv4: Early TCP socket demux.) and the above commit.
      
      Cc: Eric Dumazet <edumazet@google.com>
      Cc: Alexander Duyck <alexander.h.duyck@intel.com>
      Cc: David S. Miller <davem@davemloft.net>
      Signed-off-by: NCong Wang <amwang@redhat.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      e3d73bce
    • P
      tun: Turn tun_flow_init() into void fn · 944a1376
      Pavel Emelyanov 提交于
      This routine doesn't fail since 9fdc6bef (tuntap: dont use a private kmem_cache)
      so it makes sense to compact the code a little bit.
      Signed-off-by: NPavel Emelyanov <xemul@parallels.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      944a1376
    • P
      tun: Report "persist" flag to userspace · 274038f8
      Pavel Emelyanov 提交于
      The TUN_PERSIST flag is not reported at all -- both TUNGETIFF, and sysfs
      "flags" attribute skip one. Knowing whether a device is persistent or not
      is critical for checkpoint-restore, thus I propose to add the read-only
      IFF_PERSIST one for this.
      
      Setting this new IFF_PERSIST is hardly possible, as TUNSETIFF doesn't check
      for unknown flags being zero and thus there can be trash.
      Signed-off-by: NPavel Emelyanov <xemul@parallels.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      274038f8
    • E
      udp: fix two sparse errors · 7c0cadc6
      Eric Dumazet 提交于
      commit ba418fa3 ("soreuseport: UDP/IPv4 implementation")
      added following sparse errors :
      
      net/ipv4/udp.c:433:60: warning: cast from restricted __be16
      net/ipv4/udp.c:433:60: warning: incorrect type in argument 1 (different base types)
      net/ipv4/udp.c:433:60:    expected unsigned short [unsigned] [usertype] val
      net/ipv4/udp.c:433:60:    got restricted __be16 [usertype] sport
      net/ipv4/udp.c:433:60: warning: cast from restricted __be16
      net/ipv4/udp.c:433:60: warning: cast from restricted __be16
      net/ipv4/udp.c:514:60: warning: cast from restricted __be16
      net/ipv4/udp.c:514:60: warning: incorrect type in argument 1 (different base types)
      net/ipv4/udp.c:514:60:    expected unsigned short [unsigned] [usertype] val
      net/ipv4/udp.c:514:60:    got restricted __be16 [usertype] sport
      net/ipv4/udp.c:514:60: warning: cast from restricted __be16
      net/ipv4/udp.c:514:60: warning: cast from restricted __be16
      Signed-off-by: NEric Dumazet <edumazet@google.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      7c0cadc6
    • E
      gro: remove a sparse error · 5b9b6263
      Eric Dumazet 提交于
      Fix following sparse error :
      
      net/ipv4/af_inet.c:1410:59: warning: restricted __be16 degrades to
      integer
      
      added in commit db8caf3d
      ("gro: should aggregate frames without DF")
      Reported-by: Nkbuild test robot <fengguang.wu@intel.com>
      From: Eric Dumazet <edumazet@google.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      5b9b6263
    • D
      Merge branch 'for-davem' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next · 4a2e667a
      David S. Miller 提交于
      John W. Linville says:
      
      ====================
      This pull request is intended for the 3.11 stream...
      
      One big highlight is the cw1200 driver the ST-E CW1100 & CW1200
      WLAN chipsets.  This one has been lingering for a while, lacking
      some review comments.  Once started getting pulled into linux-next,
      it got a bit more attention and a number of improvements were made
      over the initial cut.  No doubt there will be more changes ahead,
      but I think it is looking alright at this point.
      
      Along with that, there is the usual flurry of updates to the mac80211
      core and the iwlwifi, mwifiex, ath9k, rt2x00, wil6210, and other
      drivers.  A few of the highlights are some rt2x00 refactoring/cleanup
      by Gabor Juhos, some rt2800 hardware support enhancements by Stanislaw
      Gruszka, some iwlwifi power management updates from Alexander Bondar,
      some enhanced bcma SPROM support from Rafał Miłecki, and a variety
      of other things here and there.
      ====================
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      4a2e667a
    • S
      sh_eth: split 'sh_eth_netdev_ops' · 8f728d79
      Sergei Shtylyov 提交于
      Commit 9f861341 (sh_eth: remove SH_ETH_HAS_TSU)
      removes 'const' from 'sh_eth_netdev_ops'  and modifies it in case TSU registers
      are present. I've originally suggested to Iwamatsu-san to split  this structure
      in two instead and afterwards Dave M. suggested doing the same.
      Split 'sh_eth_netdev_ops_tsu' from 'sh_eth_netdev_ops', making both 'const', and
      assigning 'ndev->detdev_ops'  depending on the presence of TSU registers.
      Signed-off-by: NSergei Shtylyov <sergei.shtylyov@cogentembedded.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      8f728d79
    • E
      igmp: fix new sparse errors · c70eba74
      Eric Dumazet 提交于
      Fix following sparse errors :
      
      net/ipv4/igmp.c:1222:25: warning: cast from restricted __be32
      net/ipv4/igmp.c:1234:31: warning: incorrect type in assignment (different address spaces)
      net/ipv4/igmp.c:1234:31:    expected struct ip_mc_list [noderef] <asn:4>*next_hash
      net/ipv4/igmp.c:1234:31:    got struct ip_mc_list *<noident>
      net/ipv4/igmp.c:1250:31: warning: incorrect type in assignment (different address spaces)
      net/ipv4/igmp.c:1250:31:    expected struct ip_mc_list [noderef] <asn:4>*next_hash
      net/ipv4/igmp.c:1250:31:    got struct ip_mc_list *<noident>
      net/ipv4/igmp.c:2380:37: warning: cast from restricted __be32
      
      These were added by commit e9897071
      ("igmp: hash a hash table to speedup ip_check_mc_rcu()")
      Reported-by: Nkbuild test robot <fengguang.wu@intel.com>
      Signed-off-by: NEric Dumazet <edumazet@google.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      c70eba74
  2. 12 6月, 2013 22 次提交
  3. 11 6月, 2013 2 次提交
    • E
      net_sched: add 64bit rate estimators · 45203a3b
      Eric Dumazet 提交于
      struct gnet_stats_rate_est contains u32 fields, so the bytes per second
      field can wrap at 34360Mbit.
      
      Add a new gnet_stats_rate_est64 structure to get 64bit bps/pps fields,
      and switch the kernel to use this structure natively.
      
      This structure is dumped to user space as a new attribute :
      
      TCA_STATS_RATE_EST64
      
      Old tc command will now display the capped bps (to 34360Mbit), instead
      of wrapped values, and updated tc command will display correct
      information.
      
      Old tc command output, after patch :
      
      eric:~# tc -s -d qd sh dev lo
      qdisc pfifo 8001: root refcnt 2 limit 1000p
       Sent 80868245400 bytes 1978837 pkt (dropped 0, overlimits 0 requeues 0)
       rate 34360Mbit 189696pps backlog 0b 0p requeues 0
      
      This patch carefully reorganizes "struct Qdisc" layout to get optimal
      performance on SMP.
      Signed-off-by: NEric Dumazet <edumazet@google.com>
      Cc: Ben Hutchings <bhutchings@solarflare.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      45203a3b
    • P
      net: pass correct parameter to skb_headers_offset_update() · b41abb42
      Peter Pan(潘卫平) 提交于
      Since commit 1a37e412(net: Use 16bits for *_headers fields of struct
      skbuff), skb->*_header are relative to skb->head,
      so copy_skb_header() should not call skb_headers_offset_update() now,
      and we should pass correct parameter to skb_headers_offset_update() in
      pskb_expand_head() and skb_copy_expand().
      Signed-off-by: NWeiping Pan <panweiping3@gmail.com>
      Reviewed-by: NSimon Horman <horms@verge.net.au>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      b41abb42