Netdev List
 help / color / mirror / Atom feed
* Re: [PATCH v2] Add Qualcomm Gobi 2000 driver.
From: Matthew Garrett @ 2010-10-08 18:03 UTC (permalink / raw)
  To: David Miller; +Cc: ellyjones, netdev, jglasgow, msb, olofj
In-Reply-To: <20101008.102803.104075511.davem@davemloft.net>

On Fri, Oct 08, 2010 at 10:28:03AM -0700, David Miller wrote:

> I've looked at the gobi_loader code and it's simpler than many
> of the gigabit ethernet driver firmware loader sequences in
> the tree already.
> 
> Requiring udev et al. magic only makes this networking device
> that much harder to use from an initrd.
> 
> I understand how this might be a bit clumsy since we'd need to make a
> dependency on the serial device since that is the mechanism by which
> the firmware is uploaded, but really I'd like you to consider it
> seriously.

The device is capable of functioning in either UMTS or CDMA modes, and 
requires different firmware for each. Further, there's separate firmware 
images per carrier due to regulatory differences. To make things even 
more complicated, there's no consistency in the naming of the firmware 
(and we can't fix that, because the firmware is undistributable). The 
only way to do this in-kernel would seem to be to have a module 
parameter to pass a firmware name, which really doesn't seem elegant.

-- 
Matthew Garrett | mjg59@srcf.ucam.org

^ permalink raw reply

* Re: [PATCH v2] Add Qualcomm Gobi 2000 driver.
From: David Miller @ 2010-10-08 18:14 UTC (permalink / raw)
  To: mjg59; +Cc: ellyjones, netdev, jglasgow, msb, olofj
In-Reply-To: <20101008180310.GA27126@srcf.ucam.org>

From: Matthew Garrett <mjg59@srcf.ucam.org>
Date: Fri, 8 Oct 2010 19:03:10 +0100

> On Fri, Oct 08, 2010 at 10:28:03AM -0700, David Miller wrote:
> 
>> I've looked at the gobi_loader code and it's simpler than many
>> of the gigabit ethernet driver firmware loader sequences in
>> the tree already.
>> 
>> Requiring udev et al. magic only makes this networking device
>> that much harder to use from an initrd.
>> 
>> I understand how this might be a bit clumsy since we'd need to make a
>> dependency on the serial device since that is the mechanism by which
>> the firmware is uploaded, but really I'd like you to consider it
>> seriously.
> 
> The device is capable of functioning in either UMTS or CDMA modes, and 
> requires different firmware for each. Further, there's separate firmware 
> images per carrier due to regulatory differences. To make things even 
> more complicated, there's no consistency in the naming of the firmware 
> (and we can't fix that, because the firmware is undistributable). The 
> only way to do this in-kernel would seem to be to have a module 
> parameter to pass a firmware name, which really doesn't seem elegant.

I don't think we want a driver in the tree for a device for which the
firmware isn't even distributable.

^ permalink raw reply

* Re: [PATCH v2] Add Qualcomm Gobi 2000 driver.
From: Matthew Garrett @ 2010-10-08 18:18 UTC (permalink / raw)
  To: David Miller; +Cc: ellyjones, netdev, jglasgow, msb, olofj
In-Reply-To: <20101008.111406.246542521.davem@davemloft.net>

On Fri, Oct 08, 2010 at 11:14:06AM -0700, David Miller wrote:

> I don't think we want a driver in the tree for a device for which the
> firmware isn't even distributable.

Greg didn't seem to think this was a problem when he merged the serial 
driver.

-- 
Matthew Garrett | mjg59@srcf.ucam.org

^ permalink raw reply

* Re: [PATCH v2] Add Qualcomm Gobi 2000 driver.
From: David Miller @ 2010-10-08 18:50 UTC (permalink / raw)
  To: mjg59; +Cc: ellyjones, netdev, jglasgow, msb, olofj
In-Reply-To: <20101008181851.GA27756@srcf.ucam.org>

From: Matthew Garrett <mjg59@srcf.ucam.org>
Date: Fri, 8 Oct 2010 19:18:51 +0100

> On Fri, Oct 08, 2010 at 11:14:06AM -0700, David Miller wrote:
> 
>> I don't think we want a driver in the tree for a device for which the
>> firmware isn't even distributable.
> 
> Greg didn't seem to think this was a problem when he merged the serial 
> driver.

That's Greg's problem.

I don't see how any distribution can properly support this device
if it cannot work without non-distributable firmware.

^ permalink raw reply

* Re: [PATCH 4/5] rds: stop including asm-generic/bitops/le.h directly
From: Andy Grover @ 2010-10-08 18:55 UTC (permalink / raw)
  To: Akinobu Mita
  Cc: linux-kernel, linux-arch, Arnd Bergmann, Andrew Morton, rds-devel,
	David S. Miller, netdev
In-Reply-To: <1286532193-29814-4-git-send-email-akinobu.mita@gmail.com>

On 10/08/2010 03:03 AM, Akinobu Mita wrote:
> asm-generic/bitops/le.h is only intended to be included directly from
> asm-generic/bitops/ext2-non-atomic.h or asm-generic/bitops/minix-le.h
> which implements generic ext2 or minix bit operations.
>
> This stops including asm-generic/bitops/le.h directly and use ext2
> non-atomic bit operations instead.
>
> An alternative approach is introducing little endian bit operations
> in linux/bitops.h. But it needs to touch more files than this change does.

> -	generic___set_le_bit(off, (void *)map->m_page_addrs[i]);
> +	ext2_set_bit(off, (void *)map->m_page_addrs[i]);

I'd like a solution that doesn't have rds calling a function starting 
with ext2_. Seems wrong.

Thanks -- Regards -- Andy

^ permalink raw reply

* Re: [PATCH 4/5] rds: stop including asm-generic/bitops/le.h directly
From: David Miller @ 2010-10-08 18:59 UTC (permalink / raw)
  To: andy.grover
  Cc: akinobu.mita, linux-kernel, linux-arch, arnd, akpm, rds-devel,
	netdev
In-Reply-To: <4CAF693B.9030706@oracle.com>

From: Andy Grover <andy.grover@oracle.com>
Date: Fri, 08 Oct 2010 11:55:55 -0700

> On 10/08/2010 03:03 AM, Akinobu Mita wrote:
>> asm-generic/bitops/le.h is only intended to be included directly from
>> asm-generic/bitops/ext2-non-atomic.h or asm-generic/bitops/minix-le.h
>> which implements generic ext2 or minix bit operations.
>>
>> This stops including asm-generic/bitops/le.h directly and use ext2
>> non-atomic bit operations instead.
>>
>> An alternative approach is introducing little endian bit operations
>> in linux/bitops.h. But it needs to touch more files than this change
>> does.
> 
>> -	generic___set_le_bit(off, (void *)map->m_page_addrs[i]);
>> +	ext2_set_bit(off, (void *)map->m_page_addrs[i]);
> 
> I'd like a solution that doesn't have rds calling a function starting
> with ext2_. Seems wrong.

Agreed.

^ permalink raw reply

* [PATCH] Tarpit target for the last stable (2.6.35.7): right version
From: Nicola @ 2010-10-08 19:01 UTC (permalink / raw)
  To: netfilter-devel, netdev

[Sorry for the inconvenience: I just noticed that Gmail has a bad 
formatting. I resend the patch hoping that now things are right.]

Kernel module to capture and hold incoming TCP connections sending a
zero window packet to slow down the worm action.
More informations and newer version at:
http://npadovano.altervista.org/tarpit.html (or in the source code
comments)
Below you can find the patch and the relative userspace library
(compile it and put the .so output in /lib/xtables)


----tarpit-2.6.35.7.patch----
diff -rupN linux-2.6.35.7.orig/drivers/char/random.c 
linux-2.6.35.7/drivers/char/random.c
--- linux-2.6.35.7.orig/drivers/char/random.c    2010-09-29 
03:09:08.000000000 +0200
+++ linux-2.6.35.7/drivers/char/random.c    2010-10-08 
02:51:35.000000000 +0200
@@ -1514,6 +1514,8 @@ __u32 secure_ip_id(__be32 daddr)
      return half_md4_transform(hash, keyptr->secret);
  }

