* Re: [PATCH 04/17] netfilter: add namespace support for l4proto_generic
From: Gao feng @ 2012-05-24 1:13 UTC (permalink / raw)
To: Pablo Neira Ayuso
Cc: netfilter-devel, netdev, serge.hallyn, ebiederm, dlezcano
In-Reply-To: <20120523103232.GD2836@1984>
于 2012年05月23日 18:32, Pablo Neira Ayuso 写道:
> On Mon, May 14, 2012 at 04:52:14PM +0800, Gao feng wrote:
>> implement and export nf_conntrack_proto_generic_[init,fini],
>> nf_conntrack_[init,cleanup]_net call them to register or unregister
>> the sysctl of generic proto.
>>
>> implement generic_net_init,it's used to initial the pernet
>> data for generic proto.
>>
>> and use nf_generic_net.timeout to replace nf_ct_generic_timeout in
>> get_timeouts function.
>>
>> Acked-by: Eric W. Biederman <ebiederm@xmission.com>
>> Signed-off-by: Gao feng <gaofeng@cn.fujitsu.com>
>> ---
>> include/net/netfilter/nf_conntrack_l4proto.h | 2 +
>> include/net/netns/conntrack.h | 6 +++
>> net/netfilter/nf_conntrack_core.c | 8 +++-
>> net/netfilter/nf_conntrack_proto.c | 21 +++++-----
>> net/netfilter/nf_conntrack_proto_generic.c | 55 ++++++++++++++++++++++++-
>> 5 files changed, 76 insertions(+), 16 deletions(-)
>>
>> diff --git a/include/net/netfilter/nf_conntrack_l4proto.h b/include/net/netfilter/nf_conntrack_l4proto.h
>> index a93dcd5..0d329b9 100644
>> --- a/include/net/netfilter/nf_conntrack_l4proto.h
>> +++ b/include/net/netfilter/nf_conntrack_l4proto.h
>> @@ -118,6 +118,8 @@ struct nf_conntrack_l4proto {
>>
>> /* Existing built-in generic protocol */
>> extern struct nf_conntrack_l4proto nf_conntrack_l4proto_generic;
>> +extern int nf_conntrack_proto_generic_init(struct net *net);
>> +extern void nf_conntrack_proto_generic_fini(struct net *net);
>>
>> #define MAX_NF_CT_PROTO 256
>>
>> diff --git a/include/net/netns/conntrack.h b/include/net/netns/conntrack.h
>> index 94992e9..3381b80 100644
>> --- a/include/net/netns/conntrack.h
>> +++ b/include/net/netns/conntrack.h
>> @@ -20,7 +20,13 @@ struct nf_proto_net {
>> unsigned int users;
>> };
>>
>> +struct nf_generic_net {
>> + struct nf_proto_net pn;
>> + unsigned int timeout;
>> +};
>> +
>> struct nf_ip_net {
>> + struct nf_generic_net generic;
>> #if defined(CONFIG_SYSCTL) && defined(CONFIG_NF_CONNTRACK_PROC_COMPAT)
>> struct ctl_table_header *ctl_table_header;
>> struct ctl_table *ctl_table;
>> diff --git a/net/netfilter/nf_conntrack_core.c b/net/netfilter/nf_conntrack_core.c
>> index 32c5909..fd33e91 100644
>> --- a/net/netfilter/nf_conntrack_core.c
>> +++ b/net/netfilter/nf_conntrack_core.c
>> @@ -1353,6 +1353,7 @@ static void nf_conntrack_cleanup_net(struct net *net)
>> }
>>
>> nf_ct_free_hashtable(net->ct.hash, net->ct.htable_size);
>> + nf_conntrack_proto_generic_fini(net);
>> nf_conntrack_helper_fini(net);
>> nf_conntrack_timeout_fini(net);
>> nf_conntrack_ecache_fini(net);
>> @@ -1586,9 +1587,12 @@ static int nf_conntrack_init_net(struct net *net)
>> ret = nf_conntrack_helper_init(net);
>> if (ret < 0)
>> goto err_helper;
>> -
>> + ret = nf_conntrack_proto_generic_init(net);
>> + if (ret < 0)
>> + goto err_generic;
>> return 0;
>> -
>> +err_generic:
>> + nf_conntrack_helper_fini(net);
>> err_helper:
>> nf_conntrack_timeout_fini(net);
>> err_timeout:
>> diff --git a/net/netfilter/nf_conntrack_proto.c b/net/netfilter/nf_conntrack_proto.c
>> index 7ee6653..9b4bf6d 100644
>> --- a/net/netfilter/nf_conntrack_proto.c
>> +++ b/net/netfilter/nf_conntrack_proto.c
>> @@ -287,10 +287,16 @@ EXPORT_SYMBOL_GPL(nf_conntrack_l3proto_unregister);
>> static struct nf_proto_net *nf_ct_l4proto_net(struct net *net,
>> struct nf_conntrack_l4proto *l4proto)
>> {
>> - if (l4proto->net_id)
>> - return net_generic(net, *l4proto->net_id);
>> - else
>> - return NULL;
>> + switch (l4proto->l4proto) {
>> + case 255: /* l4proto_generic */
>> + return (struct nf_proto_net *)&net->ct.proto.generic;
>> + default:
>> + if (l4proto->net_id)
>> + return net_generic(net, *l4proto->net_id);
>> + else
>> + return NULL;
>> + }
>> + return NULL;
>> }
>>
>> int nf_ct_l4proto_register_sysctl(struct net *net,
>> @@ -457,11 +463,6 @@ EXPORT_SYMBOL_GPL(nf_conntrack_l4proto_unregister);
>> int nf_conntrack_proto_init(void)
>> {
>> unsigned int i;
>> - int err;
>> -
>> - err = nf_ct_l4proto_register_sysctl(&init_net, &nf_conntrack_l4proto_generic);
>> - if (err < 0)
>> - return err;
>
> I like that all protocols sysctl are registered by
> nf_conntrack_proto_init. Can you keep using that?
you mean per-net's generic_proto sysctl are registered by
nf_conntrack_proto_init?
such as
int nf_conntrack_proto_init(struct net *net)
{
...
err = nf_ct_l4proto_register_sysctl(net, &nf_conntrack_l4proto_generic);
...
}
if my understanding is right,my answer is yes we can ;)
--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply
* Re: [PATCH 01/17] netfilter: add struct nf_proto_net for register l4proto sysctl
From: Gao feng @ 2012-05-24 1:35 UTC (permalink / raw)
To: Pablo Neira Ayuso
Cc: netfilter-devel, netdev, serge.hallyn, ebiederm, dlezcano,
Gao feng
In-Reply-To: <20120523101200.GA2836@1984>
Hi pablo:
于 2012年05月23日 18:12, Pablo Neira Ayuso 写道:
> On Mon, May 14, 2012 at 04:52:11PM +0800, Gao feng wrote:
>> From: Gao feng <gaofeng@cn.fujitus.com>
>>
>> the struct nf_proto_net stroes proto's ctl_table_header and ctl_table,
>> nf_ct_l4proto_(un)register_sysctl use it to register sysctl.
>>
>> there are some changes for struct nf_conntrack_l4proto:
>> - add field compat to identify if this proto should do compat.
>> - the net_id field is used to store the pernet_operations id
>> that belones to l4proto.
>> - init_net will be used to initial the proto's pernet data
>>
>> and add init_net for struct nf_conntrack_l3proto too.
>
> This patchset looks bette but there are still things that we have to
> resolve.
>
> The first one (regarding this patch 1/17) changes in:
> * include/net/netfilter/nf_conntrack_l4proto.h
> * include/net/netns/conntrack.h
>
> should be included in:
> [PATCH] netfilter: add namespace support for l4proto
>
> And changes in:
> * include/net/netfilter/nf_conntrack_l3proto.h
>
> should be included in:
> [PATCH] netfilter: add namespace support for l3proto
>
> I already told you. A patch that adds a structure without using it,
> is not good. The structure has to go together with the code uses it.
>
It seams this patch should be merged to "netfilter: add namespace support for l4proto"
the struct nf_proto_net is first used there.
> More comments below.
>
>> Acked-by: Eric W. Biederman <ebiederm@xmission.com>
>> Signed-off-by: Gao feng <gaofeng@cn.fujitus.com>
>> ---
>> include/net/netfilter/nf_conntrack_l3proto.h | 3 +++
>> include/net/netfilter/nf_conntrack_l4proto.h | 6 ++++++
>> include/net/netns/conntrack.h | 12 ++++++++++++
>> 3 files changed, 21 insertions(+), 0 deletions(-)
>>
>> diff --git a/include/net/netfilter/nf_conntrack_l3proto.h b/include/net/netfilter/nf_conntrack_l3proto.h
>> index 9699c02..9766005 100644
>> --- a/include/net/netfilter/nf_conntrack_l3proto.h
>> +++ b/include/net/netfilter/nf_conntrack_l3proto.h
>> @@ -69,6 +69,9 @@ struct nf_conntrack_l3proto {
>> struct ctl_table *ctl_table;
>> #endif /* CONFIG_SYSCTL */
>>
>> + /* Init l3proto pernet data */
>> + int (*init_net)(struct net *net);
>> +
>> /* Module (if any) which this is connected to. */
>> struct module *me;
>> };
>> diff --git a/include/net/netfilter/nf_conntrack_l4proto.h b/include/net/netfilter/nf_conntrack_l4proto.h
>> index 3b572bb..a90eab5 100644
>> --- a/include/net/netfilter/nf_conntrack_l4proto.h
>> +++ b/include/net/netfilter/nf_conntrack_l4proto.h
>> @@ -22,6 +22,8 @@ struct nf_conntrack_l4proto {
>> /* L4 Protocol number. */
>> u_int8_t l4proto;
>>
>> + u_int8_t compat;
>
> I don't see why we need this new field.
>
> It seems to be set to 1 in each structure that has set:
>
> .ctl_compat_table
>
> to non-NULL. So, it's redundant.
>
> Moreover, you already know from the protocol tracker itself if you
> have to allocate the compat ctl table or not.
>
> In other words: You set compat to 1 for nf_conntrack_l4proto_generic.
> Then, you pass that compat value to generic_init_net via ->inet_net
> again, but this information (that determines if the compat has to be
> done or not) is already in the scope of the protocol tracker.
>
because some protocols such l4proto_tcp6 and l4proto_tcp use the same init_net
function. the l4proto_tcp6 doesn't need compat sysctl, so we should use this new
field to identify if we should kmemdup compat_sysctl_table.
and beacuse protocols will have pernet ctl_compat_table and ctl_table,the .ctl_compat_table
field will be deleted in patch 15/17. so we should the new field compat.
actually, we don't need to pass compat value for generic_init_net,beacuse
we know l4proto_generic need compat. But consider there are l4proto_tcp(6), and in order to keep
code readable,I prefer to add compat field and pass it to init_net.
> You have to fix this.
>
>> +
>> /* Try to fill in the third arg: dataoff is offset past network protocol
>> hdr. Return true if possible. */
>> bool (*pkt_to_tuple)(const struct sk_buff *skb, unsigned int dataoff,
>> @@ -103,6 +105,10 @@ struct nf_conntrack_l4proto {
>> struct ctl_table *ctl_compat_table;
>> #endif
>> #endif
>> + int *net_id;
>> + /* Init l4proto pernet data */
>> + int (*init_net)(struct net *net, u_int8_t compat);
>> +
>> /* Protocol name */
>> const char *name;
>>
>> diff --git a/include/net/netns/conntrack.h b/include/net/netns/conntrack.h
>> index a053a19..1f53038 100644
>> --- a/include/net/netns/conntrack.h
>> +++ b/include/net/netns/conntrack.h
>> @@ -8,6 +8,18 @@
>> struct ctl_table_header;
>> struct nf_conntrack_ecache;
>>
>> +struct nf_proto_net {
>> +#ifdef CONFIG_SYSCTL
>> + struct ctl_table_header *ctl_table_header;
>> + struct ctl_table *ctl_table;
>> +#ifdef CONFIG_NF_CONNTRACK_PROC_COMPAT
>> + struct ctl_table_header *ctl_compat_header;
>> + struct ctl_table *ctl_compat_table;
>> +#endif
>> +#endif
>> + unsigned int users;
>> +};
>> +
>> struct netns_ct {
>> atomic_t count;
>> unsigned int expect_count;
> --
> To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply
* Re: NETDEV WATCHDOG: %s (%s): transmit queue %u timed out
From: George Spelvin @ 2012-05-24 1:39 UTC (permalink / raw)
To: linux, romieu; +Cc: davej, kernel-team, netdev
In-Reply-To: <20120523223210.GA20536@electric-eye.fr.zoreil.com>
> You may try the attached patches on top of current -git. A complete dmesg
> will be welcome. So will an 'ethtool -d eth0' if the device stops working.
>
> You did not label the problem as a serious one. Does it means that the
> driver automatically recovers ?
It does indeed recover fine. (Of course, there may be lost packets or
memory leaks.) The machine is the main office file server, which also
serves as an outside network firewall, so anything serious would be
noted VERY quickly.
> I'll add some ring and registers debug stuff tomorrow.
The main thing is I don't like to reboot it very often; it's not
a dev machine. But I can, as long as it's outside normal work hours.
So thank you; I'll give your patch a try.
Here's a complete dmesg for the current boot, which includes the message being
complained about. If there's some subset that's of interest for future test
reports, tell me and I won't spam the mailing list as much.
Initializing cgroup subsys cpu
Linux version 3.4.0-00017-g3df9c78 ($USER@$HOST) (gcc version 4.7.0 (Debian 4.7.0-8) ) #152 SMP Mon May 21 22:46:39 UTC 2012
Command line: auto BOOT_IMAGE=Amd64 ro root=905 libata.fua=1 acpi_enforce_resources=lax k10temp.force=1
BIOS-provided physical RAM map:
BIOS-e820: 0000000000000000 - 0000000000093800 (usable)
BIOS-e820: 0000000000093800 - 00000000000a0000 (reserved)
BIOS-e820: 00000000000e4000 - 0000000000100000 (reserved)
BIOS-e820: 0000000000100000 - 00000000dffa0000 (usable)
BIOS-e820: 00000000dffc0000 - 00000000dffce000 (ACPI data)
BIOS-e820: 00000000dffce000 - 00000000dfff0000 (ACPI NVS)
BIOS-e820: 00000000dfff0000 - 00000000dfffe000 (reserved)
BIOS-e820: 00000000fff00000 - 0000000100000000 (reserved)
BIOS-e820: 0000000100000000 - 0000000220000000 (usable)
NX (Execute Disable) protection: active
DMI present.
DMI: MICRO-STAR INTERNATIONAL CO.,LTD MS-7376/MS-7376, BIOS V1.7 01/13/2009
e820 update range: 0000000000000000 - 0000000000010000 (usable) ==> (reserved)
e820 remove range: 00000000000a0000 - 0000000000100000 (usable)
No AGP bridge found
last_pfn = 0x220000 max_arch_pfn = 0x400000000
MTRR default type: uncachable
MTRR fixed ranges enabled:
00000-9FFFF write-back
A0000-EFFFF uncachable
F0000-FFFFF write-protect
MTRR variable ranges enabled:
0 base 000000000000 mask FFFF80000000 write-back
1 base 000080000000 mask FFFFC0000000 write-back
2 base 0000C0000000 mask FFFFE0000000 write-back
3 disabled
4 disabled
5 disabled
6 disabled
7 disabled
TOM2: 0000000220000000 aka 8704M
x86 PAT enabled: cpu 0, old 0x7040600070406, new 0x7010600070106
e820 update range: 00000000e0000000 - 0000000100000000 (usable) ==> (reserved)
last_pfn = 0xdffa0 max_arch_pfn = 0x400000000
found SMP MP-table at [ffff8800000ff780] ff780
initial memory mapped : 0 - 20000000
Base memory trampoline at [ffff880000091000] 91000 size 8192
Using GB pages for direct mapping
init_memory_mapping: 0000000000000000-00000000dffa0000
0000000000 - 00c0000000 page 1G
00c0000000 - 00dfe00000 page 2M
00dfe00000 - 00dffa0000 page 4k
kernel direct mapping tables up to dffa0000 @ 1fffd000-20000000
init_memory_mapping: 0000000100000000-0000000220000000
0100000000 - 0200000000 page 1G
0200000000 - 0220000000 page 2M
kernel direct mapping tables up to 220000000 @ dff9e000-dffa0000
ACPI: RSDP 00000000000f9e30 00014 (v00 ACPIAM)
ACPI: RSDT 00000000dffc0000 00038 (v01 011309 RSDT1044 20090113 MSFT 00000097)
ACPI: FACP 00000000dffc0200 00084 (v02 011309 FACP1044 20090113 MSFT 00000097)
ACPI: DSDT 00000000dffc0440 06E9B (v01 1ADNC 1ADNC001 00000001 INTL 20051117)
ACPI: FACS 00000000dffce000 00040
ACPI: APIC 00000000dffc0390 0006C (v01 011309 APIC1044 20090113 MSFT 00000097)
ACPI: MCFG 00000000dffc0400 0003C (v01 011309 OEMMCFG 20090113 MSFT 00000097)
ACPI: OEMB 00000000dffce040 00071 (v01 011309 OEMB1044 20090113 MSFT 00000097)
ACPI: HPET 00000000dffc72e0 00038 (v01 011309 OEMHPET 20090113 MSFT 00000097)
ACPI: Local APIC address 0xfee00000
[ffffea0000000000-ffffea00087fffff] PMD -> [ffff880217600000-ffff88021f5fffff] on node 0
Zone PFN ranges:
DMA 0x00000010 -> 0x00001000
DMA32 0x00001000 -> 0x00100000
Normal 0x00100000 -> 0x00220000
Movable zone start PFN for each node
Early memory PFN ranges
0: 0x00000010 -> 0x00000093
0: 0x00000100 -> 0x000dffa0
0: 0x00100000 -> 0x00220000
On node 0 totalpages: 2096931
DMA zone: 64 pages used for memmap
DMA zone: 2 pages reserved
DMA zone: 3905 pages, LIFO batch:0
DMA32 zone: 16320 pages used for memmap
DMA32 zone: 896992 pages, LIFO batch:31
Normal zone: 18432 pages used for memmap
Normal zone: 1161216 pages, LIFO batch:31
ACPI: PM-Timer IO Port: 0x808
ACPI: Local APIC address 0xfee00000
ACPI: LAPIC (acpi_id[0x01] lapic_id[0x00] enabled)
ACPI: LAPIC (acpi_id[0x02] lapic_id[0x01] enabled)
ACPI: LAPIC (acpi_id[0x03] lapic_id[0x02] enabled)
ACPI: LAPIC (acpi_id[0x04] lapic_id[0x03] enabled)
ACPI: IOAPIC (id[0x04] address[0xfec00000] gsi_base[0])
IOAPIC[0]: apic_id 4, version 33, address 0xfec00000, GSI 0-23
ACPI: INT_SRC_OVR (bus 0 bus_irq 0 global_irq 2 dfl dfl)
ACPI: INT_SRC_OVR (bus 0 bus_irq 9 global_irq 9 low level)
ACPI: IRQ0 used by override.
ACPI: IRQ2 used by override.
ACPI: IRQ9 used by override.
Using ACPI (MADT) for SMP configuration information
ACPI: HPET id: 0x8300 base: 0xfed00000
SMP: Allowing 4 CPUs, 0 hotplug CPUs
nr_irqs_gsi: 40
Allocating PCI resources starting at dfffe000 (gap: dfffe000:1ff02000)
setup_percpu: NR_CPUS:4 nr_cpumask_bits:4 nr_cpu_ids:4 nr_node_ids:1
PERCPU: Embedded 23 pages/cpu @ffff88021fc00000 s72704 r0 d21504 u524288
pcpu-alloc: s72704 r0 d21504 u524288 alloc=1*2097152
pcpu-alloc: [0] 0 1 2 3
Built 1 zonelists in Zone order, mobility grouping on. Total pages: 2062113
Kernel command line: auto BOOT_IMAGE=Amd64 ro root=905 libata.fua=1 acpi_enforce_resources=lax k10temp.force=1
PID hash table entries: 4096 (order: 3, 32768 bytes)
Dentry cache hash table entries: 1048576 (order: 11, 8388608 bytes)
Inode-cache hash table entries: 524288 (order: 10, 4194304 bytes)
Checking aperture...
No AGP bridge found
Node 0: aperture @ d4000000 size 32 MB
Aperture pointing to e820 RAM. Ignoring.
Your BIOS doesn't leave a aperture memory hole
Please enable the IOMMU option in the BIOS setup
This costs you 64 MB of RAM
Mapping aperture over 65536 KB of RAM @ d4000000
Memory: 8105120k/8912896k available (4123k kernel code, 525172k absent, 282604k reserved, 1959k data, 476k init)
SLUB: Genslabs=15, HWalign=64, Order=0-3, MinObjects=0, CPUs=4, Nodes=1
Hierarchical RCU implementation.
NR_IRQS:4352 nr_irqs:712 16
Console: colour VGA+ 80x50
console [tty0] enabled
hpet clockevent registered
Fast TSC calibration failed
TSC: Unable to calibrate against PIT
TSC: using HPET reference calibration
Detected 2500.119 MHz processor.
Calibrating delay loop (skipped), value calculated using timer frequency.. 5000.23 BogoMIPS (lpj=25001190)
pid_max: default: 32768 minimum: 301
Mount-cache hash table entries: 256
tseg: 0000000000
CPU: Physical Processor ID: 0
CPU: Processor Core ID: 0
mce: CPU supports 6 MCE banks
LVT offset 0 assigned for vector 0xf9
using AMD E400 aware idle routine
Freeing SMP alternatives: 12k freed
ACPI: Core revision 20120320
..TIMER: vector=0x30 apic1=0 pin1=2 apic2=-1 pin2=-1
CPU0: AMD Phenom(tm) 9850 Quad-Core Processor stepping 03
Performance Events: AMD PMU driver.
... version: 0
... bit width: 48
... generic registers: 4
... value mask: 0000ffffffffffff
... max period: 00007fffffffffff
... fixed-purpose events: 0
... event mask: 000000000000000f
MCE: In-kernel MCE decoding enabled.
NMI watchdog: enabled, takes one hw-pmu counter.
Booting Node 0, Processors #1
NMI watchdog: enabled, takes one hw-pmu counter.
System has AMD C1E enabled
Switch to broadcast mode on CPU1
#2
NMI watchdog: enabled, takes one hw-pmu counter.
Switch to broadcast mode on CPU2
#3 Ok.
NMI watchdog: enabled, takes one hw-pmu counter.
Switch to broadcast mode on CPU3
Brought up 4 CPUs
Total of 4 processors activated (20000.95 BogoMIPS).
Switch to broadcast mode on CPU0
xor: automatically using best checksumming function: generic_sse
generic_sse: 9959.200 MB/sec
xor: using function: generic_sse (9959.200 MB/sec)
NET: Registered protocol family 16
node 0 link 0: io port [1000, ffffff]
TOM: 00000000e0000000 aka 3584M
Fam 10h mmconf [mem 0xe0000000-0xefffffff]
node 0 link 0: mmio [e0000000, efffffff] ==> none
node 0 link 0: mmio [f0000000, ffffffff]
node 0 link 0: mmio [a0000, bffff]
node 0 link 0: mmio [e0000000, dfffffff] ==> none
TOM2: 0000000220000000 aka 8704M
bus: [00, 07] on node 0 link 0
bus: 00 index 0 [io 0x0000-0xffff]
bus: 00 index 1 [mem 0xf0000000-0xffffffff]
bus: 00 index 2 [mem 0x000a0000-0x000bffff]
bus: 00 index 3 [mem 0x220000000-0xfcffffffff]
ACPI: bus type pci registered
PCI: MMCONFIG for domain 0000 [bus 00-ff] at [mem 0xe0000000-0xefffffff] (base 0xe0000000)
PCI: not using MMCONFIG
PCI: Using configuration type 1 for base access
PCI: Using configuration type 1 for extended access
bio: create slab <bio-0> at 0
raid6: int64x1 2430 MB/s
raid6: int64x2 2128 MB/s
raid6: int64x4 2234 MB/s
raid6: int64x8 1473 MB/s
raid6: sse2x1 3432 MB/s
raid6: sse2x2 5661 MB/s
raid6: sse2x4 6710 MB/s
raid6: using algorithm sse2x4 (6710 MB/s)
ACPI: Added _OSI(Module Device)
ACPI: Added _OSI(Processor Device)
ACPI: Added _OSI(3.0 _SCP Extensions)
ACPI: Added _OSI(Processor Aggregator Device)
ACPI: EC: Detected MSI hardware, enabling workarounds.
ACPI: EC: Look up EC in DSDT
ACPI: Executed 3 blocks of module-level executable AML code
ACPI: Interpreter enabled
ACPI: (supports S0 S5)
ACPI: Using IOAPIC for interrupt routing
PCI: MMCONFIG for domain 0000 [bus 00-ff] at [mem 0xe0000000-0xefffffff] (base 0xe0000000)
PCI: MMCONFIG at [mem 0xe0000000-0xefffffff] reserved in ACPI motherboard resources
ACPI: No dock devices found.
PCI: Using host bridge windows from ACPI; if necessary, use "pci=nocrs" and report a bug
ACPI: PCI Root Bridge [PCI0] (domain 0000 [bus 00-ff])
pci_root PNP0A03:00: host bridge window [io 0x0000-0x0cf7]
pci_root PNP0A03:00: host bridge window [io 0x0d00-0xffff]
pci_root PNP0A03:00: host bridge window [mem 0x000a0000-0x000bffff]
pci_root PNP0A03:00: host bridge window [mem 0x000d0000-0x000dffff]
pci_root PNP0A03:00: host bridge window [mem 0xf0000000-0xfebfffff]
PCI host bridge to bus 0000:00
pci_bus 0000:00: root bus resource [io 0x0000-0x0cf7]
pci_bus 0000:00: root bus resource [io 0x0d00-0xffff]
pci_bus 0000:00: root bus resource [mem 0x000a0000-0x000bffff]
pci_bus 0000:00: root bus resource [mem 0x000d0000-0x000dffff]
pci_bus 0000:00: root bus resource [mem 0xf0000000-0xfebfffff]
pci 0000:00:00.0: [1002:5956] type 00 class 0x060000
pci 0000:00:00.0: reg 1c: [mem 0xe0000000-0xffffffff 64bit]
pci 0000:00:02.0: [1002:5978] type 01 class 0x060400
pci 0000:00:02.0: PME# supported from D0 D3hot D3cold
pci 0000:00:05.0: [1002:597b] type 01 class 0x060400
pci 0000:00:05.0: PME# supported from D0 D3hot D3cold
pci 0000:00:09.0: [1002:597e] type 01 class 0x060400
pci 0000:00:09.0: PME# supported from D0 D3hot D3cold
pci 0000:00:12.0: [1002:4380] type 00 class 0x010601
pci 0000:00:12.0: reg 10: [io 0x7000-0x7007]
pci 0000:00:12.0: reg 14: [io 0x6000-0x6003]
pci 0000:00:12.0: reg 18: [io 0x5000-0x5007]
pci 0000:00:12.0: reg 1c: [io 0x4000-0x4003]
pci 0000:00:12.0: reg 20: [io 0x3000-0x300f]
pci 0000:00:12.0: reg 24: [mem 0xfe5ff800-0xfe5ffbff]
pci 0000:00:13.0: [1002:4387] type 00 class 0x0c0310
pci 0000:00:13.0: reg 10: [mem 0xfe5fe000-0xfe5fefff]
pci 0000:00:13.1: [1002:4388] type 00 class 0x0c0310
pci 0000:00:13.1: reg 10: [mem 0xfe5fd000-0xfe5fdfff]
pci 0000:00:13.2: [1002:4389] type 00 class 0x0c0310
pci 0000:00:13.2: reg 10: [mem 0xfe5fc000-0xfe5fcfff]
pci 0000:00:13.3: [1002:438a] type 00 class 0x0c0310
pci 0000:00:13.3: reg 10: [mem 0xfe5fb000-0xfe5fbfff]
pci 0000:00:13.4: [1002:438b] type 00 class 0x0c0310
pci 0000:00:13.4: reg 10: [mem 0xfe5fa000-0xfe5fafff]
pci 0000:00:13.5: [1002:4386] type 00 class 0x0c0320
pci 0000:00:13.5: reg 10: [mem 0xfe5ff000-0xfe5ff0ff]
pci 0000:00:13.5: supports D1 D2
pci 0000:00:13.5: PME# supported from D0 D1 D2 D3hot
pci 0000:00:14.0: [1002:4385] type 00 class 0x0c0500
pci 0000:00:14.0: reg 10: [io 0x0b00-0x0b0f]
pci 0000:00:14.1: [1002:438c] type 00 class 0x01018a
pci 0000:00:14.1: reg 10: [io 0x0000-0x0007]
pci 0000:00:14.1: reg 14: [io 0x0000-0x0003]
pci 0000:00:14.1: reg 18: [io 0x0000-0x0007]
pci 0000:00:14.1: reg 1c: [io 0x0000-0x0003]
pci 0000:00:14.1: reg 20: [io 0xff00-0xff0f]
pci 0000:00:14.2: [1002:4383] type 00 class 0x040300
pci 0000:00:14.2: reg 10: [mem 0xfe5f4000-0xfe5f7fff 64bit]
pci 0000:00:14.2: PME# supported from D0 D3hot D3cold
pci 0000:00:14.3: [1002:438d] type 00 class 0x060100
pci 0000:00:14.4: [1002:4384] type 01 class 0x060401
pci 0000:00:18.0: [1022:1200] type 00 class 0x060000
pci 0000:00:18.1: [1022:1201] type 00 class 0x060000
pci 0000:00:18.2: [1022:1202] type 00 class 0x060000
pci 0000:00:18.3: [1022:1203] type 00 class 0x060000
pci 0000:00:18.4: [1022:1204] type 00 class 0x060000
pci 0000:01:00.0: [1002:5b60] type 00 class 0x030000
pci 0000:01:00.0: reg 10: [mem 0xfc000000-0xfdffffff 64bit pref]
pci 0000:01:00.0: reg 18: [mem 0xfe6f0000-0xfe6fffff 64bit]
pci 0000:01:00.0: reg 20: [io 0x8000-0x80ff]
pci 0000:01:00.0: reg 30: [mem 0xfe6c0000-0xfe6dffff pref]
pci 0000:01:00.0: supports D1 D2
pci 0000:01:00.1: [1002:5b70] type 00 class 0x038000
pci 0000:01:00.1: reg 10: [mem 0xfe6e0000-0xfe6effff 64bit]
pci 0000:01:00.1: supports D1 D2
pci 0000:00:02.0: PCI bridge to [bus 01-01]
pci 0000:00:02.0: bridge window [io 0x8000-0x8fff]
pci 0000:00:02.0: bridge window [mem 0xfe600000-0xfe6fffff]
pci 0000:00:02.0: bridge window [mem 0xfc000000-0xfdffffff 64bit pref]
pci 0000:02:00.0: [10ec:8168] type 00 class 0x020000
pci 0000:02:00.0: reg 10: [io 0x9800-0x98ff]
pci 0000:02:00.0: reg 18: [mem 0xfe7ff000-0xfe7fffff 64bit]
pci 0000:02:00.0: reg 30: [mem 0xfe7c0000-0xfe7dffff pref]
pci 0000:02:00.0: supports D1 D2
pci 0000:02:00.0: PME# supported from D1 D2 D3hot D3cold
pci 0000:00:05.0: PCI bridge to [bus 02-02]
pci 0000:00:05.0: bridge window [io 0x9000-0x9fff]
pci 0000:00:05.0: bridge window [mem 0xfe700000-0xfe7fffff]
pci 0000:03:00.0: [105a:3f20] type 00 class 0x010400
pci 0000:03:00.0: reg 10: [io 0xa800-0xa87f]
pci 0000:03:00.0: reg 18: [io 0xa400-0xa4ff]
pci 0000:03:00.0: reg 1c: [mem 0xfe8ff000-0xfe8fffff]
pci 0000:03:00.0: reg 20: [mem 0xfe8c0000-0xfe8dffff]
pci 0000:03:00.0: reg 24: [mem 0xfe8fc000-0xfe8fdfff]
pci 0000:03:00.0: supports D1
pci 0000:00:09.0: PCI bridge to [bus 03-03]
pci 0000:00:09.0: bridge window [io 0xa000-0xafff]
pci 0000:00:09.0: bridge window [mem 0xfe800000-0xfe8fffff]
pci 0000:04:00.0: [1106:3044] type 00 class 0x0c0010
pci 0000:04:00.0: reg 10: [mem 0xfe9ff800-0xfe9fffff]
pci 0000:04:00.0: reg 14: [io 0xc800-0xc87f]
pci 0000:04:00.0: supports D2
pci 0000:04:00.0: PME# supported from D2 D3hot D3cold
pci 0000:04:02.0: [1415:9501] type 00 class 0x070006
pci 0000:04:02.0: reg 10: [io 0xc400-0xc41f]
pci 0000:04:02.0: reg 14: [mem 0xfe9fe000-0xfe9fefff]
pci 0000:04:02.0: reg 18: [io 0xc000-0xc01f]
pci 0000:04:02.0: reg 1c: [mem 0xfe9fd000-0xfe9fdfff]
pci 0000:04:02.0: supports D2
pci 0000:04:02.0: PME# supported from D0 D2 D3hot
pci 0000:04:02.1: [1415:9513] type 00 class 0x070101
pci 0000:04:02.1: reg 10: [io 0xb800-0xb807]
pci 0000:04:02.1: reg 14: [io 0xb400-0xb407]
pci 0000:04:02.1: reg 18: [io 0xb000-0xb01f]
pci 0000:04:02.1: reg 1c: [mem 0xfe9fc000-0xfe9fcfff]
pci 0000:04:02.1: supports D2
pci 0000:04:02.1: PME# supported from D0 D2 D3hot
pci 0000:04:03.0: [1011:0024] type 01 class 0x060400
pci 0000:00:14.4: PCI bridge to [bus 04-05] (subtractive decode)
pci 0000:00:14.4: bridge window [io 0xb000-0xefff]
pci 0000:00:14.4: bridge window [mem 0xfe900000-0xfebfffff]
pci 0000:00:14.4: bridge window [io 0x0000-0x0cf7] (subtractive decode)
pci 0000:00:14.4: bridge window [io 0x0d00-0xffff] (subtractive decode)
pci 0000:00:14.4: bridge window [mem 0x000a0000-0x000bffff] (subtractive decode)
pci 0000:00:14.4: bridge window [mem 0x000d0000-0x000dffff] (subtractive decode)
pci 0000:00:14.4: bridge window [mem 0xf0000000-0xfebfffff] (subtractive decode)
pci 0000:05:04.0: [1011:0019] type 00 class 0x020000
pci 0000:05:04.0: reg 10: [io 0xe800-0xe87f]
pci 0000:05:04.0: reg 14: [mem 0xfebffc00-0xfebfffff]
pci 0000:05:04.0: reg 30: [mem 0xfeb80000-0xfebbffff pref]
pci 0000:05:05.0: [1011:0019] type 00 class 0x020000
pci 0000:05:05.0: reg 10: [io 0xe400-0xe47f]
pci 0000:05:05.0: reg 14: [mem 0xfebff800-0xfebffbff]
pci 0000:05:05.0: reg 30: [mem 0xfeb40000-0xfeb7ffff pref]
pci 0000:05:06.0: [1011:0019] type 00 class 0x020000
pci 0000:05:06.0: reg 10: [io 0xe000-0xe07f]
pci 0000:05:06.0: reg 14: [mem 0xfebff400-0xfebff7ff]
pci 0000:05:06.0: reg 30: [mem 0xfeb00000-0xfeb3ffff pref]
pci 0000:05:07.0: [1011:0019] type 00 class 0x020000
pci 0000:05:07.0: reg 10: [io 0xd800-0xd87f]
pci 0000:05:07.0: reg 14: [mem 0xfebff000-0xfebff3ff]
pci 0000:05:07.0: reg 30: [mem 0xfeac0000-0xfeafffff pref]
pci 0000:04:03.0: PCI bridge to [bus 05-05]
pci 0000:04:03.0: bridge window [io 0xd000-0xefff]
pci 0000:04:03.0: bridge window [mem 0xfea00000-0xfebfffff]
pci_bus 0000:00: on NUMA node 0
ACPI: PCI Interrupt Routing Table [\_SB_.PCI0._PRT]
ACPI: PCI Interrupt Routing Table [\_SB_.PCI0.PCE2._PRT]
ACPI: PCI Interrupt Routing Table [\_SB_.PCI0.PCE5._PRT]
ACPI: PCI Interrupt Routing Table [\_SB_.PCI0.PCE9._PRT]
ACPI: PCI Interrupt Routing Table [\_SB_.PCI0.P0PC._PRT]
pci0000:00: Unable to request _OSC control (_OSC support mask: 0x19)
ACPI: PCI Interrupt Link [LNKA] (IRQs 3 4 5 7 10 11 12 14 *15)
ACPI: PCI Interrupt Link [LNKB] (IRQs 3 4 5 7 10 *11 12 14 15)
ACPI: PCI Interrupt Link [LNKC] (IRQs 3 4 5 7 *10 11 12 14 15)
ACPI: PCI Interrupt Link [LNKD] (IRQs 3 4 5 7 *10 11 12 14 15)
ACPI: PCI Interrupt Link [LNKE] (IRQs 3 4 5 *7 10 11 12 14 15)
ACPI: PCI Interrupt Link [LNKF] (IRQs *9)
ACPI: PCI Interrupt Link [LNKG] (IRQs 3 4 *5 7 10 11 12 14 15)
ACPI: PCI Interrupt Link [LNKH] (IRQs *3 4 5 7 10 11 12 14 15)
vgaarb: device added: PCI:0000:01:00.0,decodes=io+mem,owns=io+mem,locks=none
vgaarb: loaded
vgaarb: bridge control possible 0000:01:00.0
SCSI subsystem initialized
libata version 3.00 loaded.
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
pps_core: LinuxPPS API ver. 1 registered
pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
PTP clock support registered
Advanced Linux Sound Architecture Driver Version 1.0.25.
PCI: Using ACPI for IRQ routing
PCI: pci_cache_line_size set to 64 bytes
pci 0000:00:00.0: no compatible bridge window for [mem 0xe0000000-0xffffffff 64bit]
reserve RAM buffer: 0000000000093800 - 000000000009ffff
reserve RAM buffer: 00000000dffa0000 - 00000000dfffffff
hpet0: at MMIO 0xfed00000, IRQs 2, 8, 0, 0
hpet0: 4 comparators, 32-bit 14.318180 MHz counter
Switching to clocksource hpet
pnp: PnP ACPI init
ACPI: bus type pnp registered
pnp 00:00: [bus 00-ff]
pnp 00:00: [io 0x0cf8-0x0cff]
pnp 00:00: [io 0x0000-0x0cf7 window]
pnp 00:00: [io 0x0d00-0xffff window]
pnp 00:00: [mem 0x000a0000-0x000bffff window]
pnp 00:00: [mem 0x000d0000-0x000dffff window]
pnp 00:00: [mem 0xe0000000-0xdfffffff window disabled]
pnp 00:00: [mem 0xf0000000-0xfebfffff window]
pnp 00:00: Plug and Play ACPI device, IDs PNP0a03 (active)
pnp 00:01: [dma 4]
pnp 00:01: [io 0x0000-0x000f]
pnp 00:01: [io 0x0081-0x0083]
pnp 00:01: [io 0x0087]
pnp 00:01: [io 0x0089-0x008b]
pnp 00:01: [io 0x008f]
pnp 00:01: [io 0x00c0-0x00df]
pnp 00:01: Plug and Play ACPI device, IDs PNP0200 (active)
pnp 00:02: [io 0x0070-0x0071]
pnp 00:02: [irq 8]
pnp 00:02: Plug and Play ACPI device, IDs PNP0b00 (active)
pnp 00:03: [io 0x0061]
pnp 00:03: Plug and Play ACPI device, IDs PNP0800 (active)
pnp 00:04: [io 0x00f0-0x00ff]
pnp 00:04: [irq 13]
pnp 00:04: Plug and Play ACPI device, IDs PNP0c04 (active)
pnp 00:05: [io 0x03f8-0x03ff]
pnp 00:05: [irq 4]
pnp 00:05: [dma 0 disabled]
pnp 00:05: Plug and Play ACPI device, IDs PNP0501 (active)
pnp 00:06: [io 0x03f0-0x03f5]
pnp 00:06: [io 0x03f7]
pnp 00:06: [irq 6]
pnp 00:06: [dma 2]
pnp 00:06: Plug and Play ACPI device, IDs PNP0700 (active)
pnp 00:07: [mem 0xfed00000-0xfed003ff]
pnp 00:07: Plug and Play ACPI device, IDs PNP0103 (active)
pnp 00:08: [mem 0xfec00000-0xfec00fff]
pnp 00:08: [mem 0xfee00000-0xfee00fff]
system 00:08: [mem 0xfec00000-0xfec00fff] could not be reserved
system 00:08: [mem 0xfee00000-0xfee00fff] has been reserved
system 00:08: Plug and Play ACPI device, IDs PNP0c02 (active)
pnp 00:09: [io 0x0010-0x001f]
pnp 00:09: [io 0x0022-0x003f]
pnp 00:09: [io 0x0062-0x0063]
pnp 00:09: [io 0x0065-0x006f]
pnp 00:09: [io 0x0072-0x007f]
pnp 00:09: [io 0x0080]
pnp 00:09: [io 0x0084-0x0086]
pnp 00:09: [io 0x0088]
pnp 00:09: [io 0x008c-0x008e]
pnp 00:09: [io 0x0090-0x009f]
pnp 00:09: [io 0x00a2-0x00bf]
pnp 00:09: [io 0x00b1]
pnp 00:09: [io 0x00e0-0x00ef]
pnp 00:09: [io 0x04d0-0x04d1]
pnp 00:09: [io 0x040b]
pnp 00:09: [io 0x04d6]
pnp 00:09: [io 0x0c00-0x0c01]
pnp 00:09: [io 0x0c14]
pnp 00:09: [io 0x0c50-0x0c51]
pnp 00:09: [io 0x0c52]
pnp 00:09: [io 0x0c6c]
pnp 00:09: [io 0x0c6f]
pnp 00:09: [io 0x0cd0-0x0cd1]
pnp 00:09: [io 0x0cd2-0x0cd3]
pnp 00:09: [io 0x0cd4-0x0cd5]
pnp 00:09: [io 0x0cd6-0x0cd7]
pnp 00:09: [io 0x0cd8-0x0cdf]
pnp 00:09: [io 0x0800-0x089f]
pnp 00:09: [io 0x0b10-0x0b1f]
pnp 00:09: [io 0x0000-0xffffffffffffffff disabled]
pnp 00:09: [io 0x0900-0x090f]
pnp 00:09: [io 0x0910-0x091f]
pnp 00:09: [io 0xfe00-0xfefe]
pnp 00:09: [mem 0xffb80000-0xffbfffff]
system 00:09: [io 0x04d0-0x04d1] has been reserved
system 00:09: [io 0x040b] has been reserved
system 00:09: [io 0x04d6] has been reserved
system 00:09: [io 0x0c00-0x0c01] has been reserved
system 00:09: [io 0x0c14] has been reserved
system 00:09: [io 0x0c50-0x0c51] has been reserved
system 00:09: [io 0x0c52] has been reserved
system 00:09: [io 0x0c6c] has been reserved
system 00:09: [io 0x0c6f] has been reserved
system 00:09: [io 0x0cd0-0x0cd1] has been reserved
system 00:09: [io 0x0cd2-0x0cd3] has been reserved
system 00:09: [io 0x0cd4-0x0cd5] has been reserved
system 00:09: [io 0x0cd6-0x0cd7] has been reserved
system 00:09: [io 0x0cd8-0x0cdf] has been reserved
system 00:09: [io 0x0800-0x089f] has been reserved
system 00:09: [io 0x0b10-0x0b1f] has been reserved
system 00:09: [io 0x0900-0x090f] has been reserved
system 00:09: [io 0x0910-0x091f] has been reserved
system 00:09: [io 0xfe00-0xfefe] has been reserved
system 00:09: [mem 0xffb80000-0xffbfffff] has been reserved
system 00:09: Plug and Play ACPI device, IDs PNP0c02 (active)
pnp 00:0a: [io 0x0060]
pnp 00:0a: [io 0x0064]
pnp 00:0a: [irq 1]
pnp 00:0a: Plug and Play ACPI device, IDs PNP0303 PNP030b (active)
pnp 00:0b: [irq 12]
pnp 00:0b: Plug and Play ACPI device, IDs PNP0f03 PNP0f13 (active)
pnp 00:0c: [io 0x0000-0xffffffffffffffff disabled]
pnp 00:0c: [io 0x0600-0x06df]
pnp 00:0c: [io 0x0ae0-0x0aef]
system 00:0c: [io 0x0600-0x06df] has been reserved
system 00:0c: [io 0x0ae0-0x0aef] has been reserved
system 00:0c: Plug and Play ACPI device, IDs PNP0c02 (active)
pnp 00:0d: [mem 0xe0000000-0xefffffff]
system 00:0d: [mem 0xe0000000-0xefffffff] has been reserved
system 00:0d: Plug and Play ACPI device, IDs PNP0c02 (active)
pnp 00:0e: [mem 0x00000000-0x0009ffff]
pnp 00:0e: [mem 0x000c0000-0x000cffff]
pnp 00:0e: [mem 0x000e0000-0x000fffff]
pnp 00:0e: [mem 0x00100000-0xdfffffff]
pnp 00:0e: [mem 0xfec00000-0xffffffff]
pnp 00:0e: disabling [mem 0x00000000-0x0009ffff] because it overlaps 0000:00:00.0 BAR 3 [mem 0x00000000-0x1fffffff 64bit]
pnp 00:0e: disabling [mem 0x000c0000-0x000cffff] because it overlaps 0000:00:00.0 BAR 3 [mem 0x00000000-0x1fffffff 64bit]
pnp 00:0e: disabling [mem 0x000e0000-0x000fffff] because it overlaps 0000:00:00.0 BAR 3 [mem 0x00000000-0x1fffffff 64bit]
pnp 00:0e: disabling [mem 0x00100000-0xdfffffff] because it overlaps 0000:00:00.0 BAR 3 [mem 0x00000000-0x1fffffff 64bit]
system 00:0e: [mem 0xfec00000-0xffffffff] could not be reserved
system 00:0e: Plug and Play ACPI device, IDs PNP0c01 (active)
pnp: PnP ACPI: found 15 devices
ACPI: ACPI bus type pnp unregistered
pci 0000:00:02.0: PCI bridge to [bus 01-01]
pci 0000:00:02.0: bridge window [io 0x8000-0x8fff]
pci 0000:00:02.0: bridge window [mem 0xfe600000-0xfe6fffff]
pci 0000:00:02.0: bridge window [mem 0xfc000000-0xfdffffff 64bit pref]
pci 0000:00:05.0: PCI bridge to [bus 02-02]
pci 0000:00:05.0: bridge window [io 0x9000-0x9fff]
pci 0000:00:05.0: bridge window [mem 0xfe700000-0xfe7fffff]
pci 0000:00:09.0: PCI bridge to [bus 03-03]
pci 0000:00:09.0: bridge window [io 0xa000-0xafff]
pci 0000:00:09.0: bridge window [mem 0xfe800000-0xfe8fffff]
pci 0000:04:03.0: PCI bridge to [bus 05-05]
pci 0000:04:03.0: bridge window [io 0xd000-0xefff]
pci 0000:04:03.0: bridge window [mem 0xfea00000-0xfebfffff]
pci 0000:00:14.4: PCI bridge to [bus 04-05]
pci 0000:00:14.4: bridge window [io 0xb000-0xefff]
pci 0000:00:14.4: bridge window [mem 0xfe900000-0xfebfffff]
pci_bus 0000:00: resource 4 [io 0x0000-0x0cf7]
pci_bus 0000:00: resource 5 [io 0x0d00-0xffff]
pci_bus 0000:00: resource 6 [mem 0x000a0000-0x000bffff]
pci_bus 0000:00: resource 7 [mem 0x000d0000-0x000dffff]
pci_bus 0000:00: resource 8 [mem 0xf0000000-0xfebfffff]
pci_bus 0000:01: resource 0 [io 0x8000-0x8fff]
pci_bus 0000:01: resource 1 [mem 0xfe600000-0xfe6fffff]
pci_bus 0000:01: resource 2 [mem 0xfc000000-0xfdffffff 64bit pref]
pci_bus 0000:02: resource 0 [io 0x9000-0x9fff]
pci_bus 0000:02: resource 1 [mem 0xfe700000-0xfe7fffff]
pci_bus 0000:03: resource 0 [io 0xa000-0xafff]
pci_bus 0000:03: resource 1 [mem 0xfe800000-0xfe8fffff]
pci_bus 0000:04: resource 0 [io 0xb000-0xefff]
pci_bus 0000:04: resource 1 [mem 0xfe900000-0xfebfffff]
pci_bus 0000:04: resource 4 [io 0x0000-0x0cf7]
pci_bus 0000:04: resource 5 [io 0x0d00-0xffff]
pci_bus 0000:04: resource 6 [mem 0x000a0000-0x000bffff]
pci_bus 0000:04: resource 7 [mem 0x000d0000-0x000dffff]
pci_bus 0000:04: resource 8 [mem 0xf0000000-0xfebfffff]
pci_bus 0000:05: resource 0 [io 0xd000-0xefff]
pci_bus 0000:05: resource 1 [mem 0xfea00000-0xfebfffff]
NET: Registered protocol family 2
IP route cache hash table entries: 262144 (order: 9, 2097152 bytes)
TCP established hash table entries: 262144 (order: 10, 4194304 bytes)
TCP bind hash table entries: 65536 (order: 8, 1048576 bytes)
TCP: Hash tables configured (established 262144 bind 65536)
TCP: reno registered
UDP hash table entries: 4096 (order: 5, 131072 bytes)
UDP-Lite hash table entries: 4096 (order: 5, 131072 bytes)
NET: Registered protocol family 1
RPC: Registered named UNIX socket transport module.
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
RPC: Registered tcp NFSv4.1 backchannel transport module.
pci 0000:01:00.0: Boot video device
PCI: CLS 64 bytes, default 64
PCI-DMA: Disabling AGP.
PCI-DMA: aperture base @ d4000000 size 65536 KB
PCI-DMA: using GART IOMMU.
PCI-DMA: Reserving 64MB of IOMMU area in the AGP aperture
LVT offset 1 assigned for vector 0x400
IBS: LVT offset 1 assigned
perf: AMD IBS detected (0x00000007)
Installing knfsd (copyright (C) 1996 okir@monad.swb.de).
msgmni has been set to 15959
alg: No test for stdrng (krng)
io scheduler noop registered
io scheduler deadline registered
io scheduler cfq registered (default)
ACPI: duty_cycle spans bit 4
ACPI: processor limited to max C-state 1
Serial: 8250/16550 driver, 5 ports, IRQ sharing enabled
serial8250: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A
00:05: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A
ttyS4: detected caps 00000700 should be 00000500
0000:04:02.0: ttyS4 at I/O 0xc400 (irq = 22) is a 16C950/954
ttyS1: detected caps 00000700 should be 00000500
0000:04:02.0: ttyS1 at I/O 0xc408 (irq = 22) is a 16C950/954
ttyS2: detected caps 00000700 should be 00000500
0000:04:02.0: ttyS2 at I/O 0xc410 (irq = 22) is a 16C950/954
ttyS3: detected caps 00000700 should be 00000500
0000:04:02.0: ttyS3 at I/O 0xc418 (irq = 22) is a 16C950/954
lp: driver loaded but no devices found
Linux agpgart interface v0.103
PCI parallel port detected: 1415:9513, I/O at 0xb800(0x0), IRQ 23
parport0: PC-style at 0xb800, irq 23 [PCSPP]
lp0: using parport0 (interrupt-driven).
Floppy drive(s): fd0 is 1.44M
FDC 0 is a post-1991 82077
loop: module loaded
Uniform Multi-Platform E-IDE driver
atiixp 0000:00:14.1: IDE controller (0x1002:0x438c rev 0x00)
atiixp 0000:00:14.1: not 100% native mode: will probe irqs later
ide0: BM-DMA at 0xff00-0xff07
Probing IDE interface ide0...
Refined TSC clocksource calibration: 2500.175 MHz.
Switching to clocksource tsc
hda: _NEC DVD_RW ND-3540A, ATAPI CD/DVD-ROM drive
hda: host max PIO4 wanted PIO255(auto-tune) selected PIO4
hda: UDMA/33 mode selected
ide0 at 0x1f0-0x1f7,0x3f6 on irq 14
ide_generic: please use "probe_mask=0x3f" module parameter for probing all legacy ISA IDE ports
ide-gd driver 1.18
ide-cd driver 5.00
ide-cd: hda: ATAPI 48X DVD-ROM DVD-R CD-R/RW drive, 2048kB Cache
cdrom: Uniform CD-ROM driver Revision: 3.20
ahci 0000:00:12.0: version 3.0
ahci 0000:00:12.0: MSI K9A2 Platinum: enabling 64bit DMA
ahci 0000:00:12.0: AHCI 0001.0100 32 slots 4 ports 3 Gbps 0xf impl SATA mode
ahci 0000:00:12.0: flags: 64bit ncq sntf ilck pm led clo pmp pio slum part ccc
scsi0 : ahci
scsi1 : ahci
scsi2 : ahci
scsi3 : ahci
ata1: SATA max UDMA/133 abar m1024@0xfe5ff800 port 0xfe5ff900 irq 22
ata2: SATA max UDMA/133 abar m1024@0xfe5ff800 port 0xfe5ff980 irq 22
ata3: SATA max UDMA/133 abar m1024@0xfe5ff800 port 0xfe5ffa00 irq 22
ata4: SATA max UDMA/133 abar m1024@0xfe5ff800 port 0xfe5ffa80 irq 22
ahci 0000:03:00.0: PDC42819 can only drive SATA devices with this driver
ahci 0000:03:00.0: AHCI 0001.0100 32 slots 4 ports 3 Gbps 0xf impl RAID mode
ahci 0000:03:00.0: flags: 64bit ncq sntf ilck pm led clo pmp pio slum part ccc
scsi4 : ahci
scsi5 : ahci
scsi6 : ahci
scsi7 : ahci
ata5: SATA max UDMA/133 abar m8192@0xfe8fc000 port 0xfe8fc100 irq 17
ata6: SATA max UDMA/133 abar m8192@0xfe8fc000 port 0xfe8fc180 irq 17
ata7: SATA max UDMA/133 abar m8192@0xfe8fc000 port 0xfe8fc200 irq 17
ata8: SATA max UDMA/133 abar m8192@0xfe8fc000 port 0xfe8fc280 irq 17
Linux Tulip driver version 1.1.15-NAPI (Feb 27, 2007)
tulip0: EEPROM default media type Autosense
tulip0: Index #0 - Media MII (#11) described by a 21142 MII PHY (3) block
tulip0: MII transceiver #1 config 3100 status 7869 advertising 01e1
net eth0: Digital DS21142/43 Tulip rev 65 at MMIO 0xfebffc00, 00:80:c8:b9:c1:d5, IRQ 21
tulip1: EEPROM default media type Autosense
tulip1: Index #0 - Media MII (#11) described by a 21142 MII PHY (3) block
tulip1: MII transceiver #1 config 3100 status 7869 advertising 01e1
net eth1: Digital DS21142/43 Tulip rev 65 at MMIO 0xfebff800, 00:80:c8:b9:c1:d6, IRQ 22
tulip2: EEPROM default media type Autosense
tulip2: Index #0 - Media MII (#11) described by a 21142 MII PHY (3) block
tulip2: MII transceiver #1 config 3100 status 7849 advertising 01e1
net eth2: Digital DS21142/43 Tulip rev 65 at MMIO 0xfebff400, 00:80:c8:b9:c1:d7, IRQ 23
tulip3: EEPROM default media type Autosense
tulip3: Index #0 - Media MII (#11) described by a 21142 MII PHY (3) block
tulip3: MII transceiver #1 config 3100 status 7869 advertising 01e1
net eth3: Digital DS21142/43 Tulip rev 65 at MMIO 0xfebff000, 00:80:c8:b9:c1:d8, IRQ 20
r8169 Gigabit Ethernet driver 2.3LK-NAPI loaded
r8169 0000:02:00.0: irq 40 for MSI/MSI-X
r8169 0000:02:00.0: eth4: RTL8168b/8111b at 0xffffc90000020000, 00:21:85:16:51:7f, XID 18000000 IRQ 40
r8169 0000:02:00.0: eth4: jumbo features [frames: 4080 bytes, tx checksumming: ko]
ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
ehci_hcd 0000:00:13.5: EHCI Host Controller
ehci_hcd 0000:00:13.5: new USB bus registered, assigned bus number 1
ehci_hcd 0000:00:13.5: applying AMD SB600/SB700 USB freeze workaround
ehci_hcd 0000:00:13.5: debug port 1
ehci_hcd 0000:00:13.5: irq 19, io mem 0xfe5ff000
ehci_hcd 0000:00:13.5: USB 2.0 started, EHCI 1.00
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 10 ports detected
ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
ohci_hcd 0000:00:13.0: OHCI Host Controller
ohci_hcd 0000:00:13.0: new USB bus registered, assigned bus number 2
ohci_hcd 0000:00:13.0: irq 16, io mem 0xfe5fe000
hub 2-0:1.0: USB hub found
hub 2-0:1.0: 2 ports detected
ohci_hcd 0000:00:13.1: OHCI Host Controller
ohci_hcd 0000:00:13.1: new USB bus registered, assigned bus number 3
ohci_hcd 0000:00:13.1: irq 17, io mem 0xfe5fd000
hub 3-0:1.0: USB hub found
hub 3-0:1.0: 2 ports detected
ohci_hcd 0000:00:13.2: OHCI Host Controller
ohci_hcd 0000:00:13.2: new USB bus registered, assigned bus number 4
ohci_hcd 0000:00:13.2: irq 18, io mem 0xfe5fc000
hub 4-0:1.0: USB hub found
hub 4-0:1.0: 2 ports detected
ohci_hcd 0000:00:13.3: OHCI Host Controller
ohci_hcd 0000:00:13.3: new USB bus registered, assigned bus number 5
ohci_hcd 0000:00:13.3: irq 17, io mem 0xfe5fb000
ata2: SATA link up 1.5 Gbps (SStatus 113 SControl 300)
ata6: SATA link up 1.5 Gbps (SStatus 113 SControl 300)
ata8: SATA link down (SStatus 0 SControl 300)
ata1: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
ata5: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
ata3: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
ata7: SATA link down (SStatus 0 SControl 300)
ata4: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
ata6.00: ATA-8: Hitachi HDS5C3020ALA632, ML6OA580, max UDMA/133
ata6.00: 3907029168 sectors, multi 16: LBA48 NCQ (depth 31/32), AA
ata5.00: ATA-8: ST3750330AS, SD1A, max UDMA/133
ata2.00: ATA-8: ST3750330AS, SD1A, max UDMA/133
ata2.00: 1465149168 sectors, multi 16: LBA48 NCQ (depth 31/32)
ata2.00: SB600 AHCI: limiting to 255 sectors per cmd
ata1.00: ATA-8: ST3750330AS, SD1A, max UDMA/133
ata1.00: 1465149168 sectors, multi 16: LBA48 NCQ (depth 31/32)
ata1.00: SB600 AHCI: limiting to 255 sectors per cmd
ata4.00: ATA-8: ST3750330AS, SD1A, max UDMA/133
ata4.00: 1465149168 sectors, multi 16: LBA48 NCQ (depth 31/32)
ata4.00: SB600 AHCI: limiting to 255 sectors per cmd
ata3.00: ATA-8: ST3750330AS, SD1A, max UDMA/133
ata3.00: 1465149168 sectors, multi 16: LBA48 NCQ (depth 31/32)
ata3.00: SB600 AHCI: limiting to 255 sectors per cmd
ata5.00: 1465149168 sectors, multi 16: LBA48 NCQ (depth 31/32)
ata6.00: configured for UDMA/133
ata2.00: SB600 AHCI: limiting to 255 sectors per cmd
ata2.00: configured for UDMA/133
ata1.00: SB600 AHCI: limiting to 255 sectors per cmd
ata1.00: configured for UDMA/133
ata4.00: SB600 AHCI: limiting to 255 sectors per cmd
ata4.00: configured for UDMA/133
ata5.00: configured for UDMA/133
ata3.00: SB600 AHCI: limiting to 255 sectors per cmd
scsi 0:0:0:0: Direct-Access ATA ST3750330AS SD1A PQ: 0 ANSI: 5
ata3.00: configured for UDMA/133
sd 0:0:0:0: [sda] 1465149168 512-byte logical blocks: (750 GB/698 GiB)
sd 0:0:0:0: [sda] Write Protect is off
sd 0:0:0:0: [sda] Mode Sense: 00 3a 00 00
sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
scsi 1:0:0:0: Direct-Access ATA ST3750330AS SD1A PQ: 0 ANSI: 5
sd 1:0:0:0: [sdb] 1465149168 512-byte logical blocks: (750 GB/698 GiB)
scsi 2:0:0:0: Direct-Access ATA ST3750330AS SD1A PQ: 0 ANSI: 5
sd 1:0:0:0: [sdb] Write Protect is off
sd 1:0:0:0: [sdb] Mode Sense: 00 3a 00 00
sd 1:0:0:0: [sdb] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
sd 2:0:0:0: [sdc] 1465149168 512-byte logical blocks: (750 GB/698 GiB)
sd 2:0:0:0: [sdc] Write Protect is off
sd 2:0:0:0: [sdc] Mode Sense: 00 3a 00 00
sd 2:0:0:0: [sdc] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
scsi 3:0:0:0: Direct-Access ATA ST3750330AS SD1A PQ: 0 ANSI: 5
sd 3:0:0:0: [sdd] 1465149168 512-byte logical blocks: (750 GB/698 GiB)
sd 3:0:0:0: [sdd] Write Protect is off
sd 3:0:0:0: [sdd] Mode Sense: 00 3a 00 00
scsi 4:0:0:0: Direct-Access ATA ST3750330AS SD1A PQ: 0 ANSI: 5
sd 3:0:0:0: [sdd] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
sd 4:0:0:0: [sde] 1465149168 512-byte logical blocks: (750 GB/698 GiB)
scsi 5:0:0:0: Direct-Access ATA Hitachi HDS5C302 ML6O PQ: 0 ANSI: 5
sd 4:0:0:0: [sde] Write Protect is off
sd 4:0:0:0: [sde] Mode Sense: 00 3a 00 00
sd 4:0:0:0: [sde] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
sd 5:0:0:0: [sdf] 3907029168 512-byte logical blocks: (2.00 TB/1.81 TiB)
sd 5:0:0:0: [sdf] Write Protect is off
sd 5:0:0:0: [sdf] Mode Sense: 00 3a 00 10
sd 5:0:0:0: [sdf] Write cache: enabled, read cache: enabled, supports DPO and FUA
sdb: sdb1 sdb2 sdb3 sdb4
sd 1:0:0:0: [sdb] Attached SCSI disk
sdf: sdf1
sd 5:0:0:0: [sdf] Attached SCSI disk
sdd: sdd1 sdd2 sdd3 sdd4
sd 3:0:0:0: [sdd] Attached SCSI disk
sde: sde1 sde2 sde3 sde4
sd 4:0:0:0: [sde] Attached SCSI disk
hub 5-0:1.0: USB hub found
hub 5-0:1.0: 2 ports detected
ohci_hcd 0000:00:13.4: OHCI Host Controller
ohci_hcd 0000:00:13.4: new USB bus registered, assigned bus number 6
ohci_hcd 0000:00:13.4: irq 18, io mem 0xfe5fa000
sda: sda1 sda2 sda3 sda4
sd 0:0:0:0: [sda] Attached SCSI disk
sdc: sdc1 sdc2 sdc3 sdc4
sd 2:0:0:0: [sdc] Attached SCSI disk
hub 6-0:1.0: USB hub found
hub 6-0:1.0: 2 ports detected
Initializing USB Mass Storage driver...
usbcore: registered new interface driver usb-storage
USB Mass Storage support registered.
usbcore: registered new interface driver usbserial
usbserial: USB Serial Driver core
usbcore: registered new interface driver pl2303
USB Serial support registered for pl2303
i8042: PNP: PS/2 Controller [PNP0303:PS2K,PNP0f03:PS2M] at 0x60,0x64 irq 1,12
serio: i8042 KBD port at 0x60,0x64 irq 1
serio: i8042 AUX port at 0x60,0x64 irq 12
mousedev: PS/2 mouse device common for all mice
rtc_cmos 00:02: RTC can wake from S4
rtc_cmos 00:02: rtc core: registered rtc_cmos as rtc0
rtc0: alarms up to one month, y3k, 114 bytes nvram, hpet irqs
i2c /dev entries driver
ACPI Warning: 0x0000000000000b00-0x0000000000000b07 SystemIO conflicts with Region \SOR1 1 (20120320/utaddress-251)
ACPI: This conflict may cause random problems and system instability
ACPI: If an ACPI driver is available for this device, you should use it instead of the native driver
piix4_smbus 0000:00:14.0: SMBus Host Controller at 0xb00, revision 0
input: AT Translated Set 2 keyboard as /devices/platform/i8042/serio0/input/input0
pps_ldisc: PPS line discipline registered
f71882fg: Found f71882fg chip at 0x600, revision 32
ACPI Warning: 0x0000000000000600-0x0000000000000607 SystemIO conflicts with Region \HMOR 1 (20120320/utaddress-251)
ACPI: This conflict may cause random problems and system instability
ACPI: If an ACPI driver is available for this device, you should use it instead of the native driver
f71882fg f71882fg.1536: Fan: 1 is in duty-cycle mode
f71882fg f71882fg.1536: Fan: 2 is in duty-cycle mode
f71882fg f71882fg.1536: Fan: 3 is in duty-cycle mode
f71882fg f71882fg.1536: Fan: 4 is in duty-cycle mode
k10temp 0000:00:18.3: unreliable CPU thermal sensor; check erratum 319
md: raid0 personality registered for level 0
md: raid1 personality registered for level 1
md: raid10 personality registered for level 10
md: raid6 personality registered for level 6
md: raid5 personality registered for level 5
md: raid4 personality registered for level 4
EDAC MC: Ver: 2.1.0
AMD64 EDAC driver v3.4.0
EDAC amd64: DRAM ECC disabled.
EDAC amd64: ECC disabled in the BIOS or no ECC capability, module will not load.
Either enable ECC checking or force module loading by setting 'ecc_enable_override'.
(Note that use of the override may cause unknown side effects.)
cpuidle: using governor ladder
cpuidle: using governor menu
usbcore: registered new interface driver usbhid
usbhid: USB HID core driver
GACT probability on
netem: version 1.3
u32 classifier
Actions configured
Netfilter messages via NETLINK v0.30.
nf_conntrack version 0.5.0 (16384 buckets, 65536 max)
ctnetlink v0.93: registering with nfnetlink.
NF_TPROXY: Transparent proxy support initialized, version 4.1.0
NF_TPROXY: Copyright (c) 2006-2007 BalaBit IT Ltd.
ip_set: protocol 6
IPv4 over IPv4 tunneling driver
ip_tables: (C) 2000-2006 Netfilter Core Team
TCP: bic registered
TCP: cubic registered
TCP: westwood registered
TCP: highspeed registered
TCP: hybla registered
TCP: htcp registered
TCP: vegas registered
TCP: veno registered
TCP: scalable registered
TCP: lp registered
TCP: yeah registered
TCP: illinois registered
Initializing XFRM netlink socket
NET: Registered protocol family 10
ip6_tables: (C) 2000-2006 Netfilter Core Team
IPv6 over IPv4 tunneling driver
NET: Registered protocol family 17
NET: Registered protocol family 15
Bridge firewalling registered
8021q: 802.1Q VLAN Support v1.8
registered taskstats version 1
rtc_cmos 00:02: setting system clock to 2012-05-21 23:13:48 UTC (1337642028)
powernow-k8: Found 1 AMD Phenom(tm) 9850 Quad-Core Processor (4 cpu cores) (version 2.20.00)
[Firmware Bug]: powernow-k8: No compatible ACPI _PSS objects found.
[Firmware Bug]: powernow-k8: Try again with latest BIOS.
ALSA device list:
#0: HDA ATI SB at 0xfe5f4000 irq 16
usb 6-2: new low-speed USB device number 2 using ohci_hcd
input: HID 0430:0100 as /devices/pci0000:00/0000:00:13.4/usb6/6-2/6-2:1.0/input/input1
generic-usb 0003:0430:0100.0001: input: USB HID v1.00 Mouse [HID 0430:0100] on usb-0000:00:13.4-2/input0
input: PS/2 Generic Mouse as /devices/platform/i8042/serio1/input/input2
md: Waiting for all devices to be available before autodetect
md: If you don't use raid, use raid=noautodetect
md: Autodetecting RAID arrays.
md: Scanned 20 and added 20 devices.
md: autorun ...
md: considering sdc4 ...
md: adding sdc4 ...
md: sdc3 has different UUID to sdc4
md: sdc2 has different UUID to sdc4
md: sdc1 has different UUID to sdc4
md: adding sda4 ...
md: sda3 has different UUID to sdc4
md: sda2 has different UUID to sdc4
md: sda1 has different UUID to sdc4
md: adding sde4 ...
md: sde3 has different UUID to sdc4
md: sde2 has different UUID to sdc4
md: sde1 has different UUID to sdc4
md: adding sdd4 ...
md: sdd3 has different UUID to sdc4
md: sdd2 has different UUID to sdc4
md: sdd1 has different UUID to sdc4
md: adding sdb4 ...
md: sdb3 has different UUID to sdc4
md: sdb2 has different UUID to sdc4
md: sdb1 has different UUID to sdc4
md: created md6
md: bind<sdb4>
md: bind<sdd4>
md: bind<sde4>
md: bind<sda4>
md: bind<sdc4>
md: running: <sdc4><sda4><sde4><sdd4><sdb4>
bio: create slab <bio-1> at 1
md/raid:md6: device sdc4 operational as raid disk 2
md/raid:md6: device sda4 operational as raid disk 0
md/raid:md6: device sde4 operational as raid disk 4
md/raid:md6: device sdd4 operational as raid disk 3
md/raid:md6: device sdb4 operational as raid disk 1
md/raid:md6: allocated 5350kB
md/raid:md6: raid level 5 active with 5 out of 5 devices, algorithm 2
RAID conf printout:
--- level:5 rd:5 wd:5
disk 0, o:1, dev:sda4
disk 1, o:1, dev:sdb4
disk 2, o:1, dev:sdc4
disk 3, o:1, dev:sdd4
disk 4, o:1, dev:sde4
created bitmap (173 pages) for device md6
md6: bitmap initialized from disk: read 11/11 pages, set 1 of 354293 bits
md6: detected capacity change from 0 to 1486011498496
md: considering sdc3 ...
md: adding sdc3 ...
md: sdc2 has different UUID to sdc3
md: sdc1 has different UUID to sdc3
md: sda3 has different UUID to sdc3
md: sda2 has different UUID to sdc3
md: sda1 has different UUID to sdc3
md: sde3 has different UUID to sdc3
md: sde2 has different UUID to sdc3
md: sde1 has different UUID to sdc3
md: adding sdd3 ...
md: sdd2 has different UUID to sdc3
md: sdd1 has different UUID to sdc3
md: sdb3 has different UUID to sdc3
md: sdb2 has different UUID to sdc3
md: sdb1 has different UUID to sdc3
md: created md8
md: bind<sdd3>
md: bind<sdc3>
md: running: <sdc3><sdd3>
md/raid1:md8: active with 2 out of 2 mirrors
md8: detected capacity change from 0 to 6144196608
md: considering sdc2 ...
md: adding sdc2 ...
md: sdc1 has different UUID to sdc2
md: sda3 has different UUID to sdc2
md: adding sda2 ...
md: sda1 has different UUID to sdc2
md: sde3 has different UUID to sdc2
md: adding sde2 ...
md: sde1 has different UUID to sdc2
md: adding sdd2 ...
md: sdd1 has different UUID to sdc2
md: sdb3 has different UUID to sdc2
md: adding sdb2 ...
md: sdb1 has different UUID to sdc2
md: created md5
md: bind<sdb2>
md: bind<sdd2>
md: bind<sde2>
md: bind<sda2>
md: bind<sdc2>
md: running: <sdc2><sda2><sde2><sdd2><sdb2>
md/raid10:md5: active with 4 out of 4 devices
created bitmap (173 pages) for device md5
md5: bitmap initialized from disk: read 11/11 pages, set 0 of 354293 bits
md5: detected capacity change from 0 to 743005749248
md: considering sdc1 ...
RAID10 conf printout:
--- wd:4 rd:4
disk 0, wo:0, o:1, dev:sda2
disk 1, wo:0, o:1, dev:sdb2
disk 2, wo:0, o:1, dev:sdc2
disk 3, wo:0, o:1, dev:sdd2
md: adding sdc1 ...
md: sda3 has different UUID to sdc1
md: adding sda1 ...
md: sde3 has different UUID to sdc1
md: adding sde1 ...
md: adding sdd1 ...
md: sdb3 has different UUID to sdc1
md: adding sdb1 ...
md: created md0
md: bind<sdb1>
md: bind<sdd1>
md: bind<sde1>
md: bind<sda1>
md: bind<sdc1>
md: running: <sdc1><sda1><sde1><sdd1><sdb1>
md/raid1:md0: active with 5 out of 5 mirrors
md0: detected capacity change from 0 to 1003356160
md: considering sda3 ...
md: adding sda3 ...
md: adding sde3 ...
md: adding sdb3 ...
md: created md7
md: bind<sdb3>
md: bind<sde3>
md: bind<sda3>
md: running: <sda3><sde3><sdb3>
md/raid1:md7: active with 2 out of 2 mirrors
md7: detected capacity change from 0 to 6144196608
md: ... autorun DONE.
RAID1 conf printout:
--- wd:2 rd:2
disk 0, wo:0, o:1, dev:sda3
disk 1, wo:0, o:1, dev:sdb3
md5: unknown partition table
kjournald starting. Commit interval 5 seconds
EXT3-fs (md5): mounted filesystem with ordered data mode
VFS: Mounted root (ext3 filesystem) readonly on device 9:5.
Freeing unused kernel memory: 476k freed
mdadm: sending ioctl 1261 to a partition!
mdadm: sending ioctl 1261 to a partition!
md7: unknown partition table
md8: unknown partition table
mdadm: sending ioctl 1261 to a partition!
mdadm: sending ioctl 1261 to a partition!
mdadm: sending ioctl 1261 to a partition!
mdadm: sending ioctl 1261 to a partition!
mdadm: sending ioctl 1261 to a partition!
mdadm: sending ioctl 1261 to a partition!
mdadm: sending ioctl 1261 to a partition!
mdadm: sending ioctl 1261 to a partition!
md6: unknown partition table
md0:
udevd[1126]: renamed network interface eth4 to inside
udevd[1202]: renamed network interface eth1 to dmz
udevd[1184]: renamed network interface eth2 to t1
udevd[1125]: renamed network interface eth3 to spare
udevd[1132]: renamed network interface eth0 to cable
hda: UDMA/33 mode selected
ata1.00: SB600 AHCI: limiting to 255 sectors per cmd
ata1.00: SB600 AHCI: limiting to 255 sectors per cmd
ata1.00: configured for UDMA/133
ata1: EH complete
ata1.00: SB600 AHCI: limiting to 255 sectors per cmd
ata1.00: SB600 AHCI: limiting to 255 sectors per cmd
ata1.00: configured for UDMA/133
ata1: EH complete
ata2.00: SB600 AHCI: limiting to 255 sectors per cmd
ata1.00: SB600 AHCI: limiting to 255 sectors per cmd
ata2.00: SB600 AHCI: limiting to 255 sectors per cmd
ata2.00: configured for UDMA/133
ata2: EH complete
ata1.00: SB600 AHCI: limiting to 255 sectors per cmd
ata1.00: configured for UDMA/133
ata1: EH complete
ata3.00: SB600 AHCI: limiting to 255 sectors per cmd
ata2.00: SB600 AHCI: limiting to 255 sectors per cmd
ata1.00: SB600 AHCI: limiting to 255 sectors per cmd
ata3.00: SB600 AHCI: limiting to 255 sectors per cmd
ata3.00: configured for UDMA/133
ata3: EH complete
ata2.00: SB600 AHCI: limiting to 255 sectors per cmd
ata2.00: configured for UDMA/133
ata2: EH complete
ata1.00: SB600 AHCI: limiting to 255 sectors per cmd
ata1.00: configured for UDMA/133
ata1: EH complete
ata4.00: SB600 AHCI: limiting to 255 sectors per cmd
ata3.00: SB600 AHCI: limiting to 255 sectors per cmd
ata2.00: SB600 AHCI: limiting to 255 sectors per cmd
ata4.00: SB600 AHCI: limiting to 255 sectors per cmd
ata4.00: configured for UDMA/133
ata4: EH complete
ata3.00: SB600 AHCI: limiting to 255 sectors per cmd
ata3.00: configured for UDMA/133
ata3: EH complete
ata1.00: SB600 AHCI: limiting to 255 sectors per cmd
ata2.00: SB600 AHCI: limiting to 255 sectors per cmd
ata2.00: configured for UDMA/133
ata2: EH complete
ata1.00: SB600 AHCI: limiting to 255 sectors per cmd
ata1.00: configured for UDMA/133
ata1: EH complete
ata4.00: SB600 AHCI: limiting to 255 sectors per cmd
ata3.00: SB600 AHCI: limiting to 255 sectors per cmd
ata2.00: SB600 AHCI: limiting to 255 sectors per cmd
ata5.00: configured for UDMA/133
ata5: EH complete
ata4.00: SB600 AHCI: limiting to 255 sectors per cmd
ata4.00: configured for UDMA/133
ata4: EH complete
ata3.00: SB600 AHCI: limiting to 255 sectors per cmd
ata3.00: configured for UDMA/133
ata3: EH complete
ata2.00: SB600 AHCI: limiting to 255 sectors per cmd
ata2.00: configured for UDMA/133
ata2: EH complete
ata1.00: SB600 AHCI: limiting to 255 sectors per cmd
ata6.00: configured for UDMA/133
ata6: EH complete
ata2.00: SB600 AHCI: limiting to 255 sectors per cmd
ata4.00: SB600 AHCI: limiting to 255 sectors per cmd
ata3.00: SB600 AHCI: limiting to 255 sectors per cmd
ata1.00: SB600 AHCI: limiting to 255 sectors per cmd
ata1.00: configured for UDMA/133
ata1: EH complete
ata5.00: configured for UDMA/133
ata5: EH complete
ata2.00: SB600 AHCI: limiting to 255 sectors per cmd
ata2.00: configured for UDMA/133
ata2: EH complete
ata4.00: SB600 AHCI: limiting to 255 sectors per cmd
ata4.00: configured for UDMA/133
ata4: EH complete
ata3.00: SB600 AHCI: limiting to 255 sectors per cmd
ata3.00: configured for UDMA/133
ata3: EH complete
ata2.00: SB600 AHCI: limiting to 255 sectors per cmd
ata6.00: configured for UDMA/133
ata6: EH complete
ata4.00: SB600 AHCI: limiting to 255 sectors per cmd
ata2.00: SB600 AHCI: limiting to 255 sectors per cmd
ata2.00: configured for UDMA/133
ata2: EH complete
ata4.00: SB600 AHCI: limiting to 255 sectors per cmd
ata4.00: configured for UDMA/133
ata4: EH complete
ata5.00: configured for UDMA/133
ata5: EH complete
ata3.00: SB600 AHCI: limiting to 255 sectors per cmd
ata6.00: configured for UDMA/133
ata6: EH complete
ata3.00: SB600 AHCI: limiting to 255 sectors per cmd
ata3.00: configured for UDMA/133
ata3: EH complete
ata5.00: configured for UDMA/133
ata5: EH complete
ata3.00: SB600 AHCI: limiting to 255 sectors per cmd
ata3.00: SB600 AHCI: limiting to 255 sectors per cmd
ata3.00: configured for UDMA/133
ata3: EH complete
ata6.00: configured for UDMA/133
ata6: EH complete
ata4.00: SB600 AHCI: limiting to 255 sectors per cmd
ata4.00: SB600 AHCI: limiting to 255 sectors per cmd
ata4.00: configured for UDMA/133
ata4: EH complete
ata4.00: SB600 AHCI: limiting to 255 sectors per cmd
ata4.00: SB600 AHCI: limiting to 255 sectors per cmd
ata4.00: configured for UDMA/133
ata4: EH complete
ata5.00: configured for UDMA/133
ata5: EH complete
ata6.00: configured for UDMA/133
ata6: EH complete
ata5.00: configured for UDMA/133
ata5: EH complete
ata6.00: configured for UDMA/133
ata6: EH complete
hda: UDMA/33 mode selected
ata1.00: SB600 AHCI: limiting to 255 sectors per cmd
ata1.00: SB600 AHCI: limiting to 255 sectors per cmd
ata1.00: configured for UDMA/133
ata1: EH complete
ata2.00: SB600 AHCI: limiting to 255 sectors per cmd
ata2.00: SB600 AHCI: limiting to 255 sectors per cmd
ata2.00: configured for UDMA/133
ata2: EH complete
ata3.00: SB600 AHCI: limiting to 255 sectors per cmd
ata3.00: SB600 AHCI: limiting to 255 sectors per cmd
ata3.00: configured for UDMA/133
ata3: EH complete
ata4.00: SB600 AHCI: limiting to 255 sectors per cmd
ata4.00: SB600 AHCI: limiting to 255 sectors per cmd
ata4.00: configured for UDMA/133
ata4: EH complete
ata5.00: configured for UDMA/133
ata5: EH complete
ata6.00: configured for UDMA/133
ata6: EH complete
Adding 6000188k swap on /dev/md7. Priority:1 extents:1 across:6000188k
Adding 6000188k swap on /dev/md8. Priority:1 extents:1 across:6000188k
scsi_verify_blk_ioctl: 832 callbacks suppressed
mdadm: sending ioctl 1261 to a partition!
mdadm: sending ioctl 1261 to a partition!
EXT3-fs (md5): using internal journal
mdadm: sending ioctl 1261 to a partition!
mdadm: sending ioctl 1261 to a partition!
mdadm: sending ioctl 1261 to a partition!
mdadm: sending ioctl 1261 to a partition!
kjournald starting. Commit interval 5 seconds
EXT3-fs (md6): using internal journal
EXT3-fs (md6): mounted filesystem with writeback data mode
EXT4-fs (sdf1): mounted filesystem with writeback data mode. Opts: data=writeback
r8169 0000:02:00.0: inside: link down
r8169 0000:02:00.0: inside: link down
NOHZ: local_softirq_pending 08
ADDRCONF(NETDEV_UP): inside: link is not ready
r8169 0000:02:00.0: inside: link up
ADDRCONF(NETDEV_CHANGE): inside: link becomes ready
net dmz: Setting full-duplex based on MII#1 link partner capability of 45e1
net cable: Setting full-duplex based on MII#1 link partner capability of 41e1
cable: no IPv6 routers present
dmz: no IPv6 routers present
inside: no IPv6 routers present
postgres (7418): /proc/7418/oom_adj is deprecated, please use /proc/7418/oom_score_adj instead.
pps pps0: new PPS source serial3 at ID 0
pps pps0: source "/dev/ttyS3" added
pps pps1: new PPS source serial4 at ID 1
pps pps1: source "/dev/ttyS4" added
device cable entered promiscuous mode
device dmz entered promiscuous mode
------------[ cut here ]------------
WARNING: at net/sched/sch_generic.c:256 dev_watchdog+0xe9/0x15c()
Hardware name: MS-7376
NETDEV WATCHDOG: inside (r8169): transmit queue 0 timed out
Pid: 0, comm: swapper/3 Not tainted 3.4.0-00017-g3df9c78 #152
Call Trace:
<IRQ> [<ffffffff81311aba>] ? dev_watchdog+0xe9/0x15c
[<ffffffff81024499>] ? warn_slowpath_common+0x71/0x85
[<ffffffff813119d1>] ? netif_tx_lock+0x7a/0x7a
[<ffffffff81024511>] ? warn_slowpath_fmt+0x45/0x4a
[<ffffffff813119be>] ? netif_tx_lock+0x67/0x7a
[<ffffffff81311aba>] ? dev_watchdog+0xe9/0x15c
[<ffffffff810345ab>] ? __queue_work+0x20a/0x20a
[<ffffffff8102c908>] ? run_timer_softirq+0x17e/0x20b
[<ffffffff81028889>] ? __do_softirq+0x80/0x102
[<ffffffff81404b8c>] ? call_softirq+0x1c/0x30
[<ffffffff81003044>] ? do_softirq+0x2c/0x60
[<ffffffff81028abc>] ? irq_exit+0x3a/0x91
[<ffffffff81002e91>] ? do_IRQ+0x81/0x97
[<ffffffff81403327>] ? common_interrupt+0x67/0x67
<EOI> [<ffffffff810079d8>] ? default_idle+0x1e/0x32
[<ffffffff81007afc>] ? amd_e400_idle+0xb7/0xd4
[<ffffffff810081a5>] ? cpu_idle+0x58/0x98
---[ end trace 7d5a7d21f604b0d8 ]---
r8169 0000:02:00.0: inside: link up
r8169 0000:02:00.0: inside: link up
r8169 0000:02:00.0: inside: link up
r8169 0000:02:00.0: inside: link up
r8169 0000:02:00.0: inside: link up
r8169 0000:02:00.0: inside: link up
r8169 0000:02:00.0: inside: link up
r8169 0000:02:00.0: inside: link up
r8169 0000:02:00.0: inside: link up
r8169 0000:02:00.0: inside: link up
TCP: TCP: Possible SYN flooding on port 25. Sending cookies. Check SNMP counters.
kjournald starting. Commit interval 5 seconds
EXT3-fs (md0): using internal journal
EXT3-fs (md0): mounted filesystem with journal data mode
r8169 0000:02:00.0: inside: link up
r8169 0000:02:00.0: inside: link up
UDP: short packet: From yyy.yy.yyy.yy:10995 32496/70 to xx.xxx.xx.xxx:6881
r8169 0000:02:00.0: inside: link up
r8169 0000:02:00.0: inside: link up
r8169 0000:02:00.0: inside: link up
UDP: short packet: From zzz.zzz.zz.zz:29440 21248/181 to xx.xxx.xx.xxx:23552
^ permalink raw reply
* [PATCH V2] ipv4: fix the rcu race between free_fib_info and ip_route_output_slow
From: kun.jiang @ 2012-05-24 1:39 UTC (permalink / raw)
To: netdev, LKML, YMZHANG, davem, eric.dumazet
From: Yanmin Zhang <yanmin_zhang@linux.intel.com>
We hit a kernel OOPS.
<3>[23898.789643] BUG: sleeping function called from invalid context at
/data/buildbot/workdir/ics/hardware/intel/linux-2.6/arch/x86/mm/fault.c:1103
<3>[23898.862215] in_atomic(): 0, irqs_disabled(): 0, pid: 10526, name:
Thread-6683
<4>[23898.967805] HSU serial 0000:00:05.1: 0000:00:05.2:HSU serial prevented me
to suspend...
<4>[23899.258526] Pid: 10526, comm: Thread-6683 Tainted: G W
3.0.8-137685-ge7742f9 #1
<4>[23899.357404] HSU serial 0000:00:05.1: 0000:00:05.2:HSU serial prevented me
to suspend...
<4>[23899.904225] Call Trace:
<4>[23899.989209] [<c1227f50>] ? pgtable_bad+0x130/0x130
<4>[23900.000416] [<c1238c2a>] __might_sleep+0x10a/0x110
<4>[23900.007357] [<c1228021>] do_page_fault+0xd1/0x3c0
<4>[23900.013764] [<c18e9ba9>] ? restore_all+0xf/0xf
<4>[23900.024024] [<c17c007b>] ? napi_complete+0x8b/0x690
<4>[23900.029297] [<c1227f50>] ? pgtable_bad+0x130/0x130
<4>[23900.123739] [<c1227f50>] ? pgtable_bad+0x130/0x130
<4>[23900.128955] [<c18ea0c3>] error_code+0x5f/0x64
<4>[23900.133466] [<c1227f50>] ? pgtable_bad+0x130/0x130
<4>[23900.138450] [<c17f6298>] ? __ip_route_output_key+0x698/0x7c0
<4>[23900.144312] [<c17f5f8d>] ? __ip_route_output_key+0x38d/0x7c0
<4>[23900.150730] [<c17f63df>] ip_route_output_flow+0x1f/0x60
<4>[23900.156261] [<c181de58>] ip4_datagram_connect+0x188/0x2b0
<4>[23900.161960] [<c18e981f>] ? _raw_spin_unlock_bh+0x1f/0x30
<4>[23900.167834] [<c18298d6>] inet_dgram_connect+0x36/0x80
<4>[23900.173224] [<c14f9e88>] ? _copy_from_user+0x48/0x140
<4>[23900.178817] [<c17ab9da>] sys_connect+0x9a/0xd0
<4>[23900.183538] [<c132e93c>] ? alloc_file+0xdc/0x240
<4>[23900.189111] [<c123925d>] ? sub_preempt_count+0x3d/0x50
Function free_fib_info resets nexthop_nh->nh_dev to NULL before releasing
fi. Other cpu might be accessing fi. Fixing it by delaying the releasing.
With the patch, we ran MTBF testing on Android mobile for 12 hours
and didn't trigger the issue.
Thank Eric for very detailed review/checking the issue.
Signed-off-by: Yanmin Zhang <yanmin_zhang@linux.intel.com>
Signed-off-by: Kun Jiang <kunx.jiang@intel.com>
---
net/ipv4/fib_semantics.c | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/net/ipv4/fib_semantics.c b/net/ipv4/fib_semantics.c
index 5063fa3..8861f91 100644
--- a/net/ipv4/fib_semantics.c
+++ b/net/ipv4/fib_semantics.c
@@ -145,6 +145,12 @@ static void free_fib_info_rcu(struct rcu_head *head)
{
struct fib_info *fi = container_of(head, struct fib_info, rcu);
+ change_nexthops(fi) {
+ if (nexthop_nh->nh_dev)
+ dev_put(nexthop_nh->nh_dev);
+ } endfor_nexthops(fi);
+
+ release_net(fi->fib_net);
if (fi->fib_metrics != (u32 *) dst_default_metrics)
kfree(fi->fib_metrics);
kfree(fi);
@@ -156,13 +162,7 @@ void free_fib_info(struct fib_info *fi)
pr_warn("Freeing alive fib_info %p\n", fi);
return;
}
- change_nexthops(fi) {
- if (nexthop_nh->nh_dev)
- dev_put(nexthop_nh->nh_dev);
- nexthop_nh->nh_dev = NULL;
- } endfor_nexthops(fi);
fib_info_cnt--;
- release_net(fi->fib_net);
call_rcu(&fi->rcu, free_fib_info_rcu);
}
--
1.7.1
^ permalink raw reply related
* Re: [PATCH 02/17] netfilter: add namespace support for l4proto
From: Gao feng @ 2012-05-24 1:52 UTC (permalink / raw)
To: Pablo Neira Ayuso
Cc: netfilter-devel, netdev, serge.hallyn, ebiederm, dlezcano,
Gao feng
In-Reply-To: <20120523102557.GB2836@1984>
于 2012年05月23日 18:25, Pablo Neira Ayuso 写道:
> On Mon, May 14, 2012 at 04:52:12PM +0800, Gao feng wrote:
>> From: Gao feng <gaofeng@cn.fujitus.com>
>>
>> -nf_ct_(un)register_sysctl are changed to support net namespace,
>> use (un)register_net_sysctl_table replaces (un)register_sysctl_paths.
>> and in nf_ct_unregister_sysctl,kfree table only when users is 0.
>>
>> -Add the struct net as param of nf_conntrack_l4proto_(un)register.
>> register or unregister the l4proto only when the net is init_net.
>>
>> -nf_conntrack_l4proto_register call init_net to initial the pernet
>> data of l4proto.
>>
>> -nf_ct_l4proto_net is used to get the pernet data of l4proto.
>>
>> -use init_net as a param of nf_conntrack_l4proto_(un)register.
>>
>> Acked-by: Eric W. Biederman <ebiederm@xmission.com>
>> Signed-off-by: Gao feng <gaofeng@cn.fujitus.com>
>> ---
>> include/net/netfilter/nf_conntrack_l4proto.h | 13 +-
>> net/ipv4/netfilter/nf_conntrack_l3proto_ipv4.c | 18 +-
>> net/ipv6/netfilter/nf_conntrack_l3proto_ipv6.c | 18 +-
>> net/netfilter/nf_conntrack_proto.c | 245 ++++++++++++++----------
>> net/netfilter/nf_conntrack_proto_dccp.c | 10 +-
>> net/netfilter/nf_conntrack_proto_gre.c | 6 +-
>> net/netfilter/nf_conntrack_proto_sctp.c | 10 +-
>> net/netfilter/nf_conntrack_proto_udplite.c | 10 +-
>> 8 files changed, 191 insertions(+), 139 deletions(-)
>>
>> diff --git a/include/net/netfilter/nf_conntrack_l4proto.h b/include/net/netfilter/nf_conntrack_l4proto.h
>> index a90eab5..a93dcd5 100644
>> --- a/include/net/netfilter/nf_conntrack_l4proto.h
>> +++ b/include/net/netfilter/nf_conntrack_l4proto.h
>> @@ -12,7 +12,7 @@
>> #include <linux/netlink.h>
>> #include <net/netlink.h>
>> #include <net/netfilter/nf_conntrack.h>
>> -
>> +#include <net/netns/generic.h>
>
> Minor nitpick: make sure there's still one line between this structure
> below and the include headers.
thanks! I will fix it.
>
>> struct seq_file;
>>
>> struct nf_conntrack_l4proto {
>> @@ -129,8 +129,15 @@ nf_ct_l4proto_find_get(u_int16_t l3proto, u_int8_t l4proto);
>> extern void nf_ct_l4proto_put(struct nf_conntrack_l4proto *p);
>>
>> /* Protocol registration. */
>> -extern int nf_conntrack_l4proto_register(struct nf_conntrack_l4proto *proto);
>> -extern void nf_conntrack_l4proto_unregister(struct nf_conntrack_l4proto *proto);
>> +extern int nf_conntrack_l4proto_register(struct net *net,
>> + struct nf_conntrack_l4proto *proto);
>> +extern void nf_conntrack_l4proto_unregister(struct net *net,
>> + struct nf_conntrack_l4proto *proto);
>> +
>> +extern int nf_ct_l4proto_register_sysctl(struct net *net,
>> + struct nf_conntrack_l4proto *l4proto);
>> +extern void nf_ct_l4proto_unregister_sysctl(struct net *net,
>> + struct nf_conntrack_l4proto *l4proto);
>>
>> /* Generic netlink helpers */
>> extern int nf_ct_port_tuple_to_nlattr(struct sk_buff *skb,
>> diff --git a/net/ipv4/netfilter/nf_conntrack_l3proto_ipv4.c b/net/ipv4/netfilter/nf_conntrack_l3proto_ipv4.c
>> index 91747d4..46ec515 100644
>> --- a/net/ipv4/netfilter/nf_conntrack_l3proto_ipv4.c
>> +++ b/net/ipv4/netfilter/nf_conntrack_l3proto_ipv4.c
>> @@ -391,19 +391,19 @@ static int __init nf_conntrack_l3proto_ipv4_init(void)
>> return ret;
>> }
>>
>> - ret = nf_conntrack_l4proto_register(&nf_conntrack_l4proto_tcp4);
>> + ret = nf_conntrack_l4proto_register(&init_net, &nf_conntrack_l4proto_tcp4);
>> if (ret < 0) {
>> pr_err("nf_conntrack_ipv4: can't register tcp.\n");
>> goto cleanup_sockopt;
>> }
>>
>> - ret = nf_conntrack_l4proto_register(&nf_conntrack_l4proto_udp4);
>> + ret = nf_conntrack_l4proto_register(&init_net, &nf_conntrack_l4proto_udp4);
>> if (ret < 0) {
>> pr_err("nf_conntrack_ipv4: can't register udp.\n");
>> goto cleanup_tcp;
>> }
>>
>> - ret = nf_conntrack_l4proto_register(&nf_conntrack_l4proto_icmp);
>> + ret = nf_conntrack_l4proto_register(&init_net, &nf_conntrack_l4proto_icmp);
>> if (ret < 0) {
>> pr_err("nf_conntrack_ipv4: can't register icmp.\n");
>> goto cleanup_udp;
>> @@ -434,11 +434,11 @@ static int __init nf_conntrack_l3proto_ipv4_init(void)
>> cleanup_ipv4:
>> nf_conntrack_l3proto_unregister(&nf_conntrack_l3proto_ipv4);
>> cleanup_icmp:
>> - nf_conntrack_l4proto_unregister(&nf_conntrack_l4proto_icmp);
>> + nf_conntrack_l4proto_unregister(&init_net, &nf_conntrack_l4proto_icmp);
>> cleanup_udp:
>> - nf_conntrack_l4proto_unregister(&nf_conntrack_l4proto_udp4);
>> + nf_conntrack_l4proto_unregister(&init_net, &nf_conntrack_l4proto_udp4);
>> cleanup_tcp:
>> - nf_conntrack_l4proto_unregister(&nf_conntrack_l4proto_tcp4);
>> + nf_conntrack_l4proto_unregister(&init_net, &nf_conntrack_l4proto_tcp4);
>> cleanup_sockopt:
>> nf_unregister_sockopt(&so_getorigdst);
>> return ret;
>> @@ -452,9 +452,9 @@ static void __exit nf_conntrack_l3proto_ipv4_fini(void)
>> #endif
>> nf_unregister_hooks(ipv4_conntrack_ops, ARRAY_SIZE(ipv4_conntrack_ops));
>> nf_conntrack_l3proto_unregister(&nf_conntrack_l3proto_ipv4);
>> - nf_conntrack_l4proto_unregister(&nf_conntrack_l4proto_icmp);
>> - nf_conntrack_l4proto_unregister(&nf_conntrack_l4proto_udp4);
>> - nf_conntrack_l4proto_unregister(&nf_conntrack_l4proto_tcp4);
>> + nf_conntrack_l4proto_unregister(&init_net, &nf_conntrack_l4proto_icmp);
>> + nf_conntrack_l4proto_unregister(&init_net, &nf_conntrack_l4proto_udp4);
>> + nf_conntrack_l4proto_unregister(&init_net, &nf_conntrack_l4proto_tcp4);
>> nf_unregister_sockopt(&so_getorigdst);
>> }
>>
>> diff --git a/net/ipv6/netfilter/nf_conntrack_l3proto_ipv6.c b/net/ipv6/netfilter/nf_conntrack_l3proto_ipv6.c
>> index fe925e4..55f379f 100644
>> --- a/net/ipv6/netfilter/nf_conntrack_l3proto_ipv6.c
>> +++ b/net/ipv6/netfilter/nf_conntrack_l3proto_ipv6.c
>> @@ -341,19 +341,19 @@ static int __init nf_conntrack_l3proto_ipv6_init(void)
>> need_conntrack();
>> nf_defrag_ipv6_enable();
>>
>> - ret = nf_conntrack_l4proto_register(&nf_conntrack_l4proto_tcp6);
>> + ret = nf_conntrack_l4proto_register(&init_net, &nf_conntrack_l4proto_tcp6);
>> if (ret < 0) {
>> pr_err("nf_conntrack_ipv6: can't register tcp.\n");
>> return ret;
>> }
>>
>> - ret = nf_conntrack_l4proto_register(&nf_conntrack_l4proto_udp6);
>> + ret = nf_conntrack_l4proto_register(&init_net, &nf_conntrack_l4proto_udp6);
>> if (ret < 0) {
>> pr_err("nf_conntrack_ipv6: can't register udp.\n");
>> goto cleanup_tcp;
>> }
>>
>> - ret = nf_conntrack_l4proto_register(&nf_conntrack_l4proto_icmpv6);
>> + ret = nf_conntrack_l4proto_register(&init_net, &nf_conntrack_l4proto_icmpv6);
>> if (ret < 0) {
>> pr_err("nf_conntrack_ipv6: can't register icmpv6.\n");
>> goto cleanup_udp;
>> @@ -377,11 +377,11 @@ static int __init nf_conntrack_l3proto_ipv6_init(void)
>> cleanup_ipv6:
>> nf_conntrack_l3proto_unregister(&nf_conntrack_l3proto_ipv6);
>> cleanup_icmpv6:
>> - nf_conntrack_l4proto_unregister(&nf_conntrack_l4proto_icmpv6);
>> + nf_conntrack_l4proto_unregister(&init_net, &nf_conntrack_l4proto_icmpv6);
>> cleanup_udp:
>> - nf_conntrack_l4proto_unregister(&nf_conntrack_l4proto_udp6);
>> + nf_conntrack_l4proto_unregister(&init_net, &nf_conntrack_l4proto_udp6);
>> cleanup_tcp:
>> - nf_conntrack_l4proto_unregister(&nf_conntrack_l4proto_tcp6);
>> + nf_conntrack_l4proto_unregister(&init_net, &nf_conntrack_l4proto_tcp6);
>> return ret;
>> }
>>
>> @@ -390,9 +390,9 @@ static void __exit nf_conntrack_l3proto_ipv6_fini(void)
>> synchronize_net();
>> nf_unregister_hooks(ipv6_conntrack_ops, ARRAY_SIZE(ipv6_conntrack_ops));
>> nf_conntrack_l3proto_unregister(&nf_conntrack_l3proto_ipv6);
>> - nf_conntrack_l4proto_unregister(&nf_conntrack_l4proto_icmpv6);
>> - nf_conntrack_l4proto_unregister(&nf_conntrack_l4proto_udp6);
>> - nf_conntrack_l4proto_unregister(&nf_conntrack_l4proto_tcp6);
>> + nf_conntrack_l4proto_unregister(&init_net, &nf_conntrack_l4proto_icmpv6);
>> + nf_conntrack_l4proto_unregister(&init_net, &nf_conntrack_l4proto_udp6);
>> + nf_conntrack_l4proto_unregister(&init_net, &nf_conntrack_l4proto_tcp6);
>> }
>>
>> module_init(nf_conntrack_l3proto_ipv6_init);
>> diff --git a/net/netfilter/nf_conntrack_proto.c b/net/netfilter/nf_conntrack_proto.c
>> index 8b631b0..6d68727 100644
>> --- a/net/netfilter/nf_conntrack_proto.c
>> +++ b/net/netfilter/nf_conntrack_proto.c
>> @@ -35,30 +35,39 @@ EXPORT_SYMBOL_GPL(nf_ct_l3protos);
>> static DEFINE_MUTEX(nf_ct_proto_mutex);
>>
>> #ifdef CONFIG_SYSCTL
>> -static int
>> -nf_ct_register_sysctl(struct ctl_table_header **header, const char *path,
>> - struct ctl_table *table, unsigned int *users)
>> +int
>> +nf_ct_register_sysctl(struct net *net,
>> + struct ctl_table_header **header,
>> + const char *path,
>> + struct ctl_table *table,
>> + unsigned int *users)
>> {
>> if (*header == NULL) {
>> - *header = register_net_sysctl(&init_net, path, table);
>> + *header = register_net_sysctl(net, path, table);
>> if (*header == NULL)
>> return -ENOMEM;
>> }
>> if (users != NULL)
>> (*users)++;
>> +
>> return 0;
>> }
>> +EXPORT_SYMBOL_GPL(nf_ct_register_sysctl);
>
> I don't see why we need to export nf_ct_register_sysctl. I think this
> is a left-over from the previous patchset.
I miss it...
thanks
>
>> -static void
>> +void
>> nf_ct_unregister_sysctl(struct ctl_table_header **header,
>> - struct ctl_table *table, unsigned int *users)
>> + struct ctl_table **table,
>> + unsigned int *users)
>> {
>> if (users != NULL && --*users > 0)
>> return;
>>
>> unregister_net_sysctl_table(*header);
>> + kfree(*table);
>> *header = NULL;
>> + *table = NULL;
>> }
>> +EXPORT_SYMBOL_GPL(nf_ct_unregister_sysctl);
>
> Same thing. I don't find any external user of this new exported
> function in your entire patchset.
>
> You have to fix this.
>
>> #endif
>>
>> struct nf_conntrack_l4proto *
>> @@ -167,7 +176,8 @@ static int nf_ct_l3proto_register_sysctl(struct nf_conntrack_l3proto *l3proto)
>>
>> #ifdef CONFIG_SYSCTL
>> if (l3proto->ctl_table != NULL) {
>> - err = nf_ct_register_sysctl(&l3proto->ctl_table_header,
>> + err = nf_ct_register_sysctl(&init_net,
>> + &l3proto->ctl_table_header,
>> l3proto->ctl_table_path,
>> l3proto->ctl_table, NULL);
>> }
>> @@ -180,7 +190,7 @@ static void nf_ct_l3proto_unregister_sysctl(struct nf_conntrack_l3proto *l3proto
>> #ifdef CONFIG_SYSCTL
>> if (l3proto->ctl_table_header != NULL)
>> nf_ct_unregister_sysctl(&l3proto->ctl_table_header,
>> - l3proto->ctl_table, NULL);
>> + &l3proto->ctl_table, NULL);
>> #endif
>> }
>>
>> @@ -243,137 +253,172 @@ void nf_conntrack_l3proto_unregister(struct nf_conntrack_l3proto *proto)
>> }
>> EXPORT_SYMBOL_GPL(nf_conntrack_l3proto_unregister);
>>
>> -static int nf_ct_l4proto_register_sysctl(struct nf_conntrack_l4proto *l4proto)
>> +static struct nf_proto_net *nf_ct_l4proto_net(struct net *net,
>> + struct nf_conntrack_l4proto *l4proto)
>> {
>> - int err = 0;
>> + if (l4proto->net_id)
>> + return net_generic(net, *l4proto->net_id);
>> + else
>> + return NULL;
>> +}
>>
>> +int nf_ct_l4proto_register_sysctl(struct net *net,
>> + struct nf_conntrack_l4proto *l4proto)
>> +{
>> + int err = 0;
>> + struct nf_proto_net *pn = nf_ct_l4proto_net(net, l4proto);
>> + if (pn == NULL)
>> + return 0;
>> #ifdef CONFIG_SYSCTL
>> - if (l4proto->ctl_table != NULL) {
>> - err = nf_ct_register_sysctl(l4proto->ctl_table_header,
>> + if (pn->ctl_table != NULL) {
>> + err = nf_ct_register_sysctl(net,
>> + &pn->ctl_table_header,
>> "net/netfilter",
>> - l4proto->ctl_table,
>> - l4proto->ctl_table_users);
>> - if (err < 0)
>> + pn->ctl_table,
>> + &pn->users);
>> + if (err < 0) {
>> + kfree(pn->ctl_table);
>> + pn->ctl_table = NULL;
> ^^^^^^^^^^^
> Do you really need to set this above to NULL? Is there any existing
> bug trap? If not, it's superfluous, please, remove it.
>
yes,l4proto_tcp(udp,icmp)'s ctl_table is stored in netns_ct.proto,
so when we register l4proto_tcp's sysctl failed,ctl_table will still
point to the kfreed memory. this will cause panic the next
time we register l4proto_tcp's sysctl.
>> goto out;
>> + }
>> }
>> #ifdef CONFIG_NF_CONNTRACK_PROC_COMPAT
>> - if (l4proto->ctl_compat_table != NULL) {
>> - err = nf_ct_register_sysctl(&l4proto->ctl_compat_table_header,
>> + if (l4proto->compat && pn->ctl_compat_table != NULL) {
>> + err = nf_ct_register_sysctl(net,
>> + &pn->ctl_compat_header,
>> "net/ipv4/netfilter",
>> - l4proto->ctl_compat_table, NULL);
>> + pn->ctl_compat_table,
>> + NULL);
>> if (err == 0)
>> goto out;
>> - nf_ct_unregister_sysctl(l4proto->ctl_table_header,
>> - l4proto->ctl_table,
>> - l4proto->ctl_table_users);
>> +
>> + kfree(pn->ctl_compat_table);
>> + pn->ctl_compat_table = NULL;
>> + nf_ct_unregister_sysctl(&pn->ctl_table_header,
>> + &pn->ctl_table,
>> + &pn->users);
>> }
>> #endif /* CONFIG_NF_CONNTRACK_PROC_COMPAT */
>> out:
>> #endif /* CONFIG_SYSCTL */
>> return err;
>> }
>> +EXPORT_SYMBOL_GPL(nf_ct_l4proto_register_sysctl);
>>
>> -static void nf_ct_l4proto_unregister_sysctl(struct nf_conntrack_l4proto *l4proto)
>> +void nf_ct_l4proto_unregister_sysctl(struct net *net,
>> + struct nf_conntrack_l4proto *l4proto)
>> {
>> + struct nf_proto_net *pn = nf_ct_l4proto_net(net, l4proto);
>> + if (pn == NULL)
>> + return;
>> #ifdef CONFIG_SYSCTL
>> - if (l4proto->ctl_table_header != NULL &&
>> - *l4proto->ctl_table_header != NULL)
>> - nf_ct_unregister_sysctl(l4proto->ctl_table_header,
>> - l4proto->ctl_table,
>> - l4proto->ctl_table_users);
>> + if (pn->ctl_table_header != NULL)
>> + nf_ct_unregister_sysctl(&pn->ctl_table_header,
>> + &pn->ctl_table,
>> + &pn->users);
>> +
>> #ifdef CONFIG_NF_CONNTRACK_PROC_COMPAT
>> - if (l4proto->ctl_compat_table_header != NULL)
>> - nf_ct_unregister_sysctl(&l4proto->ctl_compat_table_header,
>> - l4proto->ctl_compat_table, NULL);
>> + if (l4proto->compat && pn->ctl_compat_header != NULL)
>> + nf_ct_unregister_sysctl(&pn->ctl_compat_header,
>> + &pn->ctl_compat_table,
>> + NULL);
>> #endif /* CONFIG_NF_CONNTRACK_PROC_COMPAT */
>> +#else
>> + pn->users--;
>> #endif /* CONFIG_SYSCTL */
>> }
>> +EXPORT_SYMBOL_GPL(nf_ct_l4proto_unregister_sysctl);
>>
>> /* FIXME: Allow NULL functions and sub in pointers to generic for
>> them. --RR */
>> -int nf_conntrack_l4proto_register(struct nf_conntrack_l4proto *l4proto)
>> +int nf_conntrack_l4proto_register(struct net *net,
>> + struct nf_conntrack_l4proto *l4proto)
>> {
>> int ret = 0;
>
> Minor nitpick: you save this amount of edits in this function that
> result from the extra tabbing by moving all ...
>
> if (net == &init_net) {
> ... this code ...
> }
>
> into some new static int nf_conntrack_l4proto_register_net(...) that
> will be called by nf_conntrack_l4proto_register.
>
> It will result more maintainable code. We still stick to 80-chars
> columns, saving that extra tabbing makes the code more readable.
>
Yes,it will be more readable,I will do it.
--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply
* Re: [PATCH 03/17] netfilter: add namespace support for l3proto
From: Gao feng @ 2012-05-24 1:58 UTC (permalink / raw)
To: Pablo Neira Ayuso
Cc: netfilter-devel, netdev, serge.hallyn, ebiederm, dlezcano
In-Reply-To: <20120523102910.GC2836@1984>
于 2012年05月23日 18:29, Pablo Neira Ayuso 写道:
> On Mon, May 14, 2012 at 04:52:13PM +0800, Gao feng wrote:
>> -Add the struct net as param of nf_conntrack_l3proto_(un)register.
>> register or unregister the l3proto only when the net is init_net.
>>
>> -The new struct nf_ip_net is used to store the sysctl header and data
>> of l3proto_ipv4,l4proto_tcp(6),l4proto_udp(6),l4proto_icmp(v6).
>> because the protos such tcp and tcp6 use the same data,so making
>> nf_ip_net as a field of netns_ct is the easiest way to manager it.
>>
>> -nf_ct_l3proto_register_sysctl call init_net to initial the pernet data
>> of l3proto.
>>
>> -nf_ct_l3proto_net is used to get the pernet data of l3proto.
>>
>> -export nf_conntrack_l3proto_(un)register
>>
>> -use init_net as param of nf_conntrack_l3proto_(un)register.
>>
>> Acked-by: Eric W. Biederman <ebiederm@xmission.com>
>> Signed-off-by: Gao feng <gaofeng@cn.fujitsu.com>
>> ---
>> include/net/netfilter/nf_conntrack_l3proto.h | 6 +-
>> include/net/netns/conntrack.h | 8 ++
>> net/ipv4/netfilter/nf_conntrack_l3proto_ipv4.c | 6 +-
>> net/ipv6/netfilter/nf_conntrack_l3proto_ipv6.c | 6 +-
>> net/netfilter/nf_conntrack_proto.c | 127 +++++++++++++++---------
>> 5 files changed, 97 insertions(+), 56 deletions(-)
>>
>> diff --git a/include/net/netfilter/nf_conntrack_l3proto.h b/include/net/netfilter/nf_conntrack_l3proto.h
>> index 9766005..d6df8c7 100644
>> --- a/include/net/netfilter/nf_conntrack_l3proto.h
>> +++ b/include/net/netfilter/nf_conntrack_l3proto.h
>> @@ -79,8 +79,10 @@ struct nf_conntrack_l3proto {
>> extern struct nf_conntrack_l3proto __rcu *nf_ct_l3protos[AF_MAX];
>>
>> /* Protocol registration. */
>> -extern int nf_conntrack_l3proto_register(struct nf_conntrack_l3proto *proto);
>> -extern void nf_conntrack_l3proto_unregister(struct nf_conntrack_l3proto *proto);
>> +extern int nf_conntrack_l3proto_register(struct net *net,
>> + struct nf_conntrack_l3proto *proto);
>> +extern void nf_conntrack_l3proto_unregister(struct net *net,
>> + struct nf_conntrack_l3proto *proto);
>> extern struct nf_conntrack_l3proto *nf_ct_l3proto_find_get(u_int16_t l3proto);
>> extern void nf_ct_l3proto_put(struct nf_conntrack_l3proto *p);
>>
>> diff --git a/include/net/netns/conntrack.h b/include/net/netns/conntrack.h
>> index 1f53038..94992e9 100644
>> --- a/include/net/netns/conntrack.h
>> +++ b/include/net/netns/conntrack.h
>> @@ -20,6 +20,13 @@ struct nf_proto_net {
>> unsigned int users;
>> };
>>
>> +struct nf_ip_net {
>> +#if defined(CONFIG_SYSCTL) && defined(CONFIG_NF_CONNTRACK_PROC_COMPAT)
>> + struct ctl_table_header *ctl_table_header;
>> + struct ctl_table *ctl_table;
>> +#endif
>> +};
>> +
>> struct netns_ct {
>> atomic_t count;
>> unsigned int expect_count;
>> @@ -40,6 +47,7 @@ struct netns_ct {
>> unsigned int sysctl_log_invalid; /* Log invalid packets */
>> int sysctl_auto_assign_helper;
>> bool auto_assign_helper_warned;
>> + struct nf_ip_net proto;
> ^^^^^
> please, rename this to something like nf_ct_proto.
Get it ;)
>
>> #ifdef CONFIG_SYSCTL
>> struct ctl_table_header *sysctl_header;
>> struct ctl_table_header *acct_sysctl_header;
>> diff --git a/net/ipv4/netfilter/nf_conntrack_l3proto_ipv4.c b/net/ipv4/netfilter/nf_conntrack_l3proto_ipv4.c
>> index 46ec515..0c0fb90 100644
>> --- a/net/ipv4/netfilter/nf_conntrack_l3proto_ipv4.c
>> +++ b/net/ipv4/netfilter/nf_conntrack_l3proto_ipv4.c
>> @@ -409,7 +409,7 @@ static int __init nf_conntrack_l3proto_ipv4_init(void)
>> goto cleanup_udp;
>> }
>>
>> - ret = nf_conntrack_l3proto_register(&nf_conntrack_l3proto_ipv4);
>> + ret = nf_conntrack_l3proto_register(&init_net, &nf_conntrack_l3proto_ipv4);
>> if (ret < 0) {
>> pr_err("nf_conntrack_ipv4: can't register ipv4\n");
>> goto cleanup_icmp;
>> @@ -432,7 +432,7 @@ static int __init nf_conntrack_l3proto_ipv4_init(void)
>> nf_unregister_hooks(ipv4_conntrack_ops, ARRAY_SIZE(ipv4_conntrack_ops));
>> #endif
>> cleanup_ipv4:
>> - nf_conntrack_l3proto_unregister(&nf_conntrack_l3proto_ipv4);
>> + nf_conntrack_l3proto_unregister(&init_net, &nf_conntrack_l3proto_ipv4);
>> cleanup_icmp:
>> nf_conntrack_l4proto_unregister(&init_net, &nf_conntrack_l4proto_icmp);
>> cleanup_udp:
>> @@ -451,7 +451,7 @@ static void __exit nf_conntrack_l3proto_ipv4_fini(void)
>> nf_conntrack_ipv4_compat_fini();
>> #endif
>> nf_unregister_hooks(ipv4_conntrack_ops, ARRAY_SIZE(ipv4_conntrack_ops));
>> - nf_conntrack_l3proto_unregister(&nf_conntrack_l3proto_ipv4);
>> + nf_conntrack_l3proto_unregister(&init_net, &nf_conntrack_l3proto_ipv4);
>> nf_conntrack_l4proto_unregister(&init_net, &nf_conntrack_l4proto_icmp);
>> nf_conntrack_l4proto_unregister(&init_net, &nf_conntrack_l4proto_udp4);
>> nf_conntrack_l4proto_unregister(&init_net, &nf_conntrack_l4proto_tcp4);
>> diff --git a/net/ipv6/netfilter/nf_conntrack_l3proto_ipv6.c b/net/ipv6/netfilter/nf_conntrack_l3proto_ipv6.c
>> index 55f379f..6cfbe7b 100644
>> --- a/net/ipv6/netfilter/nf_conntrack_l3proto_ipv6.c
>> +++ b/net/ipv6/netfilter/nf_conntrack_l3proto_ipv6.c
>> @@ -359,7 +359,7 @@ static int __init nf_conntrack_l3proto_ipv6_init(void)
>> goto cleanup_udp;
>> }
>>
>> - ret = nf_conntrack_l3proto_register(&nf_conntrack_l3proto_ipv6);
>> + ret = nf_conntrack_l3proto_register(&init_net, &nf_conntrack_l3proto_ipv6);
>> if (ret < 0) {
>> pr_err("nf_conntrack_ipv6: can't register ipv6\n");
>> goto cleanup_icmpv6;
>> @@ -375,7 +375,7 @@ static int __init nf_conntrack_l3proto_ipv6_init(void)
>> return ret;
>>
>> cleanup_ipv6:
>> - nf_conntrack_l3proto_unregister(&nf_conntrack_l3proto_ipv6);
>> + nf_conntrack_l3proto_unregister(&init_net, &nf_conntrack_l3proto_ipv6);
>> cleanup_icmpv6:
>> nf_conntrack_l4proto_unregister(&init_net, &nf_conntrack_l4proto_icmpv6);
>> cleanup_udp:
>> @@ -389,7 +389,7 @@ static void __exit nf_conntrack_l3proto_ipv6_fini(void)
>> {
>> synchronize_net();
>> nf_unregister_hooks(ipv6_conntrack_ops, ARRAY_SIZE(ipv6_conntrack_ops));
>> - nf_conntrack_l3proto_unregister(&nf_conntrack_l3proto_ipv6);
>> + nf_conntrack_l3proto_unregister(&init_net, &nf_conntrack_l3proto_ipv6);
>> nf_conntrack_l4proto_unregister(&init_net, &nf_conntrack_l4proto_icmpv6);
>> nf_conntrack_l4proto_unregister(&init_net, &nf_conntrack_l4proto_udp6);
>> nf_conntrack_l4proto_unregister(&init_net, &nf_conntrack_l4proto_tcp6);
>> diff --git a/net/netfilter/nf_conntrack_proto.c b/net/netfilter/nf_conntrack_proto.c
>> index 6d68727..7ee6653 100644
>> --- a/net/netfilter/nf_conntrack_proto.c
>> +++ b/net/netfilter/nf_conntrack_proto.c
>> @@ -170,85 +170,116 @@ static int kill_l4proto(struct nf_conn *i, void *data)
>> nf_ct_l3num(i) == l4proto->l3proto;
>> }
>>
>> -static int nf_ct_l3proto_register_sysctl(struct nf_conntrack_l3proto *l3proto)
>> +static struct nf_ip_net *nf_ct_l3proto_net(struct net *net,
>> + struct nf_conntrack_l3proto *l3proto)
>> +{
>> + if (l3proto->l3proto == PF_INET)
>> + return &net->ct.proto;
>> + else
>> + return NULL;
>> +}
>> +
>> +static int nf_ct_l3proto_register_sysctl(struct net *net,
>> + struct nf_conntrack_l3proto *l3proto)
>> {
>> int err = 0;
>> + struct nf_ip_net *in = nf_ct_l3proto_net(net, l3proto);
>>
>> -#ifdef CONFIG_SYSCTL
>> - if (l3proto->ctl_table != NULL) {
>> - err = nf_ct_register_sysctl(&init_net,
>> - &l3proto->ctl_table_header,
>> + if (in == NULL)
>> + return 0;
>
> Under what circunstances that in be NULL?
Because l3proto_ipv6 doesn't need sysctl,so l3proto_ipv6's nf_ip_net is NULL,
please see function nf_ct_l3proto_net above.
>
>> +
>> +#if defined(CONFIG_SYSCTL) && defined(CONFIG_NF_CONNTRACK_PROC_COMPAT)
>> + if (in->ctl_table != NULL) {
>> + err = nf_ct_register_sysctl(net,
>> + &in->ctl_table_header,
>> l3proto->ctl_table_path,
>> - l3proto->ctl_table, NULL);
>> + in->ctl_table,
>> + NULL);
>> + if (err < 0) {
>> + kfree(in->ctl_table);
>> + in->ctl_table = NULL;
>
> do we need this extra NULL assignment?
>
>> + }
>> }
>> #endif
>> return err;
>> }
>>
>> -static void nf_ct_l3proto_unregister_sysctl(struct nf_conntrack_l3proto *l3proto)
>> +static void nf_ct_l3proto_unregister_sysctl(struct net *net,
>> + struct nf_conntrack_l3proto *l3proto)
>> {
>> -#ifdef CONFIG_SYSCTL
>> - if (l3proto->ctl_table_header != NULL)
>> - nf_ct_unregister_sysctl(&l3proto->ctl_table_header,
>> - &l3proto->ctl_table, NULL);
>> + struct nf_ip_net *in = nf_ct_l3proto_net(net, l3proto);
>> +
>> + if (in == NULL)
>> + return;
>> +#if defined(CONFIG_SYSCTL) && defined(CONFIG_NF_CONNTRACK_PROC_COMPAT)
>> + if (in->ctl_table_header != NULL)
>> + nf_ct_unregister_sysctl(&in->ctl_table_header,
>> + &in->ctl_table,
>> + NULL);
>> #endif
>> }
>>
>> -int nf_conntrack_l3proto_register(struct nf_conntrack_l3proto *proto)
>> +int nf_conntrack_l3proto_register(struct net *net,
>> + struct nf_conntrack_l3proto *proto)
>> {
>> int ret = 0;
>> - struct nf_conntrack_l3proto *old;
>> -
>> - if (proto->l3proto >= AF_MAX)
>> - return -EBUSY;
>>
>> - if (proto->tuple_to_nlattr && !proto->nlattr_tuple_size)
>> - return -EINVAL;
>> + if (net == &init_net) {
>
> Same things as in previous patch. Move...
>
> if (net == &init_net) {
> ... this code ...
> }
>
> into some static int nf_conntrack_l3proto_register_net function.
>
Get it.
thanks
^ permalink raw reply
* Re: [PATCH V2] ipv4: fix the rcu race between free_fib_info and ip_route_output_slow
From: Eric Dumazet @ 2012-05-24 2:42 UTC (permalink / raw)
To: kun.jiang; +Cc: netdev, LKML, YMZHANG, davem
In-Reply-To: <4FBD9161.3040206@intel.com>
On Thu, 2012-05-24 at 09:39 +0800, kun.jiang wrote:
> From: Yanmin Zhang <yanmin_zhang@linux.intel.com>
>
> We hit a kernel OOPS.
>
...
>
> Function free_fib_info resets nexthop_nh->nh_dev to NULL before releasing
> fi. Other cpu might be accessing fi. Fixing it by delaying the releasing.
>
> With the patch, we ran MTBF testing on Android mobile for 12 hours
> and didn't trigger the issue.
>
> Thank Eric for very detailed review/checking the issue.
>
> Signed-off-by: Yanmin Zhang <yanmin_zhang@linux.intel.com>
> Signed-off-by: Kun Jiang <kunx.jiang@intel.com>
> ---
> net/ipv4/fib_semantics.c | 12 ++++++------
> 1 files changed, 6 insertions(+), 6 deletions(-)
Acked-by: Eric Dumazet <edumazet@google.com>
Thanks !
^ permalink raw reply
* Re: WARNING: at net/ipv4/tcp.c:1301 tcp_cleanup_rbuf+0x4f/0x110()
From: Sergio Correia @ 2012-05-24 3:21 UTC (permalink / raw)
To: Eric Dumazet; +Cc: netdev
In-Reply-To: <1337798274.3361.3234.camel@edumazet-glaptop>
On Wed, May 23, 2012 at 3:37 PM, Eric Dumazet <eric.dumazet@gmail.com> wrote:
> On Wed, 2012-05-23 at 15:30 -0300, Sergio Correia wrote:
>> On Wed, May 23, 2012 at 1:36 PM, Eric Dumazet <eric.dumazet@gmail.com> wrote:
>> > On Wed, 2012-05-23 at 12:56 -0300, Sergio Correia wrote:
>> >> On Wed, May 23, 2012 at 12:08 PM, Eric Dumazet <eric.dumazet@gmail.com> wrote:
>> >> > On Tue, 2012-05-22 at 11:47 -0300, Sergio Correia wrote:
>> >> >> Hi Eric,
>> >> > ...
>> >> >> Yes, it's an Atheros AR9285 adapter.
>> >> >> This morning I did a make mrproper before rebuilding the kernel
>> >> >> (should I always do that?), but the warning has just appeared again.
>> >> >
>> >> > OK, I am taking a look at this problem, thanks.
>> >> >
>> >>
>> >> Thanks. Let me know if you need additional info. As of now, my dmesg
>> >> basically shows only those warnings.
>> >
>> > I believe I found the bug and am testing a fix right now.
>> >
>> > By the way, we might have the same problem in tcp collapses.
>> >
>> > TCP coalescing (introduced in linux-3.5) triggers the problem faster.
>> >
>> > Please test following patch :
>> >
>>
>> I reverted back to 471368557a734c6c486ee757952c902b36e7fd01 and it
>> took almost one hour to trigger the warning. Now I have applied your
>> patch and will report back how it went after a few hours of testing.
>
> Thanks
>
> I triggered it very fast in my lab using following setup
>
> Sender machine :
>
> # tc qdisc add dev eth0 root netem delay 1ms 3ms 20 reorder 10 20
> for i in `seq 1 8`
> do
> netperf -t OMNI -C -c -H 172.30.42.8 -l 60 &
> done
> wait
> # tc -s -d qd
> qdisc netem 8002: dev eth0 root refcnt 2 limit 1000 delay 1.0ms 3.0ms
> 20% reorder 10% 20% gap 1
> Sent 66030032010 bytes 43992779 pkt (dropped 13846, overlimits 0
> requeues 2712184)
> backlog 0b 0p requeues 2712184
>
> receiver machine runs a netserver and triggers the bug in few seconds.
>
> (receiver being a slow machine, with r8169 NIC)
>
With your patch applied, the warning hasn't shown up in the last
hours. Without it, dmesg would have been completely taken by them by
now.
I might be able to reproduce your test setup tomorrow, and if so, I will retest.
thanks,
sergio
^ permalink raw reply
* [PATCH] tcp: take care of overlaps in tcp_try_coalesce()
From: Eric Dumazet @ 2012-05-24 3:51 UTC (permalink / raw)
To: Sergio Correia, David Miller; +Cc: netdev
In-Reply-To: <CAJyhjX1UW=N0B9GFMt_u_gFEsLH2=8OJx0N7zJWVCrpic5Z9kQ@mail.gmail.com>
From: Eric Dumazet <edumazet@google.com>
On Thu, 2012-05-24 at 00:21 -0300, Sergio Correia wrote:
> With your patch applied, the warning hasn't shown up in the last
> hours. Without it, dmesg would have been completely taken by them by
> now.
> I might be able to reproduce your test setup tomorrow, and if so, I will retest.
>
I am going to send an official patch right now.
My own testings confirmed the bug origin and I am confident the patch is
OK.
Thanks !
[PATCH] tcp: take care of overlaps in tcp_try_coalesce()
Sergio Correia reported following warning :
WARNING: at net/ipv4/tcp.c:1301 tcp_cleanup_rbuf+0x4f/0x110()
WARN(skb && !before(tp->copied_seq, TCP_SKB_CB(skb)->end_seq),
"cleanup rbuf bug: copied %X seq %X rcvnxt %X\n",
tp->copied_seq, TCP_SKB_CB(skb)->end_seq, tp->rcv_nxt);
It appears TCP coalescing, and more specifically commit b081f85c297
(net: implement tcp coalescing in tcp_queue_rcv()) should take care of
possible segment overlaps in receive queue. This was properly done in
the case of out_or_order_queue by the caller.
For example, segment at tail of queue have sequence 1000-2000, and we
add a segment with sequence 1500-2500.
This can happen in case of retransmits.
In this case, just don't do the coalescing.
Reported-by: Sergio Correia <lists@uece.net>
Signed-off-by: Eric Dumazet <edumazet@google.com>
Tested-by: Sergio Correia <lists@uece.net>
---
net/ipv4/tcp_input.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c
index cfa2aa1..b224eb8 100644
--- a/net/ipv4/tcp_input.c
+++ b/net/ipv4/tcp_input.c
@@ -4555,6 +4555,11 @@ static bool tcp_try_coalesce(struct sock *sk,
if (tcp_hdr(from)->fin)
return false;
+
+ /* Its possible this segment overlaps with prior segment in queue */
+ if (TCP_SKB_CB(from)->seq != TCP_SKB_CB(to)->end_seq)
+ return false;
+
if (!skb_try_coalesce(to, from, fragstolen, &delta))
return false;
^ permalink raw reply related
* Re: [PATCH v2] mm: add a low limit to alloc_large_system_hash
From: David Miller @ 2012-05-24 4:27 UTC (permalink / raw)
To: tim.bird; +Cc: eric.dumazet, paul.gortmaker, linux-kernel, netdev
In-Reply-To: <4FBD73CF.2000306@am.sony.com>
From: Tim Bird <tim.bird@am.sony.com>
Date: Wed, 23 May 2012 16:33:35 -0700
> This patch seems to have fallen in the cracks:
>
> https://lkml.org/lkml/2012/2/27/20
>
> The last message on the thread was an ACK by David Miller, and
> the question "Who wants to take this?"
I'll take it in via my 'net' tree, thanks Tim.
^ permalink raw reply
* Re: [PATCH V2] ipv4: fix the rcu race between free_fib_info and ip_route_output_slow
From: David Miller @ 2012-05-24 4:27 UTC (permalink / raw)
To: eric.dumazet; +Cc: kunx.jiang, netdev, linux-kernel, yanmin_zhang
In-Reply-To: <1337827362.3361.3800.camel@edumazet-glaptop>
From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Thu, 24 May 2012 04:42:42 +0200
> On Thu, 2012-05-24 at 09:39 +0800, kun.jiang wrote:
>> From: Yanmin Zhang <yanmin_zhang@linux.intel.com>
>>
>> We hit a kernel OOPS.
>>
> ...
>>
>> Function free_fib_info resets nexthop_nh->nh_dev to NULL before releasing
>> fi. Other cpu might be accessing fi. Fixing it by delaying the releasing.
>>
>> With the patch, we ran MTBF testing on Android mobile for 12 hours
>> and didn't trigger the issue.
>>
>> Thank Eric for very detailed review/checking the issue.
>>
>> Signed-off-by: Yanmin Zhang <yanmin_zhang@linux.intel.com>
>> Signed-off-by: Kun Jiang <kunx.jiang@intel.com>
>> ---
>> net/ipv4/fib_semantics.c | 12 ++++++------
>> 1 files changed, 6 insertions(+), 6 deletions(-)
>
> Acked-by: Eric Dumazet <edumazet@google.com>
Applied, thanks everyone.
^ permalink raw reply
* Re: [PATCH] tcp: take care of overlaps in tcp_try_coalesce()
From: David Miller @ 2012-05-24 4:27 UTC (permalink / raw)
To: eric.dumazet; +Cc: lists, netdev
In-Reply-To: <1337831497.3361.3888.camel@edumazet-glaptop>
From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Thu, 24 May 2012 05:51:37 +0200
> [PATCH] tcp: take care of overlaps in tcp_try_coalesce()
>
> Sergio Correia reported following warning :
>
> WARNING: at net/ipv4/tcp.c:1301 tcp_cleanup_rbuf+0x4f/0x110()
>
> WARN(skb && !before(tp->copied_seq, TCP_SKB_CB(skb)->end_seq),
> "cleanup rbuf bug: copied %X seq %X rcvnxt %X\n",
> tp->copied_seq, TCP_SKB_CB(skb)->end_seq, tp->rcv_nxt);
>
> It appears TCP coalescing, and more specifically commit b081f85c297
> (net: implement tcp coalescing in tcp_queue_rcv()) should take care of
> possible segment overlaps in receive queue. This was properly done in
> the case of out_or_order_queue by the caller.
>
> For example, segment at tail of queue have sequence 1000-2000, and we
> add a segment with sequence 1500-2500.
> This can happen in case of retransmits.
>
> In this case, just don't do the coalescing.
>
> Reported-by: Sergio Correia <lists@uece.net>
> Signed-off-by: Eric Dumazet <edumazet@google.com>
> Tested-by: Sergio Correia <lists@uece.net>
Applied, thanks.
^ permalink raw reply
* Re: [PATCH v7] tilegx network driver: initial support
From: David Miller @ 2012-05-24 4:31 UTC (permalink / raw)
To: cmetcalf; +Cc: bhutchings, arnd, linux-kernel, netdev
In-Reply-To: <201205240115.q4O1FwqG006336@lab-41.internal.tilera.com>
From: Chris Metcalf <cmetcalf@tilera.com>
Date: Wed, 23 May 2012 16:42:03 -0400
> + * FIXME (bug 11489): add support for IPv6.
...
> + * FIXME (bug# 11479): We should stop queues when they're full.
...
Mentioning bug numbers in the driver source is not appropriate.
This second problem looks extremely serious, rather than some minor
issue to look into at some time in the future.
^ permalink raw reply
* [PATCH IPROUTE2] tc-codel: Add manpage
From: Vijay Subramanian @ 2012-05-24 4:33 UTC (permalink / raw)
To: netdev; +Cc: Stephen Hemminger, Eric Dumazet, Dave Taht, Vijay Subramanian
This patch adds the manpage for the CoDel (Controlled-Delay) AQM.
Signed-off-by: Vijay Subramanian <subramanian.vijay@gmail.com>
---
man/man8/Makefile | 2 +-
man/man8/tc-codel.8 | 114 +++++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 115 insertions(+), 1 deletions(-)
create mode 100644 man/man8/tc-codel.8
diff --git a/man/man8/Makefile b/man/man8/Makefile
index 6873a4b..6d6242e 100644
--- a/man/man8/Makefile
+++ b/man/man8/Makefile
@@ -3,7 +3,7 @@ TARGETS = ip-address.8 ip-link.8 ip-route.8
MAN8PAGES = $(TARGETS) ip.8 arpd.8 lnstat.8 routel.8 rtacct.8 rtmon.8 ss.8 \
tc-bfifo.8 tc-cbq-details.8 tc-cbq.8 tc-drr.8 tc-htb.8 \
tc-pfifo.8 tc-pfifo_fast.8 tc-prio.8 tc-red.8 tc-sfq.8 \
- tc-tbf.8 tc.8 rtstat.8 ctstat.8 nstat.8 routef.8 \
+ tc-tbf.8 tc.8 rtstat.8 ctstat.8 nstat.8 routef.8 tc-codel.8 \
tc-sfb.8 tc-netem.8 tc-choke.8 ip-tunnel.8 ip-rule.8 ip-ntable.8 \
ip-monitor.8 tc-stab.8 tc-hfsc.8 ip-xfrm.8 ip-netns.8 \
ip-neighbour.8 ip-mroute.8 ip-maddress.8 ip-addrlabel.8
diff --git a/man/man8/tc-codel.8 b/man/man8/tc-codel.8
new file mode 100644
index 0000000..605e498
--- /dev/null
+++ b/man/man8/tc-codel.8
@@ -0,0 +1,114 @@
+.TH CoDel 8 "23 May 2012" "iproute2" "Linux"
+.SH NAME
+CoDel \- Controlled-Delay Active Queue Management algorithm
+.SH SYNOPSIS
+.B tc qdisc ... codel
+[
+.B limit
+PACKETS ] [
+.B target
+TIME ] [
+.B interval
+TIME ] [
+.B ecn
+|
+.B noecn
+]
+
+.SH DESCRIPTION
+CoDel (pronounced "coddle") is an adaptive "no-knobs" active queue management
+algorithm (AQM) scheme that was developed to address the shortcomings of
+RED and its variants. It was developed with the following goals
+in mind:
+ o It should be parameterless.
+ o It should keep delays low while permitting bursts of traffic.
+ o It should control delay.
+ o It should adapt dynamically to changing link rates with no impact on
+utilization.
+ o It should be simple and efficient and should scale from simple to
+complex routers.
+
+.SH ALGORITHM
+CoDel comes with three major innovations. Instead of using queue size or queue
+average, it uses the local minimum queue as a measure of the standing/persistent queue.
+Second, it uses a single state-tracking variable of the minimum delay to see where it
+is relative to the standing queue delay. Third, instead of measuring queue size
+in bytes or packets, it is measured in packet-sojourn time in the queue.
+
+CoDel measures the minimum local queue delay (i.e. standing queue delay) and
+compares it to the value of the given acceptable queue delay
+.B target.
+As long as the minimum queue delay is less than
+.B target
+or the buffer contains fewer than MTU worth of bytes, packets are not dropped.
+Codel enters a dropping mode when the minimum queue delay has exceeded
+.B target
+for a time greater than
+.B interval.
+In this mode, packets are dropped at different drop times which is set by a
+control law. The control law ensures that the packet drops cause a linear change
+in the throughput. Once the minimum delay goes below
+.B target,
+packets are no longer dropped.
+
+Additional details can be found in the paper cited below.
+
+.SH PARAMETERS
+.SS limit
+hard limit on the real queue size. When this limit is reached, incoming packets
+are dropped. If the value is lowered, packets are dropped so that the new limit is
+met. Default is 1000 packets.
+
+.SS target
+is the acceptable minimum standing/persistent queue delay. This minimum delay
+is identified by tracking the local minimum queue delay that packets experience.
+Default and recommended value is 5ms.
+
+.SS interval
+is used to ensure that the measured minimum delay does not become too stale. The
+minimum delay must be experienced in the last epoch of length
+.B interval.
+It should be set on the order of the worst-case RTT through the bottleneck to
+give endpoints sufficient time to react. Default value is 100ms.
+
+.SS ecn | noecn
+can be used to mark packets instead of dropping them. If
+.B ecn
+has been enabled,
+.B noecn
+can be used to turn it off and vice-a-versa. By default,
+.B ecn
+is turned off.
+
+.SH EXAMPLES
+ # tc qdisc add dev eth0 root codel
+ # tc -s qdisc show
+ qdisc codel 801b: dev eth0 root refcnt 2 limit 1000p target 5.0ms
+interval 100.0ms
+ Sent 245801662 bytes 275853 pkt (dropped 0, overlimits 0 requeues 24)
+ backlog 0b 0p requeues 24
+ count 0 lastcount 0 ldelay 2us drop_next 0us
+ maxpacket 7306 ecn_mark 0 drop_overlimit 0
+
+ # tc qdisc add dev eth0 root codel limit 100 target 4ms interval 30ms ecn
+ # tc -s qdisc show
+ qdisc codel 801c: dev eth0 root refcnt 2 limit 100p target 4.0ms
+interval 30.0ms ecn
+ Sent 237573074 bytes 268561 pkt (dropped 0, overlimits 0 requeues 5)
+ backlog 0b 0p requeues 5
+ count 0 lastcount 0 ldelay 76us drop_next 0us
+ maxpacket 2962 ecn_mark 0 drop_overlimit 0
+
+
+.SH SEE ALSO
+.BR tc (8),
+.BR tc-red (8)
+
+.SH SOURCES
+o Kathleen Nicols and Van Jaconson, "Controlling Queue Delay", ACM Queue,
+http://queue.acm.org/detail.cfm?id=2209336
+
+.SH AUTHORS
+CoDel was implemented by Eric Dumazet and David Taht. This manpage was written
+by Vijay Subramanian. Please reports corrections to the Linux Networking
+mailing list <netdev@vger.kernel.org>.
--
1.7.0.4
^ permalink raw reply related
* Re: [PATCH IPROUTE2] tc-codel: Add manpage
From: Eric Dumazet @ 2012-05-24 4:53 UTC (permalink / raw)
To: Vijay Subramanian; +Cc: netdev, Stephen Hemminger, Dave Taht
In-Reply-To: <1337834034-27803-1-git-send-email-subramanian.vijay@gmail.com>
On Wed, 2012-05-23 at 21:33 -0700, Vijay Subramanian wrote:
> This patch adds the manpage for the CoDel (Controlled-Delay) AQM.
>
> Signed-off-by: Vijay Subramanian <subramanian.vijay@gmail.com>
> ---
Thanks !
> +.SS target
> +is the acceptable minimum standing/persistent queue delay. This minimum delay
> +is identified by tracking the local minimum queue delay that packets experience.
> +Default and recommended value is 5ms.
Although I can tell I prefer lower values on hosts.
On 10Gbe links, I used 500us target
> +
> +.SS interval
> +is used to ensure that the measured minimum delay does not become too stale. The
> +minimum delay must be experienced in the last epoch of length
> +.B interval.
> +It should be set on the order of the worst-case RTT through the bottleneck to
> +give endpoints sufficient time to react. Default value is 100ms.
Same here. In a datacenter, you might reduce this to 20ms or so...
^ permalink raw reply
* Re: [PATCH 06/15] batman-adv: Distributed ARP Table - add snooping functions for ARP messages
From: Sven Eckelmann @ 2012-05-24 5:34 UTC (permalink / raw)
To: b.a.t.m.a.n-ZwoEplunGu2X36UT3dwllkB+6BGkLq7r
Cc: netdev-u79uwXL29TY76Z2rM5mHXA, lindner_marek-LWAfsSFWpa4,
David Miller
In-Reply-To: <20120523.190158.2172815395820691292.davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>
[-- Attachment #1: Type: text/plain, Size: 715 bytes --]
On Wednesday 23 May 2012 19:01:58 David Miller wrote:
> It can't be all on me to answer your question, I cannot be
> the choke point.
>
> You must lean on the entire networking developer community
> for help, otherwise it simply will not scale.
_You_ were the person that declined the pull request because _you_ wanted to
rewrite the ARP handling. So _you_ are the person that has the insight in
_your_ plans. Either _you_ tell us what is _your_ problem with it or _you_
will have to point us to a person that knows _you_.
Until now nobody stepped up (the mails were public visible to the netdev
people). But I will ask ask Antonio to send a separate mail to netdev and
recent arp.c commiter.
Thanks,
Sven
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply
* Re: [PATCH 06/15] batman-adv: Distributed ARP Table - add snooping functions for ARP messages
From: David Miller @ 2012-05-24 5:54 UTC (permalink / raw)
To: sven-KaDOiPu9UxWEi8DpZVb4nw
Cc: netdev-u79uwXL29TY76Z2rM5mHXA,
b.a.t.m.a.n-ZwoEplunGu2X36UT3dwllkB+6BGkLq7r,
lindner_marek-LWAfsSFWpa4
In-Reply-To: <3476925.EJY4MZoOgZ-1RWNDQYo44h8XcdJbWeDu3TFMtCCXL7YSoIsB4E12gc@public.gmane.org>
From: Sven Eckelmann <sven-KaDOiPu9UxWEi8DpZVb4nw@public.gmane.org>
Date: Thu, 24 May 2012 07:34:12 +0200
> _You_ were the person that declined the pull request because _you_ wanted to
> rewrite the ARP handling. So _you_ are the person that has the insight in
> _your_ plans. Either _you_ tell us what is _your_ problem with it or _you_
> will have to point us to a person that knows _you_.
If I say that you must not use ARP nor neighbour layer internals, it
doesn't mean that I have to come up with the alternative
implementation for you.
Now, you can ask others on the netdev list for suggestions, but you
can't expect me to be the direct and only responder on things like
that.
^ permalink raw reply
* [GIT] Networking
From: David Miller @ 2012-05-24 6:05 UTC (permalink / raw)
To: torvalds; +Cc: akpm, netdev, linux-kernel
1) One final sync of wireless and bluetooth stuff from John
Linville. These changes have all been in his tree for more
than a week, and therefore have had the necessary -next
exposure. John was just away on a trip and didn't have
a change to send the pull request until a day or two ago.
2) Put back some defines in user exposed header file areas
that were removed during the tokenring purge. From
Stephen Hemminger and Paul Gortmaker.
3) A bug fix for UDP hash table allocation got lost in the pile due to
one of those "you got it.. no I've got it.." situations. :-)
From Tim Bird.
4) SKB coalescing in TCP needs to have stricter checks, otherwise
we'll try to coalesce overlapping frags and crash. Fix from
Eric Dumazet.
5) RCU routing table lookups can race with free_fib_info(), causing
crashes when we deref the device pointers in the route. Fix by
releasing the net device in the RCU callback. From Yanmin Zhang.
Ok, everything from here on out will be bug fixes.
Please pull, thanks a lot!
The following changes since commit 72c04af9a2d57b7945cf3de8e71461bd80695d50:
fbdev: sh_mobile_lcdc: Don't confuse line size with pitch (2012-05-21 20:59:32 -0700)
are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/davem/net.git master
for you to fetch changes up to 1ca7ee30630e1022dbcf1b51be20580815ffab73:
tcp: take care of overlaps in tcp_try_coalesce() (2012-05-24 00:28:21 -0400)
----------------------------------------------------------------
Amit Beka (1):
iwlwifi: fix power index handling
Amitkumar Karwar (2):
Bluetooth: btmrvl: configure default host sleep parameters
Bluetooth: btmrvl: add support for SDIO suspend/resume callbacks
Andre Guedes (21):
Bluetooth: Check FINDING state in interleaved discovery
Bluetooth: Add hci_cancel_le_scan() to hci_core
Bluetooth: LE support for MGMT stop discovery
Bluetooth: Replace EPERM by EALREADY in hci_cancel_inquiry
Bluetooth: Refactor stop_discovery
Bluetooth: Add Periodic Inquiry command complete handler
Bluetooth: Add HCI_PERIODIC_INQ to dev_flags
Bluetooth: Check HCI_PERIODIC_INQ in start_discovery
Bluetooth: Ignore inquiry results from periodic inquiry
Bluetooth: Add Periodic Inquiry command complete handler
Bluetooth: Add HCI_PERIODIC_INQ to dev_flags
Bluetooth: Remove MGMT_ADDR_INVALID macro
Bluetooth: Remove useless code in hci_connect
Bluetooth: Move address type macros to bluetooth.h
Bluetooth: Rename link_to_mgmt to link_to_bdaddr
Bluetooth: Add address type to struct sockaddr_l2
Bluetooth: Rename mgmt_to_le to bdaddr_to_le
Bluetooth: Move bdaddr_to_le to hci_core
Bluetooth: Add dst_type parameter to hci_connect
Bluetooth: Use address type info from user-space
Bluetooth: Remove advertising cache
Andrei Emeltchenko (24):
Bluetooth: trivial: Correct endian conversion
Bluetooth: Correct type for hdev lmp_subver
Bluetooth: Correct type for ediv to __le16
Bluetooth: Fix extra conversion to __le32
Bluetooth: Correct chan->psm endian conversions
Bluetooth: Correct ediv in SMP
Bluetooth: Correct length calc in L2CAP conf rsp
Bluetooth: Correct CID endian notation
Bluetooth: Convert error codes to le16
Bluetooth: trivial: Fix endian conversion mode
Bluetooth: trivial: Correct types
Bluetooth: Fix type in cpu_to_le conversion
Bluetooth: Fix opcode access in hci_complete
Bluetooth: trivial: Remove sparse warnings
Bluetooth: Silence sparse warning
Bluetooth: Comments and style fixes
Bluetooth: Remove unneeded timer clear
Bluetooth: Make L2CAP chan_add functions static
Bluetooth: Remove unneeded zero initialization
Bluetooth: Add Read Local AMP Info to init
Bluetooth: Adds set_default function in L2CAP setup
Bluetooth: Fix debug printing unallocated name
Bluetooth: trivial: Remove empty line
Bluetooth: Remove unneeded calculation and magic number
Arik Nemtsov (1):
mac80211: fix network header location when adding encryption headers
Ashok Nagarajan (4):
mac80211: Push the deleted comment to correct place
mac80211: Fix don't use '>' operator for matching channel types
mac80211: Modify mesh_set_ht_prot_mode() to have less identation
mac80211: Add debugfs entry for mesh ht_opmode
Avinash Patil (18):
mwifiex: allocate space for one more mwifiex_private structure
mwifiex: handle station specific commands on STA interface only
mwifiex: support for creation of AP interface
mwifiex: multi-interface support for mwifiex
mwifiex: save adapter pointer in wiphy_priv
mwifiex: append peer mac address TLV in key material command to firmware
mwifiex: add bss start and bss stop commands for AP
mwifiex: add AP command sys_config and set channel
mwifiex: stop BSS in deauthentication handling
mwifiex: handle interface type changes correctly
mwifiex: common set_wiphy_params cfg80211 handler for AP and STA interface
mwifiex: add cfg80211 start_ap and stop_ap handlers
mwifiex: add AP event handling framework
mwifiex: add WPA2 support for AP
mwifiex: rearrange AP sys configure code
mwifiex: add custom IE framework
mwifiex: retrieve IEs from cfg80211_beacon_data and send to firmware
mwifiex: delete IEs when stop_ap
Bartosz.Markowski@tieto.com (1):
wlcore/wl12xx: implement better beacon loss handling
Bing Zhao (1):
mwifiex: fix coding style issue in mwifiex_deauthenticate
Bjorn Helgaas (1):
b43: use pci_is_pcie() instead of obsolete pci_dev.is_pcie
Chun-Yeow Yeoh (1):
mac80211: fix the increment of unicast/multicast counters for forwarded PREQ
Cristian Chilipirea (2):
Bluetooth: Fixed checkpatch warnings
Net: wireless: core.c: fixed checkpatch warnings
Dan Carpenter (6):
ath6kl: list_first_entry() is never NULL
ath6kl: change || to &&
ath6kl: fix an indenting issue
NFC: Remove unneeded pn533 dev NULL check
wlcore: release lock on error in wl1271_op_suspend()
wlcore: fixup an allocation
David Herrmann (5):
Bluetooth: Remove redundant hdev->parent field
Bluetooth: vhci: Ignore return code of nonseekable_open()
Bluetooth: Move hci_alloc/free_dev close to hci_register/unregister_dev
Bluetooth: Move device initialization to hci_alloc_dev()
Bluetooth: Remove unneeded initialization in hci_alloc_dev()
David S. Miller (1):
Merge branch 'master' of git://git.kernel.org/.../linville/wireless
David Spinadel (3):
iwlwifi: fix scan_cmd_size allocation
iwlwifi: disable default wildcard ssid scan
iwlwifi: invert the order of ssid list in scan cmd
Eldad Zack (1):
Bluetooth: bnep: use constant for ethertype
Emmanuel Grumbach (2):
iwlwifi: don't flood logs when HT debug flag is set
iwlwifi: don't disable AGG queues that are not enabled
Eric Dumazet (1):
tcp: take care of overlaps in tcp_try_coalesce()
Eric Lapuyade (7):
NFC: Cache the core NFC active target pointer instead of its index
NFC: Remove useless HCI private nfc target table
NFC: Specify usage for targets found and target lost events
NFC: Add HCI/SHDLC support to let driver check for tag presence
NFC: Update Documentation/nfc-hci.txt
NFC: HCI based pn544 driver
NFC: HCI drivers don't have to keep track of polling state
Eyal Shapira (4):
wlcore: add RX filters util functions
wl12xx: add RX filters ACX commands
wlcore: add RX filters driver state mgmt functions
wl12xx: support wowlan wakeup patterns
Franky Lin (11):
brcmfmac: remove unused parameter of brcmf_sdcard_reg_read
brcmfmac: remove unused parameter of brcmf_sdcard_reg_write
brcmfmac: decouple set_sbaddr_window from register write interface
brcmfmac: introduce unified register access interface for SDIO
brcmfmac: replace brcmf_sdcard_cfg_read with brcmf_sdio_regrb
brcmfmac: replace brcmf_sdcard_cfg_write with brcmf_sdio_regwb
brcmfmac: replace brcmf_sdcard_reg_read with brcmf_sdio_regrl
brcmfmac: replace brcmf_sdcard_reg_write with brcmf_sdio_regwl
brcmfmac: remove redundant retries for SDIO core register access
brcmfmac: remove function brcmf_sdcard_regfail
brcmfmac: replace brcmf_sdioh_card_regread with brcmf_sdio_regrl
Gustavo Padovan (13):
Bluetooth: Remove sk parameter from l2cap_chan_create()
Bluetooth: Remove err parameter from alloc_skb()
Bluetooth: remove unneeded declaration of sco_conn_del()
Bluetooth: Remove unneeded elements from size calculation
Bluetooth: Remove hlen variable
Merge git://git.kernel.org/.../bluetooth/bluetooth
Bluetooth: Fix wrong set of skb fragments
Bluetooth: Fix packet size provided to the controller
Bluetooth: Fix skb length calculation
Bluetooth: improve readability of l2cap_seq_list code
Bluetooth: report the right security level in getsockopt
Bluetooth: Create flags for bt_sk()
Bluetooth: Report proper error number in disconnection
H Hartley Sweeten (5):
NFC: Quiet nci/data.c sparse noise about plain integer as NULL pointer
NFC: Include nci_core.h to nci/lib.c
NFC: Quiet nci/ntf.c sparse noise about plain integer as NULL pointer
NFC: HCI ops should not be exposed globally
NFC: The NFC genl family structure should not be exposed globally
Hauke Mehrtens (32):
ssb: remove rev from boardinfo
MIPS: bcm47xx: refactor fetching board data
bcma: add boardinfo struct
MIPS: bcm47xx: read baordrev without prefix from sprom
ssb/bcma: fill attribute alpha2 from sprom
ssb: fill board_rev attribute from sprom
bcma: read out some additional sprom attributes
bcma/ssb: parse new attributes from sprom
bcma: implement setting core clock mode to dynamic
bcma: add bcma_core_pci_extend_L1timer
bcma: add bcma_core_pci_fixcfg()
bcma: add bcma_core_pci_config_fixup()
brcmsmac: use sprom from bcma
brcmsmac: remove brcmsmac own sprom parsing
brcmsmac: get board and chip info from bcma
brcmsmac: remove support for cc rev < 20
brcmsmac: remove references to PCI
brcmsmac: remove PCIe functions needed for PCIe core rev <= 10
brcmsmac: remove pcicore_hwup()
brcmsmac: remove ai_pci_setup()
brcmsmac: remove ai_chipcontrl_epa4331
brcmsmac: remove ai_gpiocontrol()
brcmsmac: remove _ai_clkctl_cc()
brcmsmac: remove pcicore_attach()
brcmsmac: remove pcicore_find_pci_capability()
brcmsmac: remove pcie_extendL1timer()
brcmsmac: remove pcicore_fixcfg()
brcmsmac: remove nicpci.c
brcmsmac: do not access host_pci
brcmsmac: read PCI vendor and device id only for PCI devices
brcmsmac: handle non pci in ai_deviceremoved()
ssb: add PCI IDs 0x4322 and 43222
Hemant Gupta (5):
Bluetooth: Send correct address type for LTK
Bluetooth: Fix clearing discovery type when stopping discovery
Bluetooth: mgmt: Fix missing connect failed event for LE
Bluetooth: mgmt: Fix address type while loading Long Term Key
Bluetooth: Don't distribute keys in case of Encryption Failure
Ido Yariv (1):
Bluetooth: Search global l2cap channels by src/dst addresses
Janusz.Dziedzic@tieto.com (1):
mac80211: Add IV-room in the skb for TKIP and WEP
Javier Cardona (1):
mac80211_hwsim: Fix rate control by correctly reporting transmission counts
Jesper Juhl (3):
ath6kl: fix memory leak in ath6kl_fwlog_block_read()
Bluetooth: btmrvl_sdio: remove pointless conditional before release_firmware()
wlcore: fix size of two memset's in wl1271_cmd_build_arp_rsp()
Johan Hedberg (1):
Bluetooth: Fix Inquiry with RSSI event mask
Johannes Berg (11):
mac80211: fix single queue drivers
mac80211: fix TX aggregation session timer
cfg80211: remove double prototype
cfg80211: add warning when calculating MCS rates >= 32
mac80211: (selectively) add HT details in radiotap
nl80211: prevent additions to old station flags API
cfg80211: fix cfg80211_can_beacon_sec_chan prototype
nl80211: refactor valid channel type check
iwlwifi: support explicit monitor interface
rndis_wlan: remove set_channel cfg80211 hook
mwifiex: remove set_channel cfg80211 hook
John W. Linville (3):
Merge branch 'for-linville' of git://github.com/kvalo/ath6kl
Merge branch 'for-upstream' of git://git.kernel.org/.../bluetooth/bluetooth-next
Merge git://git.kernel.org/.../linville/wireless-next
Jouni Malinen (2):
ath6kl: Remove incorrect Probe Response offload support for Interworking
ath6kl: Configure probed SSID list consistently
Kalle Valo (2):
Merge remote branch 'wireless-next/master' into ath6kl-next
ath6kl: merge split format strings into one
Karsten Keil (1):
mISDN: Add X-Tensions USB ISDN TA XC-525
Kevin Fang (2):
ath6kl: handle background(BK) stream properly on htc mbox layer
ath6kl: assign Tx packet drop threshold per endpoint on htc pipe layer
Larry Finger (1):
b43legacy: Fix error due to MMIO access with SSB unpowered
Luciano Coelho (3):
wlcore: use GFP_KERNEL together with GFP_DMA
wlcore: fix pointer print out in wl1271_acx_set_rx_filter()
wlcore: fix some sparse warnings due to missing static declaration
Luis R. Rodriguez (1):
ath6kl: include in.h explicitly
Lukasz Rymanowski (1):
Bluetooth: Remove not needed status parameter
Marcel Holtmann (12):
Bluetooth: Add TX power tag to EIR data
Bluetooth: Handle EIR tags for Device ID
Bluetooth: Add management command for setting Device ID
Bluetooth: Fix broken usage of put_unaligned_le16
Bluetooth: Fix broken usage of get_unaligned_le16
Bluetooth: Update management interface revision
Bluetooth: Split error handling for L2CAP listen sockets
Bluetooth: Split error handling for SCO listen sockets
Bluetooth: Don't check source address in SCO bind function
Bluetooth: Restrict to one SCO listening socket
Bluetooth: Enable Low Energy support by default
NFC: Select CRC_CCITT for SHDLC link layer of HCI based drivers
Marek Marczykowski (1):
xen: do not disable netfront in dom0
Mat Martineau (17):
Bluetooth: Add definitions and struct members for new ERTM state machine
Bluetooth: Add a structure to carry ERTM data in skb control blocks
Bluetooth: Add the l2cap_seq_list structure for tracking frames
Bluetooth: Functions for handling ERTM control fields
Bluetooth: Improve ERTM sequence number offset calculation
Bluetooth: Remove duplicate structure members from bt_skb_cb
Bluetooth: Move recently-added ERTM header packing functions
Bluetooth: Initialize new l2cap_chan structure members
Bluetooth: Remove unused function
Bluetooth: Make better use of l2cap_chan reference counting
Bluetooth: Add Code Aurora Forum copyright
Bluetooth: Refactor L2CAP ERTM and streaming transmit segmentation
Bluetooth: Update tx_send_head when sending ERTM data
Bluetooth: Initialize the transmit queue for L2CAP streaming mode
Bluetooth: Fix a redundant and problematic incoming MTU check
Bluetooth: Restore locking semantics when looking up L2CAP channels
Bluetooth: Lock the L2CAP channel when sending
Michael Gruetzner (1):
Bluetooth: Add support for Foxconn/Hon Hai AR5BBU22 0489:E03C
Mikel Astiz (3):
Bluetooth: Use unsigned int instead of signed int
Bluetooth: Remove unnecessary check
Bluetooth: btusb: Dynamic alternate setting
Ming Jiang (2):
ath6kl: allow deepsleep_suspend function when wlan interface down
ath6kl clear the MMC_PM_KEEP_POWER for cutpower case
Nathan Hintz (6):
bcma: Find names of non BCM cores
bcma: Move initialization of SPROM to prevent overwrite
bcma: Account for variable PCI memory base/size
bcma: reads/writes are always 4 bytes, so always map 4 bytes
bcma: Add __devexit to bcma_host_pci_remove
bcma: Add flush for BCMA_RESET_CTL write
Naveen Gangadharan (1):
ath6kl: Multicast filter support in wow suspend and non-suspend
Nobuhiro Iwamatsu (1):
phy/micrel: Fix ID of KSZ9021
Paul Gortmaker (1):
ipx: restore token ring define to include/linux/ipx.h
Raja Mani (1):
ath6kl: Retain bg scan period value modified by the user
Randy Dunlap (1):
wireless: TI wlxxx depends on MAC80211
Ray Chen (2):
ath6kl: Add AR6004 1.2 support for USB and SDIO
ath6kl: Fix system crash sometimes for USB hotplug
Samuel Ortiz (6):
NFC: LLCP connect must wait for a CC frame
NFC: Update the LLCP poll mask
NFC: Return the amount of LLCP bytes queued to sock_sendmsg
feature-removal: Remove pn544 raw driver
NFC: Export nfc.h to userland
NFC: Queue I frame fragments to the LLCP sockets queue tail
Subramania Sharma Thandaveswaran (1):
ath6kl: Fix bug in bg scan configuration in schedule scan
Sujith Manoharan (1):
ath9k_hw: Fix RTT calibration
Syam Sidhardhan (5):
Bluetooth: mgmt: Remove unwanted goto statements
Bluetooth: remove header declared but not defined
Bluetooth: Remove strtoba header declared but not defined
Bluetooth: Remove unused hci_le_ltk_reply()
Bluetooth: Remove unused hci_le_ltk_neg_reply()
Szymon Janc (2):
Bluetooth: mgmt: Fix some code style and indentation issues
Bluetooth: mgmt: Don't allow to set invalid value to DeviceID source
Thomas Pedersen (7):
ath6kl: handle concurrent AP-STA channel switches
ath6kl: support fw reporting phy capabilities
ath6kl: only restore supported HT caps
ath6kl: disallow WoW with multiple vifs
ath6kl: unblock fwlog_block_read() on exit
ath6kl: check for sband existence when creating scan cmd
mac80211: send peer candidate event for new sta only
Tim Bird (1):
mm: add a low limit to alloc_large_system_hash
Tim Gardner (1):
ath6kl: Normalize use of FW_DIR
Ulisses Furquim (1):
Bluetooth: Fix registering hci with duplicate name
Vasanthakumar Thiagarajan (6):
ath6kl: Fix possible unaligned memory access in ath6kl_get_rsn_capab()
ath6kl: Configure 0 as rsn cap when it is not there in rsn ie
ath6kl: Don't advertise HT capability for incapable firmware
ath6kl: Fix bss filter setting while scanning
ath6kl: Update netstats for some of the tx failrues in ath6kl_data_tx()
ath6kl: Complete failed tx packet in ath6kl_htc_tx_from_queue()
Vinicius Costa Gomes (1):
Bluetooth: Add support for reusing the same hci_conn for LE links
Vishal Agarwal (1):
Bluetooth: Fix EIR data generation for mgmt_device_found
Vivek Natarajan (1):
ath6kl_sdio: Fix the EAPOL out of order issue
Wey-Yi Guy (3):
iwlwifi: include rssi as part of decision making for reduce txpower
iwlwifi: add documentation for bt reduced tx power
iwlwifi: make sure reduced tx power bit is valid
Wu Jiajun-B06378 (1):
gianfar:don't add FCB length to hard_header_len
Yanmin Zhang (1):
ipv4: fix the rcu race between free_fib_info and ip_route_output_slow
Zefir Kurtisi (1):
nl80211: fix typos in comments
Zero.Lin (1):
rt2x00:Add RT539b chipset support
joseph daniel (1):
NFC: Fix LLCP compilation warning
stephen hemminger (1):
if: restore token ring ARP type to header
Documentation/feature-removal-schedule.txt | 12 +
Documentation/nfc/nfc-hci.txt | 45 ++-
arch/mips/bcm47xx/setup.c | 15 +-
arch/mips/bcm47xx/sprom.c | 28 +-
arch/mips/include/asm/mach-bcm47xx/bcm47xx.h | 9 +
drivers/bcma/core.c | 3 +-
drivers/bcma/driver_pci.c | 53 ++-
drivers/bcma/driver_pci_host.c | 10 +-
drivers/bcma/host_pci.c | 7 +-
drivers/bcma/scan.c | 54 ++-
drivers/bcma/sprom.c | 149 ++++++-
drivers/bluetooth/ath3k.c | 6 +
drivers/bluetooth/btmrvl_drv.h | 3 +
drivers/bluetooth/btmrvl_main.c | 56 +--
drivers/bluetooth/btmrvl_sdio.c | 112 +++++-
drivers/bluetooth/btusb.c | 16 +-
drivers/bluetooth/hci_ldisc.c | 2 +-
drivers/bluetooth/hci_vhci.c | 3 +-
drivers/isdn/hardware/mISDN/hfcsusb.h | 6 +
drivers/net/ethernet/freescale/gianfar.c | 2 +-
drivers/net/wireless/ath/ath6kl/cfg80211.c | 238 ++++++++----
drivers/net/wireless/ath/ath6kl/cfg80211.h | 2 +
drivers/net/wireless/ath/ath6kl/core.h | 33 +-
drivers/net/wireless/ath/ath6kl/debug.c | 12 +-
drivers/net/wireless/ath/ath6kl/htc_mbox.c | 45 ++-
drivers/net/wireless/ath/ath6kl/htc_pipe.c | 11 +-
drivers/net/wireless/ath/ath6kl/init.c | 29 +-
drivers/net/wireless/ath/ath6kl/main.c | 104 ++++-
drivers/net/wireless/ath/ath6kl/sdio.c | 17 +-
drivers/net/wireless/ath/ath6kl/txrx.c | 12 +-
drivers/net/wireless/ath/ath6kl/usb.c | 12 +
drivers/net/wireless/ath/ath6kl/wmi.c | 94 +++--
drivers/net/wireless/ath/ath6kl/wmi.h | 24 ++
drivers/net/wireless/ath/ath9k/ar9003_calib.c | 50 +--
drivers/net/wireless/ath/ath9k/ar9003_mci.c | 2 +-
drivers/net/wireless/ath/ath9k/ar9003_rtt.c | 84 +++-
drivers/net/wireless/ath/ath9k/ar9003_rtt.h | 5 +-
drivers/net/wireless/ath/ath9k/hw.c | 9 +-
drivers/net/wireless/ath/ath9k/hw.h | 9 +-
drivers/net/wireless/b43/bus.c | 6 +-
drivers/net/wireless/b43/dma.c | 2 +-
drivers/net/wireless/b43/main.c | 4 +-
drivers/net/wireless/b43legacy/main.c | 4 +-
drivers/net/wireless/b43legacy/phy.c | 4 +-
drivers/net/wireless/b43legacy/radio.c | 10 +-
drivers/net/wireless/brcm80211/brcmfmac/bcmsdh.c | 244 ++++++------
drivers/net/wireless/brcm80211/brcmfmac/bcmsdh_sdmmc.c | 32 +-
drivers/net/wireless/brcm80211/brcmfmac/dhd_sdio.c | 350 +++++++----------
drivers/net/wireless/brcm80211/brcmfmac/sdio_chip.c | 265 +++++++------
drivers/net/wireless/brcm80211/brcmfmac/sdio_host.h | 37 +-
drivers/net/wireless/brcm80211/brcmsmac/Makefile | 3 -
drivers/net/wireless/brcm80211/brcmsmac/aiutils.c | 479 ++---------------------
drivers/net/wireless/brcm80211/brcmsmac/aiutils.h | 24 --
drivers/net/wireless/brcm80211/brcmsmac/antsel.c | 16 +-
drivers/net/wireless/brcm80211/brcmsmac/channel.c | 7 +-
drivers/net/wireless/brcm80211/brcmsmac/mac80211_if.c | 11 +-
drivers/net/wireless/brcm80211/brcmsmac/main.c | 142 +++----
drivers/net/wireless/brcm80211/brcmsmac/nicpci.c | 826 ---------------------------------------
drivers/net/wireless/brcm80211/brcmsmac/nicpci.h | 77 ----
drivers/net/wireless/brcm80211/brcmsmac/otp.c | 410 --------------------
drivers/net/wireless/brcm80211/brcmsmac/otp.h | 36 --
drivers/net/wireless/brcm80211/brcmsmac/phy/phy_lcn.c | 67 ++--
drivers/net/wireless/brcm80211/brcmsmac/phy/phy_n.c | 333 ++++++----------
drivers/net/wireless/brcm80211/brcmsmac/phy_shim.c | 9 -
drivers/net/wireless/brcm80211/brcmsmac/phy_shim.h | 3 -
drivers/net/wireless/brcm80211/brcmsmac/pub.h | 228 -----------
drivers/net/wireless/brcm80211/brcmsmac/srom.c | 980 -----------------------------------------------
drivers/net/wireless/brcm80211/brcmsmac/srom.h | 29 --
drivers/net/wireless/brcm80211/brcmsmac/stf.c | 6 +-
drivers/net/wireless/iwlwifi/iwl-agn-lib.c | 35 +-
drivers/net/wireless/iwlwifi/iwl-agn-rxon.c | 4 +
drivers/net/wireless/iwlwifi/iwl-agn-tx.c | 19 +-
drivers/net/wireless/iwlwifi/iwl-agn.c | 2 +-
drivers/net/wireless/iwlwifi/iwl-commands.h | 7 +-
drivers/net/wireless/iwlwifi/iwl-mac80211.c | 5 +-
drivers/net/wireless/iwlwifi/iwl-power.c | 8 +-
drivers/net/wireless/iwlwifi/iwl-scan.c | 52 ++-
drivers/net/wireless/mac80211_hwsim.c | 5 +
drivers/net/wireless/mwifiex/Makefile | 2 +
drivers/net/wireless/mwifiex/cfg80211.c | 498 +++++++++++++++++-------
drivers/net/wireless/mwifiex/cfg80211.h | 2 +-
drivers/net/wireless/mwifiex/cmdevt.c | 21 +-
drivers/net/wireless/mwifiex/decl.h | 13 +-
drivers/net/wireless/mwifiex/fw.h | 159 +++++++-
drivers/net/wireless/mwifiex/ie.c | 396 +++++++++++++++++++
drivers/net/wireless/mwifiex/init.c | 1 +
drivers/net/wireless/mwifiex/ioctl.h | 32 ++
drivers/net/wireless/mwifiex/join.c | 26 +-
drivers/net/wireless/mwifiex/main.c | 57 ++-
drivers/net/wireless/mwifiex/main.h | 26 +-
drivers/net/wireless/mwifiex/sta_cmd.c | 69 ++--
drivers/net/wireless/mwifiex/sta_cmdresp.c | 8 +
drivers/net/wireless/mwifiex/sta_event.c | 51 ++-
drivers/net/wireless/mwifiex/sta_ioctl.c | 9 +-
drivers/net/wireless/mwifiex/uap_cmd.c | 432 +++++++++++++++++++++
drivers/net/wireless/mwifiex/wmm.c | 4 +
drivers/net/wireless/rndis_wlan.c | 14 -
drivers/net/wireless/rt2x00/rt2800pci.c | 1 +
drivers/net/wireless/ti/wl12xx/Kconfig | 1 +
drivers/net/wireless/ti/wlcore/Kconfig | 2 +-
drivers/net/wireless/ti/wlcore/acx.c | 80 ++++
drivers/net/wireless/ti/wlcore/acx.h | 30 ++
drivers/net/wireless/ti/wlcore/boot.c | 3 +-
drivers/net/wireless/ti/wlcore/cmd.c | 8 +-
drivers/net/wireless/ti/wlcore/event.c | 29 +-
drivers/net/wireless/ti/wlcore/main.c | 323 +++++++++++++++-
drivers/net/wireless/ti/wlcore/rx.c | 36 ++
drivers/net/wireless/ti/wlcore/rx.h | 4 +
drivers/net/wireless/ti/wlcore/wl12xx.h | 41 ++
drivers/net/wireless/ti/wlcore/wlcore.h | 6 +
drivers/net/xen-netfront.c | 6 -
drivers/nfc/Kconfig | 13 +
drivers/nfc/Makefile | 1 +
drivers/nfc/pn533.c | 19 +-
drivers/nfc/pn544_hci.c | 947 +++++++++++++++++++++++++++++++++++++++++++++
drivers/ssb/b43_pci_bridge.c | 2 +
drivers/ssb/pci.c | 88 ++++-
fs/dcache.c | 2 +
fs/inode.c | 2 +
include/linux/Kbuild | 1 +
include/linux/bcma/bcma.h | 7 +
include/linux/bcma/bcma_driver_pci.h | 11 +
include/linux/bootmem.h | 3 +-
include/linux/if_arp.h | 2 +-
include/linux/ipx.h | 2 +-
include/linux/micrel_phy.h | 2 +-
include/linux/nfc/pn544.h | 7 +
include/linux/nl80211.h | 8 +-
include/linux/ssb/ssb.h | 1 -
include/linux/ssb/ssb_regs.h | 61 ++-
include/net/bluetooth/bluetooth.h | 32 +-
include/net/bluetooth/hci.h | 8 +-
include/net/bluetooth/hci_core.h | 67 ++--
include/net/bluetooth/l2cap.h | 93 ++++-
include/net/bluetooth/mgmt.h | 9 +
include/net/bluetooth/smp.h | 2 +-
include/net/cfg80211.h | 6 +-
include/net/mac80211.h | 12 +-
include/net/nfc/hci.h | 6 +-
include/net/nfc/nfc.h | 19 +-
include/net/nfc/shdlc.h | 2 +
kernel/pid.c | 3 +-
mm/page_alloc.c | 7 +-
net/bluetooth/af_bluetooth.c | 8 +-
net/bluetooth/bnep/core.c | 2 +-
net/bluetooth/hci_conn.c | 56 +--
net/bluetooth/hci_core.c | 267 ++++++-------
net/bluetooth/hci_event.c | 75 +++-
net/bluetooth/hci_sysfs.c | 5 +-
net/bluetooth/l2cap_core.c | 762 +++++++++++++++++++++++++-----------
net/bluetooth/l2cap_sock.c | 76 ++--
net/bluetooth/mgmt.c | 286 ++++++++------
net/bluetooth/rfcomm/sock.c | 14 +-
net/bluetooth/sco.c | 75 ++--
net/bluetooth/smp.c | 2 +-
net/ipv4/fib_semantics.c | 12 +-
net/ipv4/route.c | 1 +
net/ipv4/tcp.c | 2 +
net/ipv4/tcp_input.c | 5 +
net/ipv4/udp.c | 30 +-
net/mac80211/agg-tx.c | 10 +-
net/mac80211/debugfs_netdev.c | 2 +
net/mac80211/ibss.c | 5 +
net/mac80211/iface.c | 4 +-
net/mac80211/main.c | 3 +
net/mac80211/mesh.c | 6 +-
net/mac80211/mesh_hwmp.c | 5 +-
net/mac80211/mesh_plink.c | 65 ++--
net/mac80211/rx.c | 6 +-
net/mac80211/wep.c | 15 +-
net/mac80211/wpa.c | 10 +-
net/nfc/core.c | 112 ++++--
net/nfc/hci/Kconfig | 1 +
net/nfc/hci/core.c | 78 ++--
net/nfc/hci/shdlc.c | 12 +
net/nfc/llcp/commands.c | 4 +-
net/nfc/llcp/llcp.c | 7 +
net/nfc/llcp/sock.c | 57 ++-
net/nfc/nci/core.c | 27 +-
net/nfc/nci/data.c | 8 +-
net/nfc/nci/lib.c | 1 +
net/nfc/nci/ntf.c | 2 +-
net/nfc/netlink.c | 6 +-
net/nfc/nfc.h | 2 +-
net/wireless/chan.c | 2 +-
net/wireless/core.c | 4 +-
net/wireless/core.h | 2 -
net/wireless/nl80211.c | 69 ++--
net/wireless/util.c | 2 +-
189 files changed, 6665 insertions(+), 5539 deletions(-)
delete mode 100644 drivers/net/wireless/brcm80211/brcmsmac/nicpci.c
delete mode 100644 drivers/net/wireless/brcm80211/brcmsmac/nicpci.h
delete mode 100644 drivers/net/wireless/brcm80211/brcmsmac/otp.c
delete mode 100644 drivers/net/wireless/brcm80211/brcmsmac/otp.h
delete mode 100644 drivers/net/wireless/brcm80211/brcmsmac/srom.c
delete mode 100644 drivers/net/wireless/brcm80211/brcmsmac/srom.h
create mode 100644 drivers/net/wireless/mwifiex/ie.c
create mode 100644 drivers/net/wireless/mwifiex/uap_cmd.c
create mode 100644 drivers/nfc/pn544_hci.c
^ permalink raw reply
* Re: [PATCH] Bluetooth: Fix null pointer dereference in l2cap_chan_send
From: Minho Ban @ 2012-05-24 6:32 UTC (permalink / raw)
To: Chanyeol Park
Cc: Gustavo Padovan, Marcel Holtmann, Johan Hedberg, David S. Miller,
linux-bluetooth, netdev, linux-kernel
In-Reply-To: <4FBB8828.303@samsung.com>
On 05/22/2012 09:35 PM, Chanyeol Park wrote:
> Hi
> On 2012년 05월 21일 09:58, Minho Ban wrote:
>> diff --git a/net/bluetooth/l2cap_sock.c b/net/bluetooth/l2cap_sock.c
>> index 3bb1611..98d4541 100644
>> --- a/net/bluetooth/l2cap_sock.c
>> +++ b/net/bluetooth/l2cap_sock.c
>> @@ -727,10 +727,12 @@ static int l2cap_sock_sendmsg(struct kiocb *iocb, struct socket *sock, struct ms
>> if (msg->msg_flags& MSG_OOB)
>> return -EOPNOTSUPP;
>>
>> - if (sk->sk_state != BT_CONNECTED)
>> + l2cap_chan_lock(chan);
>> + if (sk->sk_state != BT_CONNECTED || !chan->conn) {
>> + l2cap_chan_unlock(chan);
>> return -ENOTCONN;
>> + }
>>
>> - l2cap_chan_lock(chan);
>> err = l2cap_chan_send(chan, msg, len, sk->sk_priority);
>> l2cap_chan_unlock(chan);
>>
> Beside !chan->conn condition,I think it makes sense that sk_state check should be moved after l2cap_chan_lock()
> because sk_state could be changed due to l2cap_conn_del().
>
Thanks, chan->conn condition is not necessary, move sk->sk_state != BT_CONNECTED behind chan_lock is enough.
I'll amend this patch.
Regards
Minho Ban
^ permalink raw reply
* Re: [PATCH 06/15] batman-adv: Distributed ARP Table - add snooping functions for ARP messages
From: Simon Wunderlich @ 2012-05-24 8:09 UTC (permalink / raw)
To: David Miller
Cc: netdev-u79uwXL29TY76Z2rM5mHXA,
b.a.t.m.a.n-ZwoEplunGu2X36UT3dwllkB+6BGkLq7r,
lindner_marek-LWAfsSFWpa4
In-Reply-To: <20120524.015457.1543147002306809286.davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>
[-- Attachment #1: Type: text/plain, Size: 1124 bytes --]
Hey David,
thanks for your answer,
On Thu, May 24, 2012 at 01:54:57AM -0400, David Miller wrote:
> From: Sven Eckelmann <sven-KaDOiPu9UxWEi8DpZVb4nw@public.gmane.org>
> Date: Thu, 24 May 2012 07:34:12 +0200
>
> > _You_ were the person that declined the pull request because _you_ wanted to
> > rewrite the ARP handling. So _you_ are the person that has the insight in
> > _your_ plans. Either _you_ tell us what is _your_ problem with it or _you_
> > will have to point us to a person that knows _you_.
>
> If I say that you must not use ARP nor neighbour layer internals, it
> doesn't mean that I have to come up with the alternative
> implementation for you.
well, thats pretty much answers it. If we must not use ARP or neighbour
internals, even after your rewrite (?), we have to come up with an alternative
in any case (write our own backened).
We don't expect you to come up with an alternative implementation, but
as you are the one accepting the patches (or not) we need to know why
you decline something and what the problem is so we ca n work around
or improve.
Thanks
Simon
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply
* kernel 3.4.0, pppoe NAS, possible circular locking
From: Denys Fedoryshchenko @ 2012-05-24 8:44 UTC (permalink / raw)
To: netdev
Hi, upgraded one of NAS servers and got this:
[ 177.597130] ======================================================
[ 177.597234] [ INFO: possible circular locking dependency detected ]
[ 177.597339] 3.4.0-build-0061 #10 Not tainted
[ 177.597438] -------------------------------------------------------
[ 177.597543] swapper/0/0 is trying to acquire lock:
[ 177.597642] (_xmit_PPP#2){+.-...}, at: [<c02f09b9>]
sch_direct_xmit+0x36/0x119
[ 177.597892]
[ 177.597892] but task is already holding lock:
[ 177.597892] (&(&sch->busylock)->rlock){+.-...}, at: [<c02e0808>]
dev_queue_xmit+0x1d6/0x418
[ 177.597892]
[ 177.597892] which lock already depends on the new lock.
[ 177.597892]
[ 177.597892]
[ 177.597892] the existing dependency chain (in reverse order) is:
[ 177.597892]
[ 177.597892] -> #3 (&(&sch->busylock)->rlock){+.-...}:
[ 177.597892] [<c015a6d1>] lock_acquire+0x71/0x85
[ 177.597892] [<c034de94>] _raw_spin_lock_irqsave+0x40/0x50
[ 177.597892] [<c017c1f2>] get_page_from_freelist+0x227/0x398
[ 177.597892] [<c017c5a7>] __alloc_pages_nodemask+0xef/0x5f9
[ 177.597892] [<c019c34f>] alloc_slab_page+0x1d/0x21
[ 177.597892] [<c019c39f>] new_slab+0x4c/0x164
[ 177.597892] [<c019d259>]
__slab_alloc.clone.59.clone.64+0x247/0x2de
[ 177.597892] [<c019d6ee>] __kmalloc+0x55/0xa3
[ 177.597892] [<c02d70ce>] pskb_expand_head+0xbe/0x200
[ 177.597892] [<c02a8e91>] __pppoe_xmit+0xb0/0x145
[ 177.597892] [<c02a8f30>] pppoe_xmit+0xa/0xc
[ 177.597892] [<c02a6c71>] ppp_channel_push+0x3d/0x94
[ 177.597892] [<c02a6d72>] ppp_write+0x99/0xa1
[ 177.597892] [<c01a32b4>] vfs_write+0x7e/0xab
[ 177.597892] [<c01a3424>] sys_write+0x3d/0x5e
[ 177.597892] [<c034e511>] syscall_call+0x7/0xb
[ 177.597892]
[ 177.597892] -> #2 (&(&pch->downl)->rlock){+.-...}:
[ 177.597892] [<c015a6d1>] lock_acquire+0x71/0x85
[ 177.597892] [<c034df86>] _raw_spin_lock_bh+0x38/0x45
[ 177.597892] [<c02a523a>] ppp_push+0x59/0x4b3
[ 177.597892] [<c02a6a69>] ppp_xmit_process+0x41b/0x4be
[ 177.597892] [<c02a6d69>] ppp_write+0x90/0xa1
[ 177.597892] [<c01a32b4>] vfs_write+0x7e/0xab
[ 177.597892] [<c01a3424>] sys_write+0x3d/0x5e
[ 177.597892] [<c034e511>] syscall_call+0x7/0xb
[ 177.597892]
[ 177.597892] -> #1 (&(&ppp->wlock)->rlock){+.-...}:
[ 177.597892] [<c015a6d1>] lock_acquire+0x71/0x85
[ 177.597892] [<c034df86>] _raw_spin_lock_bh+0x38/0x45
[ 177.597892] [<c02a6667>] ppp_xmit_process+0x19/0x4be
[ 177.597892] [<c02a6c19>] ppp_start_xmit+0x10d/0x128
[ 177.597892] [<c02e0573>] dev_hard_start_xmit+0x333/0x3f2
[ 177.597892] [<c02f09d8>] sch_direct_xmit+0x55/0x119
[ 177.597892] [<c02e08b4>] dev_queue_xmit+0x282/0x418
[ 177.597892] [<c02e65c6>] neigh_direct_output+0xa/0xc
[ 177.597892] [<c03039e0>] ip_finish_output2+0x1e1/0x21c
[ 177.597892] [<c0303a50>] ip_finish_output+0x35/0x39
[ 177.597892] [<c03048c7>] ip_output+0x87/0x8c
[ 177.597892] [<c0301c9a>] ip_forward_finish+0x56/0x5a
[ 177.597892] [<c0301e9e>] ip_forward+0x200/0x2a2
[ 177.597892] [<c0300969>] ip_rcv_finish+0x31a/0x33c
[ 177.597892] [<c03009d1>] NF_HOOK.clone.11+0x46/0x4d
[ 177.597892] [<c0300cec>] ip_rcv+0x201/0x23d
[ 177.597892] [<c02deca7>] __netif_receive_skb+0x329/0x378
[ 177.597892] [<c02dee74>] netif_receive_skb+0x4e/0x7d
[ 177.597892] [<f846fef3>] rtl8139_poll+0x243/0x33d [8139too]
[ 177.597892] [<c02df48f>] net_rx_action+0x90/0x15d
[ 177.597892] [<c012b42d>] __do_softirq+0x7b/0x118
[ 177.597892]
[ 177.597892] -> #0 (_xmit_PPP#2){+.-...}:
[ 177.597892] [<c015a08b>] __lock_acquire+0x9a3/0xc27
[ 177.597892] [<c015a6d1>] lock_acquire+0x71/0x85
[ 177.597892] [<c034ddad>] _raw_spin_lock+0x33/0x40
[ 177.597892] [<c02f09b9>] sch_direct_xmit+0x36/0x119
[ 177.597892] [<c02e08b4>] dev_queue_xmit+0x282/0x418
[ 177.597892] [<c02e65c6>] neigh_direct_output+0xa/0xc
[ 177.597892] [<c03039e0>] ip_finish_output2+0x1e1/0x21c
[ 177.597892] [<c0303a50>] ip_finish_output+0x35/0x39
[ 177.597892] [<c03048c7>] ip_output+0x87/0x8c
[ 177.597892] [<c03030c6>] dst_output+0x15/0x18
[ 177.597892] [<c03042d7>] ip_local_out+0x17/0x1a
[ 177.597892] [<c0304f59>] ip_send_skb+0x12/0x5c
[ 177.597892] [<c0304fcd>] ip_push_pending_frames+0x2a/0x2e
[ 177.597892] [<c0320a7a>] icmp_push_reply+0xf9/0x101
[ 177.597892] [<c0320f1c>] icmp_reply+0x10e/0x12d
[ 177.597892] [<c0321050>] icmp_echo+0x59/0x5f
[ 177.597892] [<c032169f>] icmp_rcv+0xfd/0x11a
[ 177.597892] [<c030055c>] ip_local_deliver_finish+0x13a/0x1e9
[ 177.597892] [<c03009d1>] NF_HOOK.clone.11+0x46/0x4d
[ 177.597892] [<c0300ae7>] ip_local_deliver+0x41/0x45
[ 177.597892] [<c0300969>] ip_rcv_finish+0x31a/0x33c
[ 177.597892] [<c03009d1>] NF_HOOK.clone.11+0x46/0x4d
[ 177.597892] [<c0300cec>] ip_rcv+0x201/0x23d
[ 177.597892] [<c02deca7>] __netif_receive_skb+0x329/0x378
[ 177.597892] [<c02ded5f>] process_backlog+0x69/0x130
[ 177.597892] [<c02df48f>] net_rx_action+0x90/0x15d
[ 177.597892] [<c012b42d>] __do_softirq+0x7b/0x118
[ 177.597892]
[ 177.597892] other info that might help us debug this:
[ 177.597892]
[ 177.597892] Chain exists of:
[ 177.597892] _xmit_PPP#2 --> &(&pch->downl)->rlock -->
&(&sch->busylock)->rlock
[ 177.597892]
[ 177.597892] Possible unsafe locking scenario:
[ 177.597892]
[ 177.597892] CPU0 CPU1
[ 177.597892] ---- ----
[ 177.597892] lock(&(&sch->busylock)->rlock);
[ 177.597892]
lock(&(&pch->downl)->rlock);
[ 177.597892]
lock(&(&sch->busylock)->rlock);
[ 177.597892] lock(_xmit_PPP#2);
[ 177.597892]
[ 177.597892] *** DEADLOCK ***
[ 177.597892]
[ 177.597892] 6 locks held by swapper/0/0:
[ 177.597892] #0: (rcu_read_lock){.+.+..}, at: [<c02dbf9c>]
rcu_lock_acquire+0x0/0x30
[ 177.597892] #1: (rcu_read_lock){.+.+..}, at: [<c0300453>]
ip_local_deliver_finish+0x31/0x1e9
[ 177.597892] #2: (slock-AF_INET){+.-...}, at: [<c0320c40>]
icmp_xmit_lock.clone.19+0x1f/0x2f
[ 177.597892] #3: (rcu_read_lock){.+.+..}, at: [<c0302fad>]
rcu_read_lock+0x0/0x35
[ 177.597892] #4: (rcu_read_lock_bh){.+....}, at: [<c02dbf9c>]
rcu_lock_acquire+0x0/0x30
[ 177.597892] #5: (&(&sch->busylock)->rlock){+.-...}, at:
[<c02e0808>] dev_queue_xmit+0x1d6/0x418
[ 177.597892]
[ 177.597892] stack backtrace:
[ 177.597892] Pid: 0, comm: swapper/0 Not tainted 3.4.0-build-0061 #10
[ 177.597892] Call Trace:
[ 177.597892] [<c034c156>] ? printk+0x18/0x1a
[ 177.597892] [<c0158a74>] print_circular_bug+0x1ac/0x1b6
[ 177.597892] [<c015a08b>] __lock_acquire+0x9a3/0xc27
[ 177.597892] [<c0159256>] ? check_irq_usage+0x76/0x86
[ 177.597892] [<c015a6d1>] lock_acquire+0x71/0x85
[ 177.597892] [<c02f09b9>] ? sch_direct_xmit+0x36/0x119
[ 177.597892] [<c034ddad>] _raw_spin_lock+0x33/0x40
[ 177.597892] [<c02f09b9>] ? sch_direct_xmit+0x36/0x119
[ 177.597892] [<c02f09b9>] sch_direct_xmit+0x36/0x119
[ 177.597892] [<c02e08b4>] dev_queue_xmit+0x282/0x418
[ 177.597892] [<c0302fad>] ? ip_generic_getfrag+0x6e/0x6e
[ 177.597892] [<c02e65c6>] neigh_direct_output+0xa/0xc
[ 177.597892] [<c03039e0>] ip_finish_output2+0x1e1/0x21c
[ 177.597892] [<c02fcce6>] ? ipv4_mtu+0x36/0x65
[ 177.597892] [<c0303a50>] ip_finish_output+0x35/0x39
[ 177.597892] [<c03048c7>] ip_output+0x87/0x8c
[ 177.597892] [<c0303a1b>] ? ip_finish_output2+0x21c/0x21c
[ 177.597892] [<c03030c6>] dst_output+0x15/0x18
[ 177.597892] [<c03042d7>] ip_local_out+0x17/0x1a
[ 177.597892] [<c0304f59>] ip_send_skb+0x12/0x5c
[ 177.597892] [<c0304fcd>] ip_push_pending_frames+0x2a/0x2e
[ 177.597892] [<c0320a7a>] icmp_push_reply+0xf9/0x101
[ 177.597892] [<c0320f1c>] icmp_reply+0x10e/0x12d
[ 177.597892] [<c0321050>] icmp_echo+0x59/0x5f
[ 177.597892] [<f85af28d>] ? nf_nat_fn+0x121/0x12d [iptable_nat]
[ 177.597892] [<c0320cdb>] ? skb_dst.clone.21+0x1e/0x44
[ 177.597892] [<c032169f>] icmp_rcv+0xfd/0x11a
[ 177.597892] [<c030055c>] ip_local_deliver_finish+0x13a/0x1e9
[ 177.597892] [<c0300453>] ? ip_local_deliver_finish+0x31/0x1e9
[ 177.597892] [<c0300422>] ? pskb_may_pull+0x30/0x30
[ 177.597892] [<c03009d1>] NF_HOOK.clone.11+0x46/0x4d
[ 177.597892] [<c0300422>] ? pskb_may_pull+0x30/0x30
[ 177.597892] [<c0300ae7>] ip_local_deliver+0x41/0x45
[ 177.597892] [<c0300422>] ? pskb_may_pull+0x30/0x30
[ 177.597892] [<c0300969>] ip_rcv_finish+0x31a/0x33c
[ 177.597892] [<c030064f>] ? skb_dst.clone.10+0x44/0x44
[ 177.597892] [<c03009d1>] NF_HOOK.clone.11+0x46/0x4d
[ 177.597892] [<c030064f>] ? skb_dst.clone.10+0x44/0x44
[ 177.597892] [<c0300cec>] ip_rcv+0x201/0x23d
[ 177.597892] [<c030064f>] ? skb_dst.clone.10+0x44/0x44
[ 177.597892] [<c02deca7>] __netif_receive_skb+0x329/0x378
[ 177.597892] [<c02ded5f>] process_backlog+0x69/0x130
[ 177.597892] [<c02df48f>] net_rx_action+0x90/0x15d
[ 177.597892] [<c012b42d>] __do_softirq+0x7b/0x118
[ 177.597892] [<c013236e>] ? do_send_specific+0xb/0x8f
[ 177.597892] [<c012b3b2>] ? local_bh_enable+0xd/0xd
[ 177.597892] <IRQ> [<c012b648>] ? irq_exit+0x41/0x91
[ 177.597892] [<c0103c73>] ? do_IRQ+0x79/0x8d
[ 177.597892] [<c0158011>] ? trace_hardirqs_off_caller+0x2e/0x86
[ 177.597892] [<c034f2ee>] ? common_interrupt+0x2e/0x34
[ 177.597892] [<c015007b>] ? ktime_get_ts+0x8f/0x9b
[ 177.597892] [<c0108a0a>] ? mwait_idle+0x50/0x5a
[ 177.597892] [<c01091ac>] ? cpu_idle+0x55/0x6f
[ 177.597892] [<c033e2b1>] ? rest_init+0xa1/0xa7
[ 177.597892] [<c033e210>] ? __read_lock_failed+0x14/0x14
[ 177.597892] [<c049874f>] ? start_kernel+0x30d/0x314
[ 177.597892] [<c0498209>] ? repair_env_string+0x51/0x51
[ 177.597892] [<c04980a8>] ? i386_start_kernel+0xa8/0xaf
---
Denys Fedoryshchenko, Network Engineer, Virtual ISP S.A.L.
^ permalink raw reply
* [PATCH 01/21] datapath: tunnelling: Replace tun_id with tun_key
From: Simon Horman @ 2012-05-24 9:08 UTC (permalink / raw)
To: dev-yBygre7rU0TnMu66kgdUjQ; +Cc: netdev-u79uwXL29TY76Z2rM5mHXA
In-Reply-To: <1337850554-10339-1-git-send-email-horms-/R6kz+dDXgpPR4JQBCEnsQ@public.gmane.org>
this is a first pass at providing a tun_key which can be used
as the basis for flow-based tunnelling. The tun_key includes and
replaces the tun_id in both struct ovs_skb_cb and struct sw_tun_key.
In ovs_skb_cb tun_key is a pointer as it is envisaged that it will grow
when support for IPv6 to an extent that inlining the structure will result
in ovs_skb_cb being larger than the 48 bytes available in skb->cb.
As OVS does not support IPv6 as the outer transport protocol for tunnels
the IPv6 portions of this change, which appeared in the previous revision,
have been dropped in order to limit the scope and size of this patch.
This patch does not make any effort to retain the existing tun_id behaviour
nor does it fully implement flow-based tunnels. As such it it is incomplete
and can't be used in its current form (other than to break OVS tunnelling).
** Please do not apply **
Cc: Kyle Mestery <kmestery-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org>
Signed-off-by: Simon Horman <horms-/R6kz+dDXgpPR4JQBCEnsQ@public.gmane.org>
---
v4
* Add tun_flags to ovs_key_ipv4_tunnel
* Correct format in format_odp_key_attr()
v3
* Rework, actually works in limited scenarios
v2
* Use pointer to struct ovs_key_ipv4_tunnel in OVS_CB()
rather than having a struct ovs_key_ipv4_tunnel in OVS_CB()
v1
* Initial post
---
datapath/actions.c | 6 +++---
datapath/datapath.c | 10 +++++++++-
datapath/datapath.h | 5 +++--
datapath/flow.c | 34 +++++++++++++++++++++++-----------
datapath/flow.h | 27 +++++++++++++++++++++++----
datapath/tunnel.c | 24 +++++++++++++-----------
datapath/tunnel.h | 5 +++--
datapath/vport-capwap.c | 12 ++++++------
datapath/vport-gre.c | 21 +++++++++++----------
datapath/vport.c | 2 +-
include/linux/openvswitch.h | 13 ++++++++++++-
lib/dpif-netdev.c | 1 +
lib/odp-util.c | 13 +++++++++++++
lib/odp-util.h | 5 +++--
14 files changed, 124 insertions(+), 54 deletions(-)
diff --git a/datapath/actions.c b/datapath/actions.c
index 208f260..7b2ea25 100644
--- a/datapath/actions.c
+++ b/datapath/actions.c
@@ -342,8 +342,8 @@ static int execute_set_action(struct sk_buff *skb,
skb->priority = nla_get_u32(nested_attr);
break;
- case OVS_KEY_ATTR_TUN_ID:
- OVS_CB(skb)->tun_id = nla_get_be64(nested_attr);
+ case OVS_KEY_ATTR_IPV4_TUNNEL:
+ OVS_CB(skb)->tun_key = nla_data(nested_attr);
break;
case OVS_KEY_ATTR_ETHERNET:
@@ -469,7 +469,7 @@ int ovs_execute_actions(struct datapath *dp, struct sk_buff *skb)
goto out_loop;
}
- OVS_CB(skb)->tun_id = 0;
+ OVS_CB(skb)->tun_key = NULL;
error = do_execute_actions(dp, skb, acts->actions,
acts->actions_len, false);
diff --git a/datapath/datapath.c b/datapath/datapath.c
index a4376a0..65dfe79 100644
--- a/datapath/datapath.c
+++ b/datapath/datapath.c
@@ -587,12 +587,20 @@ static int validate_set(const struct nlattr *a,
switch (key_type) {
const struct ovs_key_ipv4 *ipv4_key;
+ const struct ovs_key_ipv4_tunnel *tun_key;
case OVS_KEY_ATTR_PRIORITY:
case OVS_KEY_ATTR_TUN_ID:
case OVS_KEY_ATTR_ETHERNET:
break;
+ case OVS_KEY_ATTR_IPV4_TUNNEL:
+ tun_key = nla_data(ovs_key);
+ if (!tun_key->ipv4_dst) {
+ return -EINVAL;
+ }
+ break;
+
case OVS_KEY_ATTR_IPV4:
if (flow_key->eth.type != htons(ETH_P_IP))
return -EINVAL;
@@ -785,7 +793,7 @@ static int ovs_packet_cmd_execute(struct sk_buff *skb, struct genl_info *info)
err = ovs_flow_metadata_from_nlattrs(&flow->key.phy.priority,
&flow->key.phy.in_port,
- &flow->key.phy.tun_id,
+ &flow->key.phy.tun_key,
a[OVS_PACKET_ATTR_KEY]);
if (err)
goto err_flow_put;
diff --git a/datapath/datapath.h b/datapath/datapath.h
index affbf0e..de0b28d 100644
--- a/datapath/datapath.h
+++ b/datapath/datapath.h
@@ -96,7 +96,7 @@ struct datapath {
/**
* struct ovs_skb_cb - OVS data in skb CB
* @flow: The flow associated with this packet. May be %NULL if no flow.
- * @tun_id: ID of the tunnel that encapsulated this packet. It is 0 if the
+ * @tun_key: Key for the tunnel that encapsulated this packet.
* @ip_summed: Consistently stores L4 checksumming status across different
* kernel versions.
* @csum_start: Stores the offset from which to start checksumming independent
@@ -107,7 +107,7 @@ struct datapath {
*/
struct ovs_skb_cb {
struct sw_flow *flow;
- __be64 tun_id;
+ struct ovs_key_ipv4_tunnel *tun_key;
#ifdef NEED_CSUM_NORMALIZE
enum csum_type ip_summed;
u16 csum_start;
@@ -192,4 +192,5 @@ struct sk_buff *ovs_vport_cmd_build_info(struct vport *, u32 pid, u32 seq,
u8 cmd);
int ovs_execute_actions(struct datapath *dp, struct sk_buff *skb);
+
#endif /* datapath.h */
diff --git a/datapath/flow.c b/datapath/flow.c
index d07337c..49c0dd8 100644
--- a/datapath/flow.c
+++ b/datapath/flow.c
@@ -629,7 +629,8 @@ int ovs_flow_extract(struct sk_buff *skb, u16 in_port, struct sw_flow_key *key,
memset(key, 0, sizeof(*key));
key->phy.priority = skb->priority;
- key->phy.tun_id = OVS_CB(skb)->tun_id;
+ if (OVS_CB(skb)->tun_key)
+ key->phy.tun_key = *OVS_CB(skb)->tun_key;
key->phy.in_port = in_port;
skb_reset_mac_header(skb);
@@ -847,6 +848,7 @@ const int ovs_key_lens[OVS_KEY_ATTR_MAX + 1] = {
/* Not upstream. */
[OVS_KEY_ATTR_TUN_ID] = sizeof(__be64),
+ [OVS_KEY_ATTR_IPV4_TUNNEL] = sizeof(struct ovs_key_ipv4_tunnel),
};
static int ipv4_flow_from_nlattrs(struct sw_flow_key *swkey, int *key_len,
@@ -1022,9 +1024,11 @@ int ovs_flow_from_nlattrs(struct sw_flow_key *swkey, int *key_lenp,
swkey->phy.in_port = DP_MAX_PORTS;
}
- if (attrs & (1ULL << OVS_KEY_ATTR_TUN_ID)) {
- swkey->phy.tun_id = nla_get_be64(a[OVS_KEY_ATTR_TUN_ID]);
- attrs &= ~(1ULL << OVS_KEY_ATTR_TUN_ID);
+ if (attrs & (1ULL << OVS_KEY_ATTR_IPV4_TUNNEL)) {
+ struct ovs_key_ipv4_tunnel *tun_key;
+ tun_key = nla_data(a[OVS_KEY_ATTR_IPV4_TUNNEL]);
+ swkey->phy.tun_key = *tun_key;
+ attrs &= ~(1ULL << OVS_KEY_ATTR_IPV4_TUNNEL);
}
/* Data attributes. */
@@ -1162,14 +1166,15 @@ int ovs_flow_from_nlattrs(struct sw_flow_key *swkey, int *key_lenp,
* get the metadata, that is, the parts of the flow key that cannot be
* extracted from the packet itself.
*/
-int ovs_flow_metadata_from_nlattrs(u32 *priority, u16 *in_port, __be64 *tun_id,
+int ovs_flow_metadata_from_nlattrs(u32 *priority, u16 *in_port,
+ struct ovs_key_ipv4_tunnel *tun_key,
const struct nlattr *attr)
{
const struct nlattr *nla;
int rem;
*in_port = DP_MAX_PORTS;
- *tun_id = 0;
+ tun_key->tun_id = 0;
*priority = 0;
nla_for_each_nested(nla, attr, rem) {
@@ -1184,8 +1189,9 @@ int ovs_flow_metadata_from_nlattrs(u32 *priority, u16 *in_port, __be64 *tun_id,
*priority = nla_get_u32(nla);
break;
- case OVS_KEY_ATTR_TUN_ID:
- *tun_id = nla_get_be64(nla);
+ case OVS_KEY_ATTR_IPV4_TUNNEL:
+ memcpy(tun_key, nla_data(nla),
+ sizeof(*tun_key));
break;
case OVS_KEY_ATTR_IN_PORT:
@@ -1204,15 +1210,21 @@ int ovs_flow_metadata_from_nlattrs(u32 *priority, u16 *in_port, __be64 *tun_id,
int ovs_flow_to_nlattrs(const struct sw_flow_key *swkey, struct sk_buff *skb)
{
struct ovs_key_ethernet *eth_key;
+ struct ovs_key_ipv4_tunnel *tun_key;
struct nlattr *nla, *encap;
if (swkey->phy.priority &&
nla_put_u32(skb, OVS_KEY_ATTR_PRIORITY, swkey->phy.priority))
goto nla_put_failure;
- if (swkey->phy.tun_id != cpu_to_be64(0) &&
- nla_put_be64(skb, OVS_KEY_ATTR_TUN_ID, swkey->phy.tun_id))
- goto nla_put_failure;
+ if (swkey->phy.tun_key.ipv4_dst) {
+ nla = nla_reserve(skb, OVS_KEY_ATTR_IPV4_TUNNEL,
+ sizeof(*tun_key));
+ if (!nla)
+ goto nla_put_failure;
+ tun_key = nla_data(nla);
+ *tun_key = swkey->phy.tun_key;
+ }
if (swkey->phy.in_port != DP_MAX_PORTS &&
nla_put_u32(skb, OVS_KEY_ATTR_IN_PORT, swkey->phy.in_port))
diff --git a/datapath/flow.h b/datapath/flow.h
index 5be481e..bab5363 100644
--- a/datapath/flow.h
+++ b/datapath/flow.h
@@ -42,7 +42,7 @@ struct sw_flow_actions {
struct sw_flow_key {
struct {
- __be64 tun_id; /* Encapsulating tunnel ID. */
+ struct ovs_key_ipv4_tunnel tun_key; /* Encapsulating tunnel key. */
u32 priority; /* Packet QoS priority. */
u16 in_port; /* Input switch port (or DP_MAX_PORTS). */
} phy;
@@ -150,6 +150,7 @@ u64 ovs_flow_used_time(unsigned long flow_jiffies);
* ------ --- ------ -----
* OVS_KEY_ATTR_PRIORITY 4 -- 4 8
* OVS_KEY_ATTR_TUN_ID 8 -- 4 12
+ * OVS_KEY_ATTR_IPV4_TUNNEL 18 2 4 24
* OVS_KEY_ATTR_IN_PORT 4 -- 4 8
* OVS_KEY_ATTR_ETHERNET 12 -- 4 16
* OVS_KEY_ATTR_8021Q 4 -- 4 8
@@ -158,14 +159,15 @@ u64 ovs_flow_used_time(unsigned long flow_jiffies);
* OVS_KEY_ATTR_ICMPV6 2 2 4 8
* OVS_KEY_ATTR_ND 28 -- 4 32
* -------------------------------------------------
- * total 144
+ * total 168
*/
-#define FLOW_BUFSIZE 144
+#define FLOW_BUFSIZE 168
int ovs_flow_to_nlattrs(const struct sw_flow_key *, struct sk_buff *);
int ovs_flow_from_nlattrs(struct sw_flow_key *swkey, int *key_lenp,
const struct nlattr *);
-int ovs_flow_metadata_from_nlattrs(u32 *priority, u16 *in_port, __be64 *tun_id,
+int ovs_flow_metadata_from_nlattrs(u32 *priority, u16 *in_port,
+ struct ovs_key_ipv4_tunnel *tun_key,
const struct nlattr *);
#define MAX_ACTIONS_BUFSIZE (16 * 1024)
@@ -204,4 +206,21 @@ u32 ovs_flow_hash(const struct sw_flow_key *key, int key_len);
struct sw_flow *ovs_flow_tbl_next(struct flow_table *table, u32 *bucket, u32 *idx);
extern const int ovs_key_lens[OVS_KEY_ATTR_MAX + 1];
+static inline void tun_key_swap_addr(struct ovs_key_ipv4_tunnel *tun_key)
+{
+ __be32 ndst = tun_key->ipv4_src;
+ tun_key->ipv4_src = tun_key->ipv4_dst;
+ tun_key->ipv4_dst = ndst;
+}
+
+static inline void tun_key_init(struct ovs_key_ipv4_tunnel *tun_key,
+ const struct iphdr *iph, __be64 tun_id)
+{
+ tun_key->tun_id = tun_id;
+ tun_key->ipv4_src = iph->saddr;
+ tun_key->ipv4_dst = iph->daddr;
+ tun_key->ipv4_tos = iph->tos;
+ tun_key->ipv4_ttl = iph->ttl;
+}
+
#endif /* flow.h */
diff --git a/datapath/tunnel.c b/datapath/tunnel.c
index d651c11..010e513 100644
--- a/datapath/tunnel.c
+++ b/datapath/tunnel.c
@@ -367,9 +367,9 @@ struct vport *ovs_tnl_find_port(struct net *net, __be32 saddr, __be32 daddr,
return NULL;
}
-static void ecn_decapsulate(struct sk_buff *skb, u8 tos)
+static void ecn_decapsulate(struct sk_buff *skb)
{
- if (unlikely(INET_ECN_is_ce(tos))) {
+ if (unlikely(INET_ECN_is_ce(OVS_CB(skb)->tun_key->ipv4_tos))) {
__be16 protocol = skb->protocol;
skb_set_network_header(skb, ETH_HLEN);
@@ -416,7 +416,7 @@ static void ecn_decapsulate(struct sk_buff *skb, u8 tos)
* - skb->csum does not include the inner Ethernet header.
* - The layer pointers are undefined.
*/
-void ovs_tnl_rcv(struct vport *vport, struct sk_buff *skb, u8 tos)
+void ovs_tnl_rcv(struct vport *vport, struct sk_buff *skb)
{
struct ethhdr *eh;
@@ -433,7 +433,7 @@ void ovs_tnl_rcv(struct vport *vport, struct sk_buff *skb, u8 tos)
skb_clear_rxhash(skb);
secpath_reset(skb);
- ecn_decapsulate(skb, tos);
+ ecn_decapsulate(skb);
vlan_set_tci(skb, 0);
if (unlikely(compute_ip_summed(skb, false))) {
@@ -613,12 +613,14 @@ static void ipv6_build_icmp(struct sk_buff *skb, struct sk_buff *nskb,
bool ovs_tnl_frag_needed(struct vport *vport,
const struct tnl_mutable_config *mutable,
- struct sk_buff *skb, unsigned int mtu, __be64 flow_key)
+ struct sk_buff *skb, unsigned int mtu,
+ struct ovs_key_ipv4_tunnel *tun_key)
{
unsigned int eth_hdr_len = ETH_HLEN;
unsigned int total_length = 0, header_length = 0, payload_length;
struct ethhdr *eh, *old_eh = eth_hdr(skb);
struct sk_buff *nskb;
+ struct ovs_key_ipv4_tunnel ntun_key;
/* Sanity check */
if (skb->protocol == htons(ETH_P_IP)) {
@@ -705,8 +707,10 @@ bool ovs_tnl_frag_needed(struct vport *vport,
* any way of synthesizing packets.
*/
if ((mutable->flags & (TNL_F_IN_KEY_MATCH | TNL_F_OUT_KEY_ACTION)) ==
- (TNL_F_IN_KEY_MATCH | TNL_F_OUT_KEY_ACTION))
- OVS_CB(nskb)->tun_id = flow_key;
+ (TNL_F_IN_KEY_MATCH | TNL_F_OUT_KEY_ACTION)) {
+ ntun_key = *tun_key;
+ OVS_CB(nskb)->tun_key = &ntun_key;
+ }
if (unlikely(compute_ip_summed(nskb, false))) {
kfree_skb(nskb);
@@ -761,7 +765,7 @@ static bool check_mtu(struct sk_buff *skb,
if (packet_length > mtu &&
ovs_tnl_frag_needed(vport, mutable, skb, mtu,
- OVS_CB(skb)->tun_id))
+ OVS_CB(skb)->tun_key))
return false;
}
}
@@ -778,7 +782,7 @@ static bool check_mtu(struct sk_buff *skb,
if (packet_length > mtu &&
ovs_tnl_frag_needed(vport, mutable, skb, mtu,
- OVS_CB(skb)->tun_id))
+ OVS_CB(skb)->tun_key))
return false;
}
}
@@ -799,10 +803,8 @@ static void create_tunnel_header(const struct vport *vport,
iph->ihl = sizeof(struct iphdr) >> 2;
iph->frag_off = htons(IP_DF);
iph->protocol = tnl_vport->tnl_ops->ipproto;
- iph->tos = mutable->tos;
iph->daddr = rt->rt_dst;
iph->saddr = rt->rt_src;
- iph->ttl = mutable->ttl;
if (!iph->ttl)
iph->ttl = ip4_dst_hoplimit(&rt_dst(rt));
diff --git a/datapath/tunnel.h b/datapath/tunnel.h
index 1924017..7d78297 100644
--- a/datapath/tunnel.h
+++ b/datapath/tunnel.h
@@ -269,14 +269,15 @@ int ovs_tnl_set_addr(struct vport *vport, const unsigned char *addr);
const char *ovs_tnl_get_name(const struct vport *vport);
const unsigned char *ovs_tnl_get_addr(const struct vport *vport);
int ovs_tnl_send(struct vport *vport, struct sk_buff *skb);
-void ovs_tnl_rcv(struct vport *vport, struct sk_buff *skb, u8 tos);
+void ovs_tnl_rcv(struct vport *vport, struct sk_buff *skb);
struct vport *ovs_tnl_find_port(struct net *net, __be32 saddr, __be32 daddr,
__be64 key, int tunnel_type,
const struct tnl_mutable_config **mutable);
bool ovs_tnl_frag_needed(struct vport *vport,
const struct tnl_mutable_config *mutable,
- struct sk_buff *skb, unsigned int mtu, __be64 flow_key);
+ struct sk_buff *skb, unsigned int mtu,
+ struct ovs_key_ipv4_tunnel *tun_key);
void ovs_tnl_free_linked_skbs(struct sk_buff *skb);
int ovs_tnl_init(void);
diff --git a/datapath/vport-capwap.c b/datapath/vport-capwap.c
index 05a099d..1e08d5a 100644
--- a/datapath/vport-capwap.c
+++ b/datapath/vport-capwap.c
@@ -220,7 +220,7 @@ static struct sk_buff *capwap_update_header(const struct vport *vport,
struct capwaphdr_wsi *wsi = (struct capwaphdr_wsi *)(cwh + 1);
struct capwaphdr_wsi_key *opt = (struct capwaphdr_wsi_key *)(wsi + 1);
- opt->key = OVS_CB(skb)->tun_id;
+ opt->key = OVS_CB(skb)->tun_key->tun_id;
}
udph->len = htons(skb->len - skb_transport_offset(skb));
@@ -316,6 +316,7 @@ static int capwap_rcv(struct sock *sk, struct sk_buff *skb)
struct vport *vport;
const struct tnl_mutable_config *mutable;
struct iphdr *iph;
+ struct ovs_key_ipv4_tunnel tun_key;
__be64 key = 0;
if (unlikely(!pskb_may_pull(skb, CAPWAP_MIN_HLEN + ETH_HLEN)))
@@ -333,12 +334,11 @@ static int capwap_rcv(struct sock *sk, struct sk_buff *skb)
goto error;
}
- if (mutable->flags & TNL_F_IN_KEY_MATCH)
- OVS_CB(skb)->tun_id = key;
- else
- OVS_CB(skb)->tun_id = 0;
+ tun_key_init(&tun_key, iph,
+ mutable->flags & TNL_F_IN_KEY_MATCH ? key : 0);
+ OVS_CB(skb)->tun_key = &tun_key;
- ovs_tnl_rcv(vport, skb, iph->tos);
+ ovs_tnl_rcv(vport, skb);
goto out;
error:
diff --git a/datapath/vport-gre.c b/datapath/vport-gre.c
index ab89c5b..fd2b038 100644
--- a/datapath/vport-gre.c
+++ b/datapath/vport-gre.c
@@ -101,10 +101,6 @@ static struct sk_buff *gre_update_header(const struct vport *vport,
__be32 *options = (__be32 *)(skb_network_header(skb) + mutable->tunnel_hlen
- GRE_HEADER_SECTION);
- /* Work backwards over the options so the checksum is last. */
- if (mutable->flags & TNL_F_OUT_KEY_ACTION)
- *options = be64_get_low32(OVS_CB(skb)->tun_id);
-
if (mutable->out_key || mutable->flags & TNL_F_OUT_KEY_ACTION)
options--;
@@ -285,7 +281,11 @@ static void gre_err(struct sk_buff *skb, u32 info)
#endif
__skb_pull(skb, tunnel_hdr_len);
- ovs_tnl_frag_needed(vport, mutable, skb, mtu, key);
+ {
+ struct ovs_key_ipv4_tunnel tun_key;
+ tun_key_init(&tun_key, iph, key);
+ ovs_tnl_frag_needed(vport, mutable, skb, mtu, &tun_key);
+ }
__skb_push(skb, tunnel_hdr_len);
out:
@@ -327,6 +327,7 @@ static int gre_rcv(struct sk_buff *skb)
const struct tnl_mutable_config *mutable;
int hdr_len;
struct iphdr *iph;
+ struct ovs_key_ipv4_tunnel tun_key;
__be16 flags;
__be64 key;
@@ -351,15 +352,15 @@ static int gre_rcv(struct sk_buff *skb)
goto error;
}
- if (mutable->flags & TNL_F_IN_KEY_MATCH)
- OVS_CB(skb)->tun_id = key;
- else
- OVS_CB(skb)->tun_id = 0;
+
+ tun_key_init(&tun_key, iph,
+ mutable->flags & TNL_F_IN_KEY_MATCH ? key : 0);
+ OVS_CB(skb)->tun_key = &tun_key;
__skb_pull(skb, hdr_len);
skb_postpull_rcsum(skb, skb_transport_header(skb), hdr_len + ETH_HLEN);
- ovs_tnl_rcv(vport, skb, iph->tos);
+ ovs_tnl_rcv(vport, skb);
return 0;
error:
diff --git a/datapath/vport.c b/datapath/vport.c
index 172261a..0c77a1b 100644
--- a/datapath/vport.c
+++ b/datapath/vport.c
@@ -462,7 +462,7 @@ void ovs_vport_receive(struct vport *vport, struct sk_buff *skb)
OVS_CB(skb)->flow = NULL;
if (!(vport->ops->flags & VPORT_F_TUN_ID))
- OVS_CB(skb)->tun_id = 0;
+ OVS_CB(skb)->tun_key = NULL;
ovs_dp_process_received_packet(vport, skb);
}
diff --git a/include/linux/openvswitch.h b/include/linux/openvswitch.h
index f5c9cca..c32bb58 100644
--- a/include/linux/openvswitch.h
+++ b/include/linux/openvswitch.h
@@ -278,7 +278,8 @@ enum ovs_key_attr {
OVS_KEY_ATTR_ICMPV6, /* struct ovs_key_icmpv6 */
OVS_KEY_ATTR_ARP, /* struct ovs_key_arp */
OVS_KEY_ATTR_ND, /* struct ovs_key_nd */
- OVS_KEY_ATTR_TUN_ID = 63, /* be64 tunnel ID */
+ OVS_KEY_ATTR_TUN_ID, /* be64 tunnel ID */
+ OVS_KEY_ATTR_IPV4_TUNNEL, /* struct ovs_key_ipv4_tunnel */
__OVS_KEY_ATTR_MAX
};
@@ -360,6 +361,16 @@ struct ovs_key_nd {
__u8 nd_tll[6];
};
+struct ovs_key_ipv4_tunnel {
+ __be64 tun_id;
+ __u32 tun_flags;
+ __be32 ipv4_src;
+ __be32 ipv4_dst;
+ __u8 ipv4_tos;
+ __u8 ipv4_ttl;
+ __u8 pad[2];
+};
+
/**
* enum ovs_flow_attr - attributes for %OVS_FLOW_* commands.
* @OVS_FLOW_ATTR_KEY: Nested %OVS_KEY_ATTR_* attributes specifying the flow
diff --git a/lib/dpif-netdev.c b/lib/dpif-netdev.c
index fb0a863..d065a3a 100644
--- a/lib/dpif-netdev.c
+++ b/lib/dpif-netdev.c
@@ -1165,6 +1165,7 @@ execute_set_action(struct ofpbuf *packet, const struct nlattr *a)
case OVS_KEY_ATTR_TUN_ID:
case OVS_KEY_ATTR_PRIORITY:
case OVS_KEY_ATTR_IPV6:
+ case OVS_KEY_ATTR_IPV4_TUNNEL:
/* not implemented */
break;
diff --git a/lib/odp-util.c b/lib/odp-util.c
index 8693d3c..23d1efe 100644
--- a/lib/odp-util.c
+++ b/lib/odp-util.c
@@ -106,6 +106,7 @@ ovs_key_attr_to_string(enum ovs_key_attr attr)
case OVS_KEY_ATTR_ARP: return "arp";
case OVS_KEY_ATTR_ND: return "nd";
case OVS_KEY_ATTR_TUN_ID: return "tun_id";
+ case OVS_KEY_ATTR_IPV4_TUNNEL: return "ipv4_tunnel";
case __OVS_KEY_ATTR_MAX:
default:
@@ -614,6 +615,7 @@ odp_flow_key_attr_len(uint16_t type)
case OVS_KEY_ATTR_ICMPV6: return sizeof(struct ovs_key_icmpv6);
case OVS_KEY_ATTR_ARP: return sizeof(struct ovs_key_arp);
case OVS_KEY_ATTR_ND: return sizeof(struct ovs_key_nd);
+ case OVS_KEY_ATTR_IPV4_TUNNEL: return sizeof(struct ovs_key_ipv4_tunnel);
case OVS_KEY_ATTR_UNSPEC:
case __OVS_KEY_ATTR_MAX:
@@ -668,6 +670,7 @@ format_odp_key_attr(const struct nlattr *a, struct ds *ds)
const struct ovs_key_icmpv6 *icmpv6_key;
const struct ovs_key_arp *arp_key;
const struct ovs_key_nd *nd_key;
+ const struct ovs_key_ipv4_tunnel *ipv4_tun_key;
enum ovs_key_attr attr = nl_attr_type(a);
int expected_len;
@@ -698,6 +701,16 @@ format_odp_key_attr(const struct nlattr *a, struct ds *ds)
ds_put_format(ds, "(%#"PRIx64")", ntohll(nl_attr_get_be64(a)));
break;
+ case OVS_KEY_ATTR_IPV4_TUNNEL:
+ ipv4_tun_key = nl_attr_get(a);
+ ds_put_format(ds, "(tun_id=%"PRIx64",flags=%"PRIx32
+ ",src="IP_FMT",dst="IP_FMT",tos=%"PRIx8",ttl=%"PRIu8")",
+ ntohll(ipv4_tun_key->tun_id), ipv4_tun_key->tun_flags,
+ IP_ARGS(&ipv4_tun_key->ipv4_src),
+ IP_ARGS(&ipv4_tun_key->ipv4_dst),
+ ipv4_tun_key->ipv4_tos, ipv4_tun_key->ipv4_ttl);
+ break;
+
case OVS_KEY_ATTR_IN_PORT:
ds_put_format(ds, "(%"PRIu32")", nl_attr_get_u32(a));
break;
diff --git a/lib/odp-util.h b/lib/odp-util.h
index d53f083..4e5a8a1 100644
--- a/lib/odp-util.h
+++ b/lib/odp-util.h
@@ -72,6 +72,7 @@ int odp_actions_from_string(const char *, const struct simap *port_names,
* ------ --- ------ -----
* OVS_KEY_ATTR_PRIORITY 4 -- 4 8
* OVS_KEY_ATTR_TUN_ID 8 -- 4 12
+ * OVS_KEY_ATTR_IPV4_TUNNEL 18 2 4 24
* OVS_KEY_ATTR_IN_PORT 4 -- 4 8
* OVS_KEY_ATTR_ETHERNET 12 -- 4 16
* OVS_KEY_ATTR_8021Q 4 -- 4 8
@@ -80,9 +81,9 @@ int odp_actions_from_string(const char *, const struct simap *port_names,
* OVS_KEY_ATTR_ICMPV6 2 2 4 8
* OVS_KEY_ATTR_ND 28 -- 4 32
* -------------------------------------------------
- * total 144
+ * total 168
*/
-#define ODPUTIL_FLOW_KEY_BYTES 144
+#define ODPUTIL_FLOW_KEY_BYTES 168
/* A buffer with sufficient size and alignment to hold an nlattr-formatted flow
* key. An array of "struct nlattr" might not, in theory, be sufficiently
--
1.7.10.2.484.gcd07cc5
^ permalink raw reply related
* [PATCH 04/21] vswitchd: Add iface_parse_tunnel
From: Simon Horman @ 2012-05-24 9:08 UTC (permalink / raw)
To: dev-yBygre7rU0TnMu66kgdUjQ; +Cc: netdev-u79uwXL29TY76Z2rM5mHXA
In-Reply-To: <1337850554-10339-1-git-send-email-horms-/R6kz+dDXgpPR4JQBCEnsQ@public.gmane.org>
This duplicates parse_tunnel_config, the duplication will later be minimised.
iface_parse_tunnel() is currently only used to verify the configuration
by passing NULL as its third argument. It will later be used in storing
the configuration by passing a non-NULL argument. The purpose of verification
is to allow for error-free parsing later.
Cc: Kyle Mestery <kmestery-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org>
Signed-off-by: Simon Horman <horms-/R6kz+dDXgpPR4JQBCEnsQ@public.gmane.org>
---
include/openvswitch/tunnel.h | 2 +
ofproto/ofproto.h | 33 +++++++
vswitchd/bridge.c | 214 +++++++++++++++++++++++++++++++++++++++++++
3 files changed, 249 insertions(+)
diff --git a/include/openvswitch/tunnel.h b/include/openvswitch/tunnel.h
index c494791..5f55ecc 100644
--- a/include/openvswitch/tunnel.h
+++ b/include/openvswitch/tunnel.h
@@ -71,5 +71,7 @@ enum {
#define TNL_F_PMTUD (1 << 5) /* Enable path MTU discovery. */
#define TNL_F_HDR_CACHE (1 << 6) /* Enable tunnel header caching. */
#define TNL_F_IPSEC (1 << 7) /* Traffic is IPsec encrypted. */
+#define TNL_F_IN_KEY (1 << 8) /* Tunnel port has input key. */
+#define TNL_F_OUT_KEY (1 << 9) /* Tunnel port has output key. */
#endif /* openvswitch/tunnel.h */
diff --git a/ofproto/ofproto.h b/ofproto/ofproto.h
index ea988e7..d8739b0 100644
--- a/ofproto/ofproto.h
+++ b/ofproto/ofproto.h
@@ -367,7 +367,40 @@ void ofproto_get_vlan_usage(struct ofproto *, unsigned long int *vlan_bitmap);
bool ofproto_has_vlan_usage_changed(const struct ofproto *);
int ofproto_port_set_realdev(struct ofproto *, uint16_t vlandev_ofp_port,
uint16_t realdev_ofp_port, int vid);
+\f
+#define TNL_F_CSUM (1 << 0) /* Checksum packets. */
+#define TNL_F_TOS_INHERIT (1 << 1) /* Inherit ToS from inner packet. */
+#define TNL_F_TTL_INHERIT (1 << 2) /* Inherit TTL from inner packet. */
+#define TNL_F_DF_INHERIT (1 << 3) /* Inherit DF bit from inner packet. */
+#define TNL_F_DF_DEFAULT (1 << 4) /* Set DF bit if inherit off or
+ * not IP. */
+#define TNL_F_PMTUD (1 << 5) /* Enable path MTU discovery. */
+#define TNL_F_HDR_CACHE (1 << 6) /* Enable tunnel header caching. */
+#define TNL_F_IPSEC (1 << 7) /* Traffic is IPsec encrypted. */
+#define TNL_F_IN_KEY (1 << 8) /* Tunnel port has input key. */
+#define TNL_F_OUT_KEY (1 << 9) /* Tunnel port has output key. */
+
+#define TNL_T_PROTO_GRE 0
+#define TNL_T_PROTO_CAPWAP 1
+
+#define TNL_T_KEY_EXACT (1 << 6)
+#define TNL_T_KEY_MATCH (1 << 7)
+
+/* Tunnel device support */
+struct tunnel_settings {
+ ovs_be64 in_key;
+ ovs_be64 out_key;
+ ovs_be32 saddr;
+ ovs_be32 daddr;
+ uint8_t tos;
+ uint8_t ttl;
+ uint16_t flags;
+ uint8_t type;
+};
+void ofproto_port_set_tunnel(struct ofproto *ofproto, uint16_t tundev_ofp_port,
+ uint16_t realdev_ofp_port,
+ const struct tunnel_settings *s);
#ifdef __cplusplus
}
#endif
diff --git a/vswitchd/bridge.c b/vswitchd/bridge.c
index d720952..f775ae7 100644
--- a/vswitchd/bridge.c
+++ b/vswitchd/bridge.c
@@ -20,6 +20,7 @@
#include <inttypes.h>
#include <stdlib.h>
#include "bitmap.h"
+#include "byte-order.h"
#include "bond.h"
#include "cfm.h"
#include "coverage.h"
@@ -625,6 +626,13 @@ bridge_update_ofprotos(void)
}
}
+static bool
+is_tunnel_realdev(const char *type)
+{
+ return !strcmp(type, "gre") || !strcmp(type, "ipsec_gre") ||
+ !strcmp(type, "capwap");
+}
+
static void
port_configure(struct port *port)
{
@@ -1333,6 +1341,207 @@ error:
return error;
}
+
+static const char *
+get_key(const struct shash *args, const char *name)
+{
+ const char *s;
+
+ s = shash_find_data(args, name);
+ if (!s) {
+ s = shash_find_data(args, "key");
+ if (!s) {
+ s = "0";
+ }
+ }
+
+ if (!strcmp(s, "flow")) {
+ /* This is the default if no attribute is present. */
+ return NULL;
+ }
+
+ return s;
+}
+
+static int
+iface_parse_tunnel(const struct ovsrec_interface *iface_cfg,
+ const char *type, struct tunnel_settings *sp)
+{
+ bool is_gre = false;
+ bool is_ipsec = false;
+ struct shash args;
+ struct shash_node *node;
+ struct tunnel_settings s = { .tos = 0 };
+ bool ipsec_mech_set = false;
+ int status;
+ const char *key;
+
+ shash_init(&args);
+ shash_from_ovs_idl_map(iface_cfg->key_options,
+ iface_cfg->value_options,
+ iface_cfg->n_options, &args);
+
+ s.flags = TNL_F_DF_DEFAULT | TNL_F_PMTUD | TNL_F_HDR_CACHE;
+ if (!strcmp(type, "gre")) {
+ is_gre = true;
+ s.type = TNL_T_PROTO_GRE;
+ } else if (!strcmp(type, "ipsec_gre")) {
+ is_gre = true;
+ s.type = TNL_T_PROTO_GRE;
+ is_ipsec = true;
+ s.flags |= TNL_F_IPSEC;
+ s.flags &= ~TNL_F_HDR_CACHE;
+ } else if (strcmp(type, "capwap")) {
+ s.type = TNL_T_PROTO_CAPWAP;
+ }
+
+ SHASH_FOR_EACH (node, &args) {
+ if (!strcmp(node->name, "remote_ip")) {
+ struct in_addr in_addr;
+ if (lookup_ip(node->data, &in_addr)) {
+ VLOG_WARN("%s: bad %s 'remote_ip'", iface_cfg->name, type);
+ } else {
+ s.daddr = in_addr.s_addr;
+ }
+ } else if (!strcmp(node->name, "local_ip")) {
+ struct in_addr in_addr;
+ if (lookup_ip(node->data, &in_addr)) {
+ VLOG_WARN("%s: bad %s 'local_ip'", iface_cfg->name, type);
+ } else {
+ s.saddr = in_addr.s_addr;
+ }
+ } else if (!strcmp(node->name, "tos")) {
+ if (!strcmp(node->data, "inherit")) {
+ s.flags |= TNL_F_TOS_INHERIT;
+ } else {
+ s.tos = atoi(node->data);
+ }
+ } else if (!strcmp(node->name, "ttl")) {
+ if (!strcmp(node->data, "inherit")) {
+ s.flags |= TNL_F_TTL_INHERIT;
+ } else {
+ s.ttl = atoi(node->data);
+ }
+ } else if (!strcmp(node->name, "csum") && is_gre) {
+ if (!strcmp(node->data, "true")) {
+ s.flags |= TNL_F_CSUM;
+ }
+ } else if (!strcmp(node->name, "df_inherit")) {
+ if (!strcmp(node->data, "true")) {
+ s.flags |= TNL_F_DF_INHERIT;
+ }
+ } else if (!strcmp(node->name, "df_default")) {
+ if (!strcmp(node->data, "false")) {
+ s.flags &= ~TNL_F_DF_DEFAULT;
+ }
+ } else if (!strcmp(node->name, "pmtud")) {
+ if (!strcmp(node->data, "false")) {
+ s.flags &= ~TNL_F_PMTUD;
+ }
+ } else if (!strcmp(node->name, "header_cache")) {
+ if (!strcmp(node->data, "false")) {
+ s.flags &= ~TNL_F_HDR_CACHE;
+ }
+ } else if (!strcmp(node->name, "peer_cert") && is_ipsec) {
+ if (shash_find(&args, "certificate")) {
+ ipsec_mech_set = true;
+ } else {
+ const char *use_ssl_cert;
+
+ /* If the "use_ssl_cert" is true, then "certificate" and
+ * "private_key" will be pulled from the SSL table. The
+ * use of this option is strongly discouraged, since it
+ * will like be removed when multiple SSL configurations
+ * are supported by OVS.
+ */
+ use_ssl_cert = shash_find_data(&args, "use_ssl_cert");
+ if (!use_ssl_cert || strcmp(use_ssl_cert, "true")) {
+ VLOG_ERR("%s: 'peer_cert' requires 'certificate' argument",
+ iface_cfg->name);
+ goto err;
+ }
+ ipsec_mech_set = true;
+ }
+ } else if (!strcmp(node->name, "psk") && is_ipsec) {
+ ipsec_mech_set = true;
+ } else if (is_ipsec
+ && (!strcmp(node->name, "certificate")
+ || !strcmp(node->name, "private_key")
+ || !strcmp(node->name, "use_ssl_cert"))) {
+ /* Ignore options not used by the netdev. */
+ } else if (!strcmp(node->name, "key") ||
+ !strcmp(node->name, "in_key") ||
+ !strcmp(node->name, "out_key")) {
+ /* Handled separately below. */
+ } else {
+ VLOG_WARN("%s: unknown %s argument '%s'", iface_cfg->name,
+ type, node->name);
+ }
+ }
+
+ if (is_ipsec) {
+ char *file_name = xasprintf("%s/%s", ovs_rundir(),
+ "ovs-monitor-ipsec.pid");
+ pid_t pid = read_pidfile(file_name);
+ free(file_name);
+ if (pid < 0) {
+ VLOG_ERR("%s: IPsec requires the ovs-monitor-ipsec daemon",
+ iface_cfg->name);
+ goto err;
+ }
+
+ if (shash_find(&args, "peer_cert") && shash_find(&args, "psk")) {
+ VLOG_ERR("%s: cannot define both 'peer_cert' and 'psk'",
+ iface_cfg->name);
+ goto err;
+ }
+
+ if (!ipsec_mech_set) {
+ VLOG_ERR("%s: IPsec requires an 'peer_cert' or psk' argument",
+ iface_cfg->name);
+ goto err;
+ }
+ }
+
+ if ((key = get_key(&args, "in_key"))) {
+ s.flags |= TNL_F_IN_KEY;
+ s.type |= TNL_T_KEY_EXACT;
+ s.in_key = htonll(strtoull(key, NULL, 0));
+ } else {
+ s.type |= TNL_T_KEY_MATCH;
+ s.in_key = 0ULL;
+ }
+ if ((key = get_key(&args, "out_key"))) {
+ s.flags |= TNL_F_OUT_KEY;
+ s.out_key = htonll(strtoull(key, NULL, 0));
+ } else {
+ s.out_key = 0ULL;
+ }
+
+ if (!s.daddr) {
+ VLOG_ERR("%s: %s type requires valid 'remote_ip' argument",
+ iface_cfg->name, type);
+ goto err;
+ }
+
+ if (s.saddr) {
+ if (ip_is_multicast(s.daddr)) {
+ VLOG_WARN("%s: remote_ip is multicast, ignoring local_ip",
+ iface_cfg->name);
+ s.saddr = 0;
+ }
+ }
+
+ if (sp) {
+ *sp = s;
+ }
+
+ status = 0;
+err:
+ shash_destroy(&args);
+ return status;
+}
+
/* Creates a new iface on 'br' based on 'if_cfg'. The new iface has OpenFlow
* port number 'ofp_port'. If ofp_port is negative, an OpenFlow port is
* automatically allocated for the iface. Takes ownership of and
@@ -1344,6 +1553,7 @@ iface_create(struct bridge *br, struct if_cfg *if_cfg, int ofp_port)
{
const struct ovsrec_interface *iface_cfg = if_cfg->cfg;
const struct ovsrec_port *port_cfg = if_cfg->parent;
+ const char *type = iface_get_type(iface_cfg, br->cfg);
struct netdev *netdev;
struct iface *iface;
@@ -1355,6 +1565,10 @@ iface_create(struct bridge *br, struct if_cfg *if_cfg, int ofp_port)
hmap_remove(&br->if_cfg_todo, &if_cfg->hmap_node);
free(if_cfg);
+ if (is_tunnel_realdev(type) && iface_parse_tunnel(iface_cfg, type, NULL)) {
+ return false;
+ }
+
/* Do the bits that can fail up front. */
assert(!iface_lookup(br, iface_cfg->name));
error = iface_do_create(br, iface_cfg, port_cfg, &ofp_port, &netdev);
--
1.7.10.2.484.gcd07cc5
^ permalink raw reply related
* [PATCH 05/21] vswitchd: Add add_tunnel_ports()
From: Simon Horman @ 2012-05-24 9:08 UTC (permalink / raw)
To: dev-yBygre7rU0TnMu66kgdUjQ; +Cc: netdev-u79uwXL29TY76Z2rM5mHXA
In-Reply-To: <1337850554-10339-1-git-send-email-horms-/R6kz+dDXgpPR4JQBCEnsQ@public.gmane.org>
Add tunnel tundevs for tunnel realdevs as needed.
In general the notion is that realdevs may be configured by users
and from an end-user point of view are compatible with the existing
port-based tunneling code. And that tundevs exist in the datapath
arnd are actually used to send and recieve packets, based on flows.
Cc: Kyle Mestery <kmestery-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org>
Signed-off-by: Simon Horman <horms-/R6kz+dDXgpPR4JQBCEnsQ@public.gmane.org>
---
vswitchd/bridge.c | 67 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 67 insertions(+)
diff --git a/vswitchd/bridge.c b/vswitchd/bridge.c
index f775ae7..3d187f0 100644
--- a/vswitchd/bridge.c
+++ b/vswitchd/bridge.c
@@ -268,6 +268,7 @@ static void configure_splinter_port(struct port *);
static void add_vlan_splinter_ports(struct bridge *,
const unsigned long int *splinter_vlans,
struct shash *ports);
+static void add_tunnel_ports(struct bridge *, struct shash *ports);
\f
/* Public functions. */
@@ -2751,6 +2752,8 @@ bridge_add_del_ports(struct bridge *br,
add_vlan_splinter_ports(br, splinter_vlans, &new_ports);
}
+ add_tunnel_ports(br, &new_ports);
+
/* Get rid of deleted ports.
* Get rid of deleted interfaces on ports that still exist. */
HMAP_FOR_EACH_SAFE (port, next, hmap_node, &br->ports) {
@@ -4153,6 +4156,70 @@ add_vlan_splinter_ports(struct bridge *br,
}
}
+static struct ovsrec_port *
+synthesize_tunnel_port(const char *name, const char *type)
+{
+ struct ovsrec_interface *iface;
+ struct ovsrec_port *port;
+
+ iface = xzalloc(sizeof *iface);
+ iface->name = xstrdup(name);
+ iface->type = type;
+
+ port = xzalloc(sizeof *port);
+ port->interfaces = xmemdup(&iface, sizeof iface);
+ port->n_interfaces = 1;
+ port->name = xstrdup(name);
+
+ register_block(iface);
+ register_block(iface->name);
+ register_block(port);
+ register_block(port->interfaces);
+ register_block(port->name);
+
+ return port;
+}
+
+/* For each interface with 'br' is a tunnel, adds the corresponding
+ * ovsrec_port to 'ports' if it is not already present */
+static void
+add_tunnel_ports(struct bridge *br, struct shash *ports)
+{
+ size_t i;
+
+ /* We iterate through 'br->cfg->ports' instead of 'ports' here because
+ * we're modifying 'ports'. */
+ for (i = 0; i < br->cfg->n_ports; i++) {
+ const char *name = br->cfg->ports[i]->name;
+ struct ovsrec_port *port_cfg = shash_find_data(ports, name);
+ size_t j;
+
+ for (j = 0; j < port_cfg->n_interfaces; j++) {
+ struct ovsrec_interface *iface_cfg = port_cfg->interfaces[j];
+ const char *type = iface_get_type(iface_cfg, br->cfg);
+ const char *tundev_name;
+ const char *tundev_type;
+
+ if (!is_tunnel_realdev(type)) {
+ continue;
+ }
+
+ tundev_name = strcmp(type, "ipsec_gre") ? type : "gre";
+ if (!strcmp(tundev_name, "gre")) {
+ tundev_type = "gre-tundev";
+ } else {
+ tundev_type = "capwap-tundev";
+ }
+
+ if (!shash_find(ports, tundev_name)) {
+ shash_add(ports, tundev_name,
+ synthesize_tunnel_port(tundev_name,
+ tundev_type));
+ }
+ }
+ }
+}
+
static void
mirror_refresh_stats(struct mirror *m)
{
--
1.7.10.2.484.gcd07cc5
^ permalink raw reply related
* [PATCH 06/21] ofproto: Add set_tunnelling()
From: Simon Horman @ 2012-05-24 9:08 UTC (permalink / raw)
To: dev-yBygre7rU0TnMu66kgdUjQ; +Cc: netdev-u79uwXL29TY76Z2rM5mHXA
In-Reply-To: <1337850554-10339-1-git-send-email-horms-/R6kz+dDXgpPR4JQBCEnsQ@public.gmane.org>
Allow configuration of tunneling in ofproto_port instances.
For tunnel realdevs this includes the remote IP of the and type tunnel,
and optionally the local IP, tos and ttl.
For tunnel tundevs it only includes the type.
realdevs and tundevs can be differentiated by examining the remote IP,
which is always zero for tundevs and always non-zero for realdevs.
Cc: Kyle Mestery <kmestery-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org>
Signed-off-by: Simon Horman <horms-/R6kz+dDXgpPR4JQBCEnsQ@public.gmane.org>
---
ofproto/ofproto-dpif.c | 116 +++++++++++++++++++++++++++++++++++++++++++++
ofproto/ofproto-provider.h | 12 +++++
ofproto/ofproto.c | 28 +++++++++++
ofproto/ofproto.h | 13 +++++
4 files changed, 169 insertions(+)
diff --git a/ofproto/ofproto-dpif.c b/ofproto/ofproto-dpif.c
index f2c2ca9..642b508 100644
--- a/ofproto/ofproto-dpif.c
+++ b/ofproto/ofproto-dpif.c
@@ -476,6 +476,13 @@ static void facet_account(struct facet *);
static bool facet_is_controller_flow(struct facet *);
+struct ofport_dpif_tun {
+ struct tunnel_settings s;
+ uint16_t tundev_ofp_port;
+ struct hmap_node tundev_node;
+ struct ofport_dpif *ofport; /* Containing ofport_dpif */
+};
+
struct ofport_dpif {
struct ofport up;
@@ -503,6 +510,9 @@ struct ofport_dpif {
* widespread use, we will delete these interfaces. */
uint16_t realdev_ofp_port;
int vlandev_vid;
+
+ /* Tunneling */
+ struct ofport_dpif_tun *tun;
};
/* Node in 'ofport_dpif''s 'priorities' map. Used to maintain a map from
@@ -535,6 +545,16 @@ static bool vsp_adjust_flow(const struct ofproto_dpif *, struct flow *);
static void vsp_remove(struct ofport_dpif *);
static void vsp_add(struct ofport_dpif *, uint16_t realdev_ofp_port, int vid);
+static unsigned key_local_remote_ports;
+static unsigned key_remote_ports;
+static unsigned local_remote_ports;
+static unsigned remote_ports;
+static unsigned key_multicast_ports;
+static unsigned multicast_ports;
+
+static int set_tunnelling(struct ofport *ofport_, uint16_t realdev_ofp_port,
+ const struct tunnel_settings *s);
+
static struct ofport_dpif *
ofport_dpif_cast(const struct ofport *ofport)
{
@@ -612,6 +632,9 @@ struct ofproto_dpif {
/* VLAN splinters. */
struct hmap realdev_vid_map; /* (realdev,vid) -> vlandev. */
struct hmap vlandev_map; /* vlandev -> (realdev,vid). */
+
+ /* Tunnelling */
+ struct hmap tundev_map; /* tundev -> realdev */
};
/* Defer flow mod completion until "ovs-appctl ofproto/unclog"? (Useful only
@@ -771,6 +794,8 @@ construct(struct ofproto *ofproto_)
hmap_init(&ofproto->vlandev_map);
hmap_init(&ofproto->realdev_vid_map);
+ hmap_init(&ofproto->tundev_map);
+
hmap_insert(&all_ofproto_dpifs, &ofproto->all_ofproto_dpifs_node,
hash_string(ofproto->up.name, 0));
memset(&ofproto->stats, 0, sizeof ofproto->stats);
@@ -1153,6 +1178,7 @@ port_construct(struct ofport *port_)
hmap_init(&port->priorities);
port->realdev_ofp_port = 0;
port->vlandev_vid = 0;
+ port->tun = NULL;
port->carrier_seq = netdev_get_carrier_resets(port->up.netdev);
if (ofproto->sflow) {
@@ -1171,6 +1197,7 @@ port_destruct(struct ofport *port_)
ofproto->need_revalidate = true;
bundle_remove(port_);
set_cfm(port_, NULL);
+ set_tunnelling(port_, 0, NULL);
if (ofproto->sflow) {
dpif_sflow_del_port(ofproto->sflow, port->odp_port);
}
@@ -7097,6 +7124,94 @@ vsp_add(struct ofport_dpif *port, uint16_t realdev_ofp_port, int vid)
}
}
\f
+static inline bool
+ipv4_is_multicast(__be32 addr)
+{
+ return (addr & htonl(0xf0000000)) == htonl(0xe0000000);
+}
+
+static unsigned int *
+tun_port_pool(const struct tunnel_settings *s)
+{
+ bool is_multicast = ipv4_is_multicast(s->daddr);
+
+ if (s->type & TNL_T_KEY_MATCH) {
+ if (s->saddr)
+ return &local_remote_ports;
+ else if (is_multicast)
+ return &multicast_ports;
+ else
+ return &remote_ports;
+ } else {
+ if (s->saddr)
+ return &key_local_remote_ports;
+ else if (is_multicast)
+ return &key_multicast_ports;
+ else
+ return &key_remote_ports;
+ }
+}
+
+static void
+tun_remove(struct ofport_dpif *ofport)
+{
+ struct ofproto_dpif *ofproto = ofproto_dpif_cast(ofport->up.ofproto);
+
+ if (!ofport->tun) {
+ return;
+ }
+
+ hmap_remove(&ofproto->tundev_map, &ofport->tun->tundev_node);
+ (*tun_port_pool(&ofport->tun->s))--;
+}
+
+static void
+tun_add(struct ofport_dpif *ofport, uint16_t tundev_ofp_port,
+ const struct tunnel_settings *s)
+{
+ struct ofproto_dpif *ofproto = ofproto_dpif_cast(ofport->up.ofproto);
+
+ ofport->tun->tundev_ofp_port = tundev_ofp_port;
+ ofport->tun->s = *s;
+ (*tun_port_pool(&ofport->tun->s))++;
+ hmap_insert(&ofproto->tundev_map, &ofport->tun->tundev_node,
+ hash_int(tundev_ofp_port, 0));
+}
+
+static int
+set_tunnelling(struct ofport *ofport_, uint16_t tundev_ofp_port,
+ const struct tunnel_settings *s)
+{
+ struct ofport_dpif *ofport = ofport_dpif_cast(ofport_);
+
+ if (!s) {
+ tun_remove(ofport);
+ free(ofport->tun);
+ ofport->tun = NULL;
+ return 0;
+ }
+
+ if (!ofport->tun) {
+ struct ofproto_dpif *ofproto;
+
+ ofproto = ofproto_dpif_cast(ofport->up.ofproto);
+ ofproto->need_revalidate = true;
+ ofport->tun = xzalloc(sizeof *ofport->tun);
+ ofport->tun->ofport = ofport;
+ }
+ else {
+ if (ofport->tun->tundev_ofp_port == tundev_ofp_port &&
+ tunnel_settings_equal(&ofport->tun->s, s)) {
+ return 0;
+ }
+ tun_remove(ofport);
+ }
+
+ tun_add(ofport, tundev_ofp_port, s);
+
+ return 0;
+}
+\f
const struct ofproto_class ofproto_dpif_class = {
enumerate_types,
enumerate_names,
@@ -7159,4 +7274,5 @@ const struct ofproto_class ofproto_dpif_class = {
forward_bpdu_changed,
set_mac_idle_time,
set_realdev,
+ set_tunnelling,
};
diff --git a/ofproto/ofproto-provider.h b/ofproto/ofproto-provider.h
index 1f3ad37..be39691 100644
--- a/ofproto/ofproto-provider.h
+++ b/ofproto/ofproto-provider.h
@@ -1168,6 +1168,18 @@ struct ofproto_class {
* it. */
int (*set_realdev)(struct ofport *ofport,
uint16_t realdev_ofp_port, int vid);
+
+ /* Configures tunneling for 'ofport'.
+ *
+ * If 'tunnel_settings' is nonnull, configures tunneling
+ * according to its members.
+ *
+ * If 'tunneling_settings' is null, then any tunnel configuration is
+ * removed.
+ *
+ * This function should be null if tunnelling is not supported */
+ int (*set_tunnelling)(struct ofport *ofport, uint16_t tundev_ofp_port,
+ const struct tunnel_settings *s);
};
extern const struct ofproto_class ofproto_dpif_class;
diff --git a/ofproto/ofproto.c b/ofproto/ofproto.c
index 0bda06a..79f7a24 100644
--- a/ofproto/ofproto.c
+++ b/ofproto/ofproto.c
@@ -4184,3 +4184,31 @@ ofproto_port_set_realdev(struct ofproto *ofproto, uint16_t vlandev_ofp_port,
}
return error;
}
+
+/* Configure tunneling parameters of a port
+ *
+ * This function has no effect if 'ofproto' does not have a port 'ofp_port'. */
+void
+ofproto_port_set_tunnel(struct ofproto *ofproto, uint16_t tundev_ofp_port,
+ uint16_t ofp_port, const struct tunnel_settings *s)
+{
+ struct ofport *ofport;
+ int error;
+
+ ofport = ofproto_get_port(ofproto, ofp_port);
+ if (!ofport) {
+ VLOG_WARN("%s: cannot configure tunnel on nonexistent port %"PRIu16,
+ ofproto->name, ofp_port);
+ return;
+ }
+
+ error = (ofproto->ofproto_class->set_tunnelling
+ ? ofproto->ofproto_class->set_tunnelling(ofport,
+ tundev_ofp_port, s)
+ : EOPNOTSUPP);
+ if (error) {
+ VLOG_WARN("%s: Tunnel configuration on port %"PRIu16" (%s) failed (%s)",
+ ofproto->name, ofp_port,
+ netdev_get_name(ofport->netdev), strerror(error));
+ }
+}
diff --git a/ofproto/ofproto.h b/ofproto/ofproto.h
index d8739b0..147a588 100644
--- a/ofproto/ofproto.h
+++ b/ofproto/ofproto.h
@@ -398,6 +398,19 @@ struct tunnel_settings {
uint8_t type;
};
+static inline bool
+tunnel_settings_equal(const struct tunnel_settings *a,
+ const struct tunnel_settings *b)
+{
+ return a->daddr == b->daddr &&
+ a->in_key == b->in_key &&
+ a->out_key == b->out_key &&
+ a->saddr == b->saddr &&
+ a->flags == b->flags &&
+ a->tos == b->tos &&
+ a->ttl == b->ttl;
+}
+
void ofproto_port_set_tunnel(struct ofproto *ofproto, uint16_t tundev_ofp_port,
uint16_t realdev_ofp_port,
const struct tunnel_settings *s);
--
1.7.10.2.484.gcd07cc5
^ permalink raw reply related
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox