10 Aug, 2013

4 commits

  • Get rid of the last module parameter for SCTP and make this
    configurable via sysctl for SCTP like all the rest of SCTP's
    configuration knobs.

    Signed-off-by: Daniel Borkmann
    Signed-off-by: David S. Miller

    Daniel Borkmann
     
  • Adds the new procfs knobs:

    /proc/sys/net/ipv4/conf/*/igmpv2_unsolicited_report_interval
    /proc/sys/net/ipv4/conf/*/igmpv3_unsolicited_report_interval

    Which will allow userspace configuration of the IGMP unsolicited report
    interval (see below) in milliseconds. The defaults are 10000ms for IGMPv2
    and 1000ms for IGMPv3 in accordance with RFC2236 and RFC3376.

    Background:

    If an IGMP join packet is lost you will not receive data sent to the
    multicast group so if no data arrives from that multicast group in a
    period of time after the IGMP join a second IGMP join will be sent. The
    delay between joins is the "IGMP Unsolicited Report Interval".

    Prior to this patch this value was hard coded in the kernel to 10s for
    IGMPv2 and 1s for IGMPv3. 10s is unsuitable for some use-cases, such as
    IPTV as it can cause channel change to be slow in the presence of packet
    loss.

    This patch allows the value to be overridden from userspace for both
    IGMPv2 and IGMPv3 such that it can be tuned accoding to the network.

    Tested with Wireshark and a simple program to join a (non-existent)
    multicast group. The distribution of timings for the second join differ
    based upon setting the procfs knobs.

    igmpvX_unsolicited_report_interval is intended to follow the pattern
    established by force_igmp_version, and while a procfs entry has been added
    a corresponding sysctl knob has not as it is my understanding that sysctl
    is deprecated[1].

    [1]: http://lwn.net/Articles/247243/

    Signed-off-by: William Manley
    Acked-by: Hannes Frederic Sowa
    Acked-by: Benjamin LaHaise
    Signed-off-by: David S. Miller

    William Manley
     
  • The procfs knob /proc/sys/net/ipv4/conf/*/force_igmp_version allows the
    IGMP protocol version to use to be explicitly set. As a side effect this
    caused the routing cache to be flushed as it was declared as a
    DEVINET_SYSCTL_FLUSHING_ENTRY. Flushing is unnecessary and this patch
    makes it so flushing does not occur.

    Requested by Hannes Frederic Sowa as he was reviewing other patches
    adding procfs entries.

    Suggested-by: Hannes Frederic Sowa
    Signed-off-by: William Manley
    Acked-by: Hannes Frederic Sowa
    Acked-by: Benjamin LaHaise
    Signed-off-by: David S. Miller

    William Manley
     
  • If an IGMP join packet is lost you will not receive data sent to the
    multicast group so if no data arrives from that multicast group in a
    period of time after the IGMP join a second IGMP join will be sent. The
    delay between joins is the "IGMP Unsolicited Report Interval".

    Previously this value was hard coded to be chosen randomly between 0-10s.
    This can be too long for some use-cases, such as IPTV as it can cause
    channel change to be slow in the presence of packet loss.

    The value 10s has come from IGMPv2 RFC2236, which was reduced to 1s in
    IGMPv3 RFC3376. This patch makes the kernel use the 1s value from the
    later RFC if we are operating in IGMPv3 mode. IGMPv2 behaviour is
    unaffected.

    Tested with Wireshark and a simple program to join a (non-existent)
    multicast group. The distribution of timings for the second join differ
    based upon setting /proc/sys/net/ipv4/conf/eth0/force_igmp_version.

    Signed-off-by: William Manley
    Acked-by: Hannes Frederic Sowa
    Acked-by: Benjamin LaHaise
    Signed-off-by: David S. Miller

    William Manley
     

09 Aug, 2013

3 commits

  • In case of bond_add_vlan() failure currently we'll have the vlan's
    refcnt bumped up in all slaves, but it will never go down because it
    failed to get added to the bond, so properly unwind the added vlan if
    bond_add_vlan fails.

    Signed-off-by: Nikolay Aleksandrov
    Acked-by: Veaceslav Falico
    Signed-off-by: David S. Miller

    nikolay@redhat.com
     
  • Now we have vlan_vids_add/del_by_dev() which serve the same purpose as
    bond's bond_add/del_vlans_on_slave() with the good side effect of
    reverting the changes if one of the additions fails.
    There's only 1 change in the behaviour of enslave: if adding of the
    vlans to the slave fails, we'll fail the enslaving because otherwise we
    might delete some vlan that wasn't added by the bonding.
    The only way this may happen is with ENOMEM currently, so we're in trouble
    anyway.

    Signed-off-by: Nikolay Aleksandrov
    Acked-by: Veaceslav Falico
    Signed-off-by: David S. Miller

    nikolay@redhat.com
     
  • With GRO/LRO processing, there is a problem because Ip[6]InReceives SNMP
    counters do not count the number of frames, but number of aggregated
    segments.

    Its probably too late to change this now.

    This patch adds four new counters, tracking number of frames, regardless
    of LRO/GRO, and on a per ECN status basis, for IPv4 and IPv6.

    Ip[6]NoECTPkts : Number of packets received with NOECT
    Ip[6]ECT1Pkts : Number of packets received with ECT(1)
    Ip[6]ECT0Pkts : Number of packets received with ECT(0)
    Ip[6]CEPkts : Number of packets received with Congestion Experienced

    lph37:~# nstat | egrep "Pkts|InReceive"
    IpInReceives 1634137 0.0
    Ip6InReceives 3714107 0.0
    Ip6InNoECTPkts 19205 0.0
    Ip6InECT0Pkts 52651828 0.0
    IpExtInNoECTPkts 33630 0.0
    IpExtInECT0Pkts 15581379 0.0
    IpExtInCEPkts 6 0.0

    Signed-off-by: Eric Dumazet
    Signed-off-by: David S. Miller

    Eric Dumazet
     

08 Aug, 2013

23 commits


06 Aug, 2013

10 commits

  • Cleanup gfar_start_xmit()'s fast path by factoring out "redundant"
    FCB insertion code (repeated gfar_add_fcb() calls and related)
    and by reducing the number of if() clauses (i.e. if(fcb) checks).
    Improve maintainability (e.g. there's less code and easier to read)
    also by introducing do_csum and do_vlan to mark the other 2 Tx TOE
    functionalities, following the same model as do_tstamp.
    fcb_len may also be 0 now, to mark that Tx FCB insertion conditions
    (do_csum, do_vlan, do_tstamp) have not been met.

    Signed-off-by: Claudiu Manoil
    Signed-off-by: David S. Miller

    Claudiu Manoil
     
  • Both [eTSEC76] and [eTSEC12] errata relate to Tx checksum generation
    (for some MPC83xx and MCP8548 older revisions). They require the same
    workaround: manual checksum computation and insertion, and disabling
    the H/W Tx csum acceleration feature (per frame) through Tx FCB
    (Frame Control Block) csum offload settings.

    The workaround for [eTSEC76] needs to be fixed because it currently
    fails to disable H/W Tx csum insertion via FCB. This patch fixes it
    and provides a common workaround implementation for both Tx csum errata.

    Signed-off-by: Claudiu Manoil
    Signed-off-by: David S. Miller

    Claudiu Manoil
     
  • We're already protected by RTNL lock, so nothing can happen to bond/its
    slaves, and thus the locking is useless here (both bond->lock and
    bond->curr_active_slave).

    Also, add ASSERT_RTNL() both to bond_set_rx_mode() and bond_hw_addr_swap()
    to catch possible uses of it without RTNL locking.

    This patch also saves us from a lockdep false-positive in
    bond_set_rx_mode() vs bond_hw_addr_swap().

    CC: Jay Vosburgh
    CC: Andy Gospodarek
    CC: Nikolay Aleksandrov
    Signed-off-by: Veaceslav Falico
    Signed-off-by: Nikolay Aleksandrov
    Signed-off-by: David S. Miller

    Veaceslav Falico
     
  • The new IP version has a minor changes and the offsets are same as the
    previous version, so adding new IP version support in the driver.

    Signed-off-by: Mugunthan V N
    Reviewed-by: Felipe Balbi
    Signed-off-by: David S. Miller

    Mugunthan V N
     
  • As dst_cookie is used in fast path sctp_transport_dst_check.

    Before:
    struct sctp_transport {
    struct list_head transports; /* 0 16 */
    atomic_t refcnt; /* 16 4 */
    __u32 dead:1; /* 20:31 4 */
    __u32 rto_pending:1; /* 20:30 4 */
    __u32 hb_sent:1; /* 20:29 4 */
    __u32 pmtu_pending:1; /* 20:28 4 */

    /* XXX 28 bits hole, try to pack */

    __u32 sack_generation; /* 24 4 */

    /* XXX 4 bytes hole, try to pack */

    struct flowi fl; /* 32 64 */
    /* --- cacheline 1 boundary (64 bytes) was 32 bytes ago --- */
    union sctp_addr ipaddr; /* 96 28 */

    After:
    struct sctp_transport {
    struct list_head transports; /* 0 16 */
    atomic_t refcnt; /* 16 4 */
    __u32 dead:1; /* 20:31 4 */
    __u32 rto_pending:1; /* 20:30 4 */
    __u32 hb_sent:1; /* 20:29 4 */
    __u32 pmtu_pending:1; /* 20:28 4 */

    /* XXX 28 bits hole, try to pack */

    __u32 sack_generation; /* 24 4 */
    u32 dst_cookie; /* 28 4 */
    struct flowi fl; /* 32 64 */
    /* --- cacheline 1 boundary (64 bytes) was 32 bytes ago --- */
    union sctp_addr ipaddr; /* 96 28 */

    Signed-off-by: Fan Du
    Acked-by: Neil Horman
    Signed-off-by: David S. Miller

    fan.du
     
  • Currently we use a lot of time comparison math for arp_interval
    comparisons, which are sometimes quite hard to read and understand.

    All the time comparisons have one pattern:
    (time - arp_interval_jiffies)
    CC: Andy Gospodarek
    Signed-off-by: Veaceslav Falico
    Signed-off-by: David S. Miller

    Veaceslav Falico
     
  • Simple cleanup to not call slave_last_rx() on every time function. It won't
    give any measurable boost - but looks cleaner and easier to understand.

    There are no time-consuming functions in between these calls, so it's safe
    to call it in the beginning only once.

    CC: Jay Vosburgh
    CC: Andy Gospodarek
    Signed-off-by: Veaceslav Falico
    Signed-off-by: David S. Miller

    Veaceslav Falico
     
  • Add the missing unlock before return from function tile_net_open()
    in the error handling case.

    Introduced by commit f3286a3af89d6db7a488f3e8f02b98d67d50f00c.
    (tile: support multiple mPIPE shims in tilegx network driver)

    Signed-off-by: Wei Yongjun
    Acked-by: Chris Metcalf
    Signed-off-by: David S. Miller

    Wei Yongjun
     
  • These local functions are used only in this file.
    Fix the following sparse warnings:

    drivers/net/ethernet/mellanox/mlx4/cmd.c:803:5: warning: symbol 'MLX4_CMD_UPDATE_QP_wrapper' was not declared. Should it be static?
    drivers/net/ethernet/mellanox/mlx4/cmd.c:812:5: warning: symbol 'MLX4_CMD_GET_OP_REQ_wrapper' was not declared. Should it be static?
    drivers/net/ethernet/mellanox/mlx4/cmd.c:1547:5: warning: symbol 'mlx4_master_immediate_activate_vlan_qos' was not declared. Should
    it be static?

    Signed-off-by: Jingoo Han
    Acked-By: Amir Vadai
    Signed-off-by: David S. Miller

    Jingoo Han
     
  • These local functions are used only in this file.
    Fix the following sparse warnings:

    drivers/net/ethernet/micrel/ks8842.c:708:6: warning: symbol 'ks8842_handle_rx' was not declared. Should it be static?
    drivers/net/ethernet/micrel/ks8842.c:718:6: warning: symbol 'ks8842_handle_tx' was not declared. Should it be static?
    drivers/net/ethernet/micrel/ks8842.c:727:6: warning: symbol 'ks8842_handle_rx_overrun' was not declared. Should it be static?
    drivers/net/ethernet/micrel/ks8842.c:735:6: warning: symbol 'ks8842_tasklet' was not declared. Should it be static?
    drivers/net/ethernet/micrel/ks8851_mll.c:691:6: warning: symbol 'ks_enable_qmu' was not declared. Should it be static?

    Signed-off-by: Jingoo Han
    Signed-off-by: David S. Miller

    Jingoo Han