15 Jun, 2013

11 commits


14 Jun, 2013

5 commits

  • Add support to change the link state of VF (vPort)

    Signed-off-by: Rony Efraim
    Signed-off-by: Or Gerlitz
    Signed-off-by: David S. Miller

    Rony Efraim
     
  • Add netlink directives and ndo entry to allow for controling
    VF link, which can be in one of three states:

    Auto - VF link state reflects the PF link state (default)

    Up - VF link state is up, traffic from VF to VF works even if
    the actual PF link is down

    Down - VF link state is down, no traffic from/to this VF, can be of
    use while configuring the VF

    Signed-off-by: Rony Efraim
    Signed-off-by: Or Gerlitz
    Signed-off-by: David S. Miller

    Rony Efraim
     
  • This patch adds support for the Broadcom BCM6345 SoC Ethernet. BCM6345
    has a slightly different and older DMA engine which requires the
    following modifications:

    - the width of the DMA channels on BCM6345 is 64 bytes vs 16 bytes,
    which means that the helpers enet_dma{c,s} need to account for this
    channel width and we can no longer use macros

    - BCM6345 DMA engine does not have any internal SRAM for transfering
    buffers

    - BCM6345 buffer allocation and flow control is not per-channel but
    global (done in RSET_ENETDMA)

    - the DMA engine bits are right-shifted by 3 compared to other DMA
    generations

    - the DMA enable/interrupt masks are a little different (we need to
    enabled more bits for 6345)

    - some register have the same meaning but are offsetted in the ENET_DMAC
    space so a lookup table is required to return the proper offset

    The MAC itself is identical and requires no modifications to work.

    Signed-off-by: Florian Fainelli
    Acked-by: Ralf Baechle
    Signed-off-by: David S. Miller

    Florian Fainelli
     
  • htb_class structures are big, and source of false sharing on SMP.

    By carefully splitting them in two parts, we can improve performance.

    I got 9 % performance increase on a 24 threads machine, with 200
    concurrent netperf in TCP_RR mode, using a HTB hierarchy of 4 classes.

    Signed-off-by: Eric Dumazet
    Cc: Tom Herbert
    Signed-off-by: David S. Miller

    Eric Dumazet
     
  • Caught by sparse:
    - __rcu: missing annotation to sd->flow_limit
    - __user: direct access in cpumask_scnprintf

    Also
    - add endline character when printing bitmap if room in buffer
    - avoid bucket overflow by reducing FLOW_LIMIT_HISTORY

    The last item warrants some explanation. The hashtable buckets are
    subject to overflow if FLOW_LIMIT_HISTORY is larger than or equal
    to bucket size, since all packets may end up in a single bucket. The
    current (rather arbitrary) history value of 256 happens to match the
    buffer size (u8).

    As a result, with a single flow, the first 128 packets are accepted
    (correct), the second 128 packets dropped (correct) and then the
    history[] array has filled, so that each subsequent new packet
    causes an increment in the bucket for new_flow plus a decrement
    for old_flow: a steady state.

    This is fine if packets are dropped, as the steady state goes away
    as soon as a mix of traffic reappears. But, because the 256th packet
    overflowed the bucket to 0: no packets are dropped.

    Instead of explicitly adding an overflow check, this patch changes
    FLOW_LIMIT_HISTORY to never be able to overflow a single bucket.

    Reported-by: Fengguang Wu
    (first item)

    Signed-off-by: Willem de Bruijn
    Signed-off-by: David S. Miller

    Willem de Bruijn
     

13 Jun, 2013

