19 Feb, 2013

14 commits

  • proc_net_remove is only used to remove proc entries
    that under /proc/net,it's not a general function for
    removing proc entries of netns. if we want to remove
    some proc entries which under /proc/net/stat/, we still
    need to call remove_proc_entry.

    this patch use remove_proc_entry to replace proc_net_remove.
    we can remove proc_net_remove after this patch.

    Signed-off-by: Gao feng
    Signed-off-by: David S. Miller

    Gao feng
     
  • proc_net_fops_create has been replaced by proc_create,
    we can remove it now.

    Signed-off-by: Gao feng
    Signed-off-by: David S. Miller

    Gao feng
     
  • Right now, some modules such as bonding use proc_create
    to create proc entries under /proc/net/, and other modules
    such as ipv4 use proc_net_fops_create.

    It looks a little chaos.this patch changes all of
    proc_net_fops_create to proc_create. we can remove
    proc_net_fops_create after this patch.

    Signed-off-by: Gao feng
    Signed-off-by: David S. Miller

    Gao feng
     
  • CPDMA interrupts are not properly acknowledged which leads to interrupt
    storm, only cpdma interrupt 0 is acknowledged in Davinci CPDMA driver.
    Changed cpdma_ctlr_eoi api to acknowledge 1 and 2 interrupts which are
    used for rx and tx respectively.

    Reported-by: Pantelis Antoniou
    Signed-off-by: Mugunthan V N
    Signed-off-by: David S. Miller

    Mugunthan V N
     
  • Upper case macros for various chip attributes are slightly
    difficult to read and are a bit out of characterto the other
    tg3_ attribute functions.

    Convert:

    GET_ASIC_REV(tp->pci_chip_rev_id) -> tg3_asic_rev(tp)
    GET_CHIP_REV(tp->pci_chip_rev_id) -> tg3_chip_rev(tp)

    Remove:
    GET_METAL_REV(tp->pci_chip_rev_id) -> tg3_metal_rev(tp) (unused)

    Add:
    tg3_chip_rev_id(tp) for tp->pci_chip_rev_id so access styles
    are similar to tg3_asic_rev and tg3_chip_rev.

    These macros are not converted to static inline functions
    because gcc (tested with 4.7.2) is currently unable to
    optimize the object code it produces the same way and code
    is otherwise larger.

    Signed-off-by: Joe Perches
    Acked-by: Michael Chan
    Signed-off-by: David S. Miller

    Joe Perches
     
  • It's the same value as tp->pci_chip_rev_id so use that
    instead. This makes all CHIPREV_ID_ tests the same.

    Signed-off-by: Joe Perches
    Acked-by: Michael Chan
    Signed-off-by: David S. Miller

    Joe Perches
     
  • Without this patch I get many unaligned access warnings per packet,
    this patches fixes them all. This should improve performance on some
    systems like mips.

    Signed-off-by: Hauke Mehrtens
    Signed-off-by: David S. Miller

    Hauke Mehrtens
     
  • Same problem as IPv6

    Signed-off-by: Stephen Hemminger
    Signed-off-by: David S. Miller

    stephen hemminger
     
  • Should not use assignment in conditional:
    warning: suggest parentheses around assignment used as truth value [-Wparentheses]

    Problem introduced by:
    commit 14bbd6a565e1bcdc240d44687edb93f721cfdf99
    Author: Pravin B Shelar
    Date: Thu Feb 14 09:44:49 2013 +0000

    net: Add skb_unclone() helper function.

    Signed-off-by: Stephen Hemminger
    Signed-off-by: David S. Miller

    stephen hemminger
     
  • Jeff Kirsher says:

    ====================
    This series contains updates to e1000, e1000e, igb, igbvf and ixgbe.
    The e1000, e1000e, igb and igbvf are single patch changes and the
    remaining 11 patches are all against ixgbe.

    The e1000 patch is a comment cleanup to align e1000 with the code
    commenting style for /drivers/net. It also contains a few other white
    space cleanups (i.e. fix lines over 80 char, remove unnecessary blank
    lines and fix the use of tabs/spaces).

    The e1000e patch from Koki (Fujitsu) adds a warning when link speed is
    downgraded due to SmartSpeed.

    The igb patch from Stefan (Red Hat) increases the timeout in the ethtool
    offline self-test because some i350 adapters would sometimes fail the
    self-test because link auto negotiation may take longer than the current
    4 second timeout.

    The igbvf patch from Alex is meant to address several race issues that
    become possible because next_to_watch could possibly be set to a value
    that shows that the descriptor is done when it is not. In order to correct
    that we instead make next_to_watch a pointer that is set to NULL during
    cleanup, and set to the eop_desc after the descriptor rings have been written.

    The remaining patches for ixgbe are a mix of fixes and added support as well
    as some cleanup. Most notably is the added support for displaying the
    number of Tx/Rx channels via ethtool by Alex. Also Aurélien adds the
    ability for reading data from SFP+ modules over i2c for diagnostic
    monitoring.
    ====================

    Signed-off-by: David S. Miller

    David S. Miller
     
  • They well deserve a separated unit.

    Cc: "David S. Miller"
    Signed-off-by: Cong Wang
    Signed-off-by: David S. Miller

    Cong Wang
     
  • In ehea.h the minimal entries is 2^7 - 1:
    #define EHEA_MIN_ENTRIES_QP 127

    Thus change the module param description accordinglly

    Signed-off-by: Dave Young
    Signed-off-by: David S. Miller

    Dave Young
     
  • Use ipv6_addr_hash() and a single jhash invocation.

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

    Eric Dumazet
     
  • Paul Gortmaker says:

    ====================
    Two relatively small cleanup patches here, plus a reimplementation
    of the patch Neil had questions about[1] in the last development
    cycle.

    Tested on today's net-next, between 32 and 64 bit x86 machines using
    the server/client in tipc-utils, as usual.

    [1] http://patchwork.ozlabs.org/patch/204507/
    ====================

    Signed-off-by: David S. Miller

    David S. Miller
     

