* Re: [patch 1/5] ipv6: make flowlabel to return an error
From: David Miller @ 2007-12-11 10:23 UTC (permalink / raw)
To: dlezcano; +Cc: yoshfuji, pekkas, netdev
In-Reply-To: <20071210151425.106827965@ICON-9-164-138-215.megacenter.de.ibm.com>
From: Daniel Lezcano <dlezcano@fr.ibm.com>
Date: Mon, 10 Dec 2007 16:09:11 +0100
> This patch makes the flowlab subsystem to return an error code and makes
> some cleanup with procfs ifdefs.
> The af_inet6 will use the flowlabel init return code to check the initialization
> was correct.
>
> Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
Applied.
^ permalink raw reply
* Re: [PATCH] XFRM: assorted IPsec fixups
From: David Miller @ 2007-12-11 10:22 UTC (permalink / raw)
To: eparis; +Cc: paul.moore, netdev, linux-audit, selinux
In-Reply-To: <1197059769.3183.16.camel@dhcp231-215.rdu.redhat.com>
From: Eric Paris <eparis@redhat.com>
Date: Fri, 07 Dec 2007 15:36:08 -0500
>
> On Fri, 2007-12-07 at 12:11 -0500, Paul Moore wrote:
> > This patch fixes a number of small but potentially troublesome things in the
> > XFRM/IPsec code:
...
> > Signed-off-by: Paul Moore <paul.moore@hp.com>
>
> Acked-by: Eric Paris <eparis@redhat.com>
>
> although it does make me wonder why audit_log_start doesn't just check
> audit_enabled itself.... Anyway, this patch looks good.
I want to apply this but it doesn't apply cleanly to
net-2.6.25 right now, could you respin this Paul?
Thanks.
^ permalink raw reply
* Re: [PATCH net-2.6.25] Cleanup sysctl manipulations in devinet.c
From: David Miller @ 2007-12-11 10:17 UTC (permalink / raw)
To: xemul; +Cc: netdev, devel
In-Reply-To: <47597417.9090801@openvz.org>
From: Pavel Emelyanov <xemul@openvz.org>
Date: Fri, 07 Dec 2007 19:25:59 +0300
> This includes:
>
> * moving neigh_sysctl_(un)register calls inside
> devinet_sysctl_(un)register ones, as they are always
> called in pairs;
> * making __devinet_sysctl_unregister() to unregister
> the ipv4_devconf struct, while original devinet_sysctl_unregister()
> works with the in_device to handle both - devconf and
> neigh sysctls;
> * make stubs for CONFIG_SYSCTL=n case to get rid of
> in-code ifdefs.
>
> Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
Applied, thanks!
^ permalink raw reply
* Re: [PATCH net-2.6.25] Cleanup IN_DEV_MFORWARD macro
From: David Miller @ 2007-12-11 10:17 UTC (permalink / raw)
To: xemul; +Cc: netdev, devel, herbert
In-Reply-To: <4759729A.4030403@openvz.org>
From: Pavel Emelyanov <xemul@openvz.org>
Date: Fri, 07 Dec 2007 19:19:38 +0300
> This is essentially IN_DEV_ANDCONF with proper arguments.
>
> Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
Applied, thanks!
^ permalink raw reply
* Re: [PATCH] Use BUILD_BUG_ON in inet_timewait_sock.c checks
From: David Miller @ 2007-12-11 10:12 UTC (permalink / raw)
To: xemul; +Cc: netdev, devel
In-Reply-To: <475986E2.6050409@openvz.org>
From: Pavel Emelyanov <xemul@openvz.org>
Date: Fri, 07 Dec 2007 20:46:10 +0300
> Make the INET_TWDR_TWKILL_SLOTS vs sizeof(twdr->thread_slots)
> check nicer.
>
> Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
Also applied to net-2.6.25, thanks!
^ permalink raw reply
* Re: [PATCH] Use BUILD_BUG_ON for tcp_skb_cb size checking
From: David Miller @ 2007-12-11 10:12 UTC (permalink / raw)
To: xemul; +Cc: netdev, devel
In-Reply-To: <475985EC.6050608@openvz.org>
From: Pavel Emelyanov <xemul@openvz.org>
Date: Fri, 07 Dec 2007 20:42:04 +0300
> The sizeof(struct tcp_skb_cb) should not be less than the
> sizeof(skb->cb). This is checked in net/ipv4/tcp.c, but
> this check can be made more gracefully.
>
> Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
Applied to net-2.6.25, thanks.
^ permalink raw reply
* RE: [PATCH] Increase virtual FIFOs in ucc_geth.
From: Joakim Tjernlund @ 2007-12-11 10:11 UTC (permalink / raw)
To: Li Yang; +Cc: netdev
In-Reply-To: <989B956029373F45A0B8AF029708189001B4D901@zch01exm26.fsl.freescale.net>
On Tue, 2007-12-11 at 17:49 +0800, Li Yang wrote:
> > -----Original Message-----
> > From: Joakim Tjernlund [mailto:Joakim.Tjernlund@transmode.se]
> > Sent: Tuesday, December 11, 2007 2:46 AM
> > To: Li Yang-r58472 <LeoLi@freescale.com> Netdev
> > Cc: Joakim Tjernlund
> > Subject: [PATCH] Increase virtual FIFOs in ucc_geth.
> >
> > Increase UCC_GETH_URFS_INIT to 1152 and
> > UCC_GETH_UTFS_INIT to 896 to avoid HW Overrun/Underrun.
>
> Please be noted that these values are only used for 10/100Mbps speed.
> Did you get Overrun in 10/100M mode?
I get both TX Underrun and RX overrun in 100Mbps, FD, just
by running a tftp transfer. It feels like the URFET and/or URSFET
isn't working. Why I don't know. CPU is MPC832x
Jocke
>
> - Leo
>
> >
> > Signed-off-by: Joakim Tjernlund <Joakim.Tjernlund@transmode.se>
> > ---
> > drivers/net/ucc_geth.h | 4 ++--
> > 1 files changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/drivers/net/ucc_geth.h b/drivers/net/ucc_geth.h
> > index bb4dac8..d3f030b 100644
> > --- a/drivers/net/ucc_geth.h
> > +++ b/drivers/net/ucc_geth.h
> > @@ -923,11 +923,11 @@ struct ucc_geth_hardware_statistics {
> > #define PHY_CHANGE_TIME 2
> >
> > /* Fast Ethernet (10/100 Mbps) */
> > -#define UCC_GETH_URFS_INIT 512 /* Rx
> > virtual FIFO size
> > +#define UCC_GETH_URFS_INIT 1152 /* Rx
> > virtual FIFO size
> > */
> > #define UCC_GETH_URFET_INIT 256 /* 1/2 urfs */
> > #define UCC_GETH_URFSET_INIT 384 /* 3/4 urfs */
> > -#define UCC_GETH_UTFS_INIT 512 /* Tx
> > virtual FIFO size
> > +#define UCC_GETH_UTFS_INIT 896 /* Tx
> > virtual FIFO size
> > */
> > #define UCC_GETH_UTFET_INIT 256 /* 1/2 utfs */
> > #define UCC_GETH_UTFTT_INIT 128
> > --
> > 1.5.3.6
> >
> >
>
>
^ permalink raw reply
* Re: [RFC 0/3] Add AEAD support to ESP
From: David Miller @ 2007-12-11 10:09 UTC (permalink / raw)
To: herbert; +Cc: netdev
In-Reply-To: <20071211042312.GA10911@gondor.apana.org.au>
From: Herbert Xu <herbert@gondor.apana.org.au>
Date: Tue, 11 Dec 2007 12:23:12 +0800
> This series of patches add AEAD support to ESP.
>
> Please don't merge it just yet because they depend on what's
> in the current cryptodev-2.6 tree. Once that tree has settled
> down I'll ask you to pull it and then these patches can go on
> top of that.
Ok. I looked over the crypto bits and this one and it looks
really good from here. Just sent it over when you're ready
for me to pull.
^ permalink raw reply
* Re: [PATCH 2.6.25] netns: struct net content re-work (v2)
From: Daniel Lezcano @ 2007-12-11 9:57 UTC (permalink / raw)
To: Denis V. Lunev; +Cc: davem, containers, netdev, herbert
In-Reply-To: <20071211074504.GA8334@iris.sw.ru>
Denis V. Lunev wrote:
> Recently David Miller and Herbert Xu pointed out that struct net becomes
> overbloated and un-maintainable. There are two solutions:
> - provide a pointer to a network subsystem definition from struct net.
> This costs an additional dereferrence
> - place sub-system definition into the structure itself. This will speedup
> run-time access at the cost of recompilation time
>
> The second approach looks better for us. Other sub-systems will be converted
> to this approach if this will be accepted :)
>
> Changes from v1:
> - renamed fields according to Daniel Lezcano suggestion
>
> Signed-off-by: Denis V. Lunev <den@openvz.org>
Acked-by: Daniel Lezcano <dlezcano@fr.ibm.com>
> ---
> include/net/net_namespace.h | 5 +++--
> net/unix/af_unix.c | 4 ++--
> net/unix/sysctl_net_unix.c | 12 ++++++------
> 3 files changed, 11 insertions(+), 10 deletions(-)
>
> diff --git a/include/net/net_namespace.h b/include/net/net_namespace.h
> --- a/include/net/net_namespace.h
> +++ b/include/net/net_namespace.h
> @@ -8,6 +8,8 @@
> #include <linux/workqueue.h>
> #include <linux/list.h>
>
> +#include <net/netns/unix.h>
> +
> struct proc_dir_entry;
> struct net_device;
> struct sock;
> @@ -46,8 +48,7 @@ struct net {
> struct hlist_head packet_sklist;
>
> /* unix sockets */
> - int sysctl_unix_max_dgram_qlen;
> - struct ctl_table_header *unix_ctl;
> + struct netns_unix unx;
> };
"unx" looks really weird for me. But anyway it is a cosmetic issue, not
very important. Just in case you change your mind, two suggestions for
the name :)
struct netns_unix netns_unix;
struct netns_unix af_unix;
> #ifdef CONFIG_NET
> diff --git a/net/unix/af_unix.c b/net/unix/af_unix.c
> --- a/net/unix/af_unix.c
> +++ b/net/unix/af_unix.c
> @@ -592,7 +592,7 @@ static struct sock * unix_create1(struct net *net, struct socket *sock)
> &af_unix_sk_receive_queue_lock_key);
>
> sk->sk_write_space = unix_write_space;
> - sk->sk_max_ack_backlog = net->sysctl_unix_max_dgram_qlen;
> + sk->sk_max_ack_backlog = net->unx.sysctl_max_dgram_qlen;
> sk->sk_destruct = unix_sock_destructor;
> u = unix_sk(sk);
> u->dentry = NULL;
> @@ -2138,7 +2138,7 @@ static int unix_net_init(struct net *net)
> {
> int error = -ENOMEM;
>
> - net->sysctl_unix_max_dgram_qlen = 10;
> + net->unx.sysctl_max_dgram_qlen = 10;
> if (unix_sysctl_register(net))
> goto out;
>
> diff --git a/net/unix/sysctl_net_unix.c b/net/unix/sysctl_net_unix.c
> --- a/net/unix/sysctl_net_unix.c
> +++ b/net/unix/sysctl_net_unix.c
> @@ -18,7 +18,7 @@ static ctl_table unix_table[] = {
> {
> .ctl_name = NET_UNIX_MAX_DGRAM_QLEN,
> .procname = "max_dgram_qlen",
> - .data = &init_net.sysctl_unix_max_dgram_qlen,
> + .data = &init_net.unx.sysctl_max_dgram_qlen,
> .maxlen = sizeof(int),
> .mode = 0644,
> .proc_handler = &proc_dointvec
> @@ -40,9 +40,9 @@ int unix_sysctl_register(struct net *net)
> if (table == NULL)
> goto err_alloc;
>
> - table[0].data = &net->sysctl_unix_max_dgram_qlen;
> - net->unix_ctl = register_net_sysctl_table(net, unix_path, table);
> - if (net->unix_ctl == NULL)
> + table[0].data = &net->unx.sysctl_max_dgram_qlen;
> + net->unx.ctl = register_net_sysctl_table(net, unix_path, table);
> + if (net->unx.ctl == NULL)
> goto err_reg;
>
> return 0;
> @@ -57,8 +57,8 @@ void unix_sysctl_unregister(struct net *net)
> {
> struct ctl_table *table;
>
> - table = net->unix_ctl->ctl_table_arg;
> - unregister_sysctl_table(net->unix_ctl);
> + table = net->unx.ctl->ctl_table_arg;
> + unregister_sysctl_table(net->unx.ctl);
> kfree(table);
> }
>
^ permalink raw reply
* Re: [PATCH] NET : dst_ifdown() cleanup
From: David Miller @ 2007-12-11 10:00 UTC (permalink / raw)
To: dada1; +Cc: netdev
In-Reply-To: <475E0B1A.9030406@cosmosbay.com>
From: Eric Dumazet <dada1@cosmosbay.com>
Date: Tue, 11 Dec 2007 04:59:22 +0100
> This cleanup shrinks size of net/core/dst.o on i386 from 1299 to 1289 bytes.
> (This is because dev_hold()/dev_put() are doing atomic_inc()/atomic_dec() and
> force compiler to re-evaluate memory contents.)
>
> Signed-off-by: Eric Dumazet <dada1@cosmosbay.com>
Applied to net-2.6.25, thanks Eric.
^ permalink raw reply
* Re: [IPSEC]: Add xfrm_input_state helper
From: David Miller @ 2007-12-11 9:54 UTC (permalink / raw)
To: herbert; +Cc: netdev
In-Reply-To: <20071211034531.GA10033@gondor.apana.org.au>
From: Herbert Xu <herbert@gondor.apana.org.au>
Date: Tue, 11 Dec 2007 11:45:31 +0800
> [IPSEC]: Add xfrm_input_state helper
>
> This patch adds the xfrm_input_state helper function which returns the
> current xfrm state being processed on the input path given an sk_buff.
> This is currently only used by xfrm_input but will be used by ESP upon
> asynchronous resumption.
>
> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Applied to net-2.6.25, thanks!
^ permalink raw reply
* RE: [PATCH] Increase virtual FIFOs in ucc_geth.
From: Li Yang @ 2007-12-11 9:49 UTC (permalink / raw)
To: Joakim Tjernlund, netdev
In-Reply-To: <1197312366-7484-1-git-send-email-Joakim.Tjernlund@transmode.se>
> -----Original Message-----
> From: Joakim Tjernlund [mailto:Joakim.Tjernlund@transmode.se]
> Sent: Tuesday, December 11, 2007 2:46 AM
> To: Li Yang-r58472 <LeoLi@freescale.com> Netdev
> Cc: Joakim Tjernlund
> Subject: [PATCH] Increase virtual FIFOs in ucc_geth.
>
> Increase UCC_GETH_URFS_INIT to 1152 and
> UCC_GETH_UTFS_INIT to 896 to avoid HW Overrun/Underrun.
Please be noted that these values are only used for 10/100Mbps speed.
Did you get Overrun in 10/100M mode?
- Leo
>
> Signed-off-by: Joakim Tjernlund <Joakim.Tjernlund@transmode.se>
> ---
> drivers/net/ucc_geth.h | 4 ++--
> 1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/net/ucc_geth.h b/drivers/net/ucc_geth.h
> index bb4dac8..d3f030b 100644
> --- a/drivers/net/ucc_geth.h
> +++ b/drivers/net/ucc_geth.h
> @@ -923,11 +923,11 @@ struct ucc_geth_hardware_statistics {
> #define PHY_CHANGE_TIME 2
>
> /* Fast Ethernet (10/100 Mbps) */
> -#define UCC_GETH_URFS_INIT 512 /* Rx
> virtual FIFO size
> +#define UCC_GETH_URFS_INIT 1152 /* Rx
> virtual FIFO size
> */
> #define UCC_GETH_URFET_INIT 256 /* 1/2 urfs */
> #define UCC_GETH_URFSET_INIT 384 /* 3/4 urfs */
> -#define UCC_GETH_UTFS_INIT 512 /* Tx
> virtual FIFO size
> +#define UCC_GETH_UTFS_INIT 896 /* Tx
> virtual FIFO size
> */
> #define UCC_GETH_UTFET_INIT 256 /* 1/2 utfs */
> #define UCC_GETH_UTFTT_INIT 128
> --
> 1.5.3.6
>
>
^ permalink raw reply
* Re: [PATCH 8/8] [PATCH v2] [CCID3]: Interface CCID3 code with newer Loss Intervals Database
From: Gerrit Renker @ 2007-12-11 9:42 UTC (permalink / raw)
To: Arnaldo Carvalho de Melo, dccp, netdev
In-Reply-To: <20071210210416.GB24046@ghostprotocols.net>
| When interfacing we must make sure that ccid3 tfrc_lh_slab is created
| and then tfrc_li_cachep is not needed. I'm doing this while keeping
| the structure of the patches, i.e. one introducing, the other removing.
| But we need to create tfrc_lh_slab if we want the tree to be bisectable.
|
| I'm doing this and keeping your Signed-off-line, please holler if you
| disagree for some reason.
If you are just shifting and reordering then that is fine with me. But
it seems you mean a different patch since in this one there is no slab
initialisation.
The loss history and the RX/TX packet history slabs are all created in
tfrc.c using the three different __init routines of the dccp_tfrc_lib.
^ permalink raw reply
* [PATCH 2.6.24 1/1]S2io: Fixed the case where stats_info was accessed after free in free_shared_mem()
From: Sreenivasa Honnur @ 2007-12-11 9:33 UTC (permalink / raw)
To: netdev, jeff; +Cc: support
- Fixed the case where stats_info was accessed after free in free_shared_mem().
Signed-off-by: Surjit Reang <surjit.reang@neterion.com>
Signed-off-by: Sreenivasa Honnur <sreenivasa.honnur@neterion.com>
Signed-off-by: Ramkrishna Vepa <ram.vepa@neterion.com>
---
diff -Nurp patch_10/drivers/net/s2io.c patch_11/drivers/net/s2io.c
--- patch_10/drivers/net/s2io.c 2007-12-04 23:36:48.000000000 +0530
+++ patch_11/drivers/net/s2io.c 2007-12-08 01:05:56.000000000 +0530
@@ -84,7 +84,7 @@
#include "s2io.h"
#include "s2io-regs.h"
-#define DRV_VERSION "2.0.26.10"
+#define DRV_VERSION "2.0.26.11"
/* S2io Driver name & version. */
static char s2io_driver_name[] = "Neterion";
@@ -941,18 +941,19 @@ static void free_shared_mem(struct s2io_
}
}
+ if (nic->ufo_in_band_v) {
+ nic->mac_control.stats_info->sw_stat.mem_freed
+ += (ufo_size * sizeof(u64));
+ kfree(nic->ufo_in_band_v);
+ }
+
if (mac_control->stats_mem) {
+ nic->mac_control.stats_info->sw_stat.mem_freed +=
+ mac_control->stats_mem_sz;
pci_free_consistent(nic->pdev,
mac_control->stats_mem_sz,
mac_control->stats_mem,
mac_control->stats_mem_phy);
- nic->mac_control.stats_info->sw_stat.mem_freed +=
- mac_control->stats_mem_sz;
- }
- if (nic->ufo_in_band_v) {
- kfree(nic->ufo_in_band_v);
- nic->mac_control.stats_info->sw_stat.mem_freed
- += (ufo_size * sizeof(u64));
}
}
^ permalink raw reply
* [PATCH] [NET]: Fix Ooops of napi net_rx_action.
From: Joonwoo Park @ 2007-12-11 9:13 UTC (permalink / raw)
To: netdev, linux-kernel
[NET]: Fix Ooops of napi net_rx_action.
Before doing list_move_tail napi poll_list, it should be ensured
Signed-off-by: Joonwoo Park <joonwpark81@gmail.com>
---
diff --git a/net/core/dev.c b/net/core/dev.c
index 86d6261..74bd5ab 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -2207,7 +2207,8 @@ static void net_rx_action(struct softirq_action *h)
* still "owns" the NAPI instance and therefore can
* move the instance around on the list at-will.
*/
- if (unlikely(work == weight))
+ if (unlikely((test_bit(NAPI_STATE_SCHED, &n->state))
+ && (work == weight)))
list_move_tail(&n->poll_list, list);
netpoll_poll_unlock(have);
---
I was able to make it real oops on 2.6.24-rc4 + e1000 napi + smp.
eth0 of my laptop is connected directly to a packet generator.
The packet generator is making unicast udp packets to laptop (approximately 70000pps).
At that time, if the interface is went down, Ooops occurred.
Thanks.
Joonwoo
root@joonwpark-laptop:~# ifconfig eth0 down
BUG: unable to handle kernel paging request at virtual address 00100104
printing eip: c42ecc35 *pdpt = 000000001fc89001 *pde = 0000000000000000
Ooops: 0002 [#1] SMP
Modules linked in:
Pid: 4, comm:ksoftirqd/0 Not tainted (2.6.24-rc4 #27)
EIP: 0060:[<c42ecc35>] EFLAGS: 00010046 CPU: 0
EIP is at net_rx_action+0x1d5/0x1f0
EAX: 00100100 EBX: f77c965c ECX: 00000000 EDX: 00200200
ESI: 00000040 EDI: f77c965c EBP: f7c6df94 ESP: f7c6df64
DS: 007b ES: 007b FS: 00d8 GS: 0000 SS: 0068
Process ksoftirqd/0 (pid: 4, ti=f7c6c000 task=f7c68ab0 task.ti=f7c6c000)
Stack: 00000002 00000001 c42ecabe c4598f40 c1d0f5cc 0000c7da 000000ac f77c965c
00000040 00000001 c4543b18 c4598f40 f7c6dfb0 c4032a07 00000004 00000000
00000246 00000000 c4032f60 f7c6dfbc c4032ad7 c459ba80 f6c6dfcc c4032fb9
Call Trace:
[<c40053ca>] show_trace_log_lvl+0x1a/0x30
[<c4005489>] show_stack_log_lvl+0xa9/0xd0
[<c400557a>] show_registers+0xca/0x1c0
[<c4005785>] die+0x115/0x230
[<c4020f0c>] do_page_fault+0x34c/0x7f0
[<c43c9cea>] error_code+0x72/0x78
[<c4032a07>] __do_softirq+0x87/0x60
[<c4032ad7>] do_softirq+0x57/0xe0
[<c4041ee2>] kthread+0x42/0x70
[<c4004fc3>] kernel_thread_helper+0x7/0x14
gdb outputs
(gdb) info line *net_rx_action+0x1d5
Line 157 of "include/linux/list.h"
starts at address 0xc42ecc35 <net_rx_action+469>
and ends at 0xc42ecc38 <net_rx_action+472>.
(gdb) l include/linux/list.h:157
152 * This is only for internal list manipulation where we know
153 * the prev/next entries already!
154 */
155 static inline void __list_del(struct list_head * prev, struct list_head * next)
156 {
157 next->prev = prev;
158 prev->next = next;
159 }
160
161 /**
(gdb) info line *__do_softirq+0x87
Line 130 of "include/linux/rcupdate.h"
starts at address 0xc4032a07 <__do_softirq+135>
and ends at 0xc4032a0a <__do_softirq+138>.
(gdb) l include/linux/rcupdate.h:130
125 struct rcu_data *rdp = &per_cpu(rcu_data, cpu);
126 rdp->passed_quiesc = 1;
127 }
128 static inline void rcu_bh_qsctr_inc(int cpu)
129 {
130 struct rcu_data *rdp = &per_cpu(rcu_bh_data, cpu);
131 rdp->passed_quiesc = 1;
132 }
133
134 extern int rcu_pending(int cpu);
(gdb) info line *do_softirq+0x57
Line 269 of "kernel/softirq.c" starts at address 0xc4032ad2 <do_softirq+82>
and ends at 0xc4032ae0 <tasklet_kill>.
(gdb) l kernel/softirq.c:269
264 local_irq_save(flags);
265
266 pending = local_softirq_pending();
267
268 if (pending)
269 __do_softirq();
270
271 local_irq_restore(flags);
272 }
273
^ permalink raw reply related
* [PATCH] NET: Fix wrong comments for unregister_net*
From: Wang Chen @ 2007-12-11 8:50 UTC (permalink / raw)
To: David S. Miller; +Cc: netdev
[PATCH] NET: Fix wrong comments for unregister_net*
There are some return value comments for void functions.
Fixed it.
Signed-off-by: Wang Chen <wangchen@cn.fujitsu.com>
---
dev.c | 6 ++----
1 files changed, 2 insertions(+), 4 deletions(-)
--- linux-2.6.24.rc4.org/net/core/dev.c 2007-12-11 16:40:36.000000000 +0800
+++ linux-2.6.24.rc4/net/core/dev.c 2007-12-11 16:42:40.000000000 +0800
@@ -3959,8 +3959,7 @@ void synchronize_net(void)
* @dev: device
*
* This function shuts down a device interface and removes it
- * from the kernel tables. On success 0 is returned, on a failure
- * a negative errno code is returned.
+ * from the kernel tables.
*
* Callers must hold the rtnl semaphore. You may want
* unregister_netdev() instead of this.
@@ -3978,8 +3977,7 @@ void unregister_netdevice(struct net_dev
* @dev: device
*
* This function shuts down a device interface and removes it
- * from the kernel tables. On success 0 is returned, on a failure
- * a negative errno code is returned.
+ * from the kernel tables.
*
* This is just a wrapper for unregister_netdevice that takes
* the rtnl semaphore. In general you want to use this and not
^ permalink raw reply
* Re: htb and UDP packages bigger than 1500
From: Arkadiusz Miskiewicz @ 2007-12-11 8:48 UTC (permalink / raw)
To: Jarek Poplawski; +Cc: netdev
In-Reply-To: <20071211083559.GB2261@ff.dom.local>
On Tuesday 11 of December 2007, Jarek Poplawski wrote:
> On Tue, Dec 11, 2007 at 09:17:30AM +0100, Arkadiusz Miskiewicz wrote:
> > On Tuesday 11 of December 2007, Jarek Poplawski wrote:
> > > On 10-12-2007 18:10, Arkadiusz Miskiewicz wrote:
> > > > Hello,
> > > >
> > > > I noticed that HTB doesn't properly limit traffic if someone sends
> > > > UDP packages bigger than 1500.
> > > >
> > > > Does HTB have some problems/known limits in this area?
> > > >
> > > > There is other traffic in that class and when I drop udp packets
> > > > bigger than 1500 then remaining traffic is limited properly to
> > > > correct value.
> > >
> > > Should work with proper "mtu" parameter (tc qdisc add htb help) or,
> > > for kernels >= 2.6.23, even without this. If this doesn't help,
> > > probably more information is required.
> >
> > 2.6.22 there. mtu wasn't specified at tc... Could you point to a git
> > commit which "fixes" the issue in 2.6.23 so I could backport it to my
> > 2.6.22?
>
> http://git.kernel.org/?p=linux/kernel/git/stable/linux-2.6.23.y.git;a=commi
>tdiff;h=c9726d6890f7f3a892c879e067c3ed839f61e745
>
> From: Ranjit Manomohan <ranjitm@google.com>
> Date: Wed, 11 Jul 2007 05:43:16 +0000 (-0700)
> Subject: [NET_SCHED]: Make HTB scheduler work with TSO.
> X-Git-Tag: v2.6.23-rc1~1109^2~22
Backported.
> But this is done with two different ways. And btw., if there is such
> a big difference in sizes it could be not very accurate after all.
Hm, here htb qdisc is attached to imq devices which have mtu 16000 by default
(in latest patch; previously that was 1500). I'll just lower it to 1500 for
now. Thanks.
> Jarek P.
--
Arkadiusz Miśkiewicz PLD/Linux Team
arekm / maven.pl http://ftp.pld-linux.org/
^ permalink raw reply
* Re: htb and UDP packages bigger than 1500
From: Jarek Poplawski @ 2007-12-11 8:36 UTC (permalink / raw)
To: Arkadiusz Miskiewicz; +Cc: netdev
In-Reply-To: <200712110917.30945.arekm@maven.pl>
On Tue, Dec 11, 2007 at 09:17:30AM +0100, Arkadiusz Miskiewicz wrote:
> On Tuesday 11 of December 2007, Jarek Poplawski wrote:
> > On 10-12-2007 18:10, Arkadiusz Miskiewicz wrote:
> > > Hello,
> > >
> > > I noticed that HTB doesn't properly limit traffic if someone sends UDP
> > > packages bigger than 1500.
> > >
> > > Does HTB have some problems/known limits in this area?
> > >
> > > There is other traffic in that class and when I drop udp packets bigger
> > > than 1500 then remaining traffic is limited properly to correct value.
> >
> > Should work with proper "mtu" parameter (tc qdisc add htb help) or,
> > for kernels >= 2.6.23, even without this. If this doesn't help,
> > probably more information is required.
>
> 2.6.22 there. mtu wasn't specified at tc... Could you point to a git commit
> which "fixes" the issue in 2.6.23 so I could backport it to my 2.6.22?
http://git.kernel.org/?p=linux/kernel/git/stable/linux-2.6.23.y.git;a=commitdiff;h=c9726d6890f7f3a892c879e067c3ed839f61e745
From: Ranjit Manomohan <ranjitm@google.com>
Date: Wed, 11 Jul 2007 05:43:16 +0000 (-0700)
Subject: [NET_SCHED]: Make HTB scheduler work with TSO.
X-Git-Tag: v2.6.23-rc1~1109^2~22
But this is done with two different ways. And btw., if there is such
a big difference in sizes it could be not very accurate after all.
Jarek P.
^ permalink raw reply
* Re: htb and UDP packages bigger than 1500
From: Arkadiusz Miskiewicz @ 2007-12-11 8:17 UTC (permalink / raw)
To: Jarek Poplawski; +Cc: netdev
In-Reply-To: <20071211081929.GA2261@ff.dom.local>
On Tuesday 11 of December 2007, Jarek Poplawski wrote:
> On 10-12-2007 18:10, Arkadiusz Miskiewicz wrote:
> > Hello,
> >
> > I noticed that HTB doesn't properly limit traffic if someone sends UDP
> > packages bigger than 1500.
> >
> > Does HTB have some problems/known limits in this area?
> >
> > There is other traffic in that class and when I drop udp packets bigger
> > than 1500 then remaining traffic is limited properly to correct value.
>
> Should work with proper "mtu" parameter (tc qdisc add htb help) or,
> for kernels >= 2.6.23, even without this. If this doesn't help,
> probably more information is required.
2.6.22 there. mtu wasn't specified at tc... Could you point to a git commit
which "fixes" the issue in 2.6.23 so I could backport it to my 2.6.22?
> Regards,
> Jarek P.
Thanks,
--
Arkadiusz Miśkiewicz PLD/Linux Team
arekm / maven.pl http://ftp.pld-linux.org/
^ permalink raw reply
* Re: htb and UDP packages bigger than 1500
From: Jarek Poplawski @ 2007-12-11 8:19 UTC (permalink / raw)
To: Arkadiusz Miskiewicz; +Cc: netdev
In-Reply-To: <200712101810.50730.arekm@maven.pl>
On 10-12-2007 18:10, Arkadiusz Miskiewicz wrote:
> Hello,
>
> I noticed that HTB doesn't properly limit traffic if someone sends UDP
> packages bigger than 1500.
>
> Does HTB have some problems/known limits in this area?
>
> There is other traffic in that class and when I drop udp packets bigger than
> 1500 then remaining traffic is limited properly to correct value.
>
Should work with proper "mtu" parameter (tc qdisc add htb help) or,
for kernels >= 2.6.23, even without this. If this doesn't help,
probably more information is required.
Regards,
Jarek P.
^ permalink raw reply
* [PATCH 2.6.25] netns: struct net content re-work (v2)
From: Denis V. Lunev @ 2007-12-11 7:45 UTC (permalink / raw)
To: davem; +Cc: containers, devel, netdev, herbert
Recently David Miller and Herbert Xu pointed out that struct net becomes
overbloated and un-maintainable. There are two solutions:
- provide a pointer to a network subsystem definition from struct net.
This costs an additional dereferrence
- place sub-system definition into the structure itself. This will speedup
run-time access at the cost of recompilation time
The second approach looks better for us. Other sub-systems will be converted
to this approach if this will be accepted :)
Changes from v1:
- renamed fields according to Daniel Lezcano suggestion
Signed-off-by: Denis V. Lunev <den@openvz.org>
---
include/net/net_namespace.h | 5 +++--
net/unix/af_unix.c | 4 ++--
net/unix/sysctl_net_unix.c | 12 ++++++------
3 files changed, 11 insertions(+), 10 deletions(-)
diff --git a/include/net/net_namespace.h b/include/net/net_namespace.h
--- a/include/net/net_namespace.h
+++ b/include/net/net_namespace.h
@@ -8,6 +8,8 @@
#include <linux/workqueue.h>
#include <linux/list.h>
+#include <net/netns/unix.h>
+
struct proc_dir_entry;
struct net_device;
struct sock;
@@ -46,8 +48,7 @@ struct net {
struct hlist_head packet_sklist;
/* unix sockets */
- int sysctl_unix_max_dgram_qlen;
- struct ctl_table_header *unix_ctl;
+ struct netns_unix unx;
};
#ifdef CONFIG_NET
diff --git a/net/unix/af_unix.c b/net/unix/af_unix.c
--- a/net/unix/af_unix.c
+++ b/net/unix/af_unix.c
@@ -592,7 +592,7 @@ static struct sock * unix_create1(struct net *net, struct socket *sock)
&af_unix_sk_receive_queue_lock_key);
sk->sk_write_space = unix_write_space;
- sk->sk_max_ack_backlog = net->sysctl_unix_max_dgram_qlen;
+ sk->sk_max_ack_backlog = net->unx.sysctl_max_dgram_qlen;
sk->sk_destruct = unix_sock_destructor;
u = unix_sk(sk);
u->dentry = NULL;
@@ -2138,7 +2138,7 @@ static int unix_net_init(struct net *net)
{
int error = -ENOMEM;
- net->sysctl_unix_max_dgram_qlen = 10;
+ net->unx.sysctl_max_dgram_qlen = 10;
if (unix_sysctl_register(net))
goto out;
diff --git a/net/unix/sysctl_net_unix.c b/net/unix/sysctl_net_unix.c
--- a/net/unix/sysctl_net_unix.c
+++ b/net/unix/sysctl_net_unix.c
@@ -18,7 +18,7 @@ static ctl_table unix_table[] = {
{
.ctl_name = NET_UNIX_MAX_DGRAM_QLEN,
.procname = "max_dgram_qlen",
- .data = &init_net.sysctl_unix_max_dgram_qlen,
+ .data = &init_net.unx.sysctl_max_dgram_qlen,
.maxlen = sizeof(int),
.mode = 0644,
.proc_handler = &proc_dointvec
@@ -40,9 +40,9 @@ int unix_sysctl_register(struct net *net)
if (table == NULL)
goto err_alloc;
- table[0].data = &net->sysctl_unix_max_dgram_qlen;
- net->unix_ctl = register_net_sysctl_table(net, unix_path, table);
- if (net->unix_ctl == NULL)
+ table[0].data = &net->unx.sysctl_max_dgram_qlen;
+ net->unx.ctl = register_net_sysctl_table(net, unix_path, table);
+ if (net->unx.ctl == NULL)
goto err_reg;
return 0;
@@ -57,8 +57,8 @@ void unix_sysctl_unregister(struct net *net)
{
struct ctl_table *table;
- table = net->unix_ctl->ctl_table_arg;
- unregister_sysctl_table(net->unix_ctl);
+ table = net->unx.ctl->ctl_table_arg;
+ unregister_sysctl_table(net->unx.ctl);
kfree(table);
}
--
1.5.3.rc5
^ permalink raw reply
* Re: [PATCH 2.6.25] netns: struct net content re-work
From: Denis V. Lunev @ 2007-12-11 7:33 UTC (permalink / raw)
To: Eric W. Biederman
Cc: containers-qjLDD68F18O7TbgM5vRIOg, Denis V. Lunev,
herbert-lOAM2aK0SrRLBo1qDEOMRrpzq4S04n8Q,
davem-fT/PcQaiUtIeIZ0/mPfg9Q, netdev-u79uwXL29TY76Z2rM5mHXA
In-Reply-To: <m1prxd28h3.fsf-T1Yj925okcoyDheHMi7gv2pdwda3JcWeAL8bYrjMMd8@public.gmane.org>
Eric W. Biederman wrote:
> The idea of separate structures make sense, and seems needed and useful.
>
> "Denis V. Lunev" <den-GEFAQzZX7r8dnm+yROfE0A@public.gmane.org> writes:
>
>> diff --git a/include/net/netns/unix.h b/include/net/netns/unix.h
>> new file mode 100644
>> index 0000000..27b4e7f
>> --- /dev/null
>> +++ b/include/net/netns/unix.h
> ^^^^^^
> Given that we are making this per protocol adding a separate directory
> to hold them seems to be the wrong grouping. Ideally we want everything
> for the protocol all together in the same location so it is easy
> to find. Possibly with a user/kernel split.
>
> So perhaps unix_net.h
The idea was simple:
- I can name 5 files right now
- I want them to be shown to gather by ls
- so, there are 2 ways, namely:
# include/net/netns/unix.h
# include/net/netns-unix.h
Regards,
Den
>
>> @@ -0,0 +1,13 @@
>> +/*
>> + * Unix network namespace
>> + */
>> +#ifndef __NETNS_UNIX_H__
>> +#define __NETNS_UNIX_H__
>> +
>> +struct ctl_table_header;
>> +struct netns_unix {
>> + int sysctl_unix_max_dgram_qlen;
>> + struct ctl_table_header *unix_ctl;
>> +};
>
> How about struct unix_net? I think that tracks a little better
> with how we have done struct in_device, ip6_dev and their friends.
>
> Eric
>
^ permalink raw reply
* Re: [PATCH] NETLINK : kzalloc() conversion
From: Eric Dumazet @ 2007-12-11 5:46 UTC (permalink / raw)
To: YOSHIFUJI Hideaki / 吉藤英明; +Cc: davem, netdev
In-Reply-To: <20071210.214337.86437493.yoshfuji@linux-ipv6.org>
YOSHIFUJI Hideaki / 吉藤英明 a écrit :
> In article <475E22C2.9050700@cosmosbay.com> (at Tue, 11 Dec 2007 06:40:18 +0100), Eric Dumazet <dada1@cosmosbay.com> says:
>
>> nl_pid_hash_alloc() is renamed to nl_pid_hash_zalloc().
>> It is now returning zeroed memory to its callers.
>
> I do think you do not need (and you should not) rename it
> because XXX_zalloc() would imply we have raw XXX_alloc().
>
Well, its a static function, so a single grep should satisfy
reader's concern :)
^ permalink raw reply
* Re: [PATCH] NETLINK : kzalloc() conversion
From: YOSHIFUJI Hideaki / 吉藤英明 @ 2007-12-11 5:43 UTC (permalink / raw)
To: dada1; +Cc: davem, netdev, yoshfuji
In-Reply-To: <475E22C2.9050700@cosmosbay.com>
In article <475E22C2.9050700@cosmosbay.com> (at Tue, 11 Dec 2007 06:40:18 +0100), Eric Dumazet <dada1@cosmosbay.com> says:
> nl_pid_hash_alloc() is renamed to nl_pid_hash_zalloc().
> It is now returning zeroed memory to its callers.
I do think you do not need (and you should not) rename it
because XXX_zalloc() would imply we have raw XXX_alloc().
--yoshfuji
^ permalink raw reply
* [PATCH] NETLINK : kzalloc() conversion
From: Eric Dumazet @ 2007-12-11 5:40 UTC (permalink / raw)
To: David S. Miller; +Cc: Linux Netdev List
[-- Attachment #1: Type: text/plain, Size: 157 bytes --]
nl_pid_hash_alloc() is renamed to nl_pid_hash_zalloc().
It is now returning zeroed memory to its callers.
Signed-off-by: Eric Dumazet <dada1@cosmosbay.com>
[-- Attachment #2: netlink.patch --]
[-- Type: text/plain, Size: 1574 bytes --]
diff --git a/net/netlink/af_netlink.c b/net/netlink/af_netlink.c
index 2e02b19..dbd7cad 100644
--- a/net/netlink/af_netlink.c
+++ b/net/netlink/af_netlink.c
@@ -237,13 +237,14 @@ found:
return sk;
}
-static inline struct hlist_head *nl_pid_hash_alloc(size_t size)
+static inline struct hlist_head *nl_pid_hash_zalloc(size_t size)
{
if (size <= PAGE_SIZE)
- return kmalloc(size, GFP_ATOMIC);
+ return kzalloc(size, GFP_ATOMIC);
else
return (struct hlist_head *)
- __get_free_pages(GFP_ATOMIC, get_order(size));
+ __get_free_pages(GFP_ATOMIC | __GFP_ZERO,
+ get_order(size));
}
static inline void nl_pid_hash_free(struct hlist_head *table, size_t size)
@@ -272,11 +273,10 @@ static int nl_pid_hash_rehash(struct nl_pid_hash *hash, int grow)
size *= 2;
}
- table = nl_pid_hash_alloc(size);
+ table = nl_pid_hash_zalloc(size);
if (!table)
return 0;
- memset(table, 0, size);
otable = hash->table;
hash->table = table;
hash->mask = mask;
@@ -1919,7 +1919,7 @@ static int __init netlink_proto_init(void)
for (i = 0; i < MAX_LINKS; i++) {
struct nl_pid_hash *hash = &nl_table[i].hash;
- hash->table = nl_pid_hash_alloc(1 * sizeof(*hash->table));
+ hash->table = nl_pid_hash_zalloc(1 * sizeof(*hash->table));
if (!hash->table) {
while (i-- > 0)
nl_pid_hash_free(nl_table[i].hash.table,
@@ -1927,7 +1927,6 @@ static int __init netlink_proto_init(void)
kfree(nl_table);
goto panic;
}
- memset(hash->table, 0, 1 * sizeof(*hash->table));
hash->max_shift = order;
hash->shift = 0;
hash->mask = 0;
^ 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