23 Jul, 2010

8 commits

  • We should copy the initial value to userspace for iptables-save and
    to allow removal of specific quota rules.

    Signed-off-by: Changli Gao
    Signed-off-by: Patrick McHardy

    Changli Gao
     
  • Use per-rule spin lock to improve the scalability.

    Signed-off-by: Changli Gao
    Signed-off-by: Patrick McHardy

    Changli Gao
     
  • use arp_hdr_len().

    Signed-off-by: Changli Gao
    Signed-off-by: Patrick McHardy

    Changli Gao
     
  • proto->unique_tuple() will be called finally, if the previous calls fail. This
    patch checks the false condition of (range->flags &IP_NAT_RANGE_PROTO_RANDOM)
    instead to avoid duplicate line of code: proto->unique_tuple().

    Signed-off-by: Changli Gao
    Signed-off-by: Patrick McHardy

    Changli Gao
     
  • In some situations a CPU match permits a better spreading of
    connections, or select targets only for a given cpu.

    With Remote Packet Steering or multiqueue NIC and appropriate IRQ
    affinities, we can distribute trafic on available cpus, per session.
    (all RX packets for a given flow is handled by a given cpu)

    Some legacy applications being not SMP friendly, one way to scale a
    server is to run multiple copies of them.

    Instead of randomly choosing an instance, we can use the cpu number as a
    key so that softirq handler for a whole instance is running on a single
    cpu, maximizing cache effects in TCP/UDP stacks.

    Using NAT for example, a four ways machine might run four copies of
    server application, using a separate listening port for each instance,
    but still presenting an unique external port :

    iptables -t nat -A PREROUTING -p tcp --dport 80 -m cpu --cpu 0 \
    -j REDIRECT --to-port 8080

    iptables -t nat -A PREROUTING -p tcp --dport 80 -m cpu --cpu 1 \
    -j REDIRECT --to-port 8081

    iptables -t nat -A PREROUTING -p tcp --dport 80 -m cpu --cpu 2 \
    -j REDIRECT --to-port 8082

    iptables -t nat -A PREROUTING -p tcp --dport 80 -m cpu --cpu 3 \
    -j REDIRECT --to-port 8083

    Signed-off-by: Eric Dumazet
    Signed-off-by: Patrick McHardy

    Eric Dumazet
     
  • Use nf_conntrack/nf_nat code to do the packet mangling and the TCP
    sequence adjusting. The function 'ip_vs_skb_replace' is now dead
    code, so it is removed.

    To SNAT FTP, use something like:

    % iptables -t nat -A POSTROUTING -m ipvs --vaddr 192.168.100.30/32 \
    --vport 21 -j SNAT --to-source 192.168.10.10
    and for the data connections in passive mode:

    % iptables -t nat -A POSTROUTING -m ipvs --vaddr 192.168.100.30/32 \
    --vportctl 21 -j SNAT --to-source 192.168.10.10
    using '-m state --state RELATED' would also works.

    Make sure the kernel modules ip_vs_ftp, nf_conntrack_ftp, and
    nf_nat_ftp are loaded.

    [ up-port and minor fixes by Simon Horman ]
    Signed-off-by: Hannes Eder
    Signed-off-by: Simon Horman
    Signed-off-by: Patrick McHardy

    Hannes Eder
     
  • Update the nf_conntrack tuple in reply direction, as we will see
    traffic from the real server (RIP) to the client (CIP). Once this is
    done we can use netfilters SNAT in POSTROUTING, especially with
    xt_ipvs, to do source NAT, e.g.:

    % iptables -t nat -A POSTROUTING -m ipvs --vaddr 192.168.100.30/32 --vport 80 \
    -j SNAT --to-source 192.168.10.10

    [ minor fixes by Simon Horman ]
    Signed-off-by: Hannes Eder
    Signed-off-by: Simon Horman
    Signed-off-by: Patrick McHardy

    Hannes Eder
     
  • This implements the kernel-space side of the netfilter matcher xt_ipvs.

    [ minor fixes by Simon Horman ]
    Signed-off-by: Hannes Eder
    Signed-off-by: Simon Horman
    [ Patrick: added xt_ipvs.h to Kbuild ]
    Signed-off-by: Patrick McHardy

    Hannes Eder
     

16 Jul, 2010

1 commit


15 Jul, 2010

3 commits

  • This adds a `CHECKSUM' target, which can be used in the iptables mangle
    table.

    You can use this target to compute and fill in the checksum in
    a packet that lacks a checksum. This is particularly useful,
    if you need to work around old applications such as dhcp clients,
    that do not work well with checksum offloads, but don't want to
    disable checksum offload in your device.

    The problem happens in the field with virtualized applications.
    For reference, see Red Hat bz 605555, as well as
    http://www.spinics.net/lists/kvm/msg37660.html

    Typical expected use (helps old dhclient binary running in a VM):
    iptables -A POSTROUTING -t mangle -p udp --dport bootpc \
    -j CHECKSUM --checksum-fill

    Includes fixes by Jan Engelhardt

    Signed-off-by: Michael S. Tsirkin
    Signed-off-by: Patrick McHardy

    Michael S. Tsirkin
     
  • This patch adds the missing bits to support the recovery of TCP flows
    without disabling window tracking (aka be_liberal). To ensure a
    successful recovery, we have to inject the window scale factor via
    ctnetlink.

    This patch has been tested with a development snapshot of conntrackd
    and the new clause `TCPWindowTracking' that allows to perform strict
    TCP window tracking recovery across fail-overs.

    With this patch, we don't update the receiver's window until it's not
    initiated. We require this to perform a successful recovery. Jozsef
    confirmed in a private email that this spotted a real issue since that
    should not happen.

    Signed-off-by: Pablo Neira Ayuso
    Acked-by: Jozsef Kadlecsik
    Signed-off-by: Patrick McHardy

    Pablo Neira Ayuso
     
  • This patch moves NFULNL_COPY_PACKET definition from
    linux/netfilter/nfnetlink_log.h to net/netfilter/nfnetlink_log.h
    since this copy mode is only for internal use.

    I have also changed the value from 0x03 to 0xff. Thus, we avoid
    a gap from user-space that may confuse users if we add new
    copy modes in the future.

    This change was introduced in:
    http://www.spinics.net/lists/netfilter-devel/msg13535.html

    Since this change is not included in any stable Linux kernel,
    I think it's safe to make this change now. Anyway, this copy
    mode does not make any sense from user-space, so this patch
    should not break any existing setup.

    Signed-off-by: Pablo Neira Ayuso
    Signed-off-by: Patrick McHardy

    Pablo Neira Ayuso
     

