06 Jan, 2009

2 commits

  • New nodes are inserted in u32_change() under rtnl_lock() with wmb(),
    so without tcf_tree_lock() like in other classifiers (e.g. cls_fw).
    This isn't enough without rmb() on the read side, but on the other
    hand adding such barriers doesn't give any savings, so the lock is
    added instead.

    Reported-by: m0sia
    Signed-off-by: Jarek Poplawski
    Signed-off-by: David S. Miller

    Jarek Poplawski
     
  • This reverts commit 22604c866889c4b2e12b73cbf1683bda1b72a313.

    We can't fix this issue in this way, because we now can try
    to take the dev_base_lock rwlock as a writer in software interrupt
    context and that is not allowed without major surgery elsewhere.

    This initial link state problem needs to be solved in some other
    way.

    Signed-off-by: David S. Miller

    David S. Miller
     

05 Jan, 2009

1 commit

  • From: Michael Marineau

    Commit b47300168e770b60ab96c8924854c3b0eb4260eb "Do not fire linkwatch
    events until the device is registered." was made as a workaround for
    drivers that call netif_carrier_off before registering the device.
    Unfortunately this causes these drivers to incorrectly report their
    link status as IF_OPER_UNKNOWN which can falsely set the IFF_RUNNING
    flag when the interface is first brought up. This issues was
    previously pointed out[1] but was dismissed saying that IFF_RUNNING is
    not related to the link status. From my digging IFF_RUNNING, as
    reported to userspace, is based on the link state. It is set based on
    __LINK_STATE_START and IF_OPER_UP or IF_OPER_UNKNOWN. See [2], [3],
    and [4]. (Whether or not the kernel has IFF_RUNNING set in flags is
    not reported to user space so it may well be independent of the link,
    I don't know if and when it may get set.)

    The end result depends slightly depending on the driver. The the two I
    tested were e1000e and b44. With e1000e if the system is booted
    without a network cable attached the interface will falsely report
    RUNNING when it is brought up causing NetworkManager to attempt to
    start it and eventually time out. With b44 when the system is booted
    with a network cable attached and brought up with dhcpcd it will time
    out the first time.

    The attached patch that will still set the operstate variable
    correctly to IF_OPER_UP/DOWN/etc when linkwatch_fire_event is called
    but then return rather than skipping the linkwatch_fire_event call
    entirely as the previous fix did. (sorry it isn't inline, I don't have
    a patch friendly email client at the moment)

    Signed-off-by: David S. Miller

    Michael Marineau
     

30 Dec, 2008

3 commits


29 Dec, 2008

1 commit

  • * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6: (1429 commits)
    net: Allow dependancies of FDDI & Tokenring to be modular.
    igb: Fix build warning when DCA is disabled.
    net: Fix warning fallout from recent NAPI interface changes.
    gro: Fix potential use after free
    sfc: If AN is enabled, always read speed/duplex from the AN advertising bits
    sfc: When disabling the NIC, close the device rather than unregistering it
    sfc: SFT9001: Add cable diagnostics
    sfc: Add support for multiple PHY self-tests
    sfc: Merge top-level functions for self-tests
    sfc: Clean up PHY mode management in loopback self-test
    sfc: Fix unreliable link detection in some loopback modes
    sfc: Generate unique names for per-NIC workqueues
    802.3ad: use standard ethhdr instead of ad_header
    802.3ad: generalize out mac address initializer
    802.3ad: initialize ports LACPDU from const initializer
    802.3ad: remove typedef around ad_system
    802.3ad: turn ports is_individual into a bool
    802.3ad: turn ports is_enabled into a bool
    802.3ad: make ntt bool
    ixgbe: Fix set_ringparam in ixgbe to use the same memory pools.
    ...

    Fixed trivial IPv4/6 address printing conflicts in fs/cifs/connect.c due
    to the conversion to %pI (in this networking merge) and the addition of
    doing IPv6 addresses (from the earlier merge of CIFS).

    Linus Torvalds
     

25 Dec, 2008

1 commit


23 Dec, 2008

1 commit

  • While implementing a TCQ_F_THROTTLED flag there was used an smp_wmb()
    in qdisc_watchdog(), but since this flag is practically used only in
    sch_netem(), and since it's not even clear what reordering is avoided
    here (TCQ_F_THROTTLED vs. __QDISC_STATE_SCHED?) it seems the barrier
    could be safely removed.

    Signed-off-by: Jarek Poplawski
    Signed-off-by: David S. Miller

    Jarek Poplawski
     

22 Dec, 2008

1 commit


16 Dec, 2008

1 commit


15 Dec, 2008

1 commit


10 Dec, 2008

2 commits


04 Dec, 2008

6 commits


28 Nov, 2008

1 commit

  • Impact: make global function static

    Fix the following sparse warning:

    net/sched/sch_api.c:192:14: warning: symbol 'qdisc_match_from_root' was not declared. Should it be static?

    Signed-off-by: Hannes Eder
    Signed-off-by: David S. Miller

    Hannes Eder
     

27 Nov, 2008

1 commit

  • Since all other gen_estimator functions use bstats and rate_est params
    together, and searching for them is optimized now, let's use this also
    in gen_estimator_active(). The return type of gen_estimator_active()
    is changed to bool, and gen_find_node() parameters to const, btw.

    In tcf_act_police_locate() a check for ACT_P_CREATED is added before
    calling gen_estimator_active().

    Signed-off-by: Jarek Poplawski
    Signed-off-by: David S. Miller

    Jarek Poplawski
     

26 Nov, 2008

5 commits


25 Nov, 2008

1 commit

  • Jarek Poplawski points out:

    If all child qdiscs of sch_drr are non-work-conserving (e.g. sch_tbf)
    drr_dequeue() will busy-loop waiting for skbs instead of leaving the
    job for a watchdog. Checking for list_empty() in each loop isn't
    necessary either, because this can never be true except the first time.

    Using non-work-conserving qdiscs as children of DRR makes no sense,
    simply bail out in that case.

    Reported-by: Jarek Poplawski
    Signed-off-by: Patrick McHardy
    Signed-off-by: David S. Miller

    Patrick McHardy
     

21 Nov, 2008

2 commits


20 Nov, 2008

6 commits

  • The use of xchg() hasn't been necessary since 2.2.something when proper
    locking was added to packet schedulers. In the case of classifiers they
    mostly weren't even necessary before that since they're mainly used
    to assign a NULL pointer to the filter root in the ->destroy path;
    the root is destroyed immediately after that.

    Signed-off-by: Patrick McHardy
    Signed-off-by: David S. Miller

    Patrick McHardy
     
  • The use of xchg() hasn't been necessary since 2.2.something when proper
    locking was added to packet schedulers.

    Signed-off-by: Patrick McHardy
    Signed-off-by: David S. Miller

    Patrick McHardy
     
  • Add classful DRR scheduler as a more flexible replacement for SFQ.

    The main difference to the algorithm described in "Efficient Fair Queueing
    using Deficit Round Robin" is that this implementation doesn't drop packets
    from the longest queue on overrun because its classful and limits are
    handled by each individual child qdisc.

    Signed-off-by: Patrick McHardy
    Signed-off-by: David S. Miller

    Patrick McHardy
     
  • nla_nest_start() might return NULL, causing a NULL pointer dereference.

    Signed-off-by: Patrick McHardy
    Signed-off-by: David S. Miller

    Patrick McHardy
     
  • This patch changes the network device internal API to move adminstrative
    operations out of the network device structure and into a separate structure.

    This patch involves some hackery to maintain compatablity between the
    new and old model, so all 300+ drivers don't have to be changed at once.
    For drivers that aren't converted yet, the netdevice_ops virt function list
    still resides in the net_device structure. For old protocols, the new
    net_device_ops are copied out to the old net_device pointers.

    After the transistion is completed the nag message can be changed to
    an WARN_ON, and the compatiablity code can be made configurable.

    Some function pointers aren't moved:
    * destructor can't be in net_device_ops because
    it may need to be referenced after the module is unloaded.
    * neighbor setup is manipulated in a couple of places that need special
    consideration
    * hard_start_xmit is in the fast path for transmit.

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

    Stephen Hemminger
     
  • Several device drivers try to do things like netif_carrier_off()
    before register_netdev() is invoked. This is bogus, but too many
    drivers do this to fix them all up in one go.

    Reported-by: Folkert van Heusden
    Signed-off-by: David S. Miller

    David S. Miller
     

17 Nov, 2008

1 commit


14 Nov, 2008

2 commits

  • After implementing qdisc->ops->peek() and changing sch_netem into
    classless qdisc there are no more qdisc->ops->requeue() users. This
    patch removes this method with its wrappers (qdisc_requeue()), and
    also unused qdisc->requeue structure. There are a few minor fixes of
    warnings (htb_enqueue()) and comments btw.

    The idea to kill ->requeue() and a similar patch were first developed
    by David S. Miller.

    Signed-off-by: Jarek Poplawski
    Signed-off-by: David S. Miller

    Jarek Poplawski
     
  • Attach creds to file structs and discard f_uid/f_gid.

    file_operations::open() methods (such as hppfs_open()) should use file->f_cred
    rather than current_cred(). At the moment file->f_cred will be current_cred()
    at this point.

    Signed-off-by: David Howells
    Reviewed-by: James Morris
    Signed-off-by: James Morris

    David Howells
     

08 Nov, 2008

1 commit

  • The classifier should cover the most common use case and will work
    without any special configuration.

    The principle of the classifier is to directly access the
    task_struct via get_current(). In order for this to work,
    classification requests from softirqs must be ignored. This is
    not a problem because the vast majority of packets in softirq
    context are not assigned to a task anyway. For this to work, a
    mechanism is needed to trace softirq context.

    This repost goes back to the method of relying on the number of
    nested bh disable calls for the sake of not adding too much
    complexity and the option to come up with something more reliable
    if actually needed.

    Signed-off-by: Thomas Graf
    Signed-off-by: David S. Miller

    Thomas Graf