18 commits

  • Linux sends new unset data during disorder and recovery state if all
    (suspected) lost packets have been retransmitted ( RFC5681, section
    3.2 step 1 & 2, RFC3517 section 4, NexSeg() Rule 2). One requirement
    is to keep the receive window about twice the estimated sender's
    congestion window (tcp_rcv_space_adjust()), assuming the fast
    retransmits repair the losses in the next round trip.

    But currently it's not the case on the first round trip in either
    normal or Fast Open connection, beucase the initial receive window
    is identical to (expected) sender's initial congestion window. The
    fix is to double it.

    Signed-off-by: Yuchung Cheng
    Acked-by: Neal Cardwell
    Acked-by: Eric Dumazet
    Signed-off-by: David S. Miller

    Yuchung Cheng
     
  • Now that the SoC specific support is no longer done with help of #ifdef'fery,
    we no longer need '__maybe_unused' annotations to sh_eth_select_mii() and
    sh_eth_set_duplex()...

    Signed-off-by: Sergei Shtylyov
    Signed-off-by: David S. Miller

    Sergei Shtylyov
     
  • 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: Joe Perches
    Signed-off-by: David S. Miller

    Joe Perches
     
  • 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: Flavio Leitner
    Signed-off-by: Jiri Pirko
    Signed-off-by: David S. Miller

    Flavio Leitner
     
  • 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: Fengguang Wu
    Signed-off-by: David S. Miller

    Wu Fengguang
     
  • 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: Ben Hutchings
    Acked-by: Dimitris Michailidis
    Signed-off-by: David S. Miller

    Ben Hutchings
     
  • Return -EINVAL on illegal flag instead of uninitialized value. This fixes the
    kbuild test warning.

    Signed-off-by: Jason Wang
    Signed-off-by: David S. Miller

    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 *
    drivers/net/macvtap.c:98:9: got struct macvtap_queue [noderef]
    *
    drivers/net/macvtap.c:120:9: warning: incorrect type in assignment (different
    address spaces)
    drivers/net/macvtap.c:120:9: expected struct macvtap_queue *
    drivers/net/macvtap.c:120:9: got struct macvtap_queue [noderef]
    *
    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: Jason Wang
    Signed-off-by: David S. Miller

    Jason Wang
     
  • Corrects an byte order conflict introduced by
    158874cac61245b84e939c92c53db7000122b7b0
    ("sctp: Correct access to skb->{network, transport}_header").
    The values in question are host byte order.

    Signed-off-by: Simon Horman
    Signed-off-by: David S. Miller

    Simon Horman
     
  • Commit da12c90e099789a63073fc82a19542ce54d4efb9
    "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: Fengguang Wu
    Signed-off-by: Gao feng
    Signed-off-by: David S. Miller

    Gao feng
     
  • commit 6648bd7e0e62c0c8c03b (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 41063e9dd11956f2d285
    (ipv4: Early TCP socket demux.) and the above commit.

    Cc: Eric Dumazet
    Cc: Alexander Duyck
    Cc: David S. Miller
    Signed-off-by: Cong Wang
    Signed-off-by: David S. Miller

    Cong Wang
     
  • 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: Pavel Emelyanov
    Signed-off-by: David S. Miller

    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: Pavel Emelyanov
    Signed-off-by: David S. Miller

    Pavel Emelyanov
     
  • commit ba418fa357a7b3c ("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: Eric Dumazet
    Signed-off-by: David S. Miller

    Eric Dumazet
     
  • Fix following sparse error :

    net/ipv4/af_inet.c:1410:59: warning: restricted __be16 degrades to
    integer

    added in commit db8caf3dbc77599
    ("gro: should aggregate frames without DF")

    Reported-by: kbuild test robot
    From: Eric Dumazet

    Signed-off-by: David S. Miller

    Eric Dumazet
     
  • 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: David S. Miller

    David S. Miller
     
  • Commit 9f86134155047720a3685cda21467f68695152d2 (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: Sergei Shtylyov
    Signed-off-by: David S. Miller

    Sergei Shtylyov
     
  • 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] *next_hash
    net/ipv4/igmp.c:1234:31: got struct ip_mc_list *
    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] *next_hash
    net/ipv4/igmp.c:1250:31: got struct ip_mc_list *
    net/ipv4/igmp.c:2380:37: warning: cast from restricted __be32

    These were added by commit e9897071350bd9
    ("igmp: hash a hash table to speedup ip_check_mc_rcu()")

    Reported-by: kbuild test robot
    Signed-off-by: Eric Dumazet
    Signed-off-by: David S. Miller

    Eric Dumazet
     

12 Jun, 2013

6 commits