Re: PKTGEN: Adds thread limit parameter.

2006-03-13 Thread Luiz Fernando Capitulino
On Mon, 13 Mar 2006 14:29:17 +0100 Robert Olsson <[EMAIL PROTECTED]> wrote: | | Luiz Fernando Capitulino writes: | | > Well, I wouldn't say it's _really_ needed. But it really avoids having | > too many thread entries in the pktgen's /proc directory, and as a goo

Re: PKTGEN: Adds thread limit parameter.

2006-03-13 Thread Luiz Fernando Capitulino
checked. * A new command called 'rem_device' to remove one device at a time (currently, we can only remove all devices in one shoot with 'rem_devices_all') * Ports pktgen to use the kernel thread API * cleanup the debug function usage Would be good to hear from you if

PKTGEN: Adds thread limit parameter.

2006-03-12 Thread Luiz Fernando Capitulino
Currently, pktgen will create one thread for each online CPU in the system. That behaivor may be annoying if you're using pktgen in a large SMP system. This patch adds a new module parameter called 'pg_max_threads', which can be set to the maximum number of threads pktgen should create. For exam

[PKTGEN 3/3]: Updates version.

2006-03-01 Thread Luiz Fernando Capitulino
Due to the thread's lock changes, we're at a new version now. Signed-off-by: Luiz Capitulino <[EMAIL PROTECTED]> --- net/core/pktgen.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) 8a424120e162b8efaf01cadc6b8a222ea7888608 diff --git a/net/core/pktgen.c b/net/core/pktgen.c index

[PKTGEN 0/3]: Thread's lock cleanups.

2006-03-01 Thread Luiz Fernando Capitulino
Hi, I've split the pkgten's thread lock work into three patches: [PKTGEN 1/3]: Convert thread lock to mutexes. [PKTGEN 2/3]: Removes thread_{un,}lock() macros. [PKTGEN 3/3]: Updates version. Thanks. -- Luiz Fernando N. Capitulino - To unsubscribe from this list: send the line "unsubscribe

[PKTGEN 2/3]: Removes thread_{un,}lock() macros.

2006-03-01 Thread Luiz Fernando Capitulino
As suggested by Arnaldo, this patch replaces the thread_lock()/thread_unlock() by directly calls to mutex_lock()/mutex_unlock(). This change makes the code a bit more readable, and the direct calls are used everywhere in the kernel. Signed-off-by: Luiz Capitulino <[EMAIL PROTECTED]> --- net

Re: [PATCH] pktgen: Convert thread lock to mutexes.

2006-03-01 Thread Luiz Fernando Capitulino
On Wed, 01 Mar 2006 16:05:55 -0800 (PST) "David S. Miller" <[EMAIL PROTECTED]> wrote: > From: "Arnaldo Carvalho de Melo" <[EMAIL PROTECTED]> > Date: Wed, 1 Mar 2006 11:22:25 -0300 > > > On 3/1/06, Luiz Fernando Capitulino <[EMAIL PROTECTED]>

[PATCH] pktgen: Convert thread lock to mutexes.

2006-03-01 Thread Luiz Fernando Capitulino
Hi! pktgen's thread semaphores are strict mutexes, convert them to the mutex implementation. Signed-off-by: Luiz Capitulino <[EMAIL PROTECTED]> --- net/core/pktgen.c |9 + 1 files changed, 5 insertions(+), 4 deletions(-) 1185abd5dacbca3052ccd93e059c497bbc8869b2 diff --git a/net

[PATCH 5/6] pktgen: Ports if_list to the in-kernel implementation.

2006-02-25 Thread Luiz Fernando Capitulino
This patch ports the per-thread interface list list to the in-kernel linked list implementation. In the general, the resulting code is a bit simpler. Signed-off-by: Luiz Capitulino <[EMAIL PROTECTED]> --- net/core/pktgen.c | 92 + 1 files

[PATCH 6/6] pktgen: Updates version.

2006-02-25 Thread Luiz Fernando Capitulino
With all the previous changes, we're at a new version now. Signed-off-by: Luiz Capitulino <[EMAIL PROTECTED]> --- net/core/pktgen.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) 32d9b9951586e505b4b8bc587f9e170612a48a4d diff --git a/net/core/pktgen.c b/net/core/pktgen.c index 5d

[PATCH 4/6] pktgen: Fix Initialization fail leak.

2006-02-25 Thread Luiz Fernando Capitulino
Even if pktgen's thread initialization fails for all CPUs, the module will be successfully loaded. This patch changes that behaivor, by returning an error on module load time, and also freeing all the resources allocated. It also prints a warning if a thread initialization has failed. Signed-o

[PATCH 3/6] pktgen: Fix kernel_thread() fail leak.

2006-02-25 Thread Luiz Fernando Capitulino
Free all the alocated resources if kernel_thread() call fails. Signed-off-by: Luiz Capitulino <[EMAIL PROTECTED]> --- net/core/pktgen.c | 11 +-- 1 files changed, 9 insertions(+), 2 deletions(-) c3fd9c4bbddab18349563c0c5d90c4bf0002de99 diff --git a/net/core/pktgen.c b/net/core/pktg

[PATCH 2/6] pktgen: Ports thread list to Kernel list implementation.

2006-02-25 Thread Luiz Fernando Capitulino
The final result is a simpler and smaller code. Note that I'm adding a new member in the struct pktgen_thread called 'removed'. The reason is that I didn't find a better wait condition to be used in the place of the replaced one. Signed-off-by: Luiz Capitulino <[EMAIL PROTECTED]> --- net/co

[PATCH 1/6] pktgen: Lindent run.