+EXPORT_SYMBOL(secure_ip_id);
+
  #ifdef CONFIG_INET

  __u32 secure_tcp_sequence_number(__be32 saddr, __be32 daddr,
@@ -1551,6 +1553,8 @@ __u32 secure_tcp_sequence_number(__be32
      return seq;
  }

+EXPORT_SYMBOL(secure_tcp_sequence_number);
+
  /* Generate secure starting point for ephemeral IPV4 transport port 
search */
  u32 secure_ipv4_port_ephemeral(__be32 saddr, __be32 daddr, __be16 dport)
  {
diff -rupN linux-2.6.35.7.orig/net/netfilter/Kconfig 
linux-2.6.35.7/net/netfilter/Kconfig
--- linux-2.6.35.7.orig/net/netfilter/Kconfig    2010-09-29 
03:09:08.000000000 +0200
+++ linux-2.6.35.7/net/netfilter/Kconfig    2010-10-08 
12:51:07.000000000 +0200
@@ -548,6 +548,32 @@ config NETFILTER_XT_TARGET_SECMARK

        To compile it as a module, choose M here.  If unsure, say N.

+config NETFILTER_XT_TARGET_TARPIT
+    tristate '"TARPIT" target support'
+    depends on NETFILTER_XTABLES
+    default m if NETFILTER_ADVANCED=n
+    ---help---
+      Adds a TARPIT target to iptables, which captures and holds
+      incoming TCP connections using no local per-connection resources.
+      Connections are accepted, but immediately switched to the persist
+      state (0 byte window), in which the remote side stops sending data
+      and asks to continue every 60-240 seconds (with a probe packet).
+      Attempts to close the connection are ignored, forcing the remote
+      side to time out the connection in 12-24 minutes. Any TCP port that
+      you would normally DROP or REJECT can instead become a tarpit.
+      Example:
+
+      1) iptables -A INPUT -p tcp --dport 1111 -j TARPIT
+      2) iptables -A FORWARD -p tcp -s x.y.z.k --dport 1111 -j TARPIT
+
+       In the first example all the incoming TCP packets sent to the port
+      1111 will be tarpitted. In the second one, we're tarpitting all the
+      forwarded packets sent to the host x.y.z.k on the port 1111.
+
+         You can find more informations and newer versions at:
+ <http://npadovano.altervista.org/tarpit.html>. Reporting bugs and
+      improvements are welcome.
+
  config NETFILTER_XT_TARGET_TCPMSS
      tristate '"TCPMSS" target support'
      depends on (IPV6 || IPV6=n)
