1. 20 10月, 2011 7 次提交
    • E
      sysfs: Implement support for tagged files in sysfs. · 487505c2
      Eric W. Biederman 提交于
      Looking up files in sysfs is hard to understand and analyize because we
      currently allow placing untagged files in tagged directories.  In the
      implementation of that we have two subtly different meanings of NULL.
      NULL meaning there is no tag on a directory entry and NULL meaning
      we don't care which namespace the lookup is performed for.  This
      multiple uses of NULL have resulted in subtle bugs (since fixed)
      in the code.
      
      Currently it is only the bonding driver that needs to have an untagged
      file in a tagged directory.
      
      To untagle this mess I am adding support for tagged files to sysfs.
      Modifying the bonding driver to implement bonding_masters as a tagged
      file.  Registering bonding_masters once for each network namespace.
      Then I am removing support for untagged entries in tagged sysfs
      directories.
      
      Resulting in code that is much easier to reason about.
      Signed-off-by: NEric W. Biederman <ebiederm@xmission.com>
      Acked-by: NGreg Kroah-Hartman <gregkh@suse.de>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      487505c2
    • F
      bonding: fix wrong port enabling in 802.3ad · d5edf290
      Flavio Leitner 提交于
      The port shouldn't be enabled unless its current MUX
      state is DISTRIBUTING which is correctly handled by
      ad_mux_machine(), otherwise the packet sent can be
      lost because the other end may not be ready.
      
      The issue happens on every port initialization, but
      as the ports are expected to move quickly to DISTRIBUTING,
      it doesn't cause much problem.  However, it does cause
      constant packet loss if the other peer has the port
      configured to stay in STANDBY (i.e. SYNC set to OFF).
      Signed-off-by: NFlavio Leitner <fbl@redhat.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      d5edf290
    • R
      net: validate HWTSTAMP ioctl parameters · 4dc360c5
      Richard Cochran 提交于
      This patch adds a sanity check on the values provided by user space for
      the hardware time stamping configuration. If the values lie outside of
      the absolute limits, then the ioctl request will be denied.
      Signed-off-by: NRichard Cochran <richard.cochran@omicron.at>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      4dc360c5
    • E
      net: Move rcu_barrier from rollback_registered_many to netdev_run_todo. · 850a545b
      Eric W. Biederman 提交于
      This patch moves the rcu_barrier from rollback_registered_many
      (inside the rtnl_lock) into netdev_run_todo (just outside the rtnl_lock).
      This allows us to gain the full benefit of sychronize_net calling
      synchronize_rcu_expedited when the rtnl_lock is held.
      
      The rcu_barrier in rollback_registered_many was originally a synchronize_net
      but was promoted to be a rcu_barrier() when it was found that people were
      unnecessarily hitting the 250ms wait in netdev_wait_allrefs().  Changing
      the rcu_barrier back to a synchronize_net is therefore safe.
      
      Since we only care about waiting for the rcu callbacks before we get
      to netdev_wait_allrefs() it is also safe to move the wait into
      netdev_run_todo.
      
      This was tested by creating and destroying 1000 tap devices and observing
      /proc/lock_stat.  /proc/lock_stat reports this change reduces the hold
      times of the rtnl_lock by a factor of 10.  There was no observable
      difference in the amount of time it takes to destroy a network device.
      Signed-off-by: NEric W. Biederman <ebiederm@xmission.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      850a545b
    • E
      tcp: use TCP_INIT_CWND in tcp_fixup_sndbuf() · 06a59ecb
      Eric Dumazet 提交于
      Initial cwnd being 10 (TCP_INIT_CWND) instead of 3, change
      tcp_fixup_sndbuf() to get more than 16384 bytes (sysctl_tcp_wmem[1]) in
      initial sk_sndbuf
      Signed-off-by: NEric Dumazet <eric.dumazet@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      06a59ecb
    • A
      phylib: Modify Vitesse RGMII skew settings · fddf86fc
      Andy Fleming 提交于
      The Vitesse driver was using the RGMII_ID interface type to determine if
      skew was necessary.  However, we want to move away from using that
      interface type, as it's really a property of the board's PHY connection.
      However, some boards depend on it, so we want to support it, while
      allowing new boards to use the more flexible "fixups" approach.  To do
      this, we extract the code which adds skew into its own function, and
      call that function when RGMII_ID has been selected.
      
      Another side-effect of this change is that if your PHY has skew set
      already, it doesn't clear it.  This way, the fixup code can modify the
      register without config_init then clearing it.
      Signed-off-by: NAndy Fleming <afleming@freescale.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      fddf86fc
    • A
      net: Allow skb_recycle_check to be done in stages · 3d153a7c
      Andy Fleming 提交于
      skb_recycle_check resets the skb if it's eligible for recycling.
      However, there are times when a driver might want to optionally
      manipulate the skb data with the skb before resetting the skb,
      but after it has determined eligibility.  We do this by splitting the
      eligibility check from the skb reset, creating two inline functions to
      accomplish that task.
      Signed-off-by: NAndy Fleming <afleming@freescale.com>
      Acked-by: NDavid Daney <david.daney@cavium.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      3d153a7c
  2. 19 10月, 2011 24 次提交
  3. 18 10月, 2011 9 次提交