Skip to content
Snippets Groups Projects
  1. Jun 13, 2013
    • Joe Perches's avatar
      net: Convert uses of typedef ctl_table to struct ctl_table · fe2c6338
      Joe Perches authored
      
      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: default avatarJoe Perches <joe@perches.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      fe2c6338
    • Flavio Leitner's avatar
      net: make all team port device link events urgent · 194f4a6d
      Flavio Leitner authored
      
      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: default avatarFlavio Leitner <fbl@redhat.com>
      Signed-off-by: default avatarJiri Pirko <jiri@resnulli.us>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      194f4a6d
    • Wu Fengguang's avatar
      net: ping_check_bind_addr() etc. can be static · a06a2d37
      Wu Fengguang authored
      
      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: default avatarFengguang Wu <fengguang.wu@intel.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      a06a2d37
    • Ben Hutchings's avatar
      cxgb4: Do not set net_device::dev_id to VI index · 8c367fcb
      Ben Hutchings authored
      
      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: default avatarBen Hutchings <bhutchings@solarflare.com>
      Acked-by: default avatarDimitris Michailidis <dm@chelsio.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      8c367fcb
    • Jason Wang's avatar
      macvtap: fix uninitialized return value macvtap_ioctl_set_queue() · f57855a5
      Jason Wang authored
      
      Return -EINVAL on illegal flag instead of uninitialized value. This fixes the
      kbuild test warning.
      
      Signed-off-by: default avatarJason Wang <jasowang@redhat.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      f57855a5
    • Jason Wang's avatar
      macvtap: slient sparse warnings · d9a90a31
      Jason Wang authored
      
      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: default avatarJason Wang <jasowang@redhat.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      d9a90a31
    • Simon Horman's avatar
      sctp: Correct byte order of access to skb->{network, transport}_header · 2c928e0e
      Simon Horman authored
      
      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: default avatarSimon Horman <horms@verge.net.au>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      2c928e0e
    • Gao feng's avatar
      netlink: make compare exist all the time · ca15febf
      Gao feng authored
      
      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: default avatarFengguang Wu <fengguang.wu@intel.com>
      Signed-off-by: default avatarGao feng <gaofeng@cn.fujitsu.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      ca15febf
    • Cong Wang's avatar
      net: add doc for ip_early_demux sysctl · e3d73bce
      Cong Wang authored
      
      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: default avatarCong Wang <amwang@redhat.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      e3d73bce
    • Pavel Emelyanov's avatar
      tun: Turn tun_flow_init() into void fn · 944a1376
      Pavel Emelyanov authored
      
      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: default avatarPavel Emelyanov <xemul@parallels.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      944a1376
    • Pavel Emelyanov's avatar
      tun: Report "persist" flag to userspace · 274038f8
      Pavel Emelyanov authored
      
      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: default avatarPavel Emelyanov <xemul@parallels.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      274038f8
    • Eric Dumazet's avatar
      udp: fix two sparse errors · 7c0cadc6
      Eric Dumazet authored
      
      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: default avatarEric Dumazet <edumazet@google.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      7c0cadc6
    • Eric Dumazet's avatar
      gro: remove a sparse error · 5b9b6263
      Eric Dumazet authored
      
      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: default avatarkbuild test robot <fengguang.wu@intel.com>
      From: Eric Dumazet <edumazet@google.com>
      
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      5b9b6263
    • David S. Miller's avatar
      Merge branch 'for-davem' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next · 4a2e667a
      David S. Miller authored
      
      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: default avatarDavid S. Miller <davem@davemloft.net>
      4a2e667a
    • Sergei Shtylyov's avatar
      sh_eth: split 'sh_eth_netdev_ops' · 8f728d79
      Sergei Shtylyov authored
      
      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: default avatarSergei Shtylyov <sergei.shtylyov@cogentembedded.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      8f728d79
    • Eric Dumazet's avatar
      igmp: fix new sparse errors · c70eba74
      Eric Dumazet authored
      
      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: default avatarkbuild test robot <fengguang.wu@intel.com>
      Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      c70eba74
  2. Jun 12, 2013
  3. Jun 11, 2013
    • Eric Dumazet's avatar
      net_sched: add 64bit rate estimators · 45203a3b
      Eric Dumazet authored
      
      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: default avatarEric Dumazet <edumazet@google.com>
      Cc: Ben Hutchings <bhutchings@solarflare.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      45203a3b
    • Peter Pan(潘卫平)'s avatar
      net: pass correct parameter to skb_headers_offset_update() · b41abb42
      Peter Pan(潘卫平) authored
      
      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: default avatarWeiping Pan <panweiping3@gmail.com>
      Reviewed-by: default avatarSimon Horman <horms@verge.net.au>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      b41abb42