diff -rupN linux-2.6.35.7.orig/net/netfilter/Makefile 
linux-2.6.35.7/net/netfilter/Makefile
--- linux-2.6.35.7.orig/net/netfilter/Makefile    2010-09-29 
03:09:08.000000000 +0200
+++ linux-2.6.35.7/net/netfilter/Makefile    2010-10-08 
02:53:44.000000000 +0200
@@ -56,6 +56,7 @@ obj-$(CONFIG_NETFILTER_XT_TARGET_NFQUEUE
  obj-$(CONFIG_NETFILTER_XT_TARGET_NOTRACK) += xt_NOTRACK.o
  obj-$(CONFIG_NETFILTER_XT_TARGET_RATEEST) += xt_RATEEST.o
  obj-$(CONFIG_NETFILTER_XT_TARGET_SECMARK) += xt_SECMARK.o
+obj-$(CONFIG_NETFILTER_XT_TARGET_TARPIT) += xt_TARPIT.o
  obj-$(CONFIG_NETFILTER_XT_TARGET_TPROXY) += xt_TPROXY.o
  obj-$(CONFIG_NETFILTER_XT_TARGET_TCPMSS) += xt_TCPMSS.o
  obj-$(CONFIG_NETFILTER_XT_TARGET_TCPOPTSTRIP) += xt_TCPOPTSTRIP.o
diff -rupN linux-2.6.35.7.orig/net/netfilter/xt_TARPIT.c 
linux-2.6.35.7/net/netfilter/xt_TARPIT.c
--- linux-2.6.35.7.orig/net/netfilter/xt_TARPIT.c    1970-01-01 
01:00:00.000000000 +0100
+++ linux-2.6.35.7/net/netfilter/xt_TARPIT.c    2010-10-08 
13:27:54.000000000 +0200
@@ -0,0 +1,304 @@
+/*
+ * Kernel module to capture and hold incoming TCP connections using
+ * no local per-connection resources.
+ *
+ * Based on ipt_REJECT.c and offering functionality similar to
+ * LaBrea <http://labrea.sourceforge.net/>.
+ *
+ * Original idea of:
+ *     Aaron Hopkins, <tools@die.net>
+ *
+ * Version 2.6.35.7 kernel release, written by:
+ *     Nicola Padovano, <nicola.padovano@gmail.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ *
+ * Goal:
+ * - Allow incoming TCP connections to be established.
+ * - Passing data should result in the connection being switched to the
+ *   persist state (0 byte window), in which the remote side stops sending
+ *   data and asks to continue every 60-240 seconds.
+ * - Prevent spoofing (don't allow the victim to connect with server worm)
+ * - Attempts to shut down the connection should be ignored completely, so
+ *   the remote side ends up having to time it out.
+ *
+ * This means:
+ * - Reply to TCP SYN,!ACK,!RST,!FIN with SYN-ACK, window 5 bytes
+ * - Reply to TCP !SYN,!RST,!FIN with ACK, window 0 bytes, rate-limited
+ * - Reply to TCP SYN,ACK,!RST,!FIN with RST to prevent spoofing
+ * - No reply to TCP RST or FIN
+ *
+ * More informations and newer versions at:
+ * <http://npadovano.altervista.com/tarpit.html>
+ */
+
+#include <linux/version.h>
+#include <linux/module.h>
+#include <linux/skbuff.h>
+#include <linux/ip.h>
+#include <net/ip.h>
+#include <net/tcp.h>
+#include <net/icmp.h>
+#include <net/route.h>
+#include <linux/random.h>
+#include <linux/netfilter_ipv4/ip_tables.h>
+
+
+MODULE_DESCRIPTION("TARPIT iptables target, info at: "
+ "http://npadovano.altervista.org/tarpit.html");
+MODULE_AUTHOR("Nicola Padovano <nicola.padovano@gmail.com>");
+MODULE_LICENSE("GPL");
+MODULE_ALIAS("xt_TARPIT");
+
+/*
+ * send a packet (to L2 output processing function)
+ *
+ * Note: there is also rtable* argument: it's only
+ *       used for debugging reason. Delete it if
+ *       you're sure things work.
+ */
+static int ip_direct_send(struct sk_buff* skb)
+{
+  /* get skb dst_entry pointer */
+  struct dst_entry* dst = skb_dst(skb);
+
+  /* if we already sent a packet to our neighbour */
+  if (dst->hh != NULL)
+    return neigh_hh_output(dst->hh,skb);
+
+  /* if there isn't header cache, send our packet with simple output 
function */
+  else if (dst->neighbour != NULL)
+    return dst->neighbour->output(skb);
+
+  /* no neighbour, no header cache: it's impossible send the packet */
+  if (net_ratelimit())
+    printk(KERN_DEBUG "TARPIT> ip_direct_send: no neighbour, no header 
cache\n");
+
+  kfree_skb(skb);
+
+  return -EINVAL;
+}
+
+/*
+ * tarpit service routine: it accepts a pointer to
+ * sk_buff (the received packet) and its (input)
+ * cache entry.
+ * Note: the received packet it's called "old" in
+ *       the comments below. The packet to send
+ *       it's called "new".
+ */
+static void tarpit_tcp(const struct sk_buff *oskb,
+               struct rtable *ort)
+{
+  struct iphdr    *oiph;             /* old ip header pointer */
+  struct tcphdr   *otcph;            /* old tcp header pointer */
+  unsigned int    oiphlen;           /* old ip header len */
+  unsigned int    otcplen;           /* old tcp (payload + header) len */
+
+  struct sk_buff  *nskb;             /* new skb buffer */
+  struct iphdr    *niph;             /* new ip header pointer */
+  struct tcphdr   *ntcph;            /* new tcp header pointer */
+  struct rtable   *nrt;              /* new routing table */
+
+  struct flowi fl = {};              /* search key used for the cache 
lookups */
+
+  u_int32_t tmp32;                   /* swapping variables*/
+  u_int16_t tmp16;
+
+  /* fill old structs */
+  oiph    = ip_hdr(oskb);            /* get old ip header pointer */
+  oiphlen = ip_hdrlen(oskb);
+  otcph   = (void*)oiph + oiphlen;   /* do not use 
skb_transport_header! */
+  otcplen = oskb->len - oiphlen;
+
+  /* packets to drop */
+  if ( (oskb->len < oiphlen + sizeof(struct tcphdr)) 
||                   /* truncate tcp header: 1st too fragmented packet...*/
+       (otcph->fin || otcph->rst) 
||                                      /* RST or FIN packet*/
+       (!otcph->ack && !otcph->syn) 
||                                    /* !ACK,!SYN packet */
+       (tcp_v4_check(otcplen, oiph->saddr, 
oiph->daddr,                   /* bad tcp checksum e ip checksum */
+            csum_partial((char *)otcph, otcplen, 0))) ||
+       (oiph->frag_off & htons(IP_OFFSET)) 
||                             /* fragment packets (after the first one) */
+       (!otcph->syn && otcph->ack && !xrlim_allow(&ort->u.dst,HZ)) 
||     /* rate-limit answer to SYN,ACK packets */
+       (ort == NULL) 
||                                                   /* check for an 
input routing cache entry */
+       (oskb->pkt_type != PACKET_HOST 
&&                                  /* no replies to physical 
multi/broadcast */
+        oskb->pkt_type != PACKET_OTHERHOST) ||
+       (ort->rt_flags & (RTCF_BROADCAST | RTCF_MULTICAST)) 
)             /* check IP multi/broadcast */
+    return;
+
+
+  if (!(nskb = skb_copy(oskb, GFP_ATOMIC)))      /* we start with a 
yet-prepared buffer */
+    return;                                      /* return if there's 
an error in copy */
+
+  /* This packet will not be the same as the other: clear nf fields */
+  nf_conntrack_put(nskb->nfct);
+  nskb->nfct = NULL;
+#ifdef CONFIG_NETFILTER_DEBUG
+  nskb->nf_debug = 0;
+#endif
+
+  skb_trim(nskb, ip_hdrlen(nskb) + sizeof(struct tcphdr));     /* trim 
skb size to IP LEN + TCP LEN*/
+  niph  = (struct iphdr*)skb_network_header(nskb);
+  ntcph = (void*)niph + ip_hdrlen(nskb);
+
+  /* set new ip header */
+  tmp32          = niph->saddr;
+  niph->saddr    = niph->daddr;
+  niph->daddr    = tmp32;
+
+  niph->tot_len  = htons(nskb->len);
+  niph->id       = htons(secure_ip_id(niph->daddr));
+
+  niph->frag_off = htons(IP_DF);            /* set don't frag flag */
+  niph->ttl      = (u32)64;
+
+  niph->check    = 0;
+  niph->check    = ip_fast_csum((unsigned char*)niph ,niph->ihl);
+
+  /* set new tcp header */
+  tmp16         = ntcph->source;
+  ntcph->source = ntcph->dest;
+  ntcph->dest   = tmp16;
+
+  ntcph->doff   = sizeof(struct tcphdr)/4;    /* 20bytes, doff is a 
4bit variable */
+
+  ((u_int8_t*)ntcph)[13] = 0;                 /* reset all flag */
+  ntcph->urg_ptr = 0;
+
+   /* 1st goal: new tcp connection */
+  if (otcph->syn && !otcph->ack)
+    {
+      ntcph->syn = 1;
+      ntcph->ack = 1;
+      ntcph->seq = htonl(secure_tcp_sequence_number(niph->saddr,
+                            niph->daddr,
+                            ntcph->source,
+                            ntcph->dest));
+      ntcph->ack_seq = htonl(ntohl(otcph->seq) + 1);
+      ntcph->window = htons(5);
+    }
+
+  /* 2nd goal: RST tcp: RST+ACK */
+  else if (otcph->syn && otcph->ack)
+    {
+      ntcph->syn = 0;
+      ntcph->ack = 1;
+      ntcph->rst = 1;
+
+      ntcph->seq = otcph->ack_seq;
+      ntcph->ack_seq = 0;
+    }
+
+  /* 3rd goal: 0 byte window */
+  else if (!otcph->syn && otcph->ack)
+    {
+      ntcph->syn = 0;
+      ntcph->ack = 1;
+      ntcph->window = 0;
+      ntcph->seq = otcph->ack_seq;
+      ntcph->ack_seq = otcph->seq;   /* it's saying: "i'm not received 
anything" */
+    }
+  else                               /* unacknowledged packet: drop it*/
+    return;
+
+  ntcph->check = 0;
+  ntcph->check = tcp_v4_check(sizeof(struct tcphdr),
+                  niph->saddr,
+                  niph->daddr,
+                  csum_partial((char *)ntcph,
+                  sizeof(struct tcphdr), 0));
+
+
+  /* create a search key to find packet route in cache*/
+  fl.nl_u.ip4_u.daddr = niph->daddr;
+  fl.nl_u.ip4_u.saddr = 0;
+  fl.nl_u.ip4_u.tos = RT_TOS(niph->tos) | RTO_CONN;
+  fl.oif = 0;
+
+  if (ip_route_output_key(&init_net, &nrt, &fl))             /* fill 
nrt struct */
+    goto free_nskb;                                          /* exit if 
errors in filling*/
+
+  dst_release(skb_dst(nskb));
+  nskb->_skb_refdst = ((unsigned long)&(nrt->u.dst));
+
+  ip_direct_send(nskb);                                      /* send 
the packet */
+
+  return;
+
+ free_nskb:
+  kfree_skb(nskb);
+}
+
+
+/*
+ * target function, called everyone the rule is satisfied
+ * standard behaviour: NF_DROP
+ */
+static unsigned int xt_tarpit_target(struct sk_buff *skb,
+                                     const struct xt_target_param *par)
+{
+  struct rtable *rt = (void *)skb->_skb_refdst;
+  tarpit_tcp(skb,rt);
+  return NF_DROP;
+}
+
+/*
+ * xt_tarpit_check allows only:
+ * 1. raw table & PRE_ROUTING hook or
+ * 2. filter table & (LOCAL_IN or FORWARD) hook
+ * Note: for new kernels version: returns _false_
+ *       if checking is OK, otherwise returns _true_
+ */
+static bool xt_tarpit_check(const struct xt_mtchk_param *par)
+{
+  if (!strcmp(par->table, "raw") &&
+      par->hook_mask == NF_INET_PRE_ROUTING)
+    return false;
+
+  if (strcmp(par->table, "filter"))
+    return true;
+
+  return (par->hook_mask &  ~((1 << NF_INET_LOCAL_IN) |
+                          (1 << NF_INET_FORWARD)));
+}
+
+
+static struct xt_target xt_tar_reg = {
+  .name       = "TARPIT",            /* target name */
+  .family     = AF_INET,             /* level 3 protocol */
+  .proto      = IPPROTO_TCP,         /* we recognize only tcp protocol */
+  .target     = xt_tarpit_target,    /* pointer to target function */
+  .checkentry = xt_tarpit_check,     /* pointer to check-entry function */
+  .me         = THIS_MODULE,
+};
+
+/*
+ * initing module function
+ */
+static int __init xt_tarpit_init(void)
+{
+  return xt_register_target(&xt_tar_reg);
+}
+
+/*
+ * delete module
+ */
+static void __exit xt_tarpit_exit(void)
+{
+  xt_unregister_target(&xt_tar_reg);
+}
+
+module_init(xt_tarpit_init);
+module_exit(xt_tarpit_exit);


----libxt_TARPIT.c----
#include <stdio.h>
#include <getopt.h>
#include <xtables.h>

static void tarpit_tg_help(void)
{
        printf("TARPIT takes no options\n\n");
}

static int tarpit_tg_parse(int c, char **argv, int invert, unsigned int 
*flags,
                           const void *entry, struct xt_entry_target 
**target)
{
        return 0;
}

static void tarpit_tg_check(unsigned int flags)
{
}

static struct xtables_target tarpit_tg_reg = {
        .version       = XTABLES_VERSION,
        .name          = "TARPIT",
        .family        = AF_INET,
        .help          = tarpit_tg_help,
        .parse         = tarpit_tg_parse,
        .final_check   = tarpit_tg_check,
};

static __attribute__((constructor)) void tarpit_tg_ldr(void)
{
        xtables_register_target(&tarpit_tg_reg);
}

^ permalink raw reply

* Re: [PATCH v2] Add Qualcomm Gobi 2000 driver.
From: David Miller @ 2010-10-08 19:02 UTC (permalink / raw)
  To: jglasgow; +Cc: mjg59, ellyjones, netdev, msb, olofj
In-Reply-To: <AANLkTimbpPZt4FSeHDNcfuoYeKDYtV2YsLPxP-2ngELO@mail.gmail.com>

From: Jason Glasgow <jglasgow@google.com>
Date: Fri, 8 Oct 2010 11:59:19 -0700

> Firmware is available in Windows packages.  For example,
> 
> DW5620 Mobile Broadband mini-card
> http://support.dell.com/support/downloads/download.aspx?c=us&cs=2684&l=en&s=pub&releaseid=R275082&SystemID=Lat_13&servicetag=4PLG5L1&os=W732&osl=en&deviceid=21977&devlib=0&typecnt=0&vercnt=2&catid=-1&impid=-1&formatcnt=0&libid=20&typeid=-1&dateid=-1&formatid=-1&source=-1&fileid=406043
> 
> <http://support.dell.com/support/downloads/download.aspx?c=us&cs=2684&l=en&s=pub&releaseid=R275082&SystemID=Lat_13&servicetag=4PLG5L1&os=W732&osl=en&deviceid=21977&devlib=0&typecnt=0&vercnt=2&catid=-1&impid=-1&formatcnt=0&libid=20&typeid=-1&dateid=-1&formatid=-1&source=-1&fileid=406043>The
> problem is  that the firmware is non-redistributable, not non-distributable.

So address my concern, how could a distribution support this device
out of the box?

I don't think it's possible.

^ permalink raw reply

* Re: [PATCH v2] Add Qualcomm Gobi 2000 driver.
From: Matthew Garrett @ 2010-10-08 19:05 UTC (permalink / raw)
  To: David Miller; +Cc: ellyjones, netdev, jglasgow, msb, olofj
In-Reply-To: <20101008.115050.28825457.davem@davemloft.net>

On Fri, Oct 08, 2010 at 11:50:50AM -0700, David Miller wrote:

> I don't see how any distribution can properly support this device
> if it cannot work without non-distributable firmware.

Individual vendors may negotiate redistribution agreements with 
Qualcomm. We've carried drivers without redistributable firmware in the 
past (b43 had none for some time), so I don't see that we have any clear 
and established position on this.

-- 
Matthew Garrett | mjg59@srcf.ucam.org

^ permalink raw reply

* Re: [PATCH] Tarpit target for the last stable (2.6.35.7): right version
From: Ben Hutchings @ 2010-10-08 19:10 UTC (permalink / raw)
  To: Nicola; +Cc: netfilter-devel, netdev
In-Reply-To: <4CAF6A83.6090004@gmail.com>

On Fri, 2010-10-08 at 21:01 +0200, Nicola wrote:
> [Sorry for the inconvenience: I just noticed that Gmail has a bad 
> formatting. I resend the patch hoping that now things are right.]
[...]

It's still word-wrapped.  You may have to make the patch an attachment,
but see Documentation/email-clients.txt for configuration hints.

It is also not based on the right version; networking patches adding new
features should be based on David Miller's net-next-2.6 tree.

You should also read and follow Documentation/SubmittingPatches.

Ben.

-- 
Ben Hutchings, Senior Software Engineer, Solarflare Communications
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.


^ permalink raw reply

* Re: [PATCH v2] Add Qualcomm Gobi 2000 driver.
From: Jason Glasgow @ 2010-10-08 19:18 UTC (permalink / raw)
  To: David Miller; +Cc: mjg59, ellyjones, netdev, msb, olofj
In-Reply-To: <20101008.120205.70182089.davem@davemloft.net>

David,

Yes, your concern is valid.  A distribution would have trouble
supporting this out of the box unless they negotiated with Qualcomm.
I believe that many years ago we had a similar situation with WiFi
devices and firmware.

I think the right thing to do is to encourage vendors to allow
redistribution of their firmware by showing them that the firmware is
already freely available on other platforms.

-Jason

On Fri, Oct 8, 2010 at 12:02 PM, David Miller <davem@davemloft.net> wrote:
>
> From: Jason Glasgow <jglasgow@google.com>
> Date: Fri, 8 Oct 2010 11:59:19 -0700
>
> > Firmware is available in Windows packages.  For example,
> >
> > DW5620 Mobile Broadband mini-card
> > http://support.dell.com/support/downloads/download.aspx?c=us&cs=2684&l=en&s=pub&releaseid=R275082&SystemID=Lat_13&servicetag=4PLG5L1&os=W732&osl=en&deviceid=21977&devlib=0&typecnt=0&vercnt=2&catid=-1&impid=-1&formatcnt=0&libid=20&typeid=-1&dateid=-1&formatid=-1&source=-1&fileid=406043
> >
> > <http://support.dell.com/support/downloads/download.aspx?c=us&cs=2684&l=en&s=pub&releaseid=R275082&SystemID=Lat_13&servicetag=4PLG5L1&os=W732&osl=en&deviceid=21977&devlib=0&typecnt=0&vercnt=2&catid=-1&impid=-1&formatcnt=0&libid=20&typeid=-1&dateid=-1&formatid=-1&source=-1&fileid=406043>The
> > problem is  that the firmware is non-redistributable, not non-distributable.
>
> So address my concern, how could a distribution support this device
> out of the box?
>
> I don't think it's possible.

^ permalink raw reply

* pull request: wireless-next-2.6 2010-10-08
From: John W. Linville @ 2010-10-08 20:10 UTC (permalink / raw)
  To: davem-fT/PcQaiUtIeIZ0/mPfg9Q
  Cc: linux-wireless-u79uwXL29TY76Z2rM5mHXA,
	netdev-u79uwXL29TY76Z2rM5mHXA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA

Dave,

Another week, another huge pull request for -next...

This offering is mostly the usual driver updates and such for ath9k,
iwlwifi, rt2x00, wl1271, and a few others.  Also featured are a number
of mac80211, cfg80211 and nl80211 improvements from Johannes, as well
as some mac80211 scanning improvements from Stanislaw.  Johannes is
also sneaking a genetlink feature through this tree, of which you
are already aware. :-)

Please let me know if there are problems!

Thanks,

John

---

The following changes since commit dd53df265b1ee7a1fbbc76bb62c3bec2383bbd44:

  bonding: add Speed/Duplex information to /proc/net/bonding/bond (2010-10-06 18:43:34 -0700)

are available in the git repository at:
  git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6.git for-davem

Ben Greear (4):
      wireless: Use first phyX name available when registering phy devices.
      ath5k: Allow ath5k to support virtual STA and AP interfaces.
      ath5k: Print rx/tx bytes in debugfs
      ath9k: Report total tx/rx bytes and packets in debugfs.

Ben Hutchings (1):
      ar9170: Remove MODULE_FIRMWARE references to two-stage firmware

Bill Jordan (3):
      ath9k: add WDS interfaces to ath9k
      cfg80211: patches to allow setting the WDS peer
      mac80211: fix for WDS interfaces

Bruno Randolf (3):
      mac80211: Add WME information element for IBSS
      ath5k: Don't wake internal queues
      nl80211/mac80211: Add retry and failed transmission count to station info

Christian Lamparter (3):
      mac80211: fix rx monitor filter refcounters
      carl9170: support firmware-based rx filter
      p54usb: add five more USBIDs

Dan Carpenter (1):
      ipw2200: check for allocation failures

Felix Fietkau (17):
      ath9k_htc: remove use of common->ani.noise_floor
      ath9k_hw: keep calibrated noise floor values per channel
      ath9k: do not return default noise floor values via survey
      ath9k: remove the noise floor value in the ani struct
      nl80211: allow drivers to indicate whether the survey data channel is in use
      ath9k: return survey data for all channels instead of just the current one
      ath9k: fix channel flag / regd issues with multiple cards
      ath9k_hw: remove some useless calibration data
      ath9k_hw: fix regression in ANI listen time calculation
      ath9k_hw: clean up calibration flags
      ath9k_hw: merge codepaths that access the cycle counter registers
      ath9k_hw: clean up register write buffering
      ath9k_hw: add a helper function to check for the new ANI implementation
      ath9k_hw: clean up ANI state handling
      ath9k_hw: remove code duplication in phy error counter handling
      ath9k_hw: remove function pointer abstraction for internal ANI ops
      ath9k_hw: merge ath9k_hw_ani_monitor_old and ath9k_hw_ani_monitor_new

Gabor Juhos (1):
      ath9k: get correct tx gain type in ath9k_hw_4k_get_eeprom

Helmut Schaa (18):
      rt2x00: Don't overwrite beacon buffers in pairwise key setup
      rt2x00: Split out parts of the rt2800_txdone function for easier reuse
      rt2x00: rework tx status handling in rt2800pci
      rt2x00: Fix SM PS check
      rt2x00: Implement HT protection for rt2800
      rt2x00: Don't initialize MM40 HT protection to RTS/CTS on PCI devices
      rt2x00: Fix race between dma mapping and clearing rx entries in rt2800pci
      rt2x00: Allow tx duplication for legacy rates in HT40 mode
      rt2x00: Add register definition for busy time on secondary channel
      rt2x00: add field definitions for the TBTT_SYNC_CFG register
      rt2x00: Don't enable broad- and multicast buffering on USB devices
      mac80211: distinct between max rates and the number of rates the hw can report
      rt2x00: correctly set max_report_rates in rt61pci and rt2800
      rt2x00: Enable rx aggregation in rt2800
      rt2x00: Update comment about the AMPDU flag in the TXWI
      rt2x00: Fix oops caused by error path in rt2x00lib_start
      rt2x00: Improve cooperation between rt2800pci and minstrel
      rt2x00: Work around hw aggregation oddity in rt2800

Ido Yariv (3):
      wl1271: Handle large SPI transfers
      wl1271: Support firmware RX packet aggregation
      wl1271: Support firmware TX packet aggregation

Ivo van Doorn (2):
      rt2x00: Add rt73usb device ID
      rt2x00: Improve TX status entry validation

Jay Sternberg (1):
      iwlwifi: define 100 devices

Johannes Berg (17):
      cfg80211/mac80211: allow management frame TX in AP mode
      cfg80211: remove spurious __KERNEL__ ifdef
      cfg80211: fix locking
      genetlink: introduce pre_doit/post_doit hooks
      nl80211: use the new genetlink pre/post_doit hooks
      nl80211: use generic check for netif_running
      nl80211: reduce dumping boilerplate
      mac80211: fix deadlock with multiple interfaces
      nl80211: fix remain-on-channel documentation
      mac80211: delete AddBA response timer
      mac80211: avoid transmitting delBA to old AP
      cfg80211/mac80211: allow per-station GTKs
      nl80211: fix error in generic netif_running check
      cfg80211: fix BSS double-unlinking
      mac80211: fix sw scan locking
      nl80211: use new genl helpers for WDS
      cfg80211: constify WDS address

John W. Linville (9):
      Merge branch 'wireless-next-2.6' of git://git.kernel.org/.../iwlwifi/iwlwifi-2.6
      Merge branch 'wireless-next' of git://git.kernel.org/.../luca/wl12xx
      Merge branch 'master' of git://git.kernel.org/.../linville/wireless-2.6
      mac80211: avoid uninitialized var warning in ieee80211_scan_cancel
      Revert "rtl8180: use NAPI for bottom-half processing"
      Revert "mac80211: use netif_receive_skb in ieee80211_tx_status callpath"
      Merge branch 'master' of git://git.kernel.org/.../linville/wireless-2.6
      Merge branch 'wireless-next-2.6' of git://git.kernel.org/.../iwlwifi/iwlwifi-2.6
      Merge branch 'master' of git://git.kernel.org/.../linville/wireless-next-2.6 into for-davem

Juuso Oikarinen (27):
      wl1271: Implement CMD_SET_STA_STATE to indicate connection completion to FW
      wl1271: Add trigger to net_device oper_state to change BT coex priority
      wl1271: Fix scan race condition
      wl1271: Change supported channel order for a more optimal scan
      wl1271: Remove outdated FIXME's
      wl1271: Move setting of wake-up conditions to ps.c from cmd.c
      wl1271: Remove acx_fw_version function
      wl1271: Release interrupt *after* releasing the driver context
      wl1271: Remove function cmd_read_memory
      wl1271: Enable/disable 11a support based on INI configuration
      wl1271: Reduce rate used for last PSM entry attempt
      wl1271: Enable 11a support always, prevent scanning for unsupporting chips
      wl1271: Fix tid-configuration of TX frames
      wl1271: Fix AC/TID default configuration
      wl1271: Move scan complete invocation into work function
      wl1271: Fix work cancelling when shutting down the driver
      wl1271: Separate interface removal to another function
      wl1271: Add hardware recovery mechanism
      wl1271: Add handling for failing hardware scan command
      wl1271: Optimize scan duration
      wl1271: Increase connection reliability
      wl1271: Add support for hardware GEM cipher
      wl1271: Move work-init calls to hw allocation
      wl1271: Indicate disconnection on hardware failure
      wl1271: Add extended radio parameter initialization
      mac80211: Add validity check for beacon_crc value
      wl1271: Support FEM autodetection

Luciano Coelho (5):
      wl1271: remove deprecated ACX definition
      wl1271: remove useless 11a check when scanning
      wl1271: fix forced passive scan
      MAINTAINERS: Update git url for the wl1271 driver
      wl1271: remove deprecated __attribute__ ((packed))

Luis R. Rodriguez (1):
      mac80211: fix channel assumption for association done work

Mohammed Shafi Shajakhan (1):
      ath9k : Fix for displaying the channel number

Ohad Ben-Cohen (1):
      wl12xx: fix non-wl12xx build scenarios

Rafał Miłecki (3):
      b43: N-PHY: simplify channel switching
      b43: define B43_SHM_SH_CHAN_40MHZ
      b43: N-PHY: don't duplicate setting channel in shared memory

Rajkumar Manoharan (1):
      ath9k_hw: Fix hw reset failure with HTC driver

Senthil Balasubramanian (2):
      ath9k: remove unnecessary power save flags.
      ath9k: Introduce a wrapper for power save disable.

Shanyu Zhao (3):
      iwlwifi: add iwl_nic_ops structure to iwl_ops
      iwlagn: set CSR register for 6050g2 devices
      iwlwifi: send DC calib config to runtime ucode

Stanislaw Gruszka (8):
      iwlwifi: change WARN_ON to IWL_WARN in iwl_mac_add_interface
      mac80211: perform scan cancel in hw reset work
      mac80211: reduce number of __ieee80211_scan_completed calls
      mac80211: keep lock when calling __ieee80211_scan_completed()
      mac80211: assure we also cancel deferred scan request
      mac80211: do not requeue scan work when not needed
      mac80211: compete scan to cfg80211 if deferred scan fail to start
      Revert "iwlwifi: do not perferm force reset while doing scan"

Wey-Yi Guy (9):
      iwlagn: API v5 for 6050 series device
      iwlwifi: schedule to deprecate software scan support
      iwlagn: reduce redundant parameter definitions
      iwlagn: rename iwl5000_tx_power_dbm_cmd
      iwlwifi: remove uncorrect comments
      iwlagn: rename iwl5000_tx_resp
      iwlagn: define 130 series of WiFi/BT combo devices
      iwlagn: fix module firmware name for 130 series device
      iwlagn: add define for MODULE_FIRMWARE

ext Anand Gadiyar (1):
      omap: zoom2/3: fix build caused by wl1271 support

Omnibus patch available here:

	http://www.kernel.org/pub/linux/kernel/people/linville/wireless-next-2.6-2010-10-08.patch.bz2

-- 
John W. Linville		Someday the world will need a hero, and you
linville-2XuSBdqkA4R54TAoqtyWWQ@public.gmane.org			might be all we have.  Be ready.
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply

* Re: [PATCH] net/fec: carrier off initially to avoid root mount failure
From: Oskar Schirmer @ 2010-10-08 20:35 UTC (permalink / raw)
  To: David Miller; +Cc: oskar, netdev, dan, bigeasy, hjk, gerg
In-Reply-To: <20101008.103112.189689736.davem@davemloft.net>

On Fri, Oct 08, 2010 at 10:31:12 -0700, David Miller wrote:
> From: Oskar Schirmer <oskar@linutronix.de>
> Date: Thu,  7 Oct 2010 14:30:30 +0200
> 
> > with hardware slow in negotiation, the system did freeze
> > while trying to mount root on nfs at boot time.
> > 
> > the link state has not been initialised so network stack
> > tried to start transmission right away. this caused instant
> > retries, as the driver solely stated business upon link down,
> > rendering the system unusable.
> > 
> > notify carrier off initially to prevent transmission until
> > phylib will report link up.
> > 
> > Signed-off-by: Oskar Schirmer <oskar@linutronix.de>
> 
> Maybe fs_enet_open() is a better place for this netif_carrier_off()
> call?

The patch is for fec, so I guess You propose fec_enet_open().

> Every open the driver probes the PHY and does phy_start().

netif_carrier handling is done in phylib properly
except with initialisation. So when asking for the most
correct place to fix this, I'ld propose phylib itself:
Shouldn't the correct carrier state be set with
phy_start_machine or phy_device_create when phy state is
set to PHY_DOWN?

Seen from this point of view, the patch I did propose is
a workaround, as much as doing it in the ndo_open, I guess.

^ permalink raw reply

* Re: [PATCH] net/fec: carrier off initially to avoid root mount failure
From: David Miller @ 2010-10-08 20:50 UTC (permalink / raw)
  To: oskar; +Cc: netdev, dan, bigeasy, hjk, gerg
In-Reply-To: <20101008203530.GA11926@www.tglx.de>

From: Oskar Schirmer <oskar@linutronix.de>
Date: Fri, 8 Oct 2010 22:35:30 +0200

> So when asking for the most correct place to fix this, I'ld propose
> phylib itself: Shouldn't the correct carrier state be set with
> phy_start_machine or phy_device_create when phy state is set to
> PHY_DOWN?

I agree, phylib is the best place to handle this.

The carrier defaults to "on" for newly created net devices
since that's what software devices and hardware ones which
lack a link want.

phy_device_create() currently lacks access to the network device
struct.

phy_connect_direct() and phy_attach_direct() might be good spots.


^ permalink raw reply

* tbf/htb qdisc limitations
From: Steven Brudenell @ 2010-10-08 20:58 UTC (permalink / raw)
  To: netdev

hi folks,

i was disappointed recently to find that i can't set the "burst"
parameters very high on the tbf or htb qdiscs. the actual limit of the
burst parameters varies, according to the rate parameter. at the
relatively low rate i want to set, i want to have the burst parameter
be several gigabytes, but i'm actually limited to only a few
megabytes.

(motivation: a fully-automated way to stay inside the monthly transfer
limits imposed by many ISPs these days, without resorting to a
constant rate limit. for example, comcast limits its customers to
250GB/month, which is about 101KB/s; many cellular data plans in the
US limit to 5GB/month =~ 2KB/s).

i'll gladly code a patch, but i'd like the list's advice on whether
this is necessary, and a little bit about how to proceed:

1) what is the purpose of the "rate tables" used in these qdiscs --
why use them in favor of dividing bytes by time to compute a rate? i
assume the answer has something to do with restrictions on using
floating point math (maybe even integer division?) at different places
/ interruptability states in the kernel. maybe this is documented on
kernelnewbies somewhere but i couldn't find it.