09 Jul, 2010

2 commits


05 Jul, 2010

13 commits


03 Jul, 2010

1 commit


02 Jul, 2010

12 commits

  • Support more fine grained control of bridge netfilter iptables invocation
    by adding seperate brnf_call_*tables parameters for each device using the
    sysfs interface. Packets are passed to layer 3 netfilter when either the
    global parameter or the per bridge parameter is enabled.

    Acked-by: Stephen Hemminger
    Acked-by: David S. Miller
    Signed-off-by: Patrick McHardy

    Patrick McHardy
     
  • Both ETH_FLAG_LRO and NETIF_F_LRO have the same value, but NETIF_F_LRO
    is intended to use with netdev->features.

    Signed-off-by: Stanislaw Gruszka
    Acked-by: Don Skidmore
    Signed-off-by: Jeff Kirsher
    Signed-off-by: David S. Miller

    Stanislaw Gruszka
     
  • Add explanatory comment to avoid confusion when a pointer is set
    to the second word of an array instead of the customary cast of a
    pointer to the beginning of the array.

    Signed-off-by: Greg Rose
    Signed-off-by: Jeff Kirsher
    Signed-off-by: David S. Miller

    Greg Rose
     
  • The igb online link test was always reporting pass because instead of
    checking for if_running it was checking for netif_carrier_ok.

    This change corrects the test so that it is run if the interface is running
    instead of checking for netif carrier ok.

    Signed-off-by: Alexander Duyck
    Tested-by: Emil Tantilov
    Signed-off-by: Jeff Kirsher
    Signed-off-by: David S. Miller

    Alexander Duyck
     
  • Check the value of max_vfs at the time of assignment of vfs_allocated_count.

    The previous check in igb_probe_vfs was too late as by that time the rx/tx
    rings were initialized with the wrong offset.

    Signed-off-by: Emil Tantilov
    Tested-by: Jeff Pieper
    Signed-off-by: Jeff Kirsher
    Signed-off-by: David S. Miller

    Emil Tantilov
     
  • The 82576 expects the second rx queue in any pool to receive L2 switch
    loop back packets sent from the second tx queue in another pool. The
    82576 VF driver does not enable the second rx queue so if the PF driver
    sends packets destined to a VF from its second tx queue then the VF
    driver will never see them. In SR-IOV mode limit the number of tx queues
    used by the PF driver to one. This patch fixes a bug reported in which
    the PF cannot communciate with the VF and should be considered for 2.6.34
    stable.

    CC: stable@kernel.org
    Signed-off-by: Greg Rose
    Tested-by: Jeff Pieper
    Signed-off-by: Jeff Kirsher
    Signed-off-by: David S. Miller

    Greg Rose
     
  • 82580 NICs can have up to 4 functions. This fixes phy accesses
    to use the correct locks for functions 2 and 3.

    Signed-off-by: Nicholas Nunley
    Tested-by: Jeff Pieper
    Signed-off-by: Jeff Kirsher
    Signed-off-by: David S. Miller

    Nick Nunley
     
  • This patch removes the CONFIG_MCORE2 check from around NET_IP_ALIGN. It is
    based on a suggestion from Andi Kleen. The assumption is that there are
    not any x86 cores where unaligned access is really slow, and this change
    would allow for a performance improvement to still exist on configurations
    that are not necessarily optimized for Core 2.

    Cc: Andi Kleen
    Cc: Thomas Gleixner
    Cc: Ingo Molnar
    Cc: "H. Peter Anvin"
    Cc: x86@kernel.org
    Signed-off-by: Alexander Duyck
    Signed-off-by: Jeff Kirsher
    Acked-by: H. Peter Anvin
    Signed-off-by: David S. Miller

    Alexander Duyck
     
  • Add error checking to DMA descriptor rings initialization code.

    Signed-off-by: Denis Kirjanov
    Signed-off-by: David S. Miller

    Denis Kirjanov
     
  • be2net driver is currently not showing correct phy details in certain cases.
    This patch fixes it.

    Signed-off-by: Ajit Khaparde
    Signed-off-by: David S. Miller

    Ajit Khaparde
     
  • Since ehea_get_stats calls ehea_h_query_ehea_port, which
    can sleep, we can also sleep when allocating a page in
    this function. This fixes some memory allocation failure
    warnings seen under low memory conditions.

    Signed-off-by: Brian King
    Signed-off-by: David S. Miller

    Brian King
     
  • Conflicts:
    drivers/net/wireless/libertas/host.h

    David S. Miller