* HTB TC Problem up 800 - 2000 class
From: Jan Kozel @ 2011-09-28 9:08 UTC (permalink / raw)
To: netdev
In-Reply-To: <4E82E0AF.1020709@neviol.cz>
Hi
I have a problem I use the TC HTB and IFB. Shaper limits absolutely
without any problems until 1GB/ps throughput, but only for about 750
clients. At a time when the state tables for TC and MAMGLE exceeds 1000
clients thewill be the load average to 0.7 and bandwidth shaper is
rapidly reduced and drops down to 200Mb. I attach the script for the
first clients. You do not have anyone experiences that for 2000 and more
restrictions?
# downlink eth1
/sbin/tc qdisc add dev eth1 handle 1: root htb default 99 r2q 1800
# uplink eth0
/sbin/tc qdisc add dev eth0 handle 1: root htb default 99 r2q 1800
/sbin/tc class add dev eth1 parent 1:0 classid 1:2 htb rate 1240kbit ceil 1240kbit quantum 103 prio 1
/sbin/tc class add dev eth0 parent 1:0 classid 1:2 htb rate 1240kbit ceil 1240kbit quantum 103 prio 1
/sbin/tc class add dev eth1 parent 1:0 classid 1:1 htb rate 999000kbit ceil 999040kbit quantum 83253 prio 1
/sbin/tc class add dev eth0 parent 1:0 classid 1:1 htb rate 999000kbit ceil 999040kbit quantum 83253 prio 1
/sbin/tc class add dev eth1 parent 1:1 classid 1:3 htb rate 2560kbit ceil 2560kbit quantum 213 prio 1
/sbin/tc class add dev eth0 parent 1:1 classid 1:3 htb rate 2560kbit ceil 2560kbit quantum 213 prio 1
/sbin/tc class add dev eth1 parent 1:2 classid 1:4 htb rate 2560kbit ceil 2560kbit quantum 213 prio 1
/sbin/tc class add dev eth0 parent 1:2 classid 1:4 htb rate 2560kbit ceil 2560kbit quantum 213 prio 1
/sbin/tc class add dev eth1 parent 1:1 classid 1:10 htb rate 1000kbit ceil 1001kbit quantum 83 prio 1
/sbin/tc class add dev eth0 parent 1:1 classid 1:10 htb rate 1000kbit ceil 1001kbit quantum 83 prio 1
# Jednolivi klienti -- rychlsoti
echo Aktivuji IP 94.229.95.162
/sbin/tc class add dev eth1 parent 1:1 classid 1:1686 htb rate 800kbit ceil 8000kbit quantum 666 prio 1
/sbin/tc qdisc add dev eth1 parent 1:1686 handle 1686 esfq
/sbin/tc filter add dev eth1 protocol ip parent 1: prio 1 u32 match ip dst 94.229.95.162 flowid 1:1686 action mirred egress redirect dev ifb0
/sbin/tc class add dev eth0 parent 1:1 classid 1:3336 htb rate 204kbit ceil 2048kbit quantum 170 prio 1
/sbin/tc qdisc add dev eth0 parent 1:3336 handle 3336 esfq
/usr/src/iptables-1.4.3.2/iptables -t mangle -A POSTROUTING -s 94.229.95.162 -j MARK --set-mark 3336
/sbin/tc filter add dev eth0 parent 1:0 prio 1 protocol ip handle 3336 fw flowid 1:3336
echo Aktivuji IP 192.168.1.2
/sbin/tc class add dev eth1 parent 1:1 classid 1:107 htb rate 30000kbit ceil 300000kbit quantum 25000 prio 1
/sbin/tc qdisc add dev eth1 parent 1:107 handle 107 esfq
/sbin/tc filter add dev eth1 protocol ip parent 1: prio 1 u32 match ip dst 192.168.1.2 flowid 1:107 action mirred egress redirect dev ifb0
/sbin/tc class add dev eth0 parent 1:1 classid 1:1757 htb rate 30000kbit ceil 300000kbit quantum 25000 prio 1
/sbin/tc qdisc add dev eth0 parent 1:1757 handle 1757 esfq
/usr/src/iptables-1.4.3.2/iptables -t mangle -A POSTROUTING -s 192.168.1.2 -j MARK --set-mark 1757
/sbin/tc filter add dev eth0 parent 1:0 prio 1 protocol ip handle 1757 fw flowid 1:1757
thank you
Kozel Jan
--
^ permalink raw reply
* Re: [PATCH] tcp: properly update lost_cnt_hint during shifting
From: Yan, Zheng @ 2011-09-28 9:15 UTC (permalink / raw)
To: Ilpo Järvinen; +Cc: netdev@vger.kernel.org, Nandita Dukkipati
In-Reply-To: <4E82E0EE.1050600@intel.com>
On 09/28/2011 04:55 PM, Yan, Zheng wrote:
> On 09/28/2011 04:17 PM, Ilpo Järvinen wrote:
>> On Wed, 28 Sep 2011, Yan, Zheng wrote:
>>
>>> lost_skb_hint is used by tcp_mark_head_lost() to mark the first
>>> unhandled skb. lost_cnt_hint is the number of sacked packets before
>>> the lost_skb_hint. tcp_shifted_skb() shouldn't increase lost_cnt_hint
>>> when shifting a sacked skb that is before the lost_skb_hint, because
>>> packets in it are already counted.
>>>
>>> Signed-off-by: Zheng Yan <zheng.z.yan@intel.com>
>>> ---
>>> diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c
>>> index 21fab3e..f712ace 100644
>>> --- a/net/ipv4/tcp_input.c
>>> +++ b/net/ipv4/tcp_input.c
>>> @@ -1390,9 +1390,14 @@ static int tcp_shifted_skb(struct sock *sk, struct sk_buff *skb,
>>> BUG_ON(!pcount);
>>>
>>> /* Tweak before seqno plays */
>>> - if (!tcp_is_fack(tp) && tcp_is_sack(tp) && tp->lost_skb_hint &&
>>> - !before(TCP_SKB_CB(tp->lost_skb_hint)->seq, TCP_SKB_CB(skb)->seq))
>>> - tp->lost_cnt_hint += pcount;
>>> + if (!tcp_is_fack(tp) && tcp_is_sack(tp) && tp->lost_skb_hint) {
>>> + if (skb == tp->lost_skb_hint)
>>> + tp->lost_cnt_hint += pcount;
>>> + else if (!(TCP_SKB_CB(skb)->sacked & TCPCB_SACKED_ACKED) &&
>>> + before(TCP_SKB_CB(skb)->seq,
>>> + TCP_SKB_CB(tp->lost_skb_hint)->seq))
>>> + tp->lost_cnt_hint += pcount;
>>> + }
>>
>> Ah right, the hole filled case which shifts not only the newly SACKed
>> skb but also the next, already SACKed skb?
>>
>> I fail to see why you needed to change !before into two checks though:
>> skb == tp->lost_skb_hint and before(params reversed) ? Shouldn't the
>> equality that is provided by the negation cover for the == check (and the
>> params reversion isn't necessary in any case)? In fact, isn't the skb ==
>> tp->lost_skb_hint check strictly wrong without the same TCPCB_SACKED_ACKED
>> guard (though I'm not sure, I didn't check, if the hint can ever point to
>> such a segment in the first place)?
>
> Thanks you for your reply.
>
> skb == tp->lost_skb_hint is special.
>
> If the skb is sacked and we shift 'pcount' packets to previous skb,
> these packets will not be counted by future tcp_mark_head_lost() call.
> So we should increase lost_cnt_hint.
>
> If the skb is not sacked, the skb will be sacked soon by tcp_sacktag_one(),
> So we should not increase lost_cnt_hint.
>
> I didn't think out the second case. I think the correct patch should be:
> ---
>
> diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c
> index 21fab3e..dcc2411 100644
> --- a/net/ipv4/tcp_input.c
> +++ b/net/ipv4/tcp_input.c
> @@ -1390,9 +1390,15 @@ static int tcp_shifted_skb(struct sock *sk, struct sk_buff *skb,
> BUG_ON(!pcount);
>
> /* Tweak before seqno plays */
> - if (!tcp_is_fack(tp) && tcp_is_sack(tp) && tp->lost_skb_hint &&
> - !before(TCP_SKB_CB(tp->lost_skb_hint)->seq, TCP_SKB_CB(skb)->seq))
> - tp->lost_cnt_hint += pcount;
> + if (!tcp_is_fack(tp) && tcp_is_sack(tp) && tp->lost_skb_hint) {
> + if ((TCP_SKB_CB(skb)->sacked & TCPCB_SACKED_ACKED) &&
> + skb == tp->lost_skb_hint)
> + tp->lost_cnt_hint += pcount;
> + else if (!(TCP_SKB_CB(skb)->sacked & TCPCB_SACKED_ACKED) &&
> + before(TCP_SKB_CB(skb)->seq,
> + TCP_SKB_CB(tp->lost_skb_hint)->seq))
> + tp->lost_cnt_hint += pcount;
> + }
>
> TCP_SKB_CB(prev)->end_seq += shifted;
> TCP_SKB_CB(skb)->seq += shifted;
> ---
Sorry, I didn't think out the "skb before lost_skb_hint" case neither.
If the skb isn't sacked, tcp_sacktag_one() will increase the lost_cnt_hint.
So tcp_shifted_skb() shouldn't adjust the the lost_cnt_hint.
I hope my patch is correct this time.
---
diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c
index 21fab3e..697ce5f 100644
--- a/net/ipv4/tcp_input.c
+++ b/net/ipv4/tcp_input.c
@@ -1390,8 +1390,8 @@ static int tcp_shifted_skb(struct sock *sk, struct sk_buff *skb,
BUG_ON(!pcount);
/* Tweak before seqno plays */
- if (!tcp_is_fack(tp) && tcp_is_sack(tp) && tp->lost_skb_hint &&
- !before(TCP_SKB_CB(tp->lost_skb_hint)->seq, TCP_SKB_CB(skb)->seq))
+ if (!tcp_is_fack(tp) && tcp_is_sack(tp) && tp->lost_skb_hint == skb &&
+ (TCP_SKB_CB(skb)->sacked & TCPCB_SACKED_ACKED))
tp->lost_cnt_hint += pcount;
TCP_SKB_CB(prev)->end_seq += shifted;
^ permalink raw reply related
* Re: [PATCH] tcp: properly update lost_cnt_hint during shifting
From: Ilpo Järvinen @ 2011-09-28 9:50 UTC (permalink / raw)
To: Yan, Zheng; +Cc: netdev@vger.kernel.org, Nandita Dukkipati
In-Reply-To: <4E82E5B5.1050206@intel.com>
[-- Attachment #1: Type: TEXT/PLAIN, Size: 5132 bytes --]
On Wed, 28 Sep 2011, Yan, Zheng wrote:
> On 09/28/2011 04:55 PM, Yan, Zheng wrote:
> > On 09/28/2011 04:17 PM, Ilpo Järvinen wrote:
> >> On Wed, 28 Sep 2011, Yan, Zheng wrote:
> >>
> >>> lost_skb_hint is used by tcp_mark_head_lost() to mark the first
> >>> unhandled skb. lost_cnt_hint is the number of sacked packets before
> >>> the lost_skb_hint. tcp_shifted_skb() shouldn't increase lost_cnt_hint
> >>> when shifting a sacked skb that is before the lost_skb_hint, because
> >>> packets in it are already counted.
> >>>
> >>> Signed-off-by: Zheng Yan <zheng.z.yan@intel.com>
> >>> ---
> >>> diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c
> >>> index 21fab3e..f712ace 100644
> >>> --- a/net/ipv4/tcp_input.c
> >>> +++ b/net/ipv4/tcp_input.c
> >>> @@ -1390,9 +1390,14 @@ static int tcp_shifted_skb(struct sock *sk, struct sk_buff *skb,
> >>> BUG_ON(!pcount);
> >>>
> >>> /* Tweak before seqno plays */
> >>> - if (!tcp_is_fack(tp) && tcp_is_sack(tp) && tp->lost_skb_hint &&
> >>> - !before(TCP_SKB_CB(tp->lost_skb_hint)->seq, TCP_SKB_CB(skb)->seq))
> >>> - tp->lost_cnt_hint += pcount;
> >>> + if (!tcp_is_fack(tp) && tcp_is_sack(tp) && tp->lost_skb_hint) {
> >>> + if (skb == tp->lost_skb_hint)
> >>> + tp->lost_cnt_hint += pcount;
> >>> + else if (!(TCP_SKB_CB(skb)->sacked & TCPCB_SACKED_ACKED) &&
> >>> + before(TCP_SKB_CB(skb)->seq,
> >>> + TCP_SKB_CB(tp->lost_skb_hint)->seq))
> >>> + tp->lost_cnt_hint += pcount;
> >>> + }
> >>
> >> Ah right, the hole filled case which shifts not only the newly SACKed
> >> skb but also the next, already SACKed skb?
> >>
> >> I fail to see why you needed to change !before into two checks though:
> >> skb == tp->lost_skb_hint and before(params reversed) ? Shouldn't the
> >> equality that is provided by the negation cover for the == check (and the
> >> params reversion isn't necessary in any case)? In fact, isn't the skb ==
> >> tp->lost_skb_hint check strictly wrong without the same TCPCB_SACKED_ACKED
> >> guard (though I'm not sure, I didn't check, if the hint can ever point to
> >> such a segment in the first place)?
> >
> > Thanks you for your reply.
> >
> > skb == tp->lost_skb_hint is special.
> >
> > If the skb is sacked and we shift 'pcount' packets to previous skb,
> > these packets will not be counted by future tcp_mark_head_lost() call.
> > So we should increase lost_cnt_hint.
> >
> > If the skb is not sacked, the skb will be sacked soon by tcp_sacktag_one(),
> > So we should not increase lost_cnt_hint.
> >
> > I didn't think out the second case. I think the correct patch should be:
> > ---
> >
> > diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c
> > index 21fab3e..dcc2411 100644
> > --- a/net/ipv4/tcp_input.c
> > +++ b/net/ipv4/tcp_input.c
> > @@ -1390,9 +1390,15 @@ static int tcp_shifted_skb(struct sock *sk, struct sk_buff *skb,
> > BUG_ON(!pcount);
> >
> > /* Tweak before seqno plays */
> > - if (!tcp_is_fack(tp) && tcp_is_sack(tp) && tp->lost_skb_hint &&
> > - !before(TCP_SKB_CB(tp->lost_skb_hint)->seq, TCP_SKB_CB(skb)->seq))
> > - tp->lost_cnt_hint += pcount;
> > + if (!tcp_is_fack(tp) && tcp_is_sack(tp) && tp->lost_skb_hint) {
> > + if ((TCP_SKB_CB(skb)->sacked & TCPCB_SACKED_ACKED) &&
> > + skb == tp->lost_skb_hint)
> > + tp->lost_cnt_hint += pcount;
> > + else if (!(TCP_SKB_CB(skb)->sacked & TCPCB_SACKED_ACKED) &&
> > + before(TCP_SKB_CB(skb)->seq,
> > + TCP_SKB_CB(tp->lost_skb_hint)->seq))
> > + tp->lost_cnt_hint += pcount;
> > + }
> >
> > TCP_SKB_CB(prev)->end_seq += shifted;
> > TCP_SKB_CB(skb)->seq += shifted;
> > ---
>
> Sorry, I didn't think out the "skb before lost_skb_hint" case neither.
> If the skb isn't sacked, tcp_sacktag_one() will increase the lost_cnt_hint.
> So tcp_shifted_skb() shouldn't adjust the the lost_cnt_hint.
>
> I hope my patch is correct this time.
>
> ---
> diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c
> index 21fab3e..697ce5f 100644
> --- a/net/ipv4/tcp_input.c
> +++ b/net/ipv4/tcp_input.c
> @@ -1390,8 +1390,8 @@ static int tcp_shifted_skb(struct sock *sk, struct sk_buff *skb,
> BUG_ON(!pcount);
>
> /* Tweak before seqno plays */
> - if (!tcp_is_fack(tp) && tcp_is_sack(tp) && tp->lost_skb_hint &&
> - !before(TCP_SKB_CB(tp->lost_skb_hint)->seq, TCP_SKB_CB(skb)->seq))
> + if (!tcp_is_fack(tp) && tcp_is_sack(tp) && tp->lost_skb_hint == skb &&
> + (TCP_SKB_CB(skb)->sacked & TCPCB_SACKED_ACKED))
> tp->lost_cnt_hint += pcount;
>
> TCP_SKB_CB(prev)->end_seq += shifted;
Hehe, besides not spotting all this, I also made another mistake in my
last post. It seems that this code has been quite broken from the
beginning or we still lack some detail. ...But the latest change certainly
seems more reasonable than the previous code of mine if I've successfully
understood enough pieces. These hints, although providing significant
performance benefits, are really pain to get right :-).
But is the non-SACKed case really handled right when hint == skb by the
sacktag_one. We move the seqno in between and then before(x->newseq,
x->newseq) check returns false?
--
i.
^ permalink raw reply
* Re: Introducing open source MSTP daemon
From: Vitalii Demianets @ 2011-09-28 9:56 UTC (permalink / raw)
To: David Lamparter; +Cc: bridge, netdev, Srinivas M.A., Stephen Hemminger
In-Reply-To: <20110922163939.GB1012103@jupiter.n2.diac24.net>
On Thursday 22 September 2011 19:39:40 David Lamparter wrote:
>
> I assume it works with current Linux kernel bridge code on a RSTP level?
> The code looks considerably more maintainable than rstpd :) - I will try
> running it later!
>
Ok, now it works with kernel bridge code and you can evaluate it.
mstpd sends all the state changes in the CIST to the kernel bridge, so it
works for the (R)STP cases as expected. Checked it by connecting two bridges:
one running mstpd and another running rstpd and in-kernel stp. In both cases
mstpd code behaves reasonably. Not checked in more complex setups though.
Also mstpd translates to the bridge code fdb flushing events and changes
ageing time (for the rapid ageing case).
--
Vitalii Demianets
^ permalink raw reply
* Re: [PATCH net-next] can/sja1000: add driver for EMS PCMCIA card
From: [EMS] Markus Plessing @ 2011-09-28 10:02 UTC (permalink / raw)
To: David Miller
Cc: Oliver Hartkopp, Wolfgang Grandegger, Netdev Mailing List,
SocketCAN Core Mailing List
In-Reply-To: <4E7CBB04.8070807@hartkopp.net>
Next try, without gmane ...
Am 23.09.2011 18:59, schrieb Oliver Hartkopp:
> This patch adds the driver for the SJA1000 based PCMCIA card 'CPC-Card' from
> EMS Dr. Thomas Wuensche (http://www.ems-wuensche.de).
>
> Signed-off-by: Oliver Hartkopp<socketcan-fJ+pQTUTwRTk1uMJSBkQmQ@public.gmane.org>
Acked-by: Markus Plessing <plessing@ems-wuensche.com>
Thanks Oliver.
> ---
>
> diff -u -r -N a/drivers/net/can/sja1000/Kconfig b/drivers/net/can/sja1000/Kconfig
> --- a/drivers/net/can/sja1000/Kconfig 2011-09-23 18:02:35.711750820 +0200
> +++ b/drivers/net/can/sja1000/Kconfig 2011-09-23 18:02:28.695751113 +0200
> @@ -29,6 +29,13 @@
> OpenFirmware bindings, e.g. if you have a PowerPC based system
> you may want to enable this option.
>
> +config CAN_EMS_PCMCIA
> + tristate "EMS CPC-CARD Card"
> + depends on PCMCIA
> + ---help---
> + This driver is for the one or two channel CPC-CARD cards from
> + EMS Dr. Thomas Wuensche (http://www.ems-wuensche.de).
> +
> config CAN_EMS_PCI
> tristate "EMS CPC-PCI, CPC-PCIe and CPC-104P Card"
> depends on PCI
> diff -u -r -N a/drivers/net/can/sja1000/Makefile b/drivers/net/can/sja1000/Makefile
> --- a/drivers/net/can/sja1000/Makefile 2011-09-23 18:02:38.595750534 +0200
> +++ b/drivers/net/can/sja1000/Makefile 2011-09-23 18:02:28.695751113 +0200
> @@ -6,6 +6,7 @@
> obj-$(CONFIG_CAN_SJA1000_ISA) += sja1000_isa.o
> obj-$(CONFIG_CAN_SJA1000_PLATFORM) += sja1000_platform.o
> obj-$(CONFIG_CAN_SJA1000_OF_PLATFORM) += sja1000_of_platform.o
> +obj-$(CONFIG_CAN_EMS_PCMCIA) += ems_pcmcia.o
> obj-$(CONFIG_CAN_EMS_PCI) += ems_pci.o
> obj-$(CONFIG_CAN_KVASER_PCI) += kvaser_pci.o
> obj-$(CONFIG_CAN_PEAK_PCI) += peak_pci.o
> diff -u -r -N a/drivers/net/can/sja1000/ems_pcmcia.c b/drivers/net/can/sja1000/ems_pcmcia.c
> --- a/drivers/net/can/sja1000/ems_pcmcia.c 1970-01-01 01:00:00.000000000 +0100
> +++ b/drivers/net/can/sja1000/ems_pcmcia.c 2011-09-23 18:13:59.227726972 +0200
> @@ -0,0 +1,331 @@
> +/*
> + * Copyright (C) 2008 Sebastian Haas (initial chardev implementation)
> + * Copyright (C) 2010 Markus Plessing<plessing-zsNKPWJ8Pib6hrUXjxyGrA@public.gmane.org>
> + * Rework for mainline by Oliver Hartkopp<socketcan-fJ+pQTUTwRTk1uMJSBkQmQ@public.gmane.org>
> + *
> + * This program is free software; you can redistribute it and/or modify
> + * it under the terms of the version 2 of the GNU General Public License
> + * as published by the Free Software Foundation
> + *
> + * This program is distributed in the hope that it will be useful,
> + * but WITHOUT ANY WARRANTY; without even the implied warranty of
> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
> + * GNU General Public License for more details.
> + */
> +
> +#include<linux/kernel.h>
> +#include<linux/module.h>
> +#include<linux/interrupt.h>
> +#include<linux/netdevice.h>
> +#include<linux/delay.h>
> +#include<linux/io.h>
> +#include<pcmcia/cistpl.h>
> +#include<pcmcia/ds.h>
> +#include<linux/can.h>
> +#include<linux/can/dev.h>
> +#include "sja1000.h"
> +
> +#define DRV_NAME "ems_pcmcia"
> +
> +MODULE_AUTHOR("Markus Plessing<plessing-zsNKPWJ8Pib6hrUXjxyGrA@public.gmane.org>");
> +MODULE_DESCRIPTION("Socket-CAN driver for EMS CPC-CARD cards");
> +MODULE_SUPPORTED_DEVICE("EMS CPC-CARD CAN card");
> +MODULE_LICENSE("GPL v2");
> +
> +#define EMS_PCMCIA_MAX_CHAN 2
> +
> +struct ems_pcmcia_card {
> + int channels;
> + struct pcmcia_device *pcmcia_dev;
> + struct net_device *net_dev[EMS_PCMCIA_MAX_CHAN];
> + void __iomem *base_addr;
> +};
> +
> +#define EMS_PCMCIA_CAN_CLOCK (16000000 / 2)
> +
> +/*
> + * The board configuration is probably following:
> + * RX1 is connected to ground.
> + * TX1 is not connected.
> + * CLKO is not connected.
> + * Setting the OCR register to 0xDA is a good idea.
> + * This means normal output mode , push-pull and the correct polarity.
> + */
> +#define EMS_PCMCIA_OCR (OCR_TX0_PUSHPULL | OCR_TX1_PUSHPULL)
> +
> +/*
> + * In the CDR register, you should set CBP to 1.
> + * You will probably also want to set the clock divider value to 7
> + * (meaning direct oscillator output) because the second SJA1000 chip
> + * is driven by the first one CLKOUT output.
> + */
> +#define EMS_PCMCIA_CDR (CDR_CBP | CDR_CLKOUT_MASK)
> +#define EMS_PCMCIA_MEM_SIZE 4096 /* Size of the remapped io-memory */
> +#define EMS_PCMCIA_CAN_BASE_OFFSET 0x100 /* Offset where controllers starts */
> +#define EMS_PCMCIA_CAN_CTRL_SIZE 0x80 /* Memory size for each controller */
> +
> +#define EMS_CMD_RESET 0x00 /* Perform a reset of the card */
> +#define EMS_CMD_MAP 0x03 /* Map CAN controllers into card' memory */
> +#define EMS_CMD_UMAP 0x02 /* Unmap CAN controllers from card' memory */
> +
> +static struct pcmcia_device_id ems_pcmcia_tbl[] = {
> + PCMCIA_DEVICE_PROD_ID123("EMS_T_W", "CPC-Card", "V2.0", 0xeab1ea23,
> + 0xa338573f, 0xe4575800),
> + PCMCIA_DEVICE_NULL,
> +};
> +
> +MODULE_DEVICE_TABLE(pcmcia, ems_pcmcia_tbl);
> +
> +static u8 ems_pcmcia_read_reg(const struct sja1000_priv *priv, int port)
> +{
> + return readb(priv->reg_base + port);
> +}
> +
> +static void ems_pcmcia_write_reg(const struct sja1000_priv *priv, int port,
> + u8 val)
> +{
> + writeb(val, priv->reg_base + port);
> +}
> +
> +static irqreturn_t ems_pcmcia_interrupt(int irq, void *dev_id)
> +{
> + struct ems_pcmcia_card *card = dev_id;
> + struct net_device *dev;
> + irqreturn_t retval = IRQ_NONE;
> + int i, again;
> +
> + /* Card not present */
> + if (readw(card->base_addr) != 0xAA55)
> + return IRQ_HANDLED;
> +
> + do {
> + again = 0;
> +
> + /* Check interrupt for each channel */
> + for (i = 0; i< card->channels; i++) {
> + dev = card->net_dev[i];
> + if (!dev)
> + continue;
> +
> + if (sja1000_interrupt(irq, dev) == IRQ_HANDLED)
> + again = 1;
> + }
> + /* At least one channel handled the interrupt */
> + if (again)
> + retval = IRQ_HANDLED;
> +
> + } while (again);
> +
> + return retval;
> +}
> +
> +/*
> + * Check if a CAN controller is present at the specified location
> + * by trying to set 'em into the PeliCAN mode
> + */
> +static inline int ems_pcmcia_check_chan(struct sja1000_priv *priv)
> +{
> + /* Make sure SJA1000 is in reset mode */
> + ems_pcmcia_write_reg(priv, REG_MOD, 1);
> + ems_pcmcia_write_reg(priv, REG_CDR, CDR_PELICAN);
> +
> + /* read reset-values */
> + if (ems_pcmcia_read_reg(priv, REG_CDR) == CDR_PELICAN)
> + return 1;
> +
> + return 0;
> +}
> +
> +static void ems_pcmcia_del_card(struct pcmcia_device *pdev)
> +{
> + struct ems_pcmcia_card *card = pdev->priv;
> + struct net_device *dev;
> + int i;
> +
> + free_irq(pdev->irq, card);
> +
> + for (i = 0; i< card->channels; i++) {
> + dev = card->net_dev[i];
> + if (!dev)
> + continue;
> +
> + printk(KERN_INFO "%s: removing %s on channel #%d\n",
> + DRV_NAME, dev->name, i);
> + unregister_sja1000dev(dev);
> + free_sja1000dev(dev);
> + }
> +
> + writeb(EMS_CMD_UMAP, card->base_addr);
> + iounmap(card->base_addr);
> + kfree(card);
> +
> + pdev->priv = NULL;
> +}
> +
> +/*
> + * Probe PCI device for EMS CAN signature and register each available
> + * CAN channel to SJA1000 Socket-CAN subsystem.
> + */
> +static int __devinit ems_pcmcia_add_card(struct pcmcia_device *pdev,
> + unsigned long base)
> +{
> + struct sja1000_priv *priv;
> + struct net_device *dev;
> + struct ems_pcmcia_card *card;
> + int err, i;
> +
> + /* Allocating card structures to hold addresses, ... */
> + card = kzalloc(sizeof(struct ems_pcmcia_card), GFP_KERNEL);
> + if (!card)
> + return -ENOMEM;
> +
> + pdev->priv = card;
> + card->channels = 0;
> +
> + card->base_addr = ioremap(base, EMS_PCMCIA_MEM_SIZE);
> + if (!card->base_addr) {
> + err = -ENOMEM;
> + goto failure_cleanup;
> + }
> +
> + /* Check for unique EMS CAN signature */
> + if (readw(card->base_addr) != 0xAA55) {
> + err = -ENODEV;
> + goto failure_cleanup;
> + }
> +
> + /* Request board reset */
> + writeb(EMS_CMD_RESET, card->base_addr);
> +
> + /* Make sure CAN controllers are mapped into card's memory space */
> + writeb(EMS_CMD_MAP, card->base_addr);
> +
> + /* Detect available channels */
> + for (i = 0; i< EMS_PCMCIA_MAX_CHAN; i++) {
> + dev = alloc_sja1000dev(0);
> + if (!dev) {
> + err = -ENOMEM;
> + goto failure_cleanup;
> + }
> +
> + card->net_dev[i] = dev;
> + priv = netdev_priv(dev);
> + priv->priv = card;
> + SET_NETDEV_DEV(dev,&pdev->dev);
> +
> + priv->irq_flags = IRQF_SHARED;
> + dev->irq = pdev->irq;
> + priv->reg_base = card->base_addr + EMS_PCMCIA_CAN_BASE_OFFSET +
> + (i * EMS_PCMCIA_CAN_CTRL_SIZE);
> +
> + /* Check if channel is present */
> + if (ems_pcmcia_check_chan(priv)) {
> + priv->read_reg = ems_pcmcia_read_reg;
> + priv->write_reg = ems_pcmcia_write_reg;
> + priv->can.clock.freq = EMS_PCMCIA_CAN_CLOCK;
> + priv->ocr = EMS_PCMCIA_OCR;
> + priv->cdr = EMS_PCMCIA_CDR;
> + priv->flags |= SJA1000_CUSTOM_IRQ_HANDLER;
> +
> + /* Register SJA1000 device */
> + err = register_sja1000dev(dev);
> + if (err) {
> + free_sja1000dev(dev);
> + goto failure_cleanup;
> + }
> +
> + card->channels++;
> +
> + printk(KERN_INFO "%s: registered %s on channel "
> + "#%d at 0x%p, irq %d\n", DRV_NAME, dev->name,
> + i, priv->reg_base, dev->irq);
> + } else
> + free_sja1000dev(dev);
> + }
> +
> + err = request_irq(dev->irq,&ems_pcmcia_interrupt, IRQF_SHARED,
> + DRV_NAME, card);
> + if (!err)
> + return 0;
> +
> +failure_cleanup:
> + ems_pcmcia_del_card(pdev);
> + return err;
> +}
> +
> +/*
> + * Setup PCMCIA socket and probe for EMS CPC-CARD
> + */
> +static int __devinit ems_pcmcia_probe(struct pcmcia_device *dev)
> +{
> + int csval;
> +
> + /* General socket configuration */
> + dev->config_flags |= CONF_ENABLE_IRQ;
> + dev->config_index = 1;
> + dev->config_regs = PRESENT_OPTION;
> +
> + /* The io structure describes IO port mapping */
> + dev->resource[0]->end = 16;
> + dev->resource[0]->flags |= IO_DATA_PATH_WIDTH_8;
> + dev->resource[1]->end = 16;
> + dev->resource[1]->flags |= IO_DATA_PATH_WIDTH_16;
> + dev->io_lines = 5;
> +
> + /* Allocate a memory window */
> + dev->resource[2]->flags =
> + (WIN_DATA_WIDTH_8 | WIN_MEMORY_TYPE_CM | WIN_ENABLE);
> + dev->resource[2]->start = dev->resource[2]->end = 0;
> +
> + csval = pcmcia_request_window(dev, dev->resource[2], 0);
> + if (csval) {
> + dev_err(&dev->dev, "pcmcia_request_window failed (err=%d)\n",
> + csval);
> + return 0;
> + }
> +
> + csval = pcmcia_map_mem_page(dev, dev->resource[2], dev->config_base);
> + if (csval) {
> + dev_err(&dev->dev, "pcmcia_map_mem_page failed (err=%d)\n",
> + csval);
> + return 0;
> + }
> +
> + csval = pcmcia_enable_device(dev);
> + if (csval) {
> + dev_err(&dev->dev, "pcmcia_enable_device failed (err=%d)\n",
> + csval);
> + return 0;
> + }
> +
> + ems_pcmcia_add_card(dev, dev->resource[2]->start);
> + return 0;
> +}
> +
> +/*
> + * Release claimed resources
> + */
> +static void ems_pcmcia_remove(struct pcmcia_device *dev)
> +{
> + ems_pcmcia_del_card(dev);
> + pcmcia_disable_device(dev);
> +}
> +
> +static struct pcmcia_driver ems_pcmcia_driver = {
> + .name = DRV_NAME,
> + .probe = ems_pcmcia_probe,
> + .remove = ems_pcmcia_remove,
> + .id_table = ems_pcmcia_tbl,
> +};
> +
> +static int __init ems_pcmcia_init(void)
> +{
> + return pcmcia_register_driver(&ems_pcmcia_driver);
> +}
> +module_init(ems_pcmcia_init);
> +
> +static void __exit ems_pcmcia_exit(void)
> +{
> + pcmcia_unregister_driver(&ems_pcmcia_driver);
> +}
> +module_exit(ems_pcmcia_exit);
--
EMS Dr. Thomas Wuensche e.K.
Sonnenhang 3
85304 Ilmmuenster
HRA Neuburg a.d. Donau, HR-Nr. 70.106
Phone: +49-8441-490260
Fax : +49-8441-81860
http://www.ems-wuensche.com
^ permalink raw reply
* Re: [PATCH] tcp: properly update lost_cnt_hint during shifting
From: Yan, Zheng @ 2011-09-28 10:45 UTC (permalink / raw)
To: Ilpo Järvinen; +Cc: netdev@vger.kernel.org, Nandita Dukkipati
In-Reply-To: <alpine.DEB.2.00.1109281226480.21709@wel-95.cs.helsinki.fi>
On 09/28/2011 05:50 PM, Ilpo Järvinen wrote:
> On Wed, 28 Sep 2011, Yan, Zheng wrote:
>
>> On 09/28/2011 04:55 PM, Yan, Zheng wrote:
>>> On 09/28/2011 04:17 PM, Ilpo Järvinen wrote:
>>>> On Wed, 28 Sep 2011, Yan, Zheng wrote:
>>>>
>>>>> lost_skb_hint is used by tcp_mark_head_lost() to mark the first
>>>>> unhandled skb. lost_cnt_hint is the number of sacked packets before
>>>>> the lost_skb_hint. tcp_shifted_skb() shouldn't increase lost_cnt_hint
>>>>> when shifting a sacked skb that is before the lost_skb_hint, because
>>>>> packets in it are already counted.
>>>>>
>>>>> Signed-off-by: Zheng Yan <zheng.z.yan@intel.com>
>>>>> ---
>>>>> diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c
>>>>> index 21fab3e..f712ace 100644
>>>>> --- a/net/ipv4/tcp_input.c
>>>>> +++ b/net/ipv4/tcp_input.c
>>>>> @@ -1390,9 +1390,14 @@ static int tcp_shifted_skb(struct sock *sk, struct sk_buff *skb,
>>>>> BUG_ON(!pcount);
>>>>>
>>>>> /* Tweak before seqno plays */
>>>>> - if (!tcp_is_fack(tp) && tcp_is_sack(tp) && tp->lost_skb_hint &&
>>>>> - !before(TCP_SKB_CB(tp->lost_skb_hint)->seq, TCP_SKB_CB(skb)->seq))
>>>>> - tp->lost_cnt_hint += pcount;
>>>>> + if (!tcp_is_fack(tp) && tcp_is_sack(tp) && tp->lost_skb_hint) {
>>>>> + if (skb == tp->lost_skb_hint)
>>>>> + tp->lost_cnt_hint += pcount;
>>>>> + else if (!(TCP_SKB_CB(skb)->sacked & TCPCB_SACKED_ACKED) &&
>>>>> + before(TCP_SKB_CB(skb)->seq,
>>>>> + TCP_SKB_CB(tp->lost_skb_hint)->seq))
>>>>> + tp->lost_cnt_hint += pcount;
>>>>> + }
>>>>
>>>> Ah right, the hole filled case which shifts not only the newly SACKed
>>>> skb but also the next, already SACKed skb?
>>>>
>>>> I fail to see why you needed to change !before into two checks though:
>>>> skb == tp->lost_skb_hint and before(params reversed) ? Shouldn't the
>>>> equality that is provided by the negation cover for the == check (and the
>>>> params reversion isn't necessary in any case)? In fact, isn't the skb ==
>>>> tp->lost_skb_hint check strictly wrong without the same TCPCB_SACKED_ACKED
>>>> guard (though I'm not sure, I didn't check, if the hint can ever point to
>>>> such a segment in the first place)?
>>>
>>> Thanks you for your reply.
>>>
>>> skb == tp->lost_skb_hint is special.
>>>
>>> If the skb is sacked and we shift 'pcount' packets to previous skb,
>>> these packets will not be counted by future tcp_mark_head_lost() call.
>>> So we should increase lost_cnt_hint.
>>>
>>> If the skb is not sacked, the skb will be sacked soon by tcp_sacktag_one(),
>>> So we should not increase lost_cnt_hint.
>>>
>>> I didn't think out the second case. I think the correct patch should be:
>>> ---
>>>
>>> diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c
>>> index 21fab3e..dcc2411 100644
>>> --- a/net/ipv4/tcp_input.c
>>> +++ b/net/ipv4/tcp_input.c
>>> @@ -1390,9 +1390,15 @@ static int tcp_shifted_skb(struct sock *sk, struct sk_buff *skb,
>>> BUG_ON(!pcount);
>>>
>>> /* Tweak before seqno plays */
>>> - if (!tcp_is_fack(tp) && tcp_is_sack(tp) && tp->lost_skb_hint &&
>>> - !before(TCP_SKB_CB(tp->lost_skb_hint)->seq, TCP_SKB_CB(skb)->seq))
>>> - tp->lost_cnt_hint += pcount;
>>> + if (!tcp_is_fack(tp) && tcp_is_sack(tp) && tp->lost_skb_hint) {
>>> + if ((TCP_SKB_CB(skb)->sacked & TCPCB_SACKED_ACKED) &&
>>> + skb == tp->lost_skb_hint)
>>> + tp->lost_cnt_hint += pcount;
>>> + else if (!(TCP_SKB_CB(skb)->sacked & TCPCB_SACKED_ACKED) &&
>>> + before(TCP_SKB_CB(skb)->seq,
>>> + TCP_SKB_CB(tp->lost_skb_hint)->seq))
>>> + tp->lost_cnt_hint += pcount;
>>> + }
>>>
>>> TCP_SKB_CB(prev)->end_seq += shifted;
>>> TCP_SKB_CB(skb)->seq += shifted;
>>> ---
>>
>> Sorry, I didn't think out the "skb before lost_skb_hint" case neither.
>> If the skb isn't sacked, tcp_sacktag_one() will increase the lost_cnt_hint.
>> So tcp_shifted_skb() shouldn't adjust the the lost_cnt_hint.
>>
>> I hope my patch is correct this time.
>>
>> ---
>> diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c
>> index 21fab3e..697ce5f 100644
>> --- a/net/ipv4/tcp_input.c
>> +++ b/net/ipv4/tcp_input.c
>> @@ -1390,8 +1390,8 @@ static int tcp_shifted_skb(struct sock *sk, struct sk_buff *skb,
>> BUG_ON(!pcount);
>>
>> /* Tweak before seqno plays */
>> - if (!tcp_is_fack(tp) && tcp_is_sack(tp) && tp->lost_skb_hint &&
>> - !before(TCP_SKB_CB(tp->lost_skb_hint)->seq, TCP_SKB_CB(skb)->seq))
>> + if (!tcp_is_fack(tp) && tcp_is_sack(tp) && tp->lost_skb_hint == skb &&
>> + (TCP_SKB_CB(skb)->sacked & TCPCB_SACKED_ACKED))
>> tp->lost_cnt_hint += pcount;
>>
>> TCP_SKB_CB(prev)->end_seq += shifted;
>
> Hehe, besides not spotting all this, I also made another mistake in my
> last post. It seems that this code has been quite broken from the
> beginning or we still lack some detail. ...But the latest change certainly
> seems more reasonable than the previous code of mine if I've successfully
> understood enough pieces. These hints, although providing significant
> performance benefits, are really pain to get right :-).
>
> But is the non-SACKed case really handled right when hint == skb by the
> sacktag_one. We move the seqno in between and then before(x->newseq,
> x->newseq) check returns false?
>
you are right, thank you.
really hope my patch is correct this time :)
---
diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c
index 21fab3e..a04622e 100644
--- a/net/ipv4/tcp_input.c
+++ b/net/ipv4/tcp_input.c
@@ -1390,8 +1390,7 @@ static int tcp_shifted_skb(struct sock *sk, struct sk_buff *skb,
BUG_ON(!pcount);
/* Tweak before seqno plays */
- if (!tcp_is_fack(tp) && tcp_is_sack(tp) && tp->lost_skb_hint &&
- !before(TCP_SKB_CB(tp->lost_skb_hint)->seq, TCP_SKB_CB(skb)->seq))
+ if (!tcp_is_fack(tp) && tcp_is_sack(tp) && tp->lost_skb_hint == skb)
tp->lost_cnt_hint += pcount;
TCP_SKB_CB(prev)->end_seq += shifted;
^ permalink raw reply related
* Possible NULL dereference caused by -stable commit ef81bb40bf15f350fe865f31fa42f1082772a576
From: Jason Wang @ 2011-09-28 10:51 UTC (permalink / raw)
To: netdev, eric.dumazet, David S. Miller, linux-kernel, Greg KH,
stable
Cc: Michael S. Tsirkin, Amos Kong
Hi all:
A possible NULL dereference were noticed by the stable commit
ef81bb40bf15f350fe865f31fa42f1082772a576 (which is a backport of
87c48fa3b4630905f98268dde838ee43626a060c). The case happens when bridge
froward a packet from guest to a physical nic, at this time no route is
attached to the skb which may lead a NULL dereference in
ipv6_select_ident(). -Next version have this check so it is fine. The
following patch may be used to avoid this but may also lead the ip
identification predicable, and this defect is also exist -next version
when no route because we still depends on a global variable to generate
the identification. Any thought on this?
Thanks.
diff --git a/net/ipv6/ip6_output.c b/net/ipv6/ip6_output.c
index 4ea6e21..414e2f4 100644
--- a/net/ipv6/ip6_output.c
+++ b/net/ipv6/ip6_output.c
@@ -622,7 +622,9 @@ static u32 __ipv6_select_ident(const struct in6_addr
*addr)
void ipv6_select_ident(struct frag_hdr *fhdr, struct rt6_info *rt)
{
- fhdr->identification =
htonl(__ipv6_select_ident(&rt->rt6i_dst.addr));
+ const struct in6_addr addr = IN6ADDR_ANY_INIT;
+ fhdr->identification =
+ htonl(__ipv6_select_ident(rt ? &rt->rt6i_dst.addr : &addr));
}
int ip6_fragment(struct sk_buff *skb, int (*output)(struct sk_buff *))
^ permalink raw reply related
* Re: [net-next 11/13] igb: Make Tx budget for NAPI user adjustable
From: Neil Horman @ 2011-09-28 11:00 UTC (permalink / raw)
To: Ben Hutchings
Cc: Andy Gospodarek, Stephen Hemminger, jeffrey t kirsher,
David Miller, netdev, gospo, Alexander H Duyck
In-Reply-To: <1317167146.2845.48.camel@bwh-desktop>
On Wed, Sep 28, 2011 at 12:45:46AM +0100, Ben Hutchings wrote:
> On Tue, 2011-09-20 at 16:23 -0400, Neil Horman wrote:
> [...]
> > This is the work Andy is referring to for those interested:
> > http://marc.info/?l=linux-kernel&m=131644727521409&w=2
> >
> > This version has Gregs Ack, and is waiting for an Ack from Jesse Barnes at the
> > moment.
>
> While I think it's useful to be able to list all IRQs assigned to a PCI
> device, this doesn't tell us anything about the way they're associated
> with queues.
>
I never claimed that it did. This just lets us definitavely correlate msi irq
instances to pci devices, and their device class. Preveously we were limited to
guessing what kind device an irq belonged to by doing hopeful string matches on
device names from proc/interrupts, something which was easily broken by a change
in driver naming practice, or an administrative device name change.
> > I think Andy's probably right, theres room here for expansion to create
> > a relationship between a given interrupt and a napi wieght. I expect what would
> > be most direct would be adding a napi_weight attribute that was conditional on
> > the class of the pci device allocating the irqs (make it visible for class 0x200
> > devs, invisible for others).
>
> That's a terrible idea; what has NAPI got to do with PCI devices?
>
Nothing directly, but stop making up an implementation, and deciding based on
that the whole notion is stupid. There are a few ways to do this, some of which
make sense.
I was thinking of something along the lines of two more attributes in
/sys/class/net/<if>/queues:
napi_weight
irq
The former is the napi weight of a given napi instance associated with a queue,
while the latter is a symlink either to ../device/irq or ../device/msi_irqs/<n>/
(or perhaps to ../devices/msi_irqs/<n>/irq if we want more consistency). This
lets us tune the napi weight of a queue and know what interrupt is associated
with it. That seems fairly sane to me.
Neil
^ permalink raw reply
* Re: [PATCH] tcp: properly update lost_cnt_hint during shifting
From: Ilpo Järvinen @ 2011-09-28 11:29 UTC (permalink / raw)
To: Yan, Zheng; +Cc: netdev@vger.kernel.org, Nandita Dukkipati
In-Reply-To: <4E82FAD6.1010708@intel.com>
[-- Attachment #1: Type: TEXT/PLAIN, Size: 1383 bytes --]
On Wed, 28 Sep 2011, Yan, Zheng wrote:
> > But is the non-SACKed case really handled right when hint == skb by the
> > sacktag_one. We move the seqno in between and then before(x->newseq,
> > x->newseq) check returns false?
> >
> you are right, thank you.
>
> really hope my patch is correct this time :)
> ---
> diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c
> index 21fab3e..a04622e 100644
> --- a/net/ipv4/tcp_input.c
> +++ b/net/ipv4/tcp_input.c
> @@ -1390,8 +1390,7 @@ static int tcp_shifted_skb(struct sock *sk, struct sk_buff *skb,
> BUG_ON(!pcount);
>
> /* Tweak before seqno plays */
> - if (!tcp_is_fack(tp) && tcp_is_sack(tp) && tp->lost_skb_hint &&
> - !before(TCP_SKB_CB(tp->lost_skb_hint)->seq, TCP_SKB_CB(skb)->seq))
> + if (!tcp_is_fack(tp) && tcp_is_sack(tp) && tp->lost_skb_hint == skb)
> tp->lost_cnt_hint += pcount;
>
> TCP_SKB_CB(prev)->end_seq += shifted;
It also looks a lot nicer now and more obvious. According to my current
understanding, feel free to add this once doing the proper submission with
Signed-off etc. (please also remove the comment too as seqnos have no
longer any significance here):
Acked-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi>
...but it certainly wouldn't hurt if also somebody else has pair of eyes
to spare to confirm that we (both) are now in agreement what the code
really says.
--
i.
^ permalink raw reply
* Re: [PATCH v2 4/7] per-cgroup tcp buffers control
From: Andrew Wagin @ 2011-09-28 11:58 UTC (permalink / raw)
To: Glauber Costa
Cc: linux-kernel, paul, lizf, kamezawa.hiroyu, ebiederm, davem,
gthelen, netdev, linux-mm
In-Reply-To: <1316051175-17780-5-git-send-email-glommer@parallels.com>
* tcp_destroy_cgroup_fill() is executed for each cgroup and
initializes some proto methods. proto_list is global and we can
initialize each proto one time. Do we need this really?
* And when a cgroup is destroyed, it cleans proto methods
(tcp_destroy_cgroup_fill), how other cgroups will work after that?
* What about proto, which is registered when cgroup mounted?
My opinion that we may initialize proto by the following way:
+#ifdef CONFIG_CGROUP_MEM_RES_CTLR_KMEM+ .enter_memory_pressure
= tcp_enter_memory_pressure_nocg,
+ .sockets_allocated = sockets_allocated_tcp_nocg,
+ .memory_allocated = memory_allocated_tcp_nocg,
+ .memory_pressure = memory_pressure_tcp_nocg,
+#else
.enter_memory_pressure = tcp_enter_memory_pressure,
.sockets_allocated = sockets_allocated_tcp,
.memory_allocated = memory_allocated_tcp,
.memory_pressure = memory_pressure_tcp,
+#endif
It should work, because the root memory cgroup always exists.
>+int tcp_init_cgroup_fill(struct proto *prot, struct cgroup *cgrp,
>+ struct cgroup_subsys *ss)
>+{
>+ prot->enter_memory_pressure = tcp_enter_memory_pressure;
>+ prot->memory_allocated = memory_allocated_tcp;
>+ prot->prot_mem = tcp_sysctl_mem;
>+ prot->sockets_allocated = sockets_allocated_tcp;
>+ prot->memory_pressure = memory_pressure_tcp;
>+
>+ return 0;
>+}
> +void tcp_destroy_cgroup_fill(struct proto *prot, struct cgroup *cgrp,
> + struct cgroup_subsys *ss)
> +{
> + prot->enter_memory_pressure = tcp_enter_memory_pressure_nocg;
> + prot->memory_allocated = memory_allocated_tcp_nocg;
> + prot->prot_mem = tcp_sysctl_mem_nocg;
> + prot->sockets_allocated = sockets_allocated_tcp_nocg;
> + prot->memory_pressure = memory_pressure_tcp_nocg;
>
>@@ -2220,12 +2220,16 @@ struct proto tcpv6_prot = {
> .hash = tcp_v6_hash,
> .unhash = inet_unhash,
> .get_port = inet_csk_get_port
> + .enter_memory_pressure = tcp_enter_memory_pressure_nocg,
> + .sockets_allocated = sockets_allocated_tcp_nocg,
> + .memory_allocated = memory_allocated_tcp_nocg,
> + .memory_pressure = memory_pressure_tcp_nocg,
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply
* Re: [PATCH v3 1/7] Basic kernel memory functionality for the Memory Controller
From: Glauber Costa @ 2011-09-28 12:03 UTC (permalink / raw)
To: KAMEZAWA Hiroyuki
Cc: linux-kernel, paul, lizf, ebiederm, davem, gthelen, netdev,
linux-mm, kirill
In-Reply-To: <20110928095826.eb8ebc8c.kamezawa.hiroyu@jp.fujitsu.com>
On 09/27/2011 09:58 PM, KAMEZAWA Hiroyuki wrote:
> On Mon, 26 Sep 2011 20:18:39 -0300
> Glauber Costa<glommer@parallels.com> wrote:
>
>> On 09/26/2011 07:34 AM, KAMEZAWA Hiroyuki wrote:
>>> On Sun, 18 Sep 2011 21:56:39 -0300
>>> Glauber Costa<glommer@parallels.com> wrote:
> "If parent sets use_hierarchy==1, children must have the same kmem_independent value
>>> with parant's one."
>>>
>>> How do you think ? I think a hierarchy must have the same config.
>> BTW, Kame:
>>
>> Look again (I forgot myself when I first replied to you)
>> Only in the root cgroup those files get registered.
>> So shouldn't be a problem, because children won't even
>> be able to see them.
>>
>> Do you agree with this ?
>>
>
> agreed.
>
Actually it is the other way around, following previous suggestions...
The root cgroup does *not* get those files registered, since we don't
intend to do any kernel memory limitation for it. The others get it.
Given that, I will proceed writing some code to respect parent cgroup's
hierarchy.
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply
* Re: Possible NULL dereference caused by -stable commit ef81bb40bf15f350fe865f31fa42f1082772a576
From: Eric Dumazet @ 2011-09-28 12:09 UTC (permalink / raw)
To: Jason Wang
Cc: netdev, David S. Miller, linux-kernel, Greg KH, stable,
Michael S. Tsirkin, Amos Kong
In-Reply-To: <4E82FC4E.5010101@redhat.com>
Le mercredi 28 septembre 2011 à 18:51 +0800, Jason Wang a écrit :
> Hi all:
>
> A possible NULL dereference were noticed by the stable commit
> ef81bb40bf15f350fe865f31fa42f1082772a576 (which is a backport of
> 87c48fa3b4630905f98268dde838ee43626a060c). The case happens when bridge
> froward a packet from guest to a physical nic, at this time no route is
> attached to the skb which may lead a NULL dereference in
> ipv6_select_ident(). -Next version have this check so it is fine. The
> following patch may be used to avoid this but may also lead the ip
> identification predicable, and this defect is also exist -next version
> when no route because we still depends on a global variable to generate
> the identification. Any thought on this?
1) Discussion on current kernel :
All we need here is not the route but inet_peer, so that inet_getid()
can be called on it.
If no route is given to ipv6_select_ident(), at least we can try to get
inet_peer, and release it before exiting from ipv6_select_ident()
2) On stable kernel, we already use an array
(ipv6_fragmentation_id[FID_HASH_SZ];) to make less predictables
fragments ids.
So we could get dst addr from the packet to be forwarded instead of the
(possibly NULL) route.
^ permalink raw reply
* Re: [PATCH v2 4/7] per-cgroup tcp buffers control
From: Glauber Costa @ 2011-09-28 12:11 UTC (permalink / raw)
To: Andrew Wagin
Cc: linux-kernel, paul, lizf, kamezawa.hiroyu, ebiederm, davem,
gthelen, netdev, linux-mm
In-Reply-To: <CANaxB-wy8VDv0Wjni6UzcfBzSgNn=bZBey5f+fXHebNuek=O1A@mail.gmail.com>
On 09/28/2011 08:58 AM, Andrew Wagin wrote:
> * tcp_destroy_cgroup_fill() is executed for each cgroup and
> initializes some proto methods. proto_list is global and we can
> initialize each proto one time. Do we need this really?
>
> * And when a cgroup is destroyed, it cleans proto methods
> (tcp_destroy_cgroup_fill), how other cgroups will work after that?
I've already realized that, and removed destruction from my upcoming
series. Thanks
> * What about proto, which is registered when cgroup mounted?
>
> My opinion that we may initialize proto by the following way:
>
> +#ifdef CONFIG_CGROUP_MEM_RES_CTLR_KMEM+ .enter_memory_pressure
> = tcp_enter_memory_pressure_nocg,
> + .sockets_allocated = sockets_allocated_tcp_nocg,
> + .memory_allocated = memory_allocated_tcp_nocg,
> + .memory_pressure = memory_pressure_tcp_nocg,
> +#else
> .enter_memory_pressure = tcp_enter_memory_pressure,
> .sockets_allocated = sockets_allocated_tcp,
> .memory_allocated = memory_allocated_tcp,
> .memory_pressure = memory_pressure_tcp,
> +#endif
>
> It should work, because the root memory cgroup always exists.
Yeah, I was still doing the initialization through cgroups, but I think
this works.
The reason I was keeping it cgroup's initialization method, was because
we have a parameter that allowed kmem accounting to be disabled.
But Kame suggested we'd remove it, and so I did.
>
>> +int tcp_init_cgroup_fill(struct proto *prot, struct cgroup *cgrp,
>> + struct cgroup_subsys *ss)
>> +{
>> + prot->enter_memory_pressure = tcp_enter_memory_pressure;
>> + prot->memory_allocated = memory_allocated_tcp;
>> + prot->prot_mem = tcp_sysctl_mem;
>> + prot->sockets_allocated = sockets_allocated_tcp;
>> + prot->memory_pressure = memory_pressure_tcp;
>> +
>> + return 0;
>> +}
>
>
>> +void tcp_destroy_cgroup_fill(struct proto *prot, struct cgroup *cgrp,
>> + struct cgroup_subsys *ss)
>> +{
>> + prot->enter_memory_pressure = tcp_enter_memory_pressure_nocg;
>> + prot->memory_allocated = memory_allocated_tcp_nocg;
>> + prot->prot_mem = tcp_sysctl_mem_nocg;
>> + prot->sockets_allocated = sockets_allocated_tcp_nocg;
>> + prot->memory_pressure = memory_pressure_tcp_nocg;
>>
>
>> @@ -2220,12 +2220,16 @@ struct proto tcpv6_prot = {
>> .hash = tcp_v6_hash,
>> .unhash = inet_unhash,
>> .get_port = inet_csk_get_port
>> + .enter_memory_pressure = tcp_enter_memory_pressure_nocg,
>> + .sockets_allocated = sockets_allocated_tcp_nocg,
>> + .memory_allocated = memory_allocated_tcp_nocg,
>> + .memory_pressure = memory_pressure_tcp_nocg,
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply
* Re: [PATCH 1/2] virtio-net: Verify page list size before fitting into skb
From: Sasha Levin @ 2011-09-28 12:19 UTC (permalink / raw)
To: Michael S. Tsirkin
Cc: linux-kernel, Rusty Russell, virtualization, netdev, kvm
In-Reply-To: <20110927123719.GB11276@redhat.com>
On Tue, 2011-09-27 at 15:37 +0300, Michael S. Tsirkin wrote:
> On Tue, Sep 27, 2011 at 02:20:29PM +0300, Sasha Levin wrote:
> > On Tue, 2011-09-27 at 10:00 +0300, Michael S. Tsirkin wrote:
> > > > skb = page_to_skb(vi, page, len);
> > > > ...
> > >
> > > Sorry I don't get it yet. Where is mergeable ignored here?
> >
> > The NULL deref happens in page_to_skb(), before merge buffers are
> > handled.
>
> The len here is a single buffer length, so for mergeable
> buffers it is <= the size of the buffer we gave to hardware,
> which is PAGE_SIZE.
>
> err = virtqueue_add_buf_single(vi->rvq, page_address(page),
> PAGE_SIZE, false, page, gfp);
>
>
> Unless of course we are trying to work around broken hardware again,
> which I don't have a problem with, but should probably
> get appropriate comments in code and trigger a warning.
>
> > I'll test it and see if it's really the case.
I've verified it with VIRTIO_NET_F_MRG_RXBUF set, and we still get the
NULL deref.
--
Sasha.
^ permalink raw reply
* [PATCH net-next v3] candev: allow SJW user setting for bittiming calculation
From: Oliver Hartkopp @ 2011-09-28 12:50 UTC (permalink / raw)
To: David Miller
Cc: SocketCAN Core Mailing List, Linux Netdev List,
Wolfgang Grandegger
This patch adds support for SJW user settings to not set the synchronization
jump width (SJW) to 1 in any case when using the in-kernel bittiming
calculation.
The ip-tool from iproute2 already supports to pass the user defined SJW
value. The given SJW value is sanitized with the controller specific sjw_max
and the calculated tseg2 value. As the SJW can have values up to 4 providing
this value will lead to the maximum possible SJW automatically. A higher SJW
allows higher controller oscillator tolerances.
Signed-off-by: Oliver Hartkopp <socketcan-fJ+pQTUTwRTk1uMJSBkQmQ@public.gmane.org>
Acked-by: Wolfgang Grandegger <wg-5Yr1BZd7O62+XT7JhA+gdA@public.gmane.org>
---
v2: Resend due to wrong mail address header encoding.
v3: - Detected malformed patch format due to line break in function name
- Added Acked-by: from Wolfgang Grandegger
diff --git a/drivers/net/can/dev.c b/drivers/net/can/dev.c
index 9bf1116..25695bd 100644
--- a/drivers/net/can/dev.c
+++ b/drivers/net/can/dev.c
@@ -150,7 +150,19 @@ static int can_calc_bittiming(struct net_device *dev, struct can_bittiming *bt)
bt->prop_seg = tseg1 / 2;
bt->phase_seg1 = tseg1 - bt->prop_seg;
bt->phase_seg2 = tseg2;
- bt->sjw = 1;
+
+ /* check for sjw user settings */
+ if (!bt->sjw || !btc->sjw_max)
+ bt->sjw = 1;
+ else {
+ /* bt->sjw is at least 1 -> sanitize upper bound to sjw_max */
+ if (bt->sjw > btc->sjw_max)
+ bt->sjw = btc->sjw_max;
+ /* bt->sjw must not be higher than tseg2 */
+ if (tseg2 < bt->sjw)
+ bt->sjw = tseg2;
+ }
+
bt->brp = best_brp;
/* real bit-rate */
bt->bitrate = priv->clock.freq / (bt->brp * (tseg1 + tseg2 + 1));
^ permalink raw reply related
* Re: [GIT PULL net-next] IPVS
From: Simon Horman @ 2011-09-28 13:28 UTC (permalink / raw)
To: Pablo Neira Ayuso
Cc: lvs-devel, netdev, netfilter-devel, netfilter, Wensong Zhang,
Julian Anastasov, Patrick McHardy, David S. Miller
In-Reply-To: <20110927081618.GA22655@1984>
On Tue, Sep 27, 2011 at 10:16:18AM +0200, Pablo Neira Ayuso wrote:
> On Mon, Sep 26, 2011 at 06:05:33PM +0900, Simon Horman wrote:
> > Hi,
> >
> > with all the excitement of kernel.org being offline and a bunch of trees
> > likewise being offline I am a little unsure who should take this pull
> > request which is based on the current net-next tree. But I guess it should
> > be Patrick, Pablo or Dave.
>
> I'll try to set up one tree in one of my servers along today, I'll
> send you the URI. We can use it until kernel.org comes back.
Thanks. Would you like me to rebase my tree on yours?
^ permalink raw reply
* [PATCH v2] tcp: properly update lost_cnt_hint during shifting
From: Yan, Zheng @ 2011-09-28 14:13 UTC (permalink / raw)
To: netdev@vger.kernel.org
Cc: Ilpo Järvinen, Nandita Dukkipati, davem@davemloft.net
lost_skb_hint is used by tcp_mark_head_lost() to mark the first unhandled skb.
lost_cnt_hint is the number of sacked packets before the lost_skb_hint. When
shifting a skb that is before the lost_skb_hint, tcp_shifted_skb() doesn't need
to adjust lost_cnt_hint by itself because it calls tcp_sacktag_one() which will
do the job right.
Signed-off-by: Zheng Yan <zheng.z.yan@intel.com>
Acked-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi>
---
diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c
index 21fab3e..ae5a934 100644
--- a/net/ipv4/tcp_input.c
+++ b/net/ipv4/tcp_input.c
@@ -1389,9 +1389,7 @@ static int tcp_shifted_skb(struct sock *sk, struct sk_buff *skb,
BUG_ON(!pcount);
- /* Tweak before seqno plays */
- if (!tcp_is_fack(tp) && tcp_is_sack(tp) && tp->lost_skb_hint &&
- !before(TCP_SKB_CB(tp->lost_skb_hint)->seq, TCP_SKB_CB(skb)->seq))
+ if (!tcp_is_fack(tp) && tcp_is_sack(tp) && tp->lost_skb_hint == skb)
tp->lost_cnt_hint += pcount;
TCP_SKB_CB(prev)->end_seq += shifted;
^ permalink raw reply related
* Question about reply to a datagram sent to a Subnet-Router anycast address
From: François-Xavier Le Bail @ 2011-09-28 14:13 UTC (permalink / raw)
To: Linux Netdev List
Hi All,
I try to ping some routers on one of their Subnet-Router anycast addresses (SRAA).
(http://tools.ietf.org/html/rfc4291#section-2.6.1)
A Linux kernel 3.0 in IPv6 forwarding mode reply with an unicast source address (same subnet prefix).
An Alcatel router reply with the SRAA as source address.
The RFC 4291 removed the restrictions on using IPv6 anycast addresses, so a SRAA may be used as a source address, in a reply.
In the following draft, we have a rationale for the removal of restrictions regarding anycast as source address in RFC 4291 :
(http://tools.ietf.org/html/draft-jabley-v6-anycast-clarify-00#section-3.1)
"3.1 Anycast Source Addresses
For many conventional services to be distributed using anycast, it is
necessary for reply datagrams sent from servers to clients to be
sourced from the same address that was used as the destination in
request datagrams sent from clients to servers. When such a service
is distributed using anycast, the destination address used in request
datagrams is necessarily an anycast address; corresponding reply
packets must therefore use the same anycast address as their source
address.
Being able to use an anycast address as the source address in an IPv6
datagram is a prerequisite for the distribution of many services
using anycast over IPv6."
A SRAA is a special case of anycast address.
Is there a way to setup the Linux kernel to behave like Alcatel router, replying with the SRAA as source address ?
If not, why not update the behaviour of the Linux kernel to configurable ?
Please let me know your feedback.
Thanks,
Francois-Xavier Le Bail
^ permalink raw reply
* [PATCH v2 1/2] virtio-net: Verify page list size before fitting into skb
From: Sasha Levin @ 2011-09-28 14:40 UTC (permalink / raw)
To: linux-kernel
Cc: Sasha Levin, Rusty Russell, Michael S. Tsirkin, virtualization,
netdev, kvm
This patch verifies that the length of a buffer stored in a linked list
of pages is small enough to fit into a skb.
If the size is larger than a max size of a skb, it means that we shouldn't
go ahead building skbs anyway since we won't be able to send the buffer as
the user requested.
Cc: Rusty Russell <rusty@rustcorp.com.au>
Cc: "Michael S. Tsirkin" <mst@redhat.com>
Cc: virtualization@lists.linux-foundation.org
Cc: netdev@vger.kernel.org
Cc: kvm@vger.kernel.org
Signed-off-by: Sasha Levin <levinsasha928@gmail.com>
---
drivers/net/virtio_net.c | 13 +++++++++++++
1 files changed, 13 insertions(+), 0 deletions(-)
diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c
index 0c7321c..bde0dec 100644
--- a/drivers/net/virtio_net.c
+++ b/drivers/net/virtio_net.c
@@ -195,6 +195,19 @@ static struct sk_buff *page_to_skb(struct virtnet_info *vi,
len -= copy;
offset += copy;
+ /*
+ * Verify that we can indeed put this data into a skb.
+ * This is here to handle cases when the device erroneously
+ * tries to receive more than is possible. This is usually
+ * the case of a broken device.
+ */
+ if (unlikely(len > MAX_SKB_FRAGS * PAGE_SIZE)) {
+ if (net_ratelimit())
+ pr_debug("%s: too much data\n", skb->dev->name);
+ dev_kfree_skb(skb);
+ return NULL;
+ }
+
while (len) {
set_skb_frag(skb, page, offset, &len);
page = (struct page *)page->private;
--
1.7.6.1
^ permalink raw reply related
* [PATCH v2 2/2] virtio-net: Prevent NULL dereference
From: Sasha Levin @ 2011-09-28 14:40 UTC (permalink / raw)
To: linux-kernel
Cc: Sasha Levin, Rusty Russell, Michael S. Tsirkin, virtualization,
netdev, kvm
In-Reply-To: <1317220855-9352-1-git-send-email-levinsasha928@gmail.com>
This patch prevents a NULL dereference when the user has passed a length
longer than an actual buffer to virtio-net.
Cc: Rusty Russell <rusty@rustcorp.com.au>
Cc: "Michael S. Tsirkin" <mst@redhat.com>
Cc: virtualization@lists.linux-foundation.org
Cc: netdev@vger.kernel.org
Cc: kvm@vger.kernel.org
Signed-off-by: Sasha Levin <levinsasha928@gmail.com>
---
drivers/net/virtio_net.c | 12 +++++++++++-
1 files changed, 11 insertions(+), 1 deletions(-)
diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c
index bde0dec..4a53d2a 100644
--- a/drivers/net/virtio_net.c
+++ b/drivers/net/virtio_net.c
@@ -208,12 +208,22 @@ static struct sk_buff *page_to_skb(struct virtnet_info *vi,
return NULL;
}
- while (len) {
+ while (len && page) {
set_skb_frag(skb, page, offset, &len);
page = (struct page *)page->private;
offset = 0;
}
+ /*
+ * This is the case where we ran out of pages in our linked list, but
+ * supposedly have more data to read.
+ */
+ if (len > 0) {
+ pr_debug("%s: missing data to assemble skb\n", skb->dev->name);
+ dev_kfree_skb(skb);
+ return NULL;
+ }
+
if (page)
give_pages(vi, page);
--
1.7.6.1
^ permalink raw reply related
* Re: [net-next 11/13] igb: Make Tx budget for NAPI user adjustable
From: Stephen Hemminger @ 2011-09-28 15:11 UTC (permalink / raw)
To: Neil Horman
Cc: Ben Hutchings, Andy Gospodarek, Stephen Hemminger,
jeffrey t kirsher, David Miller, netdev, gospo, Alexander H Duyck
In-Reply-To: <20110928110055.GA15340@hmsreliant.think-freely.org>
On Wed, 28 Sep 2011 07:00:55 -0400
Neil Horman <nhorman@tuxdriver.com> wrote:
> I was thinking of something along the lines of two more attributes in
> /sys/class/net/<if>/queues:
> napi_weight
> irq
>
> The former is the napi weight of a given napi instance associated with a queue,
> while the latter is a symlink either to ../device/irq or ../device/msi_irqs/<n>/
> (or perhaps to ../devices/msi_irqs/<n>/irq if we want more consistency). This
> lets us tune the napi weight of a queue and know what interrupt is associated
> with it. That seems fairly sane to me.
This breaks for the case of some corner case devices like multi-port Marvell boards.
There can be a N to 1 or 1 to N relationship between NAPI and the device.
^ permalink raw reply
* Re: Bridging broken/unfriendly
From: Michal Soltys @ 2011-09-28 15:21 UTC (permalink / raw)
To: sclark46; +Cc: Linux Kernel Network Developers
In-Reply-To: <4E7E5976.1070200@earthlink.net>
On 11-09-25 00:28, Stephen Clark wrote:
> Hi,
>
> Is there some reason Linux bridging won't let the ip address be on
> one of the interfaces, like FreeBSD does, instead of the bridge device?
>
You can do that, though you have to remember about proper routing, and
you will need ebtables to make some of the traffic not go through the
bridge.
Check http://ebtables.sourceforge.net/examples/basic.html#all for more
details.
^ permalink raw reply
* Re: Bridging broken/unfriendly
From: Stephen Hemminger @ 2011-09-28 15:30 UTC (permalink / raw)
To: sclark46; +Cc: Linux Kernel Network Developers
In-Reply-To: <4E7E5976.1070200@earthlink.net>
On Sat, 24 Sep 2011 18:28:06 -0400
Stephen Clark <sclark46@earthlink.net> wrote:
> Hi,
>
> Is there some reason Linux bridging won't let the ip address be on
> one of the interfaces, like FreeBSD does, instead of the bridge device?
>
> This makes it very difficult or impossible to remotely add the interface
> you are remoted in on to a bridge, or is there some sneaky way to
> do this without losing your connection?
>
I would like to see a clean solution to setting up a bridge.
There was a patch that was never completed to allow migrating a ethernet
interface into a bridge. It is possible to do it with a script, by
dumping routes with ip command and replaying that into the bridge.
To really do it right (including neighbor table and iptables rules)
would be complex, especially considering the error cases.
Having looked at the FreeBSD code, that is not the answer. Trying to keep
a clean separation between IP and bridging is much better.
^ permalink raw reply
* [PATCH 1/1] ibmveth: Fix oops on request_irq failure
From: Brian King @ 2011-09-28 15:33 UTC (permalink / raw)
To: netdev; +Cc: brking
If request_irq fails, the ibmveth driver will overwrite
the rc and end up returning a successful rc on its open
function, resulting in an oops later when a packet gets
sent and buffers are not allocated due to the failed open.
Signed-off-by: Brian King <brking@linux.vnet.ibm.com>
---
drivers/net/ibmveth.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff -puN drivers/net/ibmveth.c~ibmveth_bounce_oops2 drivers/net/ibmveth.c
--- linux-2.6/drivers/net/ibmveth.c~ibmveth_bounce_oops2 2011-09-28 09:53:09.000000000 -0500
+++ linux-2.6-bjking1/drivers/net/ibmveth.c 2011-09-28 09:53:09.000000000 -0500
@@ -636,8 +636,8 @@ static int ibmveth_open(struct net_devic
netdev_err(netdev, "unable to request irq 0x%x, rc %d\n",
netdev->irq, rc);
do {
- rc = h_free_logical_lan(adapter->vdev->unit_address);
- } while (H_IS_LONG_BUSY(rc) || (rc == H_BUSY));
+ lpar_rc = h_free_logical_lan(adapter->vdev->unit_address);
+ } while (H_IS_LONG_BUSY(lpar_rc) || (lpar_rc == H_BUSY));
goto err_out;
}
_
^ permalink raw reply
* Re: [GIT PULL net-next] IPVS
From: Pablo Neira Ayuso @ 2011-09-28 15:45 UTC (permalink / raw)
To: Simon Horman
Cc: lvs-devel, netdev, netfilter-devel, netfilter, Wensong Zhang,
Julian Anastasov, Patrick McHardy, David S. Miller
In-Reply-To: <20110928132802.GC7661@verge.net.au>
On Wed, Sep 28, 2011 at 10:28:03PM +0900, Simon Horman wrote:
> On Tue, Sep 27, 2011 at 10:16:18AM +0200, Pablo Neira Ayuso wrote:
> > On Mon, Sep 26, 2011 at 06:05:33PM +0900, Simon Horman wrote:
> > > Hi,
> > >
> > > with all the excitement of kernel.org being offline and a bunch of trees
> > > likewise being offline I am a little unsure who should take this pull
> > > request which is based on the current net-next tree. But I guess it should
> > > be Patrick, Pablo or Dave.
> >
> > I'll try to set up one tree in one of my servers along today, I'll
> > send you the URI. We can use it until kernel.org comes back.
>
> Thanks. Would you like me to rebase my tree on yours?
For your patches, I put them in one branch and will cherrypick them
into master.
BTW, the trees are here:
http://1984.lsi.us.es/git/?p=net/.git;a=summary
http://1984.lsi.us.es/git/?p=net-next/.git;a=summary
I'll start iterating over the list collecting patches along today.
^ 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