2) is there an established procedure for versioning a netlink
interface? today the netlink interface for tbf and htb is horribly
implementation-coupled (the "burst" parameters need to be munged
according to the "rate" parameters and kernel tick rate). i think i
would need to change these interfaces in order to change the
accounting implementation in the corresponding qdisc. however, i
probably want to remain compatible with old userspace.

~steve

^ permalink raw reply

* Re: [PATCH NEXT 0/7]qlcnic: driver update
From: David Miller @ 2010-10-08 21:01 UTC (permalink / raw)
  To: amit.salecha; +Cc: netdev, ameen.rahman, anirban.chakraborty
In-Reply-To: <1286531171-21173-1-git-send-email-amit.salecha@qlogic.com>

From: Amit Kumar Salecha <amit.salecha@qlogic.com>
Date: Fri,  8 Oct 2010 02:46:04 -0700

> Hi
>   Series of 7 to support quiescent mode and fixes.
>   Please include them in net-next.

All applied, thank you.

^ permalink raw reply

* Re: pull request: wireless-next-2.6 2010-10-08
From: David Miller @ 2010-10-08 21:01 UTC (permalink / raw)
  To: linville; +Cc: linux-wireless, netdev, linux-kernel
In-Reply-To: <20101008201008.GA2414@tuxdriver.com>