16 Feb, 2013

26 commits

  • Recent changes have made it so that MAX_SKB_FRAGS is now never less than 16.
    As a result we were seeing issues on systems with 64K pages as it would
    cause DESC_NEEDED to increase to 68, and we would need over 136 descriptors
    free before clean_tx_irq would wake the queue.

    This patch makes it so that DESC_NEEDED is always MAX_SKB_FRAGS + 4. This
    should prevent any possible deadlocks on the systems with 64K pages as we will
    now only require 42 descriptors to wake.

    Signed-off-by: Alexander Duyck
    Tested-by: Phil Schmitt
    Signed-off-by: Jeff Kirsher

    Alexander Duyck
     
  • This patch makes sure that TXDCTL.WTHRESH is set to 1 when BQL is enabled
    and EITR is set to more than 100k interrupts per second to avoid Tx timeouts.

    Signed-off-by: Emil Tantilov
    Tested-by: Phil Schmitt
    Signed-off-by: Jeff Kirsher

    Emil Tantilov
     
  • This patch adds support for reading data from SFP+ modules over i2c.

    Signed-off-by: Aurélien Guillaume
    Signed-off-by: Emil Tantilov
    Tested-by: Phil Schmitt
    Signed-off-by: Jeff Kirsher

    Aurélien Guillaume
     
  • This patch replaces instances where a return code from i2c operations
    were checked against a list of error codes with a much simpler
    if ( status != 0 ) check.

    Some whitespace cleanups included.

    Signed-off-by: Emil Tantilov
    Tested-by: Phil Schmitt
    Signed-off-by: Jeff Kirsher

    Emil Tantilov
     
  • This patch makes sure that the SW lock is released after all i2c
    operations complete in the retry code path.

    Signed-off-by: Emil Tantilov
    Tested-by: Phil Schmitt
    Signed-off-by: Jeff Kirsher

    Emil Tantilov
     
  • This change adds support for the ethtool set_channels operation.

    Since the ixgbe driver has to support DCB as well as the other modes the
    assumption I made here is that the number of channels in DCB modes refers
    to the number of queues per traffic class, not the number of queues total.

    CC: Ben Hutchings
    Signed-off-by: Alexander Duyck
    Tested-by: Phil Schmitt
    Signed-off-by: Jeff Kirsher

    Alexander Duyck
     
  • This patch adds support for the ethtool get_channels operation.

    Since the ixgbe driver has to support DCB as well as the other modes the
    assumption I made here is that the number of channels in DCB modes refers
    to the number of queues per traffic class, not the number of queues total.

    Signed-off-by: Alexander Duyck
    Reviewed-by: John Fastabend
    Tested-by: Phil Schmitt
    Signed-off-by: Jeff Kirsher

    Alexander Duyck
     
  • The ixgbe_setup_tc code is essentially the same code we need any time we have
    to update the number of queues. As such I am making it available always and
    just stripping the DCB specific bits out when DCB is disabled instead of
    stripping the entire function.

    Signed-off-by: Alexander Duyck
    Reviewed-by: John Fastabend
    Tested-by: Phil Schmitt
    Signed-off-by: Jeff Kirsher

    Alexander Duyck
     
  • This change updates the ixgbe driver to use __netdev_pick_tx instead of
    the current logic it is using to select a queue. The main result of this
    change is that ixgbe can now fully support XPS, and in the case of non-FCoE
    enabled configs it means we don't need to have our own ndo_select_queue.

    Signed-off-by: Alexander Duyck
    Reviewed-by: John Fastabend
    Tested-by: Phil Schmitt
    Signed-off-by: Jeff Kirsher

    Alexander Duyck
     
  • This change adds support for ixgbe to configure the XPS queue mapping on
    load. The result of this change is that on open we will now be resetting
    the number of Tx queues, and then setting the default configuration for XPS
    based on if ATR is enabled or disabled.

    Signed-off-by: Alexander Duyck
    Reviewed-by: John Fastabend
    Tested-by: Phil Schmitt
    Signed-off-by: Jeff Kirsher

    Alexander Duyck
     
  • Instead of adjusting the FCoE and Flow director limits based on the number
    of CPUs we can define them much sooner. This allows the user to come
    through later and adjust them once we have updated the code to support the
    set_channels ethtool operation.

    I am still allowing for FCoE and RSS queues to be separated if the number
    queues is less than the number of CPUs. This essentially treats the two
    groupings like they are two separate traffic classes.

    In addition I am changing the initialization to use the MAX_TX/RX_QUEUES
    defines instead of trying to compute the value as it will be possible in
    upcoming patches for the user to request the maximum number of queues.

    I have also updated things so that the upper limit on queues is exactly 63
    instead of allowing it to go up to 64. The reason for this change is to
    address the fact thqt the driver only supports up to 63 queue vectors since
    the hardware supports 64 MSI-X vectors, but one must be reserved for "other"
    causes.

    Signed-off-by: Alexander Duyck
    Tested-by: Phil Schmitt
    Signed-off-by: Jeff Kirsher

    Alexander Duyck
     
  • On several machines with i350 adapters the ethtool offline self-test sometimes
    fails. This happens because link auto negotiation may take longer than the
    timeout of 4 seconds. Increasing the timeout by 1 seconds resolves the issue.

    Output from a failing i350 offline self-test:
    while [ 1 ]; do ethtool -t eth2 offline; done
    The test result is PASS
    The test extra info:
    Register test (offline) 0
    Eeprom test (offline) 0
    Interrupt test (offline) 0
    Loopback test (offline) 0
    Link test (on/offline) 0

    The test result is FAIL
    The test extra info:
    Register test (offline) 0
    Eeprom test (offline) 0
    Interrupt test (offline) 0
    Loopback test (offline) 0
    Link test (on/offline) 1

    The test result is PASS
    The test extra info:
    Register test (offline) 0
    Eeprom test (offline) 0
    Interrupt test (offline) 0
    Loopback test (offline) 0
    Link test (on/offline) 0

    Signed-off-by: Stefan Assmann
    Tested-by: Aaron Brown
    Signed-off-by: Jeff Kirsher

    Stefan Assmann
     
  • This change is meant to address several race issues that become possible
    because next_to_watch could possibly be set to a value that shows that the
    descriptor is done when it is not. In order to correct that we instead make
    next_to_watch a pointer that is set to NULL during cleanup, and set to the
    eop_desc after the descriptor rings have been written.

    To enforce proper ordering the next_to_watch pointer is not set until after
    a wmb writing the values to the last descriptor in a transmit. In order to
    guarantee that the descriptor is not read until after the eop_desc we use the
    read_barrier_depends which is only really necessary on the alpha architecture.

    Signed-off-by: Alexander Duyck
    Acked-by: Greg Rose
    Tested-by: Sibai Li
    Signed-off-by: Jeff Kirsher

    Alexander Duyck
     
  • Current e1000e driver doesn't tell nothing when Link Speed is downgraded due to
    SmartSpeed. As a result, users suspect that there is something wrong with
    NIC. If the cause of it is SmartSpeed, there is no means to replace NIC. This
    patch make e1000e notify users that SmartSpeed worked.

    Signed-off-by: Koki Sanagi
    Tested-by: Aaron Brown
    Signed-off-by: Jeff Kirsher

    Koki Sanagi
     
  • Fixes whitespace issues, such as lines exceeding 80 chars, needless blank
    lines and the use of spaces where tabs are needed. In addition, fix
    multi-line comments to align with the networking standard.

    Signed-off-by: Jeff Kirsher
    Tested-by: Aaron Brown

    Jeff Kirsher
     
  • As the number of iovecs in a send request is already limited within
    UIO_MAXIOV(i.e. 1024) in __sys_sendmsg(), it's unnecessary to check it
    again in TIPC stack.

    Signed-off-by: Ying Xue
    Signed-off-by: Jon Maloy
    Signed-off-by: Paul Gortmaker

    Ying Xue
     
  • Change overload control to be purely byte-based, using
    sk->sk_rmem_alloc as byte counter, and compare it to a calculated
    upper limit for the socket receive queue.

    For all connection messages, irrespective of message importance,
    the overload limit is set to a constant value (i.e, 67MB). This
    limit should normally never be reached because of the lower
    limit used by the flow control algorithm, and is there only
    as a last resort in case a faulty peer doesn't respect the send
    window limit.

    For datagram messages, message importance is taken into account
    when calculating the overload limit. The calculation is based
    on sk->sk_rcvbuf, and is hence configurable via the socket option
    SO_RCVBUF.

    Cc: Neil Horman
    Signed-off-by: Ying Xue
    Signed-off-by: Jon Maloy
    Signed-off-by: Paul Gortmaker

    Ying Xue
     
  • The tipc function discard_rx_queue() is just a duplicated
    implementation of __skb_queue_purge(). Remove the former
    and directly invoke __skb_queue_purge().

    In doing so, the underscores convey to the code reader, more
    information about the current locking state that is assumed.

    Signed-off-by: Ying Xue
    Signed-off-by: Jon Maloy
    Signed-off-by: Paul Gortmaker

    Ying Xue
     
  • We no longer need to use mac_len, lets cleanup things.

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

    Eric Dumazet
     
  • There is no need to implement empty suspend/resume callbacks if there is nothing
    to do during suspend/resume. The drivers will behave the same with no callbacks
    or empty callbacks during suspend/resume.

    Signed-off-by: Lars-Peter Clausen
    Signed-off-by: David S. Miller

    Lars-Peter Clausen
     
  • Jeff Kirsher says:

    ====================
    This series contains updates to igb and ixgbe. Most of the changes
    are against igb, except for one patch against ixgbe.

    There are 3 igb fixes from Carolyn which were reported by Dan
    Carpenter which resolve issues found in the get_i2c_client(). Alex
    does some cleanup of the igb driver to match similar functionality
    in ixgbe on transmit. Alex also makes it so that we can enable the use
    of build_skb for cases where jumbo frames are disabled. The advantage
    to this is that we do not have to perform a memcpy to populate the header
    and as a result we see a significant performance improvement.

    Akeem provides 4 patches to initialize function pointers and do a
    re-factoring of the function pointers in igb_get_variants() to assist
    with driver debugging.

    The ixgbe patch comes from Emil to reshuffle the switch/case structure
    of the flag assignment to allow for the flags to be set for each MAC
    type separately. This is needed for new hardware that does not have feature
    parity with older hardware.

    v2: updated patches 4 & 5 based on feedback from Ben Hutchings and Eric
    Dumazet
    ====================

    Signed-off-by: David S. Miller

    David S. Miller
     
  • Following patch adds GRE protocol offload handler so that
    skb_gso_segment() can segment GRE packets.
    SKB GSO CB is added to keep track of total header length so that
    skb_segment can push entire header. e.g. in case of GRE, skb_segment
    need to push inner and outer headers to every segment.
    New NETIF_F_GRE_GSO feature is added for devices which support HW
    GRE TSO offload. Currently none of devices support it therefore GRE GSO
    always fall backs to software GSO.

    [ Compute pkt_len before ip_local_out() invocation. -DaveM ]

    Signed-off-by: Pravin B Shelar
    Signed-off-by: David S. Miller

    Pravin B Shelar
     
  • This function will be used in next GRE_GSO patch. This patch does
    not change any functionality. It only exports skb_mac_gso_segment()
    function.

    [ Use skb_reset_mac_len() -DaveM ]

    Signed-off-by: Pravin B Shelar
    Acked-by: Eric Dumazet
    Signed-off-by: David S. Miller

    Pravin B Shelar
     
  • This function will be used in next GRE_GSO patch. This patch does
    not change any functionality.

    Signed-off-by: Pravin B Shelar
    Acked-by: Eric Dumazet

    Pravin B Shelar
     
  • Signed-off-by: Michael Chan
    Signed-off-by: David S. Miller

    Michael Chan
     
  • Before the device is opened, the carrier state should be off. It
    will not race with the link interrupt if we set it before calling
    register_netdev().

    Signed-off-by: Michael Chan
    Signed-off-by: David S. Miller

    Michael Chan