* Re: [PATCH] ks8851_ml ethernet network driver
From: Greg KH @ 2009-09-17 13:03 UTC (permalink / raw)
To: David Miller; +Cc: netdev, Charles.Li, Choi, David.Choi, jgarzik, shemminger
In-Reply-To: <20090916.204801.190052862.davem@davemloft.net>
On Wed, Sep 16, 2009 at 08:48:01PM -0700, David Miller wrote:
> From: Greg KH <greg@kroah.com>
> Date: Wed, 16 Sep 2009 19:38:36 -0700
>
> > From: Choi, David <David.Choi@Micrel.Com>
> >
> > This is a network driver for the ks8851 16bit MLL ethernet device.
> >
> > Signed-off-by: David J. Choi <david.choi@micrel.com>
> > Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
>
> This doesn't even build cleanly:
>
> drivers/net/ks8851_mll.c: In function ‘ks_inblk’:
> drivers/net/ks8851_mll.c:555: warning: cast from pointer to integer of different size
> drivers/net/ks8851_mll.c:558: warning: passing argument 1 of ‘_readw’ makes pointer from integer without a cast
> drivers/net/ks8851_mll.c: In function ‘ks_outblk’:
> drivers/net/ks8851_mll.c:571: warning: cast from pointer to integer of different size
> drivers/net/ks8851_mll.c:574: warning: passing argument 2 of ‘_writew’ makes pointer from integer without a cast
Ick, David Choi, what happened here?
> It also has a big "#define DEBUG" at the beginning of the driver.
>
> And it also has stuff like:
>
> +#define MALLOC(x) kmalloc(x, GFP_KERNEL)
>
> which actually decreases the readability of this driver.
>
> Please fix this up.
Sorry about that, I'll do a closer review next time before resubmitting.
David Choi, care to fix this, and the comments from Stephen up?
thanks,
greg k-h
^ permalink raw reply
* Re: [PATCH 1/3] at91sam9263: add at91_can device to generic device definition
From: Wolfgang Grandegger @ 2009-09-17 13:14 UTC (permalink / raw)
To: Marc Kleine-Budde; +Cc: netdev, Socketcan-core, Andrew Victor, linux-arm-kernel
In-Reply-To: <1253180254-11910-2-git-send-email-mkl@pengutronix.de>
Marc Kleine-Budde wrote:
> This patch adds the device definition for the at91_can device to
> the generic device definiton file for the at91sam9263.
>
> Signed-off-by: Hans J. Koch <hjk@linutronix.de>
> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
> ---
> arch/arm/mach-at91/at91sam9263_devices.c | 36 ++++++++++++++++++++++++++++++
> arch/arm/mach-at91/include/mach/board.h | 6 +++++
> 2 files changed, 42 insertions(+), 0 deletions(-)
>
> diff --git a/arch/arm/mach-at91/at91sam9263_devices.c b/arch/arm/mach-at91/at91sam9263_devices.c
> index b7f2332..6026c2e 100644
> --- a/arch/arm/mach-at91/at91sam9263_devices.c
> +++ b/arch/arm/mach-at91/at91sam9263_devices.c
> @@ -757,6 +757,42 @@ void __init at91_add_device_ac97(struct atmel_ac97_data *data)
> void __init at91_add_device_ac97(struct atmel_ac97_data *data) {}
> #endif
>
> +/* --------------------------------------------------------------------
> + * CAN Controller
> + * -------------------------------------------------------------------- */
> +
> +#if defined(CONFIG_CAN_AT91) || defined(CONFIG_CAN_AT91_MODULE)
> +static struct resource can_resources[] = {
> + [0] = {
> + .start = AT91SAM9263_BASE_CAN,
> + .end = AT91SAM9263_BASE_CAN + SZ_16K - 1,
> + .flags = IORESOURCE_MEM,
> + },
> + [1] = {
> + .start = AT91SAM9263_ID_CAN,
> + .end = AT91SAM9263_ID_CAN,
> + .flags = IORESOURCE_IRQ,
> + },
> +};
> +
> +static struct platform_device at91sam9263_can_device = {
> + .name = "at91_can",
> + .id = -1,
> + .resource = can_resources,
> + .num_resources = ARRAY_SIZE(can_resources),
> +};
> +
> +void __init at91_add_device_can(struct at91_can_data *data)
> +{
> + at91_set_A_periph(AT91_PIN_PA13, 0); /* CANTX */
> + at91_set_A_periph(AT91_PIN_PA14, 0); /* CANRX */
> + at91sam9263_can_device.dev.platform_data = data;
> +
> + platform_device_register(&at91sam9263_can_device);
> +}
> +#else
> +void __init at91_add_device_can(struct at91_can_data *data) {}
> +#endif
>
> /* --------------------------------------------------------------------
> * LCD Controller
> diff --git a/arch/arm/mach-at91/include/mach/board.h b/arch/arm/mach-at91/include/mach/board.h
> index e6afff8..134731c 100644
> --- a/arch/arm/mach-at91/include/mach/board.h
> +++ b/arch/arm/mach-at91/include/mach/board.h
> @@ -179,6 +179,12 @@ extern void __init at91_add_device_isi(void);
> /* Touchscreen Controller */
> extern void __init at91_add_device_tsadcc(void);
>
> +/* CAN */
> +struct at91_can_data {
> + void (*transceiver_switch)(int on);
> +};
> +extern void __init at91_add_device_can(struct at91_can_data *data);
> +
> /* LEDs */
> extern void __init at91_init_leds(u8 cpu_led, u8 timer_led);
> extern void __init at91_gpio_leds(struct gpio_led *leds, int nr);
Acked-by: Wolfgang Grandegger <wg@grandegger.com>
^ permalink raw reply
* Re: [PATCH 2/3] at91sam9263ek: activate at91 CAN controller
From: Wolfgang Grandegger @ 2009-09-17 13:14 UTC (permalink / raw)
To: Marc Kleine-Budde
Cc: Socketcan-core-0fE9KPoRgkgATYTw5x5z8w,
netdev-u79uwXL29TY76Z2rM5mHXA, Andrew Victor,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r
In-Reply-To: <1253180254-11910-3-git-send-email-mkl-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
Marc Kleine-Budde wrote:
> This patch activates the at91 CAN controller for the at91sam9263ek
> development board.
>
> Signed-off-by: Hans J. Koch <hjk-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org>
> Signed-off-by: Marc Kleine-Budde <mkl-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
> ---
> arch/arm/mach-at91/board-sam9263ek.c | 19 +++++++++++++++++++
> 1 files changed, 19 insertions(+), 0 deletions(-)
>
> diff --git a/arch/arm/mach-at91/board-sam9263ek.c b/arch/arm/mach-at91/board-sam9263ek.c
> index 57d5252..e6268b3 100644
> --- a/arch/arm/mach-at91/board-sam9263ek.c
> +++ b/arch/arm/mach-at91/board-sam9263ek.c
> @@ -400,6 +400,23 @@ static struct gpio_led ek_pwm_led[] = {
> }
> };
>
> +/*
> + * CAN
> + */
> +static void sam9263ek_transceiver_switch(int on)
> +{
> + if (on) {
> + at91_set_gpio_output(AT91_PIN_PA18, 1); /* CANRXEN */
> + at91_set_gpio_output(AT91_PIN_PA19, 0); /* CANRS */
> + } else {
> + at91_set_gpio_output(AT91_PIN_PA18, 0); /* CANRXEN */
> + at91_set_gpio_output(AT91_PIN_PA19, 1); /* CANRS */
> + }
> +}
> +
> +static struct at91_can_data ek_can_data = {
> + .transceiver_switch = sam9263ek_transceiver_switch,
> +};
>
> static void __init ek_board_init(void)
> {
> @@ -431,6 +448,8 @@ static void __init ek_board_init(void)
> /* LEDs */
> at91_gpio_leds(ek_leds, ARRAY_SIZE(ek_leds));
> at91_pwm_leds(ek_pwm_led, ARRAY_SIZE(ek_pwm_led));
> + /* CAN */
> + at91_add_device_can(&ek_can_data);
> }
>
> MACHINE_START(AT91SAM9263EK, "Atmel AT91SAM9263-EK")
Acked-by: Wolfgang Grandegger <wg-5Yr1BZd7O62+XT7JhA+gdA@public.gmane.org>
^ permalink raw reply
* We are currently upgrading our data base
From: Webmail Technical Support Team @ 2009-09-17 11:04 UTC (permalink / raw)
Dear Account User,
We are currently upgrading our data base and e-mail account center i.e
homepage view. We shall be deleting old email accounts which are no longer
active to create more space for new accounts users.we have also
investigated a system wide security audit to improve and enhance our
current security.
In order to continue using our services you are require to update and
re-comfirmed your email account details as requested below.
To complete your account re-comfirmation,you must reply to this email
immediately and enter your account details as requested below.
Username : ..................
E-mail Login ID..............
Password : ..................
confirm password:............
Date of Birth :..............
Future Password :............
Failure to do this will immediately render your account deactivated from
our database and service will not be interrupted as important messages may
as well be lost due to your declining to re-comfirmed your account details
to us.
You are to send your information above via our webmaster email:
accountupgrade001@mail2webmaster.com
We apologise for the inconvenience that this will cause you during this
period,but trusting that we are here to serve you better and providing
more technology which revolves around email and internet.
It is also pertinent,you understand that our primary concern is for our
customers, and for the security of their files and data.
COMFIRMATION CODE: -/93-1A388-480 Webmail Technical Support Team.
^ permalink raw reply
* Re: [RFCv4 PATCH 2/2] net: Allow protocols to provide an unlocked_recvmsg socket method
From: Nir Tzachar @ 2009-09-17 14:09 UTC (permalink / raw)
To: Arnaldo Carvalho de Melo
Cc: David Miller, Linux Networking Development Mailing List,
Caitlin Bestler, Chris Van Hoof, Clark Williams, Neil Horman,
Nivedita Singhvi, Paul Moore, Rémi Denis-Courmont,
Steven Whitehouse, Ziv Ayalon
In-Reply-To: <20090916170745.GD7699@ghostprotocols.net>
Hello.
Below are some test results with the patch (only part 1, as I did not
manage to apply part 2).
The test application is attached below, and works as follows:
I set out to measure the latency which can be saved by this patch, and
the application is designed accordingly. It is composed of three
parts: a producer, which time-stamps packets and sends them as fast as
possible, a mirror, which receives messages and bounces them to a
remote destination and finally, a consumer, which receives messages as
fast as possible and measures latency and throughout.
Both the produce and consumer are executed on the same host and the
mirror on a remote host. Both hosts are running linux 2.6.31 with v4
of the patch (but, as I said before, only part 1, with the unlocked_*
stuff). All processes are executed under SCHED_FIFO. Both hosts are
connected by a switched 1G Ethernet network. The mirror is executed on
a 8-core nahelem beast, and the producer and consumer on my desktop,
which is a quad. /proc/cpuinfo and lspcis and .configs can be supplied
if needed. Network cards are Intel Corporation 82566DM-2 Gigabit
Network and Broadcom Corporation NetXtreme II BCM5709 Gigabit
Ethernet.
The results (which follow below) clearly show the advantages of using
recvmmsg over recvmsg both latency wise and throughput wise. The
addition of a sendmmsg would also have a huge impact, IMO.
Receiving batches of 30 packets, each of 1024 bytes, results with no
latency improvements, but with a ~55% throughput improvement, from 72
megabytes per second to 111. Repeating the same test, but with
batches of 3000, displays the same behaviour. The more interesting
result (to me, at least :) is when using small packets. Sending
packets of size 100 and receiving in batches of 30 gives 470 micro
latency and 244669 packets per second. On the other hand, without
recvmmsg we get 750 micro latency and 210818 packets per second. A
huge improvement here.
I think that with a bit more tinkering we can even stretch these results a bit.
Cheers.
The results:
(a sample execution)
Usage:
-n do not use recvmmsg
-r producer/consumer/mirror [producer]
-b recv_batch_size [8]
-l master_listen_port [5001]
-t send_to_host [localhost]
-p slave_listen_port [5002]
-s packet_size [256]
-f run in sched fifo
-m use mlockall
10.0.0.1:
sudo ./recvmmsg -r consumer -b 3000 -f -s 1024
sudo ./recvmmsg -r producer -t 10.0.0.2 -f -s 1024 -b 1
10.0.0.2
sudo ./recvmmsg -t 10.0.0.1 -r mirror -b 3000 -f -s 1024
-f -s 1024 -b 30
packets num: 569203, mean: 942.69, max: 1551, stddev: 128.48
packets per second: 113839.96, bytes per second: 116572774
packets num: 569214, mean: 942.61, max: 1385, stddev: 126.55
packets per second: 113841.62, bytes per second: 116575027
packets num: 569210, mean: 943.76, max: 1443, stddev: 127.41
packets per second: 113840.36, bytes per second: 116574208
packets num: 569209, mean: 942.34, max: 1363, stddev: 126.72
packets per second: 113840.18, bytes per second: 116574003
packets num: 569202, mean: 943.43, max: 1495, stddev: 127.88
packets per second: 113839.85, bytes per second: 116572569
-f -s 1024 -b 30 -n
packets num: 373461, mean: 950.15, max: 1351, stddev: 122.45
packets per second: 74691.80, bytes per second: 76484812
packets num: 373494, mean: 954.28, max: 1538, stddev: 125.60
packets per second: 74697.81, bytes per second: 76491571
packets num: 373786, mean: 952.16, max: 1505, stddev: 124.79
packets per second: 74756.24, bytes per second: 76551372
packets num: 373564, mean: 953.37, max: 1500, stddev: 125.18
packets per second: 74712.34, bytes per second: 76505907
-f -s 100 -b 30
packets num: 1208114, mean: 474.45, max: 1849, stddev: 117.70
packets per second: 241616.37, bytes per second: 24162280
packets num: 1223365, mean: 475.24, max: 2273, stddev: 117.12
packets per second: 244669.28, bytes per second: 24467300
packets num: 1231103, mean: 470.03, max: 2509, stddev: 107.01
packets per second: 246219.42, bytes per second: 24622060
packets num: 1242466, mean: 467.69, max: 2753, stddev: 114.55
packets per second: 248488.53, bytes per second: 24849320
-f -s 100 -b 30 -n
packets num: 1044677, mean: 785.11, max: 3635, stddev: 417.51
packets per second: 208933.60, bytes per second: 20893540
packets num: 1054100, mean: 765.59, max: 3259, stddev: 399.20
packets per second: 210818.74, bytes per second: 21082000
packets num: 1051835, mean: 726.04, max: 3403, stddev: 369.04
packets per second: 210365.91, bytes per second: 21036700
packets num: 1048108, mean: 743.42, max: 3440, stddev: 390.79
packets per second: 209620.38, bytes per second: 20962160
-b 3000 -f -s 1024
packets num: 569200, mean: 948.99, max: 1507, stddev: 130.52
packets per second: 113838.77, bytes per second: 116572160
packets num: 569204, mean: 940.57, max: 1307, stddev: 125.34
packets per second: 113840.28, bytes per second: 116572979
packets num: 569193, mean: 957.70, max: 1545, stddev: 138.00
packets per second: 113836.62, bytes per second: 116570726
packets num: 569205, mean: 947.59, max: 1505, stddev: 130.55
packets per second: 113839.91, bytes per second: 116573184
packets num: 569205, mean: 943.81, max: 1395, stddev: 126.93
packets per second: 113840.36, bytes per second: 116573184
-b 3000 -f -s 1024 -n:
packets num: 373661, mean: 952.37, max: 1509, stddev: 131.57
packets per second: 74731.71, bytes per second: 76525772
packets num: 373678, mean: 951.38, max: 1525, stddev: 130.43
packets per second: 74734.52, bytes per second: 76529254
packets num: 373717, mean: 947.87, max: 1499, stddev: 127.31
packets per second: 74742.53, bytes per second: 76537241
packets num: 373727, mean: 944.58, max: 1491, stddev: 125.06
packets per second: 74744.29, bytes per second: 76539289
-f -s 100 -b 3000
packets num: 1380128, mean: 1345.93, max: 4422, stddev: 164.48
packets per second: 276023.28, bytes per second: 27602560
packets num: 1430723, mean: 1379.40, max: 2498, stddev: 45.08
packets per second: 286138.19, bytes per second: 28614460
packets num: 1450128, mean: 1353.45, max: 2589, stddev: 52.73
packets per second: 290024.56, bytes per second: 29002560
packets num: 1422040, mean: 1392.20, max: 2539, stddev: 50.48
packets per second: 284404.25, bytes per second: 28440800
packets num: 1391757, mean: 1422.72, max: 2604, stddev: 50.74
packets per second: 278349.79, bytes per second: 27835140
-f -s 100 -n -b 3000
packets num: 1088358, mean: 828.90, max: 20103, stddev: 660.55
packets per second: 217668.99, bytes per second: 21767160
packets num: 1225010, mean: 1018.98, max: 10186, stddev: 538.93
packets per second: 245000.28, bytes per second: 24500200
packets num: 1090276, mean: 899.01, max: 5032, stddev: 562.04
packets per second: 218001.96, bytes per second: 21805520
recvmmsg.c:
#include "linux/arch/x86/include/asm/unistd.h"
#include <stdlib.h>
#include <syscall.h>
#include <stdio.h>
#include <sys/socket.h>
#include <unistd.h>
#include <netinet/in.h>
#include <netinet/tcp.h>
#include <arpa/inet.h>
#include <netdb.h>
#include <poll.h>
#include <string.h>
#include <sys/time.h>
#include <time.h>
#include <math.h>
#include <sched.h>
#include <fcntl.h>
#include <sys/mman.h>
struct mmsghdr {
struct msghdr msg_hdr;
unsigned msg_len;
};
#ifndef NSEC_PER_MSEC
#define NSEC_PER_MSEC 1000000UL
#endif
/* Set a fd into nonblocking mode. */
int set_nonblocking(int fd)
{
int val;
if ((val = fcntl(fd, F_GETFL)) == -1)
return -1;
if (!(val & O_NONBLOCK)) {
val |= O_NONBLOCK;
return fcntl(fd, F_SETFL, val);
}
return 0;
}
static int recvmmsg(int fd, struct mmsghdr *mmsg,
unsigned vlen, unsigned flags,
struct timespec *timeout)
{
return syscall(__NR_recvmmsg, fd, mmsg, vlen, flags, timeout);
}
static int reg_recvmsg(int fd, struct mmsghdr *mmsg,
unsigned vlen, unsigned flags,
struct timespec *timeout)
{
int i;
int ret = -1;
for (i=0; i<vlen; i++){
int tmp = recvmsg(fd, &mmsg[i].msg_hdr, flags);
if (tmp < 0)
break;
mmsg[i].msg_len = tmp;
ret++;
}
return ret;
}
static int reg_sendmsg(int fd, struct mmsghdr *mmsg,
unsigned vlen, unsigned flags,
struct timespec *timeout)
{
int i;
int ret = 0;
for (i=0; i<vlen; i++){
int tmp = sendmsg(fd, &mmsg[i].msg_hdr, flags);
if (tmp <= 0){
ret = tmp;
break;
}
mmsg[i].msg_len = tmp;
ret++;
}
return ret;
}
static unsigned long long micro_time()
{
struct timeval tv;
gettimeofday(&tv, NULL);
return tv.tv_sec*NSEC_PER_MSEC+tv.tv_usec;
}
typedef int (*send_packets_f)(int fd, struct mmsghdr *mmsg, unsigned vlen,
unsigned flags, struct timespec *timeout);
typedef int (*recv_packets_f)(int fd, struct mmsghdr *mmsg, unsigned vlen,
unsigned flags, struct timespec *timeout);
//sockets must be bound/connected
static void producer(const int batch_size,
const int packet_size,
int send_sock,
send_packets_f send_f)
{
char buf[batch_size][packet_size];
struct iovec iovec[batch_size];
struct mmsghdr datagrams[batch_size];
int i;
for (i = 0; i < batch_size; ++i) {
memset(&datagrams[i].msg_hdr, 0, sizeof(datagrams[i].msg_hdr));
iovec[i].iov_base = buf[i];
iovec[i].iov_len = sizeof(buf[i]);
datagrams[i].msg_hdr.msg_iov = &iovec[i];
datagrams[i].msg_hdr.msg_iovlen = 1;
}
while (1){
//generate batch_size packets of packet_size, stamp them, and send
int send_num = 0;
for (i = 0; i < batch_size; ++i) {
unsigned long long *stamp =
(unsigned long long *) &buf[i][0];
*stamp = micro_time();
}
send_num = send_f(send_sock, datagrams, batch_size, 0, 0);
if (send_num < batch_size){
printf("could not send entire batch: %d %m\n", send_num);
continue;
}
}
}
//sockets must be bound/connected
static void consumer(const int batch_size,
const int packet_size,
int recv_sock,
recv_packets_f recv_f)
{
char buf[batch_size][packet_size];
struct iovec iovec[batch_size];
struct mmsghdr datagrams[batch_size];
int i;
unsigned long long start_time = micro_time();
unsigned long long max = 0;
double mean = 0;
double m2 = 0;
int n = 0;
if (set_nonblocking(recv_sock) != 0)
printf("recv socket is in blocking mode\n");
else
printf("recv socket is in non-blocking mode\n");
for (i = 0; i < batch_size; ++i) {
memset(&datagrams[i].msg_hdr, 0, sizeof(datagrams[i].msg_hdr));
iovec[i].iov_base = buf[i];
iovec[i].iov_len = sizeof(buf[i]);
datagrams[i].msg_hdr.msg_iov = &iovec[i];
datagrams[i].msg_hdr.msg_iovlen = 1;
}
struct pollfd pfds[1] = {
[0] = {
.fd = recv_sock,
.events = POLLIN,
},
};
while (1){
unsigned long long now;
if (poll(pfds, 1, -1) < 0) {
perror("poll: ");
exit(0);
}
int ret = recv_f(recv_sock, &datagrams[0], batch_size, 0, 0);
if (ret < 0){
perror("consumer recv: ");
exit(0);
}
//go over all received packets, and count latency:
now = micro_time();
for (i = 0; i < ret; ++i) {
double delta;
unsigned long long *stamp =
(unsigned long long *) &buf[i];
unsigned long long sample =
now - *stamp;
n++;
delta = sample - mean;
mean += delta/n;
m2 += delta*(sample-mean);
if (max < sample)
max = sample;
}
if (micro_time() - start_time >= 5000000){
printf("packets num: %d, mean: %.2f, max: %llu, stddev: %.2f\n",
n, mean, max, sqrt(m2/(n-1)));
printf("packets per second: %.2f, bytes per second: %lld\n",
n / ((micro_time() - start_time)/1000000.0),
n*packet_size / ((micro_time() - start_time)/1000000));
start_time = micro_time();
n = 0;
mean = 0;
m2 = 0;
max = 0;
}
}
}
//sockets must be bound/connected
static void mirror(const int batch_size,
const int packet_size,
int send_sock,
int recv_sock,
send_packets_f send_f,
recv_packets_f recv_f)
{
char buf[batch_size][packet_size];
struct iovec iovec[batch_size];
struct mmsghdr datagrams[batch_size];
int i;
if (set_nonblocking(recv_sock) != 0)
printf("recv socket is in blocking mode\n");
else
printf("recv socket is in non-blocking mode\n");
for (i = 0; i < batch_size; ++i) {
memset(&datagrams[i].msg_hdr, 0, sizeof(datagrams[i].msg_hdr));
iovec[i].iov_base = buf[i];
iovec[i].iov_len = sizeof(buf[i]);
datagrams[i].msg_hdr.msg_iov = &iovec[i];
datagrams[i].msg_hdr.msg_iovlen = 1;
datagrams[i].msg_hdr.msg_name = NULL;
}
while (1){
int send_num = 0;
int recv_num = 0;
struct pollfd pfds[1] = {
[0] = {
.fd = recv_sock,
.events = POLLIN,
},
};
if (poll(pfds, 1, -1) < 0) {
perror("poll: ");
exit(0);
}
//printf("slave recv...\n");
recv_num = recv_f(recv_sock, &datagrams[recv_num],
batch_size-recv_num, 0, 0);
if (recv_num < 0) {
perror("mirror recv");
exit(0);
}
//printf("recv %d packets\n", recv_num);
while (send_num < recv_num){
int ret = send_f(send_sock, &datagrams[send_num], recv_num-send_num, 0, 0);
if (ret < 0){
perror("mirror send");
exit(0);
}
send_num += ret;
//printf("sent %d packets\n", ret);
}
}
}
static void usage(char *app)
{
printf("Usage: %s\n"
" -n do not use recvmmsg\n"
" -r producer/consumer/mirror [producer]\n"
" -b recv_batch_size [8]\n"
" -l master_listen_port [5001]\n"
" -t send_to_host [localhost]\n"
" -p slave_listen_port [5002]\n"
" -s packet_size [256]\n"
" -f run in sched fifo\n"
" -m use mlockall\n"
" -h this help\n",
app);
}
int create_recv_sock(const char *port)
{
struct addrinfo *host;
struct addrinfo hints;
int fd = -1;
int err;
memset(&hints, 0, sizeof(struct addrinfo));
hints.ai_flags = AI_PASSIVE; /* For wildcard IP address */
hints.ai_family = AF_INET;
hints.ai_socktype = SOCK_DGRAM; /* Datagram socket */
hints.ai_protocol = 0; /* Any protocol */
hints.ai_canonname = NULL;
hints.ai_addr = NULL;
hints.ai_next = NULL;
err = getaddrinfo(NULL, port, &hints, &host);
if (err != 0) {
fprintf(stderr, "error using getaddrinfo: %s\n",
gai_strerror(err));
goto out;
}
fd = socket(host->ai_family, host->ai_socktype, host->ai_protocol);
if (fd < 0) {
perror("recv_sock: ");
goto out_freeaddrinfo;
}
if (bind(fd, host->ai_addr, host->ai_addrlen) < 0) {
perror("recv_sock bind");
close(fd);
}
out_freeaddrinfo:
freeaddrinfo(host);
out:
return fd;
}
int create_send_sock(const char *host, const char *port)
{
int fd = -1;
struct addrinfo *send_host;
struct addrinfo hints;
int err;
memset(&hints, 0, sizeof(struct addrinfo));
hints.ai_flags = AI_PASSIVE; /* For wildcard IP address */
hints.ai_family = AF_INET;
hints.ai_socktype = SOCK_DGRAM; /* Datagram socket */
hints.ai_protocol = 0; /* Any protocol */
hints.ai_canonname = NULL;
hints.ai_addr = NULL;
hints.ai_next = NULL;
err = getaddrinfo(host, port, &hints, &send_host);
if (err != 0) {
fprintf(stderr, "error using getaddrinfo: %s\n",
gai_strerror(err));
goto out;
}
fd = socket(send_host->ai_family, send_host->ai_socktype,
send_host->ai_protocol);
if (fd < 0) {
perror("send_sock");
goto out_freeaddrinfo;
}
if (connect(fd, send_host->ai_addr, send_host->ai_addrlen) != 0) {
perror("send_sock connect");
close(fd);
}
out_freeaddrinfo:
freeaddrinfo(send_host);
out:
return fd;
}
int main(int argc, char *argv[])
{
const char *master_listen_port = "5001";
const char *slave_listen_port = "5002";
const char *listen_port;
const char *send_port;
const char *target_host = "localhost";
const char *role = "producer";
int batch_size = 8;
int packet_size = 256;
int use_mmsg = 1;
int s_fifo = 0;
int lock_mem = 0;
char c;
while ( (c=getopt(argc, argv, "mfhr:b:nl:t:p:s:")) != -1){
switch(c){
case 'r':
role = optarg;
break;
case 'b':
batch_size = atoi(optarg);
break;
case 'l':
master_listen_port = optarg;
break;
case 't':
target_host = optarg;
break;
case 'p':
slave_listen_port = optarg;
break;
case 'n':
use_mmsg = 0;
break;
case 'm':
lock_mem = 1;
break;
case 'f':
s_fifo = 1;
break;
case 's':
packet_size = atoi(optarg);
break;
case 'h':
default:
usage(argv[0]);
exit(0);
}
}
//set scheduling to SCHED_FIFO
struct sched_param params;
params.sched_priority = 99;
if (s_fifo && sched_setscheduler(getpid(), SCHED_FIFO, ¶ms) != 0){
perror("sched_setscheduler");
}
if (sched_getscheduler(getpid()) != SCHED_FIFO)
printf("not running in SCHED_FIFO\n");
else
printf("running in SCHED_FIFO\n");
if (lock_mem){
if (mlockall(MCL_CURRENT|MCL_FUTURE) != 0)
perror("mlockall failed");
else
printf("memory is locked\n");
}
if (strcmp(role, "producer") == 0 ||
strcmp(role, "consumer") == 0){
listen_port = master_listen_port;
send_port = slave_listen_port;
} else {
listen_port = slave_listen_port;
send_port = master_listen_port;
}
if (strcmp(role, "producer") == 0){
int send_sock = create_send_sock(target_host, send_port);
if (send_sock < 0){
perror("send sock");
goto out;
}
if (use_mmsg){
printf("starting producer with mmsg\n");
producer(batch_size,
packet_size,
send_sock,
reg_sendmsg);
} else {
printf("starting producer without mmsg\n");
producer(batch_size,
packet_size,
send_sock,
reg_sendmsg);
}
} else if (strcmp(role, "consumer") == 0){
int recv_sock = create_recv_sock(listen_port);
if (recv_sock < 0){
perror("recv_sock ");
goto out;
}
if (use_mmsg){
printf("starting consumer with mmsg\n");
consumer(batch_size,
packet_size,
recv_sock,
recvmmsg);
} else {
printf("starting consumer without mmsg\n");
consumer(batch_size,
packet_size,
recv_sock,
reg_recvmsg);
}
} else if (strcmp(role, "mirror") == 0){
int recv_sock = create_recv_sock(listen_port);
int send_sock = create_send_sock(target_host, send_port);
if (send_sock < 0){
perror("send sock");
goto out;
}
if (recv_sock < 0){
perror("recv_sock ");
goto out;
}
if (use_mmsg){
printf("starting mirror with mmsg\n");
mirror(batch_size,
packet_size,
send_sock,
recv_sock,
reg_sendmsg,
recvmmsg);
} else {
printf("starting mirror without mmsg\n");
mirror(batch_size,
packet_size,
send_sock,
recv_sock,
reg_sendmsg,
reg_recvmsg);
}
} else {
printf("please specify role as either master or slave\n");
}
out:
return 0;
}
^ permalink raw reply
* Re: [PATCHv5 3/3] vhost_net: a kernel-level virtio server
From: Javier Guerra @ 2009-09-17 14:16 UTC (permalink / raw)
To: Gregory Haskins
Cc: Avi Kivity, Michael S. Tsirkin, Ira W. Snyder, netdev,
virtualization, kvm, linux-kernel, mingo, linux-mm, akpm, hpa,
Rusty Russell, s.hetze, alacrityvm-devel
In-Reply-To: <4AB1A8FD.2010805@gmail.com>
On Wed, Sep 16, 2009 at 10:11 PM, Gregory Haskins
<gregory.haskins@gmail.com> wrote:
> It is certainly not a requirement to make said
> chip somehow work with existing drivers/facilities on bare metal, per
> se. Why should virtual systems be different?
i'd guess it's an issue of support resources. a hardware developer
creates a chip and immediately sells it, getting small but assured
revenue, with it they write (or pays to write) drivers for a couple of
releases, and stop to manufacture it as soon as it's not profitable.
software has a much longer lifetime, especially at the platform-level
(and KVM is a platform for a lot of us). also, being GPL, it's cheaper
to produce but has (much!) more limited resources. creating a new
support issue is a scary thought.
--
Javier
^ permalink raw reply
* Re: [PATCH 1/2] wl12xx: switch to %pM to print the mac address
From: Jean-Christophe PLAGNIOL-VILLARD @ 2009-09-17 14:42 UTC (permalink / raw)
To: John W. Linville; +Cc: Ben Hutchings, netdev
In-Reply-To: <20090917125521.GA2577@tuxdriver.com>
On 08:55 Thu 17 Sep , John W. Linville wrote:
> On Thu, Sep 17, 2009 at 02:22:51AM +0100, Ben Hutchings wrote:
> > On Thu, 2009-09-17 at 02:07 +0200, Jean-Christophe PLAGNIOL-VILLARD
> > wrote:
> > > Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
> > > ---
> > > drivers/net/wireless/wl12xx/wl1271_main.c | 3 +--
> > > 1 files changed, 1 insertions(+), 2 deletions(-)
> > >
> > > diff --git a/drivers/net/wireless/wl12xx/wl1271_main.c b/drivers/net/wireless/wl12xx/wl1271_main.c
> > > index d9169b4..f6f8895 100644
> > > --- a/drivers/net/wireless/wl12xx/wl1271_main.c
> > > +++ b/drivers/net/wireless/wl12xx/wl1271_main.c
> > > @@ -644,11 +644,10 @@ static int wl1271_op_config_interface(struct ieee80211_hw *hw,
> > > {
> > > struct wl1271 *wl = hw->priv;
> > > struct sk_buff *beacon;
> > > - DECLARE_MAC_BUF(mac);
> > > int ret;
> > >
> > > wl1271_debug(DEBUG_MAC80211, "mac80211 config_interface bssid %s",
> > > - print_mac(mac, conf->bssid));
> > > + printf("%pM", conf->bssid);
> > > wl1271_dump_ascii(DEBUG_MAC80211, "ssid: ", conf->ssid,
> > > conf->ssid_len);
> > >
> >
> > That isn't even syntactically valid, let alone correct.
>
> Ugh, you're right -- remind me not to ACK things before bed...
>
> Jean-Christophe posted a new patch that looked better, although it
> probably needs to be rebased on this one since I think Dave applied
> it after my (misguided) ACK.
ok I'll do asap really sorry
Best Regards,
J.
^ permalink raw reply
* Transmit timeouts with forcedeth card in 2.6.30.4
From: Chris Webb @ 2009-09-17 15:47 UTC (permalink / raw)
To: netdev, linux-kernel
In-Reply-To: <20090915224925.GA4630@alpha.arachsys.com>
Hi. I'm occasionally seeing the following transmit time-out from a forcedeth
ethernet interface with linux 2.6.30.4. We have a cluster of identical machines
with Supermicro H8DMT motherboards on which there are two such interfaces
integrated, and these errors appear on random machines across the cluster,
about once every two or three weeks per machine.
Following this error, it is impossible to ping in or out, but it is restored
back to life by a simple
ip link set eth0 down
ip link set eth0 up
The eth0 is enslaved to a bridge and has the mtu set at the default 1500. A
second forcedeth nic in the same machine with mtu set at 9000 and not joined to
bridge doesn't seem to suffer from this problem, although it may have much
lower traffic in any case.
forcedeth: Reverse Engineered nForce ethernet driver. Version 0.64.
forcedeth 0000:00:08.0: setting latency timer to 64
nv_probe: set workaround bit for reversed mac addr
forcedeth 0000:00:08.0: ifname eth0, PHY OUI 0x5043 @ 2, addr 00:30:48:67:7d:7c
forcedeth 0000:00:08.0: highdma csum vlan pwrctl mgmt gbit lnktim msi desc-v3
[...]
WARNING: at net/sched/sch_generic.c:226 dev_watchdog+0x130/0x1da()
Hardware name: H8DMT
NETDEV WATCHDOG: eth0 (forcedeth): transmit timed out
Modules linked in:
Pid: 0, comm: swapper Tainted: G M 2.6.30.4-elastic-lon-b #2
Call Trace:
<IRQ> [<ffffffff80257fa5>] warn_slowpath_common+0x77/0x8f
[<ffffffff8025800a>] warn_slowpath_fmt+0x3c/0x3e
[<ffffffff80260a27>] ? lock_timer_base+0x27/0x4d
[<ffffffff8058a872>] dev_watchdog+0x130/0x1da
[<ffffffff80260068>] ? ptrace_detach+0x86/0x95
[<ffffffff802607fe>] run_timer_softirq+0x164/0x1dc
[<ffffffff8058a742>] ? dev_watchdog+0x0/0x1da
[<ffffffff8025ca61>] __do_softirq+0xdc/0x1e3
[<ffffffff8022bf6c>] call_softirq+0x1c/0x28
[<ffffffff8022d7c8>] do_softirq+0x34/0x72
[<ffffffff8025c6ed>] irq_exit+0x3f/0x8b
[<ffffffff8023ab59>] smp_apic_timer_interrupt+0x89/0x97
[<ffffffff8022b983>] apic_timer_interrupt+0x13/0x20
<EOI> [<ffffffff80231919>] ? default_idle+0x9d/0x118
[<ffffffff80231c41>] ? c1e_idle+0xe3/0xea
[<ffffffff8026efb6>] ? atomic_notifier_call_chain+0xf/0x11
[<ffffffff8022a25c>] ? cpu_idle+0x52/0xb6
[<ffffffff808ce222>] ? start_secondary+0x1a4/0x1a8
---[ end trace 97f305223326b99b ]---
eth0: Got tx_timeout. irq: 00000036
eth0: Ring at 42596c000
eth0: Dumping tx registers
0: 00002036 00000000 00000003 0006000d 00000000 00000000 00000000 00000000
20: 00000000 00000000 00000000 00000000 00000001 00000000 00000000 00000000
40: 0420e20e 0000a855 00002e20 00000000 00000000 00000000 00000000 00000000
60: 00000000 00000000 00000000 0000ffff 0000ffff 0000ffff 0000ffff 00000000
80: 003b0f3c 00040001 00000000 007f0080 0000061c 00000001 00200000 80007f30
a0: 0016070f 00000016 67483000 00007c7d 00000001 00000000 00000000 00000000
c0: 10000001 00000001 00000001 00000001 00000001 00000001 00000001 00000001
e0: 00000001 00000001 00000001 00000001 00000001 00000001 00000001 00000001
100: 2596e000 2596c000 01ff00ff 00008000 00010064 00000000 0000004f 2596e150
120: 2596cb50 204308c0 a000fff2 00000000 00000000 2596e15c 2596cb50 01e08000
140: 00304120 80c02600 00000004 00000004 00000008 00000000 00000000 00000000
160: 00000004 00000004 00000004 00000004 01ff0080 0000c000 00000000 00000000
180: 00000006 00000008 0294796d 00008103 0000004a 00004000 00000591 0000c183
1a0: 00000006 00000008 0294796d 00008103 0000004a 00004000 0000059e 0000c583
1c0: 00000006 00000008 0294796d 00008103 0000004a 00004000 00000596 0000c583
1e0: 00000006 00000008 0294796d 00008103 0000004a 00004000 0000059b 0000c583
200: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
220: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
240: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
260: 00000000 00000000 fe027001 00000100 00000011 000000a3 fe027011 000001a3
280: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
2a0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
2c0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
2e0: 00000000 00000000 00000000 00000000 00000000 00000001 00000001 00000001
300: 80212000 00000000 00000000 00000000 00000000 00002000 00000000 00000000
320: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
340: 00000000 00000000 00000000 00000000 00000000 00000020 d104438f 00000000
360: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
380: 00000000 00000000 00000000 00000000 00000000 00000000 00000002 00000000
3a0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
3c0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
3e0: 06255300 00701365 00000000 00000000 00000032 00000000 00000000 00000000
400: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
420: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
440: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
460: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
480: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
4a0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
4c0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
4e0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
500: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
520: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
540: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
560: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
580: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
5a0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
5c0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
5e0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
600: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
eth0: Dumping tx ring
000: 00000005 d4ea5802 20000029 // 00000006 92398802 20000029 // 00000004 423a0c02 20000029 // 00000
004: 00000005 dc2bf422 20000040 // 00000005 dc2b8422 20000062 // 00000005 dc2b8c22 2000005c // 00000
008: 00000008 20437c22 20000095 // 00000008 20432022 20000095 // 00000008 20435c22 20000095 // 00000
00c: 00000006 0aa3d822 2000006e // 00000004 fa8d3022 200005c6 // 00000005 7806f022 2000059e // 00000
010: 00000008 20435022 20000095 // 00000008 20437022 20000095 // 00000008 20435822 20000095 // 00000
014: 00000008 20430822 20000095 // 00000006 0aa38822 20000069 // 00000005 61eb3022 200005e9 // 00000
018: 00000005 7806d822 20000599 // 00000008 20436c22 20000090 // 00000008 20432c22 20000090 // 00000
01c: 00000008 20436822 20000090 // 00000005 7806f822 200005b7 // 00000008 206c8c22 2000003c // 00000
020: 00000008 206cc822 20000090 // 00000008 206ce022 20000090 // 00000008 206cc422 20000090 // 00000
024: 00000008 206c9022 20000090 // 00000008 206c8422 20000090 // 00000008 206cb422 2000003d // 00000
028: 00000005 0c077022 200005d5 // 00000005 7806a822 20000599 // 00000008 206ca822 20000090 // 00000
02c: 00000008 206cbc22 20000090 // 00000008 206c9c22 20000090 // 00000006 0aa3ac02 20000029 // 00000
030: 00000006 0aa3dc22 20000090 // 00000006 0aa3cc22 20000090 // 00000006 0aa3d422 20000090 // 00000
034: 00000006 0aa3bc22 20000090 // 00000006 0aa3a022 20000090 // 00000006 0aa39402 20000029 // 00000
038: 00000001 c34fe402 20000029 // 00000004 3683e022 200005e1 // 00000006 0aa3e422 200000a0 // 00000
03c: 00000006 0aa3c422 20000090 // 00000006 0aa3f822 20000090 // 00000006 0aa3b422 20000090 // 00000
040: 00000001 c34fdc22 20000069 // 00000001 c34fd402 20000029 // 00000008 25736022 200000a0 // 00000
044: 00000008 25731022 20000090 // 00000008 25734422 20000090 // 00000008 25735c22 20000090 // 00000
048: 00000008 25732422 20000090 // 00000005 dc2b9402 2c000059 // 00000008 25735002 20000029 // 00000
04c: 00000006 000fbc02 2c000059 // 00000008 25abc002 20000029 // 00000008 25abb002 20000029 // 00000
050: 00000005 dc2bd002 20000029 // 00000008 25ab8c02 20000029 // 00000006 249f5402 20000029 // 00000
054: 00000008 25abfc02 20000029 // 00000006 249f5802 20000029 // 00000005 dc2ba002 20000029 // 00000
058: 00000006 249f0402 20000029 // 00000008 254de402 20000029 // 00000008 254df802 20000029 // 00000
05c: 00000005 dc2ba822 20000041 // 00000006 25091c02 20000029 // 00000006 25096422 20000041 // 00000
060: 00000005 dc2b9002 20000029 // 00000006 25091402 20000029 // 00000006 249f6c22 20000041 // 00000
064: 00000008 2022b002 20000029 // 00000006 25090c02 20000029 // 00000005 e597f802 20000029 // 00000
068: 00000006 25093402 20000029 // 00000006 25093002 20000029 // 00000006 000f9802 20000029 // 00000
06c: 00000006 249f2422 2000003f // 00000006 000fcc02 20000029 // 00000006 249f1802 20000029 // 00000
070: 00000005 dc2ba402 20000029 // 00000005 dc2bc002 20000029 // 00000005 e597f402 20000029 // 00000
074: 00000008 206cd802 20000029 // 00000005 e580d402 20000029 // 00000006 000ff002 20000029 // 00000
078: 00000006 249f2c02 20000029 // 00000006 249f7802 20000029 // 00000008 2022c802 20000029 // 00000
07c: 00000006 000f9c02 20000029 // 00000006 249f3802 20000029 // 00000005 dc2bec02 20000029 // 00000
080: 00000005 e597b802 20000029 // 00000003 9a19cc02 20000029 // 00000003 9a19f802 20000029 // 00000
084: 00000004 25992c02 20000029 // 00000006 249f2802 20000029 // 00000004 25994c02 20000029 // 00000
088: 00000006 000f8402 20000029 // 00000005 dc2b9c02 20000029 // 00000006 25091002 20000029 // 00000
08c: 00000006 000f9422 2000003f // 00000006 000fa822 2000003f // 00000006 9239ac02 20000029 // 00000
090: 00000006 0aa38402 20000029 // 00000001 c34fc002 20000029 // 00000008 2022ac02 20000029 // 00000
094: 00000001 c34f9802 20000029 // 00000008 20433c02 20000029 // 00000005 e580d802 20000029 // 00000
098: 00000005 e5978002 20000029 // 00000001 c34fbc22 2000003f // 00000001 c34fcc02 20000029 // 00000
09c: 00000006 25096802 20000029 // 00000001 c34ff802 20000029 // 00000005 e580f402 20000029 // 00000
0a0: 00000005 e580b802 20000029 // 00000006 000fe802 20000029 // 00000001 c34fa402 20000029 // 00000
0a4: 00000005 e580b402 20000029 // 00000001 c34ffc02 20000029 // 00000001 c34f9002 20000029 // 00000
0a8: 00000001 c34fe002 20000029 // 00000005 dc2b9802 20000029 // 00000001 c34ff002 20000029 // 00000
0ac: 00000006 9239dc02 20000029 // 00000001 c34fe802 20000029 // 00000006 9239c802 20000029 // 00000
0b0: 00000001 c34f9402 20000029 // 00000006 9239d002 20000029 // 00000005 dc2bc402 20000029 // 00000
0b4: 00000006 249f1c02 20000029 // 00000006 000fc402 20000029 // 00000001 c34fd802 20000029 // 00000
0b8: 00000006 249f5c02 20000029 // 00000001 c34f8002 20000029 // 00000006 92398c02 20000029 // 00000
0bc: 00000001 c34f8402 20000029 // 00000001 c34ff402 20000029 // 00000008 206cb802 20000029 // 00000
0c0: 00000005 e5978c02 20000029 // 00000005 e5978802 20000029 // 00000001 c34fc402 20000029 // 00000
0c4: 00000005 e597e002 20000029 // 00000003 9a199c02 20000029 // 00000005 dc2bb402 20000029 // 00000
0c8: 00000005 e597fc02 20000029 // 00000003 9a19d002 20000029 // 00000005 e597d402 20000029 // 00000
0cc: 00000005 e580fc02 20000029 // 00000003 9a198c02 20000029 // 00000005 e580a402 20000029 // 00000
0d0: 00000003 9a19b002 20000029 // 00000004 25652002 20000029 // 00000004 25656002 20000029 // 00000
0d4: 00000005 e580dc02 20000029 // 00000004 25650802 20000029 // 00000005 e580ec02 20000029 // 00000
0d8: 00000006 000fe402 20000029 // 00000004 23942802 20000029 // 00000004 25997c02 20000029 // 00000
0dc: 00000004 25994802 20000029 // 00000004 25995802 20000029 // 00000006 92399802 20000029 // 00000
0e0: 00000006 92398002 20000029 // 00000004 23940802 20000029 // 00000006 9239d402 20000029 // 00000
0e4: 00000004 25993802 20000029 // 00000004 25995c02 20000029 // 00000004 25996002 20000029 // 00000
0e8: 00000004 25997402 20000029 // 00000003 9a19dc02 20000029 // 00000004 25917c02 20000029 // 00000
0ec: 00000004 25914c02 20000029 // 00000004 25914802 20000029 // 00000004 25911402 20000029 // 00000
0f0: 00000006 9239b402 20000029 // 00000001 c34fac02 20000029 // 00000006 92399002 20000029 // 00000
0f4: 00000006 92398402 20000029 // 00000001 c34fb002 20000029 // 00000005 d4ea4802 20000029 // 00000
0f8: 00000003 f5818c02 20000029 // 00000008 206ccc02 20000029 // 00000003 f581ec02 20000029 // 00000
0fc: 00000008 206cd402 20000029 // 00000003 f581c002 20000029 // 00000006 9239f802 20000029 // 00000
Best wishes,
Chris.
^ permalink raw reply
* Re: fanotify as syscalls
From: Linus Torvalds @ 2009-09-17 16:40 UTC (permalink / raw)
To: Jamie Lokier
Cc: Evgeniy Polyakov, Eric Paris, David Miller, linux-kernel,
linux-fsdevel, netdev, viro, alan, hch
In-Reply-To: <20090916122723.GE29359@shareable.org>
On Wed, 16 Sep 2009, Jamie Lokier wrote:
>
> I'd forgotten about Linus' strace argument. That's a good one.
>
> Of course everything should be a syscall by that argument :-)
Oh yes, everything _should_ be a syscall.
The problem is that many things are too "amorphous" to be system calls,
and don't have any sane generic semantics (ie they only act on a specific
device node). So we have ioctl's etc for those things.
And then we have page faults. I've long wished that from a system call
tracing standpoint we could show page faults as pseudo-system-calls (at
least as long as they happen from user space - trying to handle nesting is
not worth it). It would make it _so_ much more obvious what the
performance patterns are if you could just do
strace -ttT firefox
for the cold-cache case and you'd see where the time is really spent.
(yeah, yeah, you can get that kind of information other ways, but it's a
hell of a lot less convenient than just getting a nice trace with
timestamps).
> And strace can trace some ioctls and setsockopts. (But it's never
> pretty to see isatty() showing in strace as SNDCTL_TMR_TIMEBASE :-)
Yes, strace can fix things up, and show "send a packet" as "fanotify". But
it's nasty and hard.
Quite frankly, I have _never_ever_ seen a good reason for talking to the
kernel with some idiotic packet interface. It's just a fancy way to do
ioctl's, and everybody knows that ioctl's are bad and evil. Why are fancy
packet interfaces suddenly much better?
Linus
^ permalink raw reply
* Re: [PATCH] d44: the poll handler b44_poll must not enable IRQ unconditionally
From: Matt Mackall @ 2009-09-17 16:45 UTC (permalink / raw)
To: DDD; +Cc: davem, romieu, netdev
In-Reply-To: <1253153447.24160.12.camel@dengdd-desktop>
On Thu, Sep 17, 2009 at 10:10:47AM +0800, DDD wrote:
> net/core/netpoll.c::netpoll_send_skb() calls the poll handler when
> it is available. As netconsole can be used from almost any context,
> IRQ must not be enabled blindly in the NAPI handler of the driver
> which supports netpoll.
>
> Call trace:
> netpoll_send_skb()
> {
> local_irq_save(flags)
> -> netpoll_poll()
> -> poll_napi()
> -> poll_one_napi()
> -> napi->poll()
> -> b44_poll()
> local_irq_restore(flags)
> }
>
> Signed-off-by: Dongdong Deng <dongdong.deng@windriver.com>
Acked-by: Matt Mackall <mpm@selenic.com>
> ---
> drivers/net/b44.c | 7 +++----
> 1 files changed, 3 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/net/b44.c b/drivers/net/b44.c
> index 0189dcd..e046943 100644
> --- a/drivers/net/b44.c
> +++ b/drivers/net/b44.c
> @@ -847,23 +847,22 @@ static int b44_poll(struct napi_struct *napi, int budget)
> {
> struct b44 *bp = container_of(napi, struct b44, napi);
> int work_done;
> + unsigned long flags;
>
> - spin_lock_irq(&bp->lock);
> + spin_lock_irqsave(&bp->lock, flags);
>
> if (bp->istat & (ISTAT_TX | ISTAT_TO)) {
> /* spin_lock(&bp->tx_lock); */
> b44_tx(bp);
> /* spin_unlock(&bp->tx_lock); */
> }
> - spin_unlock_irq(&bp->lock);
> + spin_unlock_irqrestore(&bp->lock, flags);
>
> work_done = 0;
> if (bp->istat & ISTAT_RX)
> work_done += b44_rx(bp, budget);
>
> if (bp->istat & ISTAT_ERRORS) {
> - unsigned long flags;
> -
> spin_lock_irqsave(&bp->lock, flags);
> b44_halt(bp);
> b44_init_rings(bp);
> --
> 1.6.0.4
>
--
Mathematics is the supreme nostalgia of our time.
^ permalink raw reply
* Re: [PATCH 1/2] wl12xx: switch to %pM to print the mac address
From: David Miller @ 2009-09-17 17:19 UTC (permalink / raw)
To: plagnioj; +Cc: linville, bhutchings, netdev
In-Reply-To: <20090917144208.GH29905@game.jcrosoft.org>
From: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Date: Thu, 17 Sep 2009 16:42:08 +0200
> On 08:55 Thu 17 Sep , John W. Linville wrote:
>> Ugh, you're right -- remind me not to ACK things before bed...
>>
>> Jean-Christophe posted a new patch that looked better, although it
>> probably needs to be rebased on this one since I think Dave applied
>> it after my (misguided) ACK.
> ok I'll do asap really sorry
I've already fixed this in my tree.
^ permalink raw reply
* Re: [PATCH] ipv6: Log the affected address when DAD failure occurs
From: David Miller @ 2009-09-17 17:24 UTC (permalink / raw)
To: me; +Cc: netdev
In-Reply-To: <1253101477.10715.8.camel@fnki-nb00130>
From: Jens Rosenboom <me@jayr.de>
Date: Wed, 16 Sep 2009 13:44:37 +0200
> From: Jens Rosenboom <me@jayr.de>
>
> If an interface has multiple addresses, the current message for DAD
> failure isn't really helpful, so this patch adds the address itself to
> the printk.
>
> Signed-off-by: Jens Rosenboom <me@jayr.de>
Applied.
^ permalink raw reply
* Re: [PATCH] pkt_sched: Fix qstats.qlen updating in dump_stats
From: David Miller @ 2009-09-17 17:26 UTC (permalink / raw)
To: jarkao2; +Cc: kaber, netdev
In-Reply-To: <20090916103838.GA9719@ff.dom.local>
From: Jarek Poplawski <jarkao2@gmail.com>
Date: Wed, 16 Sep 2009 10:38:38 +0000
> Some classful qdiscs miss qstats.qlen updating with q.qlen of their
> child qdiscs in dump_stats methods.
>
> Signed-off-by: Jarek Poplawski <jarkao2@gmail.com>
Applied, thanks.
^ permalink raw reply
* Re: [Patch net-next]atl1e:fix 2.6.31-git4 -- ATL1E 0000:03:00.0: DMA-API: device driver frees DMA
From: David Miller @ 2009-09-17 17:27 UTC (permalink / raw)
To: jie.yang; +Cc: miles.lane, chris.snook, jcliburn, netdev, linux-kernel
In-Reply-To: <12530933101782-git-send-email-jie.yang@atheros.com>
From: <jie.yang@atheros.com>
Date: Wed, 16 Sep 2009 17:28:30 +0800
> use the wrong API when free dma. So when map dma use a flag to demostrate whether it is 'pci_map_single' or 'pci_map_page'. When free the dma, check the flags to select the right APIs('pci_unmap_single' or 'pci_unmap_page').
>
> set the flags type to u16 instead of unsigned long on David's comments.
>
> Signed-off-by: Jie Yang <jie.yang@atheros.com>
Applied.
^ permalink raw reply
* Re: [crash] kernel BUG at net/core/pktgen.c:3503!
From: David Miller @ 2009-09-17 17:29 UTC (permalink / raw)
To: gorcunov; +Cc: mingo, torvalds, akpm, netdev, linux-kernel
In-Reply-To: <20090915185112.GA17587@lenovo>
From: Cyrill Gorcunov <gorcunov@gmail.com>
Date: Tue, 15 Sep 2009 22:51:12 +0400
> [Ingo Molnar - Tue, Sep 15, 2009 at 08:36:47PM +0200]
> |
> | not sure which merge caused this, but i got this boot crash with latest
> | -git:
> |
> | calling flow_cache_init+0x0/0x1b9 @ 1
> | initcall flow_cache_init+0x0/0x1b9 returned 0 after 64 usecs
> | calling pg_init+0x0/0x37c @ 1
> | pktgen 2.72: Packet Generator for packet performance testing.
> | ------------[ cut here ]------------
> | kernel BUG at net/core/pktgen.c:3503!
> | invalid opcode: 0000 [#1] PREEMPT SMP DEBUG_PAGEALLOC
> | last sysfs file:
> |
>
> Hi Ingo,
>
> just curious, will the following patch fix the problem?
> I've been fixing problem with familiar symthoms on
> system with custome virtual cpu implementation so
> it may not help in mainline but anyway :)
Ingo, does Cyrill's patch help?
^ permalink raw reply
* Re: [net-next-2.6 PATCH] be2net: fix some cmds to use mccq instead of mbox
From: David Miller @ 2009-09-17 17:30 UTC (permalink / raw)
To: sathyap; +Cc: netdev
In-Reply-To: <20090917044331.GA14568@serverengines.com>
From: Sathya Perla <sathyap@serverengines.com>
Date: Thu, 17 Sep 2009 10:13:31 +0530
> All cmds issued to BE after the creation of mccq must now use the mcc-q
> (and not mbox) to avoid a hw issue that results in mbox poll timeout.
>
> Signed-off-by: Sathya Perla <sathyap@serverengines.com>
Applied, thanks.
^ permalink raw reply
* 2.6.31 / WARNING / tcp_input
From: Denys Fedoryschenko @ 2009-09-17 17:33 UTC (permalink / raw)
To: netdev
Nothing unusual in configs, heavily loaded HTTP proxy.
Some tunings:
sysctl -w net.core.somaxconn=4096
sysctl -w net.core.wmem_max=384000
kernel.panic_on_oops=1
kernel.panic=5
vm.min_free_kbytes=16384
net.ipv4.tcp_max_syn_backlog=10240
net.ipv4.conf.all.arp_filter=1
vm.panic_on_oom=2
net.core.netdev_max_backlog=4000
[ 123.221032] ------------[ cut here ]------------
[ 123.221183] WARNING: at net/ipv4/tcp_input.c:2920 tcp_ack+0xc6c/0x17bf()
[ 123.221316] Hardware name: PowerEdge 2900
[ 123.221438] Modules linked in: ext4 jbd2 mptspi mptsas scsi_transport_spi
scsi_transport_sas mptscsih mptbase xt_owner ipt_REDIRECT xt_tcpudp xt_dscp
iptable_raw iptable_nat nf_nat nf_conntrack_ipv4 nf_conntrack rtc_cmos
rtc_core rtc_lib nf_defrag_ipv4 iptable_filter ip_tables x_tables 8021q garp
stp llc loop usb_storage mtdblock mtd_blkdevs mtd iTCO_wdt
iTCO_vendor_support pata_acpi ata_piix ata_generic libata megaraid_sas bnx2
sr_mod cdrom tulip r8169 sky2 via_velocity via_rhine sis900 ne2k_pci 8390
skge tg3 libphy 8139too e1000 e100 usbhid ohci_hcd uhci_hcd ehci_hcd usbcore
nls_base
[ 123.225025] Pid: 0, comm: swapper Not tainted 2.6.31-build-0046-32bit #20
[ 123.225162] Call Trace:
[ 123.225289] [<c012d051>] warn_slowpath_common+0x60/0x90
[ 123.225415] [<c012d08e>] warn_slowpath_null+0xd/0x10
[ 123.225540] [<c02c8e15>] tcp_ack+0xc6c/0x17bf
[ 123.225665] [<c02ca51c>] tcp_rcv_established+0x6dc/0x8fd
[ 123.225791] [<c02cff7f>] tcp_v4_do_rcv+0x24/0x17e
[ 123.225915] [<c02d04c0>] tcp_v4_rcv+0x3e7/0x5a8
[ 123.226039] [<c02b953a>] ip_local_deliver_finish+0xb6/0x12e
[ 123.226174] [<c02b9613>] ip_local_deliver+0x61/0x6a
[ 123.226303] [<c02b9215>] ip_rcv_finish+0x29d/0x2b3
[ 123.226427] [<c02b9458>] ip_rcv+0x22d/0x259
[ 123.226552] [<c029d700>] netif_receive_skb+0x439/0x458
[ 123.226677] [<c02ab3ca>] ? eth_type_trans+0x25/0xa9
[ 123.226808] [<f84c1193>] bnx2_poll_work+0xffd/0x1137 [bnx2]
[ 123.226938] [<c012331a>] ? enqueue_task_fair+0x131/0x173
[ 123.227069] [<c011f015>] ? activate_task+0x3c/0x4b
[ 123.227206] [<f84c145f>] bnx2_poll+0xf8/0x1d8 [bnx2]
[ 123.227331] [<c029dc93>] net_rx_action+0x93/0x177
[ 123.227457] [<c0131ad9>] __do_softirq+0xa7/0x144
[ 123.227582] [<c0131a32>] ? __do_softirq+0x0/0x144
[ 123.227705] <IRQ> [<c0131853>] ? irq_exit+0x29/0x5c
[ 123.227876] [<c0104393>] ? do_IRQ+0x80/0x96
[ 123.228000] [<c0102f49>] ? common_interrupt+0x29/0x30
[ 123.228136] [<c0108a1e>] ? mwait_idle+0x8a/0xb9
[ 123.228266] [<c0101bf0>] ? cpu_idle+0x44/0x60
[ 123.228390] [<c02f90ed>] ? start_secondary+0x195/0x19a
[ 123.228515] ---[ end trace 22f267765b97f808 ]---
^ permalink raw reply
* Re: fanotify as syscalls
From: Arjan van de Ven @ 2009-09-17 17:35 UTC (permalink / raw)
To: Linus Torvalds
Cc: Jamie Lokier, Evgeniy Polyakov, Eric Paris, David Miller,
linux-kernel, linux-fsdevel, netdev, viro, alan, hch
In-Reply-To: <alpine.LFD.2.01.0909170934450.4950@localhost.localdomain>
On Thu, 17 Sep 2009 09:40:16 -0700 (PDT)
Linus Torvalds <torvalds@linux-foundation.org> wrote:
>
> And then we have page faults. I've long wished that from a system
> call tracing standpoint we could show page faults as
> pseudo-system-calls (at least as long as they happen from user space
> - trying to handle nesting is not worth it). It would make it _so_
> much more obvious what the performance patterns are if you could just
> do
>
> strace -ttT firefox
>
> for the cold-cache case and you'd see where the time is really spent.
>
> (yeah, yeah, you can get that kind of information other ways, but
> it's a hell of a lot less convenient than just getting a nice trace
> with timestamps).
ohhh I should add pagefaults to timechart
good one.
--
Arjan van de Ven Intel Open Source Technology Centre
For development, discussion and tips for power savings,
visit http://www.lesswatts.org
^ permalink raw reply
* Re: [PATCH 1/2] wl12xx: switch to %pM to print the mac address
From: Jean-Christophe PLAGNIOL-VILLARD @ 2009-09-17 17:31 UTC (permalink / raw)
To: David Miller; +Cc: linville, bhutchings, netdev
In-Reply-To: <20090917.101939.109704983.davem@davemloft.net>
On 10:19 Thu 17 Sep , David Miller wrote:
> From: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
> Date: Thu, 17 Sep 2009 16:42:08 +0200
>
> > On 08:55 Thu 17 Sep , John W. Linville wrote:
> >> Ugh, you're right -- remind me not to ACK things before bed...
> >>
> >> Jean-Christophe posted a new patch that looked better, although it
> >> probably needs to be rebased on this one since I think Dave applied
> >> it after my (misguided) ACK.
> > ok I'll do asap really sorry
>
> I've already fixed this in my tree.
Tks
Best Regards,
J/
^ permalink raw reply
* Re: [crash] kernel BUG at net/core/pktgen.c:3503!
From: Ingo Molnar @ 2009-09-17 17:44 UTC (permalink / raw)
To: David Miller; +Cc: gorcunov, torvalds, akpm, netdev, linux-kernel
In-Reply-To: <20090917.102923.174779685.davem@davemloft.net>
* David Miller <davem@davemloft.net> wrote:
> From: Cyrill Gorcunov <gorcunov@gmail.com>
> Date: Tue, 15 Sep 2009 22:51:12 +0400
>
> > [Ingo Molnar - Tue, Sep 15, 2009 at 08:36:47PM +0200]
> > |
> > | not sure which merge caused this, but i got this boot crash with latest
> > | -git:
> > |
> > | calling flow_cache_init+0x0/0x1b9 @ 1
> > | initcall flow_cache_init+0x0/0x1b9 returned 0 after 64 usecs
> > | calling pg_init+0x0/0x37c @ 1
> > | pktgen 2.72: Packet Generator for packet performance testing.
> > | ------------[ cut here ]------------
> > | kernel BUG at net/core/pktgen.c:3503!
> > | invalid opcode: 0000 [#1] PREEMPT SMP DEBUG_PAGEALLOC
> > | last sysfs file:
> > |
> >
> > Hi Ingo,
> >
> > just curious, will the following patch fix the problem?
> > I've been fixing problem with familiar symthoms on
> > system with custome virtual cpu implementation so
> > it may not help in mainline but anyway :)
>
> Ingo, does Cyrill's patch help?
For now i've turned pktgen off in my tests. Will check it again once
things have calmed down somewhat.
Also, i just tried to reproduce the pktgen crash with latest -git and
the config i sent - no luck, so i cannot test Cyrill's patch either.
Btw., we are seeing some other preempt count and task related
weirdnesses as well in other code, maybe it's related. No good pattern
yet to act upon.
Anyway - please disregard this bugreport until i've investigated it
closer.
Ingo
^ permalink raw reply
* Re: [crash] kernel BUG at net/core/pktgen.c:3503!
From: David Miller @ 2009-09-17 17:49 UTC (permalink / raw)
To: mingo; +Cc: gorcunov, torvalds, akpm, netdev, linux-kernel
In-Reply-To: <20090917174448.GA9548@elte.hu>
From: Ingo Molnar <mingo@elte.hu>
Date: Thu, 17 Sep 2009 19:44:48 +0200
> Anyway - please disregard this bugreport until i've investigated it
> closer.
Ok, thanks for the status update.
^ permalink raw reply
* Re: [crash] kernel BUG at net/core/pktgen.c:3503!
From: Cyrill Gorcunov @ 2009-09-17 17:51 UTC (permalink / raw)
To: Ingo Molnar; +Cc: David Miller, torvalds, akpm, netdev, linux-kernel
In-Reply-To: <20090917174448.GA9548@elte.hu>
[Ingo Molnar - Thu, Sep 17, 2009 at 07:44:48PM +0200]
...
|
| >
| > Ingo, does Cyrill's patch help?
|
| For now i've turned pktgen off in my tests. Will check it again once
| things have calmed down somewhat.
|
| Also, i just tried to reproduce the pktgen crash with latest -git and
| the config i sent - no luck, so i cannot test Cyrill's patch either.
|
| Btw., we are seeing some other preempt count and task related
| weirdnesses as well in other code, maybe it's related. No good pattern
| yet to act upon.
|
| Anyway - please disregard this bugreport until i've investigated it
| closer.
|
| Ingo
|
I'm unable to reproduce this issue too. I was trying
many ways (under kvm) -- no bug triggered. Though on
a system for which I had done this patch in first place
the bug was been hitting all the time (but it contains
custom vcpu management code, which is not our case here).
-- Cyrill
^ permalink raw reply
* [GIT]: Networking
From: David Miller @ 2009-09-17 17:54 UTC (permalink / raw)
To: torvalds; +Cc: akpm, netdev, linux-kernel
1) The idea to use ->close() and then a ->open() to refresh multicast
addresses in the bonding driver was a bad idea and breaks a bunch
of stuff. Better scheme from Moni Shoua.
2) Some TCP code still assuming ssthresh was a u16, oops. Fix from
Ilpo Järvinen.
3) RXRPC updates from David Howells.
4) genetlink table locking busted with netns, fix from Johannes Berg.
5) Several fixes for multiq packet scheduler fallout from Jarek Poplawski.
6) can receives packets in wrong context eliciting warnings from
local_softirq_pending(), fix from Oliver Hartkopp.
7) TCP MD5 code has preempt level imbalance, fix from Robert Varga.
8) SKY2 bug fixes from Stephen Hemminger.
9) Alexey Dobriyan is const'ified several protocol and ops structures.
10) Wireless bug fixes via John Linville.
11) IPV6 conformance fix wrt ROUTER_PREF_INVALID options and making
the DAD failure log message more informative, from Jens Rosenboom.
12) S390 IUCV stack fixes from Ursula Braun and Hendrik Brueckner.
13) ieee802154 stack fixes from Dmitry Eremin-Solenikov.
Please pull, thanks a lot!
The following changes since commit 4142e0d1def2c0176c27fd2e810243045a62eb6d:
Linus Torvalds (1):
Merge branch 'osync_cleanup' of git://git.kernel.org/.../jack/linux-fs-2.6
are available in the git repository at:
master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6.git master
Alexander Duyck (2):
igb: reset sgmii phy at start of init
igb: do not allow phy sw reset code to make calls to null pointers
Alexey Dobriyan (3):
net: constify struct net_protocol
net: constify struct inet6_protocol
net: constify remaining proto_ops
Christian Lamparter (1):
p54usb: add Zcomax XG-705A usbid
Daniel C Halperin (1):
iwlwifi: fix HT operation in 2.4 GHz band
David Howells (5):
RxRPC: Declare the security index constants symbolically
RxRPC: Allow key payloads to be passed in XDR form
RxRPC: Allow RxRPC keys to be read
RxRPC: Parse security index 5 keys (Kerberos 5)
RxRPC: Use uX/sX rather than uintX_t/intX_t types
David S. Miller (3):
Merge branch 'master' of git://git.kernel.org/.../linville/wireless-next-2.6
Merge branch 'for-linus' of git://git.kernel.org/.../lowpan/lowpan
wl12xx: Fix print_mac() conversion.
Dmitry Eremin-Solenikov (2):
af_ieee802154: setsockopt optlen arg isn't __user
ieee802154: add locking for seq numbers
Dongdong Deng (1):
b44: the poll handler b44_poll must not enable IRQ unconditionally
Eric Dumazet (1):
net: kmemcheck annotation in struct socket
Gerrit Renker (1):
net-next-2.6 [PATCH 1/1] dccp: ccids whitespace-cleanup / CodingStyle
Hendrik Brueckner (6):
iucv: fix iucv_buffer_cpumask check when calling IUCV functions
iucv: use correct output register in iucv_query_maxconn()
af_iucv: fix race in __iucv_sock_wait()
af_iucv: handle non-accepted sockets after resuming from suspend
af_iucv: do not call iucv_sock_kill() twice
af_iucv: fix race when queueing skbs on the backlog queue
Holger Schurig (2):
cfg80211: use cfg80211_wext_freq() for freq conversion
cfg80211: minimal error handling for wext-compat freq scanning
Ilpo Järvinen (1):
tcp: fix ssthresh u16 leftover
Jarek Poplawski (4):
pkt_sched: Fix qdisc_graft WRT ingress qdisc
pkt_sched: Fix tx queue selection in tc_modify_qdisc
pkt_sched: Fix qdisc_create on stab error handling
pkt_sched: Fix qstats.qlen updating in dump_stats
Jean-Christophe PLAGNIOL-VILLARD (1):
wl12xx: switch to %pM to print the mac address
Jens Rosenboom (2):
ipv6: Ignore route option with ROUTER_PREF_INVALID
ipv6: Log the affected address when DAD failure occurs
Jie Yang (1):
atl1e: fix 2.6.31-git4 -- ATL1E 0000:03:00.0: DMA-API: device driver frees DMA
Jiri Pirko (1):
bonding: make ab_arp select active slaves as other modes
Johannes Berg (3):
iwlwifi: disable powersave for 4965
genetlink: fix netns vs. netlink table locking
cfg80211: fix SME connect
Ken Kawasaki (1):
pcnet_cs: add cis of Linksys multifunction pcmcia card
Larry Finger (1):
ssb: Fix error when V1 SPROM extraction is forced
Luis R. Rodriguez (1):
wireless: default CONFIG_WLAN to y
Mark Smith (1):
Have atalk_route_packet() return NET_RX_SUCCESS not NET_XMIT_SUCCESS
Martin Decky (1):
hostap: Revert a toxic part of the conversion to net_device_ops
Michael Buesch (3):
b43: Force-wake queues on init
ssb: Disable verbose SDIO coreswitch
b43: Fix resume failure
Michael Hennerich (1):
netdev: smc91x: drop Blackfin cruft
Moni Shoua (1):
bonding: remap muticast addresses without using dev_close() and dev_open()
Oliver Hartkopp (1):
can: fix NOHZ local_softirq_pending 08 warning
Pavel Roskin (1):
rc80211_minstrel: fix contention window calculation
Peter P Waskiewicz Jr (3):
ixgbe: Properly disable packet split per-ring when globally disabled
ixgbe: Add support for 82599-based CX4 adapters
ixgbe: Create separate media type for CX4 adapters
Randy Dunlap (1):
ssb/sdio: fix printk format warnings
Reinette Chatre (1):
iwlwifi: fix potential rx buffer loss
Robert Varga (1):
tcp: fix CONFIG_TCP_MD5SIG + CONFIG_PREEMPT timer BUG()
Rémi Denis-Courmont (2):
Phonet: Netlink event for autoconfigured addresses
cdc-phonet: remove noisy debug statement
Sathya Perla (1):
be2net: fix some cmds to use mccq instead of mbox
Stephen Hemminger (2):
sky2: transmit ring accounting
sky2: Make sure both ports initialize correctly
Sujith (1):
ath9k: Fix bug in ANI channel handling
Ursula Braun (1):
iucv: suspend/resume error msg for left over pathes
Vitaliy Gusev (1):
mlx4: Fix access to freed memory
Wey-Yi Guy (1):
iwlwifi: find the correct first antenna
drivers/net/atl1e/atl1e.h | 9 +
drivers/net/atl1e/atl1e_main.c | 15 +-
drivers/net/b44.c | 7 +-
drivers/net/benet/be.h | 1 +
drivers/net/benet/be_cmds.c | 412 +++++++-----
drivers/net/benet/be_cmds.h | 5 +-
drivers/net/benet/be_main.c | 42 +-
drivers/net/bonding/bond_main.c | 131 ++---
drivers/net/can/vcan.c | 2 +-
drivers/net/igb/e1000_82575.c | 198 +++---
drivers/net/igb/e1000_82575.h | 2 +-
drivers/net/igb/e1000_defines.h | 2 +-
drivers/net/igb/e1000_phy.c | 5 +-
drivers/net/igb/igb_main.c | 2 +-
drivers/net/ixgbe/ixgbe_82598.c | 6 +-
drivers/net/ixgbe/ixgbe_82599.c | 3 +
drivers/net/ixgbe/ixgbe_main.c | 4 +
drivers/net/ixgbe/ixgbe_type.h | 2 +
drivers/net/mlx4/catas.c | 11 +-
drivers/net/pcmcia/pcnet_cs.c | 10 +-
drivers/net/pppol2tp.c | 4 +-
drivers/net/sky2.c | 24 +-
drivers/net/smc91x.h | 28 -
drivers/net/usb/cdc-phonet.c | 1 -
drivers/net/wireless/Kconfig | 1 +
drivers/net/wireless/ath/ath9k/ani.c | 6 +-
drivers/net/wireless/b43/main.c | 8 +-
drivers/net/wireless/hostap/hostap_main.c | 3 +-
drivers/net/wireless/iwlwifi/iwl-4965.c | 1 +
drivers/net/wireless/iwlwifi/iwl-agn-rs.c | 10 +-
drivers/net/wireless/iwlwifi/iwl-core.c | 9 +-
drivers/net/wireless/iwlwifi/iwl-core.h | 1 +
drivers/net/wireless/iwlwifi/iwl-power.c | 5 +-
drivers/net/wireless/iwlwifi/iwl-rx.c | 24 +-
drivers/net/wireless/iwlwifi/iwl3945-base.c | 24 +-
drivers/net/wireless/p54/p54usb.c | 1 +
drivers/net/wireless/wl12xx/wl1271_main.c | 5 +-
drivers/serial/serial_cs.c | 14 +-
drivers/ssb/pci.c | 1 +
drivers/ssb/sdio.c | 6 +-
firmware/Makefile | 3 +-
firmware/WHENCE | 12 +
firmware/cis/MT5634ZLX.cis.ihex | 11 +
firmware/cis/PCMLM28.cis.ihex | 18 +
firmware/cis/RS-COM-2P.cis.ihex | 10 +
include/keys/rxrpc-type.h | 107 ++++
include/linux/igmp.h | 2 +
include/linux/net.h | 5 +
include/linux/netdevice.h | 3 +-
include/linux/netlink.h | 4 +
include/linux/notifier.h | 2 +
include/linux/rxrpc.h | 7 +
include/net/addrconf.h | 2 +
include/net/protocol.h | 13 +-
include/net/sch_generic.h | 2 +-
include/net/tcp.h | 7 +
net/appletalk/ddp.c | 2 +-
net/can/af_can.c | 4 +-
net/core/dev.c | 4 +-
net/dccp/ccids/Kconfig | 6 +-
net/dccp/ccids/ccid2.c | 2 -
net/dccp/ccids/ccid2.h | 8 +-
net/dccp/ccids/ccid3.c | 5 +-
net/dccp/ccids/ccid3.h | 50 +-
net/dccp/ccids/lib/loss_interval.c | 7 +-
net/dccp/ccids/lib/loss_interval.h | 2 -
net/dccp/ccids/lib/packet_history.c | 4 +-
net/dccp/ccids/lib/packet_history.h | 1 -
net/dccp/ccids/lib/tfrc.h | 4 +-
net/dccp/ccids/lib/tfrc_equation.c | 26 +-
net/dccp/ipv4.c | 2 +-
net/dccp/ipv6.c | 4 +-
net/ieee802154/dgram.c | 2 +-
net/ieee802154/netlink.c | 4 +
net/ieee802154/raw.c | 2 +-
net/ipv4/af_inet.c | 18 +-
net/ipv4/ah4.c | 2 +-
net/ipv4/devinet.c | 6 +
net/ipv4/esp4.c | 2 +-
net/ipv4/icmp.c | 2 +-
net/ipv4/igmp.c | 22 +
net/ipv4/ip_gre.c | 2 +-
net/ipv4/ip_input.c | 2 +-
net/ipv4/ipcomp.c | 2 +-
net/ipv4/ipmr.c | 6 +-
net/ipv4/protocol.c | 6 +-
net/ipv4/tcp.c | 2 +-
net/ipv4/tcp_input.c | 2 +-
net/ipv4/tcp_ipv4.c | 4 +-
net/ipv4/tcp_minisocks.c | 4 +-
net/ipv4/tunnel4.c | 4 +-
net/ipv4/udplite.c | 2 +-
net/ipv6/addrconf.c | 23 +-
net/ipv6/af_inet6.c | 10 +-
net/ipv6/ah6.c | 2 +-
net/ipv6/esp6.c | 2 +-
net/ipv6/exthdrs.c | 6 +-
net/ipv6/icmp.c | 4 +-
net/ipv6/ip6_input.c | 2 +-
net/ipv6/ip6mr.c | 6 +-
net/ipv6/ipcomp6.c | 2 +-
net/ipv6/mcast.c | 19 +
net/ipv6/protocol.c | 6 +-
net/ipv6/reassembly.c | 2 +-
net/ipv6/route.c | 2 +-
net/ipv6/tcp_ipv6.c | 7 +-
net/ipv6/tunnel6.c | 4 +-
net/ipv6/udp.c | 2 +-
net/ipv6/udplite.c | 2 +-
net/iucv/af_iucv.c | 33 +-
net/iucv/iucv.c | 38 +-
net/mac80211/rc80211_minstrel.c | 2 +-
net/netlink/af_netlink.c | 51 +-
net/netlink/genetlink.c | 5 +-
net/phonet/pn_dev.c | 9 +-
net/rds/af_rds.c | 2 +-
net/rose/af_rose.c | 4 +-
net/rxrpc/ar-ack.c | 6 +-
net/rxrpc/ar-internal.h | 32 +-
net/rxrpc/ar-key.c | 914 +++++++++++++++++++++++++--
net/rxrpc/ar-security.c | 8 +-
net/rxrpc/rxkad.c | 47 +-
net/sched/sch_api.c | 29 +-
net/sched/sch_drr.c | 4 +-
net/sched/sch_mq.c | 14 +-
net/sched/sch_multiq.c | 1 +
net/sched/sch_prio.c | 1 +
net/sctp/ipv6.c | 2 +-
net/sctp/protocol.c | 2 +-
net/socket.c | 1 +
net/wireless/scan.c | 7 +-
net/wireless/sme.c | 21 +-
132 files changed, 2009 insertions(+), 805 deletions(-)
create mode 100644 firmware/cis/MT5634ZLX.cis.ihex
create mode 100644 firmware/cis/PCMLM28.cis.ihex
create mode 100644 firmware/cis/RS-COM-2P.cis.ihex
^ permalink raw reply
* Re: fanotify as syscalls
From: Eric Paris @ 2009-09-17 18:53 UTC (permalink / raw)
To: Linus Torvalds
Cc: Jamie Lokier, Evgeniy Polyakov, David Miller, linux-kernel,
linux-fsdevel, netdev, viro, alan, hch
In-Reply-To: <alpine.LFD.2.01.0909170934450.4950@localhost.localdomain>
On Thu, 2009-09-17 at 09:40 -0700, Linus Torvalds wrote:
>
> On Wed, 16 Sep 2009, Jamie Lokier wrote:
> >
> > I'd forgotten about Linus' strace argument. That's a good one.
> >
> > Of course everything should be a syscall by that argument :-)
>
> Oh yes, everything _should_ be a syscall.
I rewrote the interface and prototyped out a working fanotify like so:
SYSCALL_DEFINE4(fanotify_init, unsigned int, flags, int, event_f_flags,
__u64, mask, int, priority)
int flags indicates - things like global or directed, fd's or wd's,
could include fail allow vs fail deny, O_CLOEXEC, O_NONBLOCK, etc
int event_f_flags - flags used when opening an fd for the listener
__u64 mask - in global mode the events of interest
int priority - the order fanotify listeners should be checked (so HSM
can be before AV scanners)
Do we need a timeout for access decisions? I left room for that in the
bind address, but we can't just leave room to spare with a syscall...
SYSCALL_DEFINE6(fanotify_modify_mark, int, fanotify_fd,
unsigned int, flags, int, fd,
const char __user *, pathname, __u64, mask,
__u64, ignored_mask)
int fanotify_fd - duh
int flags - add, remove, flush, events on child, event on subtree?
int fd - either fd to object or fd to dir for relative pathname
const char __user * pathname - either pathname or null if only use fd
__u64 mask - events this inode cares about
__u64 ignored_mask - events this inode does NOT care about
(not yet done, would someone like to comment?)
fanotify_response(int fanotify_fd, __u64 cookie, __u32 response);
__u64 cookie - which of our permission requests we are waiting on
__u32 response - allow, deny, wait longer
Could be done using write(), but I think the strace argument clearly
says that this should be a syscall that can be easily found and reported
(not settled in my mind)
int fanotify_ignore_sb(int fanotify_fd, unsigned int flags,
long f_type, fsid_t f_fsid)
int fanotify_fd - duh
unsigned int flags - f_type or fsid?
long f_type - statfs(2) f_type
fsid_t f_fsid - statfs(2) f_fsid
Reads from the fd would return data of this structure:
struct fanotify_event_metadata {
__u32 event_len;
__u32 vers;
__s32 fd;
__u32 mask;
__u32 f_flags;
__s32 pid;
__s32 uid;
__s32 tgid;
__u64 cookie;
} __attribute__((packed));
Thanks to event_len and vers, we could extend it to include
__u32 filename1_len,
char filename1[filename1_len]
__u32 filename2_len,
char filename2[filename2_len]
This can all take shape as that work is completed and I don't believe
should block merging.
Do my syscalls look pretty enough? I'm down to 3 or 4.
Jamie, you tend to agree that the interface and the event types are nice
enough that we can build out (if we get the right hooks in the right
places) everywhere we need to go?
-Eric
^ permalink raw reply
* RE: [PATCH] ks8851_ml ethernet network driver
From: Choi, David @ 2009-09-17 19:11 UTC (permalink / raw)
To: Stephen Hemminger, Li, Charles
Cc: Greg KH, netdev, David S. Miller, Choi, Jeff Garzik
In-Reply-To: <20090916210315.04dc743e@s6510>
Hello Stephen Hemminger,
My fix up is as followings;
Even if the irq is not shared, it is safe not to process
when there is no interrupt status change in the hardware.
====================
@@ -818,6 +811,11 @@ static irqreturn_t ks_irq(int irq, void
ks_save_cmd_reg(ks);
status = ks_rdreg16(ks, KS_ISR);
+ if (unlikely(!status)) {
+ ks_restore_cmd_reg(ks);
+ return IRQ_NONE;
+ }
+
ks_wrreg16(ks, KS_ISR, status);
if (likely(status & IRQ_RXI))
Regards,
David J. Choi
-----Original Message-----
From: Stephen Hemminger [mailto:shemminger@vyatta.com]
Sent: Wednesday, September 16, 2009 9:03 PM
To: Li, Charles
Cc: Greg KH; netdev@vger.kernel.org; David S. Miller; Choi@kroah.com;
Choi, David; Jeff Garzik
Subject: Re: [PATCH] ks8851_ml ethernet network driver
On Wed, 16 Sep 2009 19:38:36 -0700
Greg KH <greg@kroah.com> wrote:
> /**
> + * ks_irq - device interrupt handler
> + * @irq: Interrupt number passed from the IRQ hnalder.
> + * @pw: The private word passed to register_irq(), our struct ks_net.
> + *
> + * This is the handler invoked to find out what happened
> + *
> + * Read the interrupt status, work out what needs to be done and then
clear
> + * any of the interrupts that are not needed.
> + */
> +
> +static irqreturn_t ks_irq(int irq, void *pw)
> +{
> + struct ks_net *ks = pw;
> + struct net_device *netdev = ks->netdev;
> + u16 status;
> +
> + /*this should be the first in IRQ handler */
> + ks_save_cmd_reg(ks);
> +
> + status = ks_rdreg16(ks, KS_ISR);
> + ks_wrreg16(ks, KS_ISR, status);
if status == 0 or status == ~0 then device should not return
IRQ_HANDLED.
In the former case, the IRQ is shared, in later case the device is not
present
on the bus (hotplug).
^ permalink raw reply
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