From: "John W. Linville" <linville@tuxdriver.com>
Date: Fri, 8 Oct 2010 16:10:09 -0400

> This offering is mostly the usual driver updates and such for ath9k,
> iwlwifi, rt2x00, wl1271, and a few others.  Also featured are a number
> of mac80211, cfg80211 and nl80211 improvements from Johannes, as well
> as some mac80211 scanning improvements from Stanislaw.  Johannes is
> also sneaking a genetlink feature through this tree, of which you
> are already aware. :-)

That sneaky Johannes.

Pulled, thanks John.

^ permalink raw reply

* Re: [PATCH 1/4] Phonet: add to MAINTAINERS and add myself
From: David Miller @ 2010-10-08 21:17 UTC (permalink / raw)
  To: remi; +Cc: netdev, remi.denis-courmont
In-Reply-To: <1286546523-3340-1-git-send-email-remi@remlab.net>

From: Rémi Denis-Courmont <remi@remlab.net>
Date: Fri,  8 Oct 2010 17:02:00 +0300

> From: Rémi Denis-Courmont <remi.denis-courmont@nokia.com>
> 
> Signed-off-by: Rémi Denis-Courmont <remi.denis-courmont@nokia.com>

Applied.

^ permalink raw reply

* Re: [PATCH 2/4] Phonet: advise against enabling the pipe controller
From: David Miller @ 2010-10-08 21:17 UTC (permalink / raw)
  To: remi; +Cc: netdev, remi.denis-courmont