2006-02-25 Thread Luiz Fernando Capitulino
This patch is not in-lined because it's 124K bytes long, you can get it at: http://www.cpu.eti.br/patches/0001-pktgen-Lindent-run.patch -- Luiz Fernando N. Capitulino - To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordom

[PATCH 0/6] pktgen: refinements and small fixes (V3).

2006-02-25 Thread Luiz Fernando Capitulino
Hi David, As you've asked, I'm sending again my patches for pktgen: [PATCH 1/6] pktgen: Lindent run. [PATCH 2/6] pktgen: Ports thread list to Kernel list implementation. [PATCH 3/6] pktgen: Fix kernel_thread() fail leak. [PATCH 4/6] pktgen: Fix Initialization fail leak. [PATCH 5/6] pktgen: Por

[PATCH] pktgen: Ports the if_list to the in-kernel implementation.

2006-02-18 Thread Luiz Fernando Capitulino
Hi! This patch ports the per-thread interface list to the in-kernel linked list implementation. In general, the resulting code is a bit simpler. I've tested it with QEMU emulating a four CPU machine with four NICs. Note that this patch has been made in the top of my previous pktgen patches.

Re: [PATCH 0/4] - pktgen: refinements and small fixes (V2).

2006-01-30 Thread Luiz Fernando Capitulino
On Mon, 30 Jan 2006 12:18:12 +0100 Robert Olsson <[EMAIL PROTECTED]> wrote: | | Luiz Fernando Capitulino writes: | | > [PATCH 1/4] pktgen: Lindent run. | > [PATCH 2/4] pktgen: Ports thread list to Kernel list implementation. | > [PATCH 3/4] pktgen: Fix kernel_thr

[PATCH 4/4] pktgen: Fix Initialization fail leak.

2006-01-29 Thread Luiz Fernando Capitulino
Even if pktgen's thread initialization fails for all CPUs, the module will be successfully loaded. This patch changes that behaivor, by returning error on module load time, and also freeing all the resources allocated. It also prints a warning if a thread initialization has failed. Signed-off-

[PATCH 3/4] pktgen: Fix kernel_thread() fail leak.

2006-01-29 Thread Luiz Fernando Capitulino
Leak fix: free all the alocated resources if kernel_thread() call fails. Signed-off-by: Luiz Capitulino <[EMAIL PROTECTED]> --- net/core/pktgen.c | 11 +-- 1 files changed, 9 insertions(+), 2 deletions(-) 59115e7981073430cfcbcde20840ec926cca diff --git a/net/core/pktgen.c b/ne

[PATCH 2/4] pktgen: Ports thread list to Kernel list implementation.

2006-01-29 Thread Luiz Fernando Capitulino
Ports the thread list to use the Linux Kernel linked list implementation. The final result is a simpler and smaller code. Note that I'm adding a new member in the struct pktgen_thread called 'removed'. The reason is that I didn't find a better wait condition to be used in the place of the repla

[PATCH 1/4] pktgen: Lindent run.

2006-01-29 Thread Luiz Fernando Capitulino
This patch is not in-lined because it's 120K bytes long, you can found it at: http://www.cpu.eti.br/patches/0001-pktgen-Lindent-run.patch -- Luiz Fernando N. Capitulino - To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majord

[PATCH 0/4] - pktgen: refinements and small fixes (V2).

2006-01-29 Thread Luiz Fernando Capitulino
Hi! I'm sending again the following patches for pktgen: [PATCH 1/4] pktgen: Lindent run. [PATCH 2/4] pktgen: Ports thread list to Kernel list implementation. [PATCH 3/4] pktgen: Fix kernel_thread() fail leak. [PATCH 4/4] pktgen: Fix Initialization fail leak. The changes from V1 are: 1.

[PATCH 00/01] pktgen: Lindent run.

2006-01-23 Thread Luiz Fernando Capitulino
This patch is not in-lined because it's 120K bytes long, you can found it at: http://www.cpu.eti.br/patches/pktgen_lindent_1.patch -- Luiz Fernando N. Capitulino - To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordomo inf

[PATCH 00/00] pktgen: refinements and small fixes.

2006-01-23 Thread Luiz Fernando Capitulino
Hi! I have the following patches for pktgen: [PATCH 00/01] pktgen: Lindent run. [PATCH 00/02] pktgen: Ports thread list to Kernel list implementation. [PATCH 00/03] pktgen: Fix kernel_thread() fail leak. [PATCH 00/04] pktgen: Fix Initialization fail leak. All the patches were tested wit

[PATCH 00/03] pktgen: Fix kernel_thread() fail leak.

2006-01-23 Thread Luiz Fernando Capitulino
Leak fix: free all the alocated resources if kernel_thread() call fails. Signed-off-by: Luiz Capitulino <[EMAIL PROTECTED]> net/core/pktgen.c | 11 +-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/net/core/pktgen.c b/net/core/pktgen.c index ee26c69..ccffcbb 100644 --

[PATCH 00/04] pktgen: Fix Initialization fail leak.

2006-01-23 Thread Luiz Fernando Capitulino
Even if pktgen's thread initialization fails for all CPUs, the module will be successfully loaded. This patch changes that behaivor, by returning error on module load time, and also freeing all the resources allocated. It also prints a warning if a thread initialization has failed. Signed-off-

[PATCH 00/02] pktgen: Ports thread list to Kernel list implementation.

2006-01-23 Thread Luiz Fernando Capitulino
Ports the thread list to use the Linux Kernel linked list implementation. The final result is a simpler and smaller code. Note that I'm adding a new member in the struct pktgen_thread called 'removed'. The reason is that I didn't find a better wait condition to be used in the place of the repl