In-Reply-To: <1286546523-3340-2-git-send-email-remi@remlab.net>

From: Rémi Denis-Courmont <remi@remlab.net>
Date: Fri,  8 Oct 2010 17:02:01 +0300

> From: Rémi Denis-Courmont <remi.denis-courmont@nokia.com>
> 
> As it currently is, the new code path is not compatible with existing
> Nokia modems. This would break existing userspace for Nokia modem, such
> as the existing oFono ISI driver.
> 
> Signed-off-by: Rémi Denis-Courmont <remi.denis-courmont@nokia.com>

This really needs to be designed such that it can co-exist with current
userland technology.

Applied.

^ permalink raw reply

* Re: [PATCH 3/4] Phonet: cleanup pipe enable socket option
From: David Miller @ 2010-10-08 21:17 UTC (permalink / raw)
  To: remi; +Cc: netdev, remi.denis-courmont, kumar.sanghvi
In-Reply-To: <1286546523-3340-3-git-send-email-remi@remlab.net>

From: Rémi Denis-Courmont <remi@remlab.net>
Date: Fri,  8 Oct 2010 17:02:02 +0300

> From: Rémi Denis-Courmont <remi.denis-courmont@nokia.com>
> 
> The current code works like this:
 ...
> ...which does not follow the usual socket option pattern. This patch
> merges all three "options" into a single gettable&settable option,
> before Linux 2.6.37 gets out:
 ...
> This also fixes the error code from EFAULT to ENOTCONN.
> 
> Signed-off-by: Rémi Denis-Courmont <remi.denis-courmont@nokia.com>
> Cc: Kumar Sanghvi <kumar.sanghvi@stericsson.com>

Applied.

^ permalink raw reply

* Re: [PATCH 4/4] Phonet: mark the pipe controller as EXPERIMENTAL
From: David Miller @ 2010-10-08 21:17 UTC (permalink / raw)
  To: remi; +Cc: netdev, remi.denis-courmont
In-Reply-To: <1286546523-3340-4-git-send-email-remi@remlab.net>

From: Rémi Denis-Courmont <remi@remlab.net>
Date: Fri,  8 Oct 2010 17:02:03 +0300

> From: Rémi Denis-Courmont <remi.denis-courmont@nokia.com>
> 
> There are a bunch of issues that need to be fixed, including:
>  - GFP_KERNEL allocations from atomic context
>    (and GFP_ATOMIC in process context),
>  - abuse of the setsockopt() call convention,
>  - unprotected/unlocked static variables...
> 
> IMHO, we will need to alter the userspace ABI when we fix it. So mark
> the configuration option as EXPERIMENTAL for the time being (or should
> it be BROKEN instead?).
> 
> Signed-off-by: Rémi Denis-Courmont <remi.denis-courmont@nokia.com>

Applied.

^ permalink raw reply

* Re: [PATCH net-next-2.6] net: Fix rxq ref counting
From: David Miller @ 2010-10-08 21:35 UTC (permalink / raw)
  To: eric.dumazet; +Cc: therbert, netdev
In-Reply-To: <1286485149.3745.93.camel@edumazet-laptop>

From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Thu, 07 Oct 2010 22:59:09 +0200

> Le jeudi 07 octobre 2010 à 13:09 -0700, Tom Herbert a écrit :
>> The rx->count reference is used to track reference counts to the
>> number of rx-queue kobjects created for the device.  This patch
>> eliminates initialization of the counter in netif_alloc_rx_queues
>> and instead increments the counter each time a kobject is created.
>> This is now symmetric with the decrement that is done when an object is
>> released.
>> 
>> Signed-off-by: Tom Herbert <therbert@google.com>
 ...
> Acked-by: Eric Dumazet <eric.dumazet@gmail.com>

Applied, thanks.

^ permalink raw reply

* Re: [PATCH net-next] net: percpu net_device refcount
From: Paul E. McKenney @ 2010-10-08 21:56 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: Eric Dumazet, David Miller, netdev
In-Reply-To: <20101007103051.63b5177c@nehalam>

On Thu, Oct 07, 2010 at 10:30:51AM -0700, Stephen Hemminger wrote:
> On Thu, 07 Oct 2010 19:12:35 +0200
> Eric Dumazet <eric.dumazet@gmail.com> wrote:
> 
> > We tried very hard to remove all possible dev_hold()/dev_put() pairs in
> > network stack, using RCU conversions.
> > 
> > There is still an unavoidable device refcount change for every dst we
> > create/destroy, and this can slow down some workloads (routers or some
> > app servers)
> > 
> > We can switch to a percpu refcount implementation, now dynamic per_cpu
> > infrastructure is mature. On a 64 cpus machine, this consumes 256 bytes
> > per device.
> 
> It makes sense, but what about 256 cores and 1024 Vlans?
> That adds up to 4M of memory which is might be noticeable.

I bet that systems that have 256 cores have >100GB of memory, at which
point 4MB is way down in the noise.

							Thanx, Paul

^ permalink raw reply

* [RFC] ixgbe: v3 normalize frag_list usage
From: Duyck, Alexander H @ 2010-10-08 23:57 UTC (permalink / raw)
  To: David Miller
  Cc: Kirsher, Jeffrey T, Brandeburg, Jesse, Allan, Bruce W,
	netdev@vger.kernel.org
In-Reply-To: <20101006.235837.241424681.davem@davemloft.net>

Dave,

Below is the new and improved version of the RSC chaining approach.  Basically
I am holding off on merging the SKB into the frame until the SKB has data in
order to make it take a more standard approach.

Let me know if this will work with the new pointer structure.

Thanks,

Alex

---

This change drops the RSC queue approach and instead creates a normalized
frag_list skb but the tail is kept active and regularly merged into the
host SKB every time it is completed.  In order to identify the tail skb
as a tail we set the head pointer in the RSC CB block of the skb. To locate
the head we just need to check to see if skb->prev is set and make sure to
clean up the pointer before we pass it up to the stack.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
---

 drivers/net/ixgbe/ixgbe.h      |    3 +
 drivers/net/ixgbe/ixgbe_main.c |   96 +++++++++++++++++++++++-----------------
 2 files changed, 58 insertions(+), 41 deletions(-)


diff --git a/drivers/net/ixgbe/ixgbe.h b/drivers/net/ixgbe/ixgbe.h
index a62d19c..397f9e1 100644
--- a/drivers/net/ixgbe/ixgbe.h
+++ b/drivers/net/ixgbe/ixgbe.h
@@ -469,8 +469,9 @@ enum ixbge_state_t {
 };
 
 struct ixgbe_rsc_cb {
+	struct sk_buff *head;
 	dma_addr_t dma;
-	u16 skb_cnt;
+	u16 append_cnt;
 	bool delay_unmap;
 };
 #define IXGBE_RSC_CB(skb) ((struct ixgbe_rsc_cb *)(skb)->cb)
diff --git a/drivers/net/ixgbe/ixgbe_main.c b/drivers/net/ixgbe/ixgbe_main.c
index 8edce66..104a833 100644
--- a/drivers/net/ixgbe/ixgbe_main.c
+++ b/drivers/net/ixgbe/ixgbe_main.c
@@ -1251,34 +1251,51 @@ static inline u16 ixgbe_get_hlen(union ixgbe_adv_rx_desc *rx_desc)
 }
 
 /**
- * ixgbe_transform_rsc_queue - change rsc queue into a full packet
- * @skb: pointer to the last skb in the rsc queue
+ * ixgbe_merge_active_tail - merge active tail into frag_list skb
+ * @tail: pointer to active tail in frag_list
  *
- * This function changes a queue full of hw rsc buffers into a completed
- * packet.  It uses the ->prev pointers to find the first packet and then
- * turns it into the frag list owner.
+ * This function merges the length and data of an active tail into the
+ * skb containing the frag_list.  It resets the tail's pointer to the head,
+ * but it leaves the heads pointer to tail intact.
  **/
-static inline struct sk_buff *ixgbe_transform_rsc_queue(struct sk_buff *skb)
+static inline struct sk_buff *ixgbe_merge_active_tail(struct sk_buff *tail)
 {
-	unsigned int frag_list_size = 0;
-	unsigned int skb_cnt = 1;
+	struct sk_buff *head = IXGBE_RSC_CB(tail)->head;
 
-	while (skb->prev) {
-		struct sk_buff *prev = skb->prev;
-		frag_list_size += skb->len;
-		skb->prev = NULL;
-		skb = prev;
-		skb_cnt++;
-	}
+	if (!head)
+		return tail;
+
+	IXGBE_RSC_CB(tail)->head = NULL;
+
+	if (head->prev)
+		head->prev->next = tail;
+	else
+		skb_shinfo(head)->frag_list = tail;
+
+	head->len += tail->len;
+	head->data_len += tail->len;
+	head->truesize += tail->len;
 
-	skb_shinfo(skb)->frag_list = skb->next;
-	skb->next = NULL;
-	skb->len += frag_list_size;
-	skb->data_len += frag_list_size;
-	skb->truesize += frag_list_size;
-	IXGBE_RSC_CB(skb)->skb_cnt = skb_cnt;
+	head->prev = tail;
+	IXGBE_RSC_CB(head)->append_cnt++;
 
-	return skb;
+	return head;
+}
+
+/**
+ * ixgbe_close_active_frag_list - cleanup pointers on a frag_list skb
+ * @head: pointer to head of an active frag list
+ *
+ * This function will clear the frag_tail_tracker pointer on an active
+ * frag_list and returns true if the pointer was actually set
+ **/
+static inline bool ixgbe_close_active_frag_list(struct sk_buff *head)
+{
+	if (head->prev) {
+		head->prev = NULL;
+		return true;
+	}
+	return false;
 }
 
 static inline bool ixgbe_get_rsc_state(union ixgbe_adv_rx_desc *rx_desc)
@@ -1397,6 +1414,8 @@ static void ixgbe_clean_rx_irq(struct ixgbe_q_vector *q_vector,
 			next_buffer = &rx_ring->rx_buffer_info[i];
 		}
 
+		skb = ixgbe_merge_active_tail(skb);
+
 		if (!(staterr & IXGBE_RXD_STAT_EOP)) {
 			if (ring_is_ps_enabled(rx_ring)) {
 				rx_buffer_info->skb = next_buffer->skb;
@@ -1404,15 +1423,13 @@ static void ixgbe_clean_rx_irq(struct ixgbe_q_vector *q_vector,
 				next_buffer->skb = skb;
 				next_buffer->dma = 0;
 			} else {
-				skb->next = next_buffer->skb;
-				skb->next->prev = skb;
+				IXGBE_RSC_CB(next_buffer->skb)->head = skb;
 			}
 			rx_ring->rx_stats.non_eop_descs++;
 			goto next_desc;
 		}
 
-		if (skb->prev) {
-			skb = ixgbe_transform_rsc_queue(skb);
+		if (ixgbe_close_active_frag_list(skb)) {
 			/* if we got here without RSC the packet is invalid */
 			if (!pkt_is_rsc) {
 				__pskb_trim(skb, 0);
@@ -1437,7 +1454,7 @@ static void ixgbe_clean_rx_irq(struct ixgbe_q_vector *q_vector,
 					skb_shinfo(skb)->nr_frags;
 			else
 				rx_ring->rx_stats.rsc_count +=
-					IXGBE_RSC_CB(skb)->skb_cnt;
+					IXGBE_RSC_CB(skb)->append_cnt;
 			rx_ring->rx_stats.rsc_flush++;
 		}
 
@@ -3907,19 +3924,18 @@ static void ixgbe_clean_rx_ring(struct ixgbe_ring *rx_ring)
 		if (rx_buffer_info->skb) {
 			struct sk_buff *skb = rx_buffer_info->skb;
 			rx_buffer_info->skb = NULL;
-			do {
-				struct sk_buff *this = skb;
-				if (IXGBE_RSC_CB(this)->delay_unmap) {
-					dma_unmap_single(dev,
-							 IXGBE_RSC_CB(this)->dma,
-							 rx_ring->rx_buf_len,
-							 DMA_FROM_DEVICE);
-					IXGBE_RSC_CB(this)->dma = 0;
-					IXGBE_RSC_CB(skb)->delay_unmap = false;
-				}
-				skb = skb->prev;
-				dev_kfree_skb(this);
-			} while (skb);
+			/* We need to clean up RSC frag lists */
+			skb = ixgbe_merge_active_tail(skb);
+			ixgbe_close_active_frag_list(skb);
+			if (IXGBE_RSC_CB(skb)->delay_unmap) {
+				dma_unmap_single(dev,
+						 IXGBE_RSC_CB(skb)->dma,
+						 rx_ring->rx_buf_len,
+						 DMA_FROM_DEVICE);
+				IXGBE_RSC_CB(skb)->dma = 0;
+				IXGBE_RSC_CB(skb)->delay_unmap = false;
+			}
+			dev_kfree_skb(skb);
 		}
 		if (!rx_buffer_info->page)
 			continue;

^ permalink raw reply related

* [GIT] Networking
From: David Miller @ 2010-10-09  3:30 UTC (permalink / raw)
  To: torvalds; +Cc: akpm, netdev, linux-kernel


1) Memory out-of-bounds accesses in SCTP, from Dan Rosenberg.

2) We accidently handle v3 queries imporperly when in IGMP v2 compat mode.
   Fix from David Stevens.

3) Ref-after-put bug, and lack of dev_get_by_index() failure checking
   in caif_connect(), from Eric Dumazet.

4) Bluetooh can deadlock on writes when socket send buffer fills us,
   but the packets that would release that space are in the backlog,
   because we hold the socket lock while sleeping and therefore can't
   process those backlog packets.

   Fix from Gustavo F. Padovan.

5) IPV6 doesn't check all of the necessary routes when updating the
   PMTU in response to an ICMP.  Fix from Maciej Żenczykowski.

6) When global TCP memory hit is hit, we hang because the sk_wait_event()
   third argument is wrong in sk_stream_wait_memory().

   This is a very very old bug, I am very surprised nobody else has hit
   this problem.

   Fix by Nagendra Singh Tomar.

7) An old commit I made to fix a build failure with some drivers
   was wrong, and didn't fix the INET_LRO dependency problems at
   all.

   So revert that and Ben Hutchings fixes it right by adding the
   necessary "INET" dependencies to drivers which need "INET_LRO".

8) Signedness overflow in offset check of cls_u32 packet scheduler
   classifier module, from Dan Carpenter.

9) Update Intel ethernet driver docs and MAINTAINERS netry, from Jeff Kirsher.

10) SKGE on some motherboards can't do 64-bit DMA properly, fix from
    Stanislaw Gruszka.

11) bond_masters sysfs file gives bogus WARN_ON, fix from Neil HOrman

12) Fix ath9k clock rate calcuation regression, from Felix Fietkau.

13) Kill AddBA timer, otherwise we reference a freed object.  Fix
    from Johannes Berg.

14) Revert mac80211 change to use netif_receive_skb() instead of netif_rx()
    since sometimes this ends up executing in the wrong context, from
    John W. Linville.

15) Use strlcpy() in isdn to avoid going past the end of a buffer.  From
    Dan Carpenter.

16) ETHTOOL_GRXCLSRLALL exposes kernel heap to userspace.  Fix from
    Kees Cook.

17) Revert ConfigReq rejection commit that causes failures in bluetooth
    validation suite.  From Gustavo F. Padovan.

18) rfcomm_sk_state_change() needs to disable local interrupts to avoid
    illegal lock state, also from Gustavo F. Padovan.

Please pull, thanks a lot!

The following changes since commit 6b0cd00bc396daf5c2dcf17a8d82055335341f46:

  Merge branch 'hwpoison-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/ak/linux-mce-2.6 (2010-10-07 13:59:32 -0700)

are available in the git repository at:

  master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6.git master

Andrei Emeltchenko (1):
      Bluetooth: fix MTU L2CAP configuration parameter

Ben Hutchings (2):
      Revert "ipv4: Make INET_LRO a bool instead of tristate."
      netdev: Depend on INET before selecting INET_LRO

Dan Carpenter (2):
      cls_u32: signedness bug
      isdn: strcpy() => strlcpy()

Dan Rosenberg (2):
      sctp: prevent reading out-of-bounds memory
      sctp: Fix out-of-bounds reading in sctp_asoc_get_hmac()

David S. Miller (3):
      Merge branch 'master' of master.kernel.org:/.../torvalds/linux-2.6
      Merge branch 'master' of git://git.kernel.org/.../padovan/bluetooth-2.6
      Merge branch 'master' of git://git.kernel.org/.../linville/wireless-2.6

David Stevens (1):
      ipv4: correct IGMP behavior on v3 query during v2-compatibility mode

Eric Dumazet (1):
      caif: fix two caif_connect() bugs

Felix Fietkau (1):
      ath9k_hw: fix regression in ANI listen time calculation

Gustavo F. Padovan (5):
      Bluetooth: Simplify L2CAP Streaming mode sending
      Bluetooth: Fix inconsistent lock state with RFCOMM
      Revert "Bluetooth: Don't accept ConfigReq if we aren't in the BT_CONFIG state"
      Bluetooth: Fix deadlock in the ERTM logic
      Bluetooth: Disallow to change L2CAP_OPTIONS values when connected

Jeff Kirsher (4):
      ixgbevf.txt: Update ixgbevf documentation
      e1000.txt: Update e1000 documentation
      e1000e.txt: Add e1000e documentation
      MAINTAINERS: update Intel LAN Ethernet info

Johannes Berg (1):
      mac80211: delete AddBA response timer

John W. Linville (1):
      Revert "mac80211: use netif_receive_skb in ieee80211_tx_status callpath"

Kees Cook (1):
      net: clear heap allocation for ETHTOOL_GRXCLSRLALL

Maciej Żenczykowski (1):
      net: Fix IPv6 PMTU disc. w/ asymmetric routes

Mat Martineau (1):
      Bluetooth: Only enable L2CAP FCS for ERTM or streaming

Nagendra Tomar (1):
      net: Fix the condition passed to sk_wait_event()

Neil Horman (1):
      bonding: fix WARN_ON when writing to bond_master sysfs file

Stanislaw Gruszka (1):
      skge: add quirk to limit DMA

 Documentation/networking/e1000.txt   |  373 +++++++++-------------------------
 Documentation/networking/e1000e.txt  |  302 +++++++++++++++++++++++++++
 Documentation/networking/ixgbevf.txt |   40 +----
 MAINTAINERS                          |   16 ++-
 drivers/isdn/sc/interrupt.c          |   18 ++-
 drivers/net/Kconfig                  |    4 +-
 drivers/net/bonding/bond_main.c      |    9 +
 drivers/net/skge.c                   |   18 ++-
 drivers/net/wireless/ath/ath9k/ani.c |    2 +-
 include/net/bluetooth/bluetooth.h    |   18 ++
 net/bluetooth/l2cap.c                |   62 +++---
 net/bluetooth/rfcomm/sock.c          |    4 +
 net/caif/caif_socket.c               |   21 ++-
 net/core/ethtool.c                   |    2 +-
 net/core/stream.c                    |    8 +-
 net/ipv4/Kconfig                     |    2 +-
 net/ipv4/igmp.c                      |   14 ++-
 net/ipv6/route.c                     |   28 +++-
 net/mac80211/agg-tx.c                |    2 +
 net/mac80211/status.c                |    4 +-
 net/sched/cls_u32.c                  |    2 +-
 net/sctp/auth.c                      |    8 +-
 net/sctp/socket.c                    |   13 +-
 23 files changed, 590 insertions(+), 380 deletions(-)
 create mode 100644 Documentation/networking/e1000e.txt
 mode change 100755 => 100644 Documentation/networking/ixgbevf.txt

^ permalink raw reply


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox