* Re: [PATCH] inet_diag: fix panic when unload inet_diag
From: Gao feng @ 2012-09-25 7:20 UTC (permalink / raw)
To: Eric Dumazet; +Cc: davem, stephen.hemminger, jengelh, kuznet, netdev
In-Reply-To: <1348555011.26828.2031.camel@edumazet-glaptop>
于 2012年09月25日 14:36, Eric Dumazet 写道:
> On Tue, 2012-09-25 at 10:48 +0800, Gao feng wrote:
>> when inet_diag being compiled as module, inet_diag_handler_dump
>> set netlink_dump_control.dump to inet_diag_dump,so if module
>> inet_diag is unloaded,netlink will still try to call this function
>> in netlink_dump. this will cause kernel panic.
>>
>> fix this by adding a reference of inet_diag module before
>> setting netlink_callback, and release this reference in
>> netlink_callback.done.
>>
>> Thanks for all help from Stephen,Jan and Eric.
> ...
>
>>
>> @@ -1001,8 +1025,26 @@ static int inet_diag_handler_dump(struct sk_buff *skb, struct nlmsghdr *h)
>> {
>> struct netlink_dump_control c = {
>> .dump = inet_diag_dump,
>> + .done = inet_diag_done,
>> };
>> - return netlink_dump_start(net->diag_nlsk, skb, h, &c);
>> + int err;
>> + /*
>> + * netlink_dump will call inet_diag_dump,
>> + * so we need a reference of THIS_MODULE.
>> + */
>> + if (!try_module_get(THIS_MODULE))
>> + return -EPROTONOSUPPORT;
>> +
>> + err = netlink_dump_start(net->diag_nlsk, skb, h, &c);
>> +
>> + if ((err != -EINTR) && (err != -ENOBUFS)) {
>> + /*
>> + * netlink_callback set failed, release the
>> + * referenct of THIS_MODULE.
>> + */
>> + module_put(THIS_MODULE);
>> + }
>> + return err;
>> }
>> }
>>
>
> Hmm... this seems error prone...
>
> In the future, netlink_dump_start() could be changed to return other
> errors than EINTR or ENOBUFS that need the module_put()
>
EINTR and ENOBUFS is returned by netlink_dump, netlink_dump is called by
netlink_dump_start after netlink_callback being set successfully.
so this checking of EINTR and ENOBUFS here is to determinate if we set
netlink_callback successfully.
I think in order to reduce error prone,we have to change netlink_dump_start
to determinate if we set netlink_callback successfully.
> I would change netlink_dump_start() to __netlink_dump_start() and add a
> module param to it, so that this module stuff is centralized in
> __netlink_dump_start()
>
> Then, instead of calling (from inet_diag)
>
> netlink_dump_start(net->diag_nlsk, skb, nlh, &c);
>
> you would use :
>
> __netlink_dump_start(net->diag_nlsk, skb, nlh, &c, THIS_MODULE);
>
> I wonder if this fix is not needed elsewhere eventually
> (net/unix/af_unix.c for example ?)
>
do you mean net/unix/unix_diag.c ?
I test nfnetlink module,it has the same problem.
It's need to modify netlink_dump_start not only wrap netlink_dump_start.
^ permalink raw reply
* Re: [PATCH] inet_diag: fix panic when unload inet_diag
From: Gao feng @ 2012-09-25 7:27 UTC (permalink / raw)
To: Eric Dumazet; +Cc: davem, stephen.hemminger, jengelh, kuznet, netdev
In-Reply-To: <50615B30.80901@cn.fujitsu.com>
于 2012年09月25日 15:20, Gao feng 写道:
> It's need to modify netlink_dump_start not only wrap netlink_dump_start.
maybe it's better to add a struct module *module in struct netlink_callback..
^ permalink raw reply
* RE: bnx2x: link detected up at startup even when it should be down
From: Dmitry Kravkov @ 2012-09-25 7:40 UTC (permalink / raw)
To: Jean-Michel Hautbois
Cc: netdev, Barak Witkowski, Eilon Greenstein, davem@davemloft.net
In-Reply-To: <504C9EFCA2D0054393414C9CB605C37F2F1B50@SJEXCHMB06.corp.ad.broadcom.com>
> -----Original Message-----
> From: netdev-owner@vger.kernel.org [mailto:netdev-owner@vger.kernel.org]
> On Behalf Of Dmitry Kravkov
> Sent: Friday, September 21, 2012 10:23 PM
> To: Jean-Michel Hautbois
> Cc: netdev; Barak Witkowski; Eilon Greenstein; davem@davemloft.net
> Subject: RE: bnx2x: link detected up at startup even when it should be down
>
> Hi Jean,
>
> Thank you for the info
>
> > -----Original Message-----
> > From: Jean-Michel Hautbois [mailto:jhautbois@gmail.com]
> > Sent: Friday, September 21, 2012 9:04 AM
> > To: Dmitry Kravkov
> > Cc: netdev; Barak Witkowski; Eilon Greenstein; davem@davemloft.net
> > Subject: Re: bnx2x: link detected up at startup even when it should be down
> >
> > I already did it twice. I think this is FW related and not only the
> > commit adding afex support. It may have solved a link issue (I am just
> > guessing, based on experiments) ?
>
> FW replaced in this commit does not deal with link at all,
>
> One is involved in link management is displayed using 'ethtool -i' - it comes with
> a card and driver independent.
>
> Is device configured for MF by the switch?
> Can you please share lspci output?
>
> Other thing that can help in analysis is msglvl 0x4 for both situations
>
We were unable to reproduce the issue on 3.2. Can you please provide logs from your setup?
^ permalink raw reply
* Re: [PATCH v4] lxt PHY: Support for the buggy LXT973 rev A2
From: Richard Cochran @ 2012-09-25 7:47 UTC (permalink / raw)
To: leroy christophe; +Cc: David S Miller, netdev, linux-kernel
In-Reply-To: <50614DEE.9050400@c-s.fr>
On Tue, Sep 25, 2012 at 08:23:42AM +0200, leroy christophe wrote:
>
> A2 chip has phy_id 0x00137a10
> A3 chip has phy_id 0x00137a11
Okay then, thanks.
Acked-by: Richard Cochran <richardcochran@gmail.com>
^ permalink raw reply
* [PATCH] ipconfig: fix trivial build error
From: Andy Shevchenko @ 2012-09-25 8:09 UTC (permalink / raw)
To: netdev, linux-next; +Cc: Andy Shevchenko, Christoph Fritz, David S. Miller
In-Reply-To: <1348255713.12456.43.camel@mars>
The commit 5e953778a2aab04929a5e7b69f53dc26e39b079e ("ipconfig: add nameserver
IPs to kernel-parameter ip=") introduces ic_nameservers_predef() that defined
only for BOOTP. However it is used by ip_auto_config_setup() as well. This
patch moves it outside of #ifdef BOOTP.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: Christoph Fritz <chf.fritz@googlemail.com>
Cc: David S. Miller <davem@davemloft.net>
---
net/ipv4/ipconfig.c | 22 +++++++++++-----------
1 file changed, 11 insertions(+), 11 deletions(-)
diff --git a/net/ipv4/ipconfig.c b/net/ipv4/ipconfig.c
index 1c0e7e0..798358b 100644
--- a/net/ipv4/ipconfig.c
+++ b/net/ipv4/ipconfig.c
@@ -583,6 +583,17 @@ static void __init ic_rarp_send_if(struct ic_device *d)
#endif
/*
+ * Predefine Nameservers
+ */
+static inline void __init ic_nameservers_predef(void)
+{
+ int i;
+
+ for (i = 0; i < CONF_NAMESERVERS_MAX; i++)
+ ic_nameservers[i] = NONE;
+}
+
+/*
* DHCP/BOOTP support.
*/
@@ -743,17 +754,6 @@ static void __init ic_bootp_init_ext(u8 *e)
/*
- * Predefine Nameservers
- */
-static inline void __init ic_nameservers_predef(void)
-{
- int i;
-
- for (i = 0; i < CONF_NAMESERVERS_MAX; i++)
- ic_nameservers[i] = NONE;
-}
-
-/*
* Initialize the DHCP/BOOTP mechanism.
*/
static inline void __init ic_bootp_init(void)
--
1.7.10.4
^ permalink raw reply related
* Re: bnx2x: link detected up at startup even when it should be down
From: Jean-Michel Hautbois @ 2012-09-25 8:11 UTC (permalink / raw)
To: Dmitry Kravkov
Cc: netdev, Barak Witkowski, Eilon Greenstein, davem@davemloft.net
In-Reply-To: <504C9EFCA2D0054393414C9CB605C37F3079E4@SJEXCHMB06.corp.ad.broadcom.com>
2012/9/25 Dmitry Kravkov <dmitry@broadcom.com>:
>> -----Original Message-----
>> From: netdev-owner@vger.kernel.org [mailto:netdev-owner@vger.kernel.org]
>> On Behalf Of Dmitry Kravkov
>> Sent: Friday, September 21, 2012 10:23 PM
>> To: Jean-Michel Hautbois
>> Cc: netdev; Barak Witkowski; Eilon Greenstein; davem@davemloft.net
>> Subject: RE: bnx2x: link detected up at startup even when it should be down
>>
>> Hi Jean,
>>
>> Thank you for the info
>>
>> > -----Original Message-----
>> > From: Jean-Michel Hautbois [mailto:jhautbois@gmail.com]
>> > Sent: Friday, September 21, 2012 9:04 AM
>> > To: Dmitry Kravkov
>> > Cc: netdev; Barak Witkowski; Eilon Greenstein; davem@davemloft.net
>> > Subject: Re: bnx2x: link detected up at startup even when it should be down
>> >
>> > I already did it twice. I think this is FW related and not only the
>> > commit adding afex support. It may have solved a link issue (I am just
>> > guessing, based on experiments) ?
>>
>> FW replaced in this commit does not deal with link at all,
>>
>> One is involved in link management is displayed using 'ethtool -i' - it comes with
>> a card and driver independent.
>>
>> Is device configured for MF by the switch?
>> Can you please share lspci output?
>>
>> Other thing that can help in analysis is msglvl 0x4 for both situations
>>
> We were unable to reproduce the issue on 3.2. Can you please provide logs from your setup?
Yes, I was off until today, I have a workaround, but here are some
informations :
$> lspci -vv -d 14e4:168e
04:00.0 Ethernet controller: Broadcom Corporation Device 168e (rev 10)
Subsystem: Hewlett-Packard Company Device 1798
Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop-
ParErr+ Stepping- SERR- FastB2B- DisINTx+
Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort-
<TAbort- <MAbort- >SERR- <PERR- INTx-
Latency: 0, Cache Line Size: 64 bytes
Interrupt: pin A routed to IRQ 32
Region 0: Memory at ea000000 (64-bit, prefetchable) [size=8M]
Region 2: Memory at e9800000 (64-bit, prefetchable) [size=8M]
Region 4: Memory at e97f0000 (64-bit, prefetchable) [size=64K]
[virtual] Expansion ROM at def00000 [disabled] [size=256K]
Capabilities: [48] Power Management version 3
Flags: PMEClk- DSI- D1- D2- AuxCurrent=0mA
PME(D0+,D1-,D2-,D3hot+,D3cold+)
Status: D0 PME-Enable- DSel=0 DScale=1 PME-
Capabilities: [50] Vital Product Data <?>
Capabilities: [58] Message Signalled Interrupts: Mask- 64bit+
Queue=0/3 Enable-
Address: 0000000000000000 Data: 0000
Capabilities: [a0] MSI-X: Enable+ Mask- TabSize=17
Vector table: BAR=4 offset=00000000
PBA: BAR=4 offset=00001000
Capabilities: [ac] Express (v2) Endpoint, MSI 00
DevCap: MaxPayload 512 bytes, PhantFunc 0, Latency L0s
<4us, L1 <64us
ExtTag+ AttnBtn- AttnInd- PwrInd- RBE+ FLReset-
DevCtl: Report errors: Correctable- Non-Fatal+ Fatal+
Unsupported-
RlxdOrd+ ExtTag+ PhantFunc- AuxPwr+ NoSnoop+
MaxPayload 256 bytes, MaxReadReq 4096 bytes
DevSta: CorrErr- UncorrErr- FatalErr- UnsuppReq-
AuxPwr+ TransPend-
LnkCap: Port #0, Speed 5GT/s, Width x8, ASPM L0s L1,
Latency L0 <2us, L1 <4us
ClockPM+ Suprise- LLActRep- BwNot-
LnkCtl: ASPM Disabled; RCB 64 bytes Disabled- Retrain- CommClk-
ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
LnkSta: Speed 5GT/s, Width x8, TrErr- Train- SlotClk+
DLActive- BWMgmt- ABWMgmt-
Capabilities: [100] Advanced Error Reporting <?>
Capabilities: [13c] Device Serial Number 48-49-7a-fe-ff-6e-c1-80
Capabilities: [150] Power Budgeting <?>
Capabilities: [160] Virtual Channel <?>
Capabilities: [1b8] #0e
Capabilities: [220] #15
Capabilities: [300] #19
Kernel driver in use: bnx2x
Kernel modules: bnx2x
04:00.1 Ethernet controller: Broadcom Corporation Device 168e (rev 10)
Subsystem: Hewlett-Packard Company Device 1798
Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop-
ParErr+ Stepping- SERR- FastB2B- DisINTx+
Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort-
<TAbort- <MAbort- >SERR- <PERR- INTx-
Latency: 0, Cache Line Size: 64 bytes
Interrupt: pin B routed to IRQ 36
Region 0: Memory at e8800000 (64-bit, prefetchable) [size=8M]
Region 2: Memory at e8000000 (64-bit, prefetchable) [size=8M]
Region 4: Memory at e7ff0000 (64-bit, prefetchable) [size=64K]
[virtual] Expansion ROM at def40000 [disabled] [size=256K]
Capabilities: [48] Power Management version 3
Flags: PMEClk- DSI- D1- D2- AuxCurrent=0mA
PME(D0+,D1-,D2-,D3hot+,D3cold+)
Status: D0 PME-Enable- DSel=0 DScale=1 PME-
Capabilities: [50] Vital Product Data <?>
Capabilities: [58] Message Signalled Interrupts: Mask- 64bit+
Queue=0/3 Enable-
Address: 0000000000000000 Data: 0000
Capabilities: [a0] MSI-X: Enable+ Mask- TabSize=17
Vector table: BAR=4 offset=00000000
PBA: BAR=4 offset=00001000
Capabilities: [ac] Express (v2) Endpoint, MSI 00
DevCap: MaxPayload 512 bytes, PhantFunc 0, Latency L0s
<4us, L1 <64us
ExtTag+ AttnBtn- AttnInd- PwrInd- RBE+ FLReset-
DevCtl: Report errors: Correctable- Non-Fatal+ Fatal+
Unsupported-
RlxdOrd+ ExtTag+ PhantFunc- AuxPwr+ NoSnoop+
MaxPayload 256 bytes, MaxReadReq 4096 bytes
DevSta: CorrErr- UncorrErr- FatalErr- UnsuppReq-
AuxPwr+ TransPend-
LnkCap: Port #0, Speed 5GT/s, Width x8, ASPM L0s L1,
Latency L0 <2us, L1 <4us
ClockPM+ Suprise- LLActRep- BwNot-
LnkCtl: ASPM Disabled; RCB 64 bytes Disabled- Retrain- CommClk-
ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
LnkSta: Speed 5GT/s, Width x8, TrErr- Train- SlotClk+
DLActive- BWMgmt- ABWMgmt-
Capabilities: [100] Advanced Error Reporting <?>
Capabilities: [13c] Device Serial Number 4c-49-7a-fe-ff-6e-c1-80
Capabilities: [150] Power Budgeting <?>
Capabilities: [160] Virtual Channel <?>
Capabilities: [1b8] #0e
Capabilities: [220] #15
Kernel driver in use: bnx2x
Kernel modules: bnx2x
04:00.2 Ethernet controller: Broadcom Corporation Device 168e (rev 10)
Subsystem: Hewlett-Packard Company Device 1798
Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop-
ParErr+ Stepping- SERR- FastB2B- DisINTx+
Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort-
<TAbort- <MAbort- >SERR- <PERR- INTx-
Latency: 0, Cache Line Size: 64 bytes
Interrupt: pin B routed to IRQ 36
Region 0: Memory at e7000000 (64-bit, prefetchable) [size=8M]
Region 2: Memory at e6800000 (64-bit, prefetchable) [size=8M]
Region 4: Memory at e67f0000 (64-bit, prefetchable) [size=64K]
Capabilities: [48] Power Management version 3
Flags: PMEClk- DSI- D1- D2- AuxCurrent=0mA
PME(D0+,D1-,D2-,D3hot+,D3cold+)
Status: D0 PME-Enable- DSel=0 DScale=1 PME-
Capabilities: [50] Vital Product Data <?>
Capabilities: [58] Message Signalled Interrupts: Mask- 64bit+
Queue=0/3 Enable-
Address: 0000000000000000 Data: 0000
Capabilities: [a0] MSI-X: Enable+ Mask- TabSize=17
Vector table: BAR=4 offset=00000000
PBA: BAR=4 offset=00001000
Capabilities: [ac] Express (v2) Endpoint, MSI 00
DevCap: MaxPayload 512 bytes, PhantFunc 0, Latency L0s
<4us, L1 <64us
ExtTag+ AttnBtn- AttnInd- PwrInd- RBE+ FLReset-
DevCtl: Report errors: Correctable- Non-Fatal+ Fatal+
Unsupported-
RlxdOrd+ ExtTag+ PhantFunc- AuxPwr+ NoSnoop+
MaxPayload 256 bytes, MaxReadReq 4096 bytes
DevSta: CorrErr- UncorrErr- FatalErr- UnsuppReq-
AuxPwr+ TransPend-
LnkCap: Port #0, Speed 5GT/s, Width x8, ASPM L0s L1,
Latency L0 <2us, L1 <4us
ClockPM+ Suprise- LLActRep- BwNot-
LnkCtl: ASPM Disabled; RCB 64 bytes Disabled- Retrain- CommClk-
ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
LnkSta: Speed 5GT/s, Width x8, TrErr- Train- SlotClk+
DLActive- BWMgmt- ABWMgmt-
Capabilities: [100] Advanced Error Reporting <?>
Capabilities: [13c] Device Serial Number 48-49-7a-fe-ff-6e-c1-80
Capabilities: [150] Power Budgeting <?>
Capabilities: [160] Virtual Channel <?>
Capabilities: [1b8] #0e
Capabilities: [220] #15
Kernel driver in use: bnx2x
Kernel modules: bnx2x
04:00.3 Ethernet controller: Broadcom Corporation Device 168e (rev 10)
Subsystem: Hewlett-Packard Company Device 1798
Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop-
ParErr+ Stepping- SERR- FastB2B- DisINTx+
Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort-
<TAbort- <MAbort- >SERR- <PERR- INTx-
Latency: 0, Cache Line Size: 64 bytes
Interrupt: pin C routed to IRQ 37
Region 0: Memory at e5800000 (64-bit, prefetchable) [size=8M]
Region 2: Memory at e5000000 (64-bit, prefetchable) [size=8M]
Region 4: Memory at e4ff0000 (64-bit, prefetchable) [size=64K]
Capabilities: [48] Power Management version 3
Flags: PMEClk- DSI- D1- D2- AuxCurrent=0mA
PME(D0+,D1-,D2-,D3hot+,D3cold+)
Status: D0 PME-Enable- DSel=0 DScale=1 PME-
Capabilities: [50] Vital Product Data <?>
Capabilities: [58] Message Signalled Interrupts: Mask- 64bit+
Queue=0/3 Enable-
Address: 0000000000000000 Data: 0000
Capabilities: [a0] MSI-X: Enable+ Mask- TabSize=17
Vector table: BAR=4 offset=00000000
PBA: BAR=4 offset=00001000
Capabilities: [ac] Express (v2) Endpoint, MSI 00
DevCap: MaxPayload 512 bytes, PhantFunc 0, Latency L0s
<4us, L1 <64us
ExtTag+ AttnBtn- AttnInd- PwrInd- RBE+ FLReset-
DevCtl: Report errors: Correctable- Non-Fatal+ Fatal+
Unsupported-
RlxdOrd+ ExtTag+ PhantFunc- AuxPwr+ NoSnoop+
MaxPayload 256 bytes, MaxReadReq 4096 bytes
DevSta: CorrErr- UncorrErr- FatalErr- UnsuppReq-
AuxPwr+ TransPend-
LnkCap: Port #0, Speed 5GT/s, Width x8, ASPM L0s L1,
Latency L0 <2us, L1 <4us
ClockPM+ Suprise- LLActRep- BwNot-
LnkCtl: ASPM Disabled; RCB 64 bytes Disabled- Retrain- CommClk-
ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
LnkSta: Speed 5GT/s, Width x8, TrErr- Train- SlotClk+
DLActive- BWMgmt- ABWMgmt-
Capabilities: [100] Advanced Error Reporting <?>
Capabilities: [13c] Device Serial Number 4c-49-7a-fe-ff-6e-c1-80
Capabilities: [150] Power Budgeting <?>
Capabilities: [160] Virtual Channel <?>
Capabilities: [1b8] #0e
Capabilities: [220] #15
Kernel driver in use: bnx2x
Kernel modules: bnx2x
04:00.4 Ethernet controller: Broadcom Corporation Device 168e (rev 10)
Subsystem: Hewlett-Packard Company Device 1798
Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop-
ParErr+ Stepping- SERR- FastB2B- DisINTx+
Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort-
<TAbort- <MAbort- >SERR- <PERR- INTx-
Latency: 0, Cache Line Size: 64 bytes
Interrupt: pin C routed to IRQ 37
Region 0: Memory at e4000000 (64-bit, prefetchable) [size=8M]
Region 2: Memory at e3800000 (64-bit, prefetchable) [size=8M]
Region 4: Memory at e37f0000 (64-bit, prefetchable) [size=64K]
Capabilities: [48] Power Management version 3
Flags: PMEClk- DSI- D1- D2- AuxCurrent=0mA
PME(D0+,D1-,D2-,D3hot+,D3cold+)
Status: D0 PME-Enable- DSel=0 DScale=1 PME-
Capabilities: [50] Vital Product Data <?>
Capabilities: [58] Message Signalled Interrupts: Mask- 64bit+
Queue=0/3 Enable-
Address: 0000000000000000 Data: 0000
Capabilities: [a0] MSI-X: Enable+ Mask- TabSize=17
Vector table: BAR=4 offset=00000000
PBA: BAR=4 offset=00001000
Capabilities: [ac] Express (v2) Endpoint, MSI 00
DevCap: MaxPayload 512 bytes, PhantFunc 0, Latency L0s
<4us, L1 <64us
ExtTag+ AttnBtn- AttnInd- PwrInd- RBE+ FLReset-
DevCtl: Report errors: Correctable- Non-Fatal+ Fatal+
Unsupported-
RlxdOrd+ ExtTag+ PhantFunc- AuxPwr+ NoSnoop+
MaxPayload 256 bytes, MaxReadReq 4096 bytes
DevSta: CorrErr- UncorrErr- FatalErr- UnsuppReq-
AuxPwr+ TransPend-
LnkCap: Port #0, Speed 5GT/s, Width x8, ASPM L0s L1,
Latency L0 <2us, L1 <4us
ClockPM+ Suprise- LLActRep- BwNot-
LnkCtl: ASPM Disabled; RCB 64 bytes Disabled- Retrain- CommClk-
ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
LnkSta: Speed 5GT/s, Width x8, TrErr- Train- SlotClk+
DLActive- BWMgmt- ABWMgmt-
Capabilities: [100] Advanced Error Reporting <?>
Capabilities: [13c] Device Serial Number 48-49-7a-fe-ff-6e-c1-80
Capabilities: [150] Power Budgeting <?>
Capabilities: [160] Virtual Channel <?>
Capabilities: [1b8] #0e
Capabilities: [220] #15
Kernel driver in use: bnx2x
Kernel modules: bnx2x
04:00.5 Ethernet controller: Broadcom Corporation Device 168e (rev 10)
Subsystem: Hewlett-Packard Company Device 1798
Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop-
ParErr+ Stepping- SERR- FastB2B- DisINTx+
Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort-
<TAbort- <MAbort- >SERR- <PERR- INTx-
Latency: 0, Cache Line Size: 64 bytes
Interrupt: pin D routed to IRQ 38
Region 0: Memory at e2800000 (64-bit, prefetchable) [size=8M]
Region 2: Memory at e2000000 (64-bit, prefetchable) [size=8M]
Region 4: Memory at e1ff0000 (64-bit, prefetchable) [size=64K]
Capabilities: [48] Power Management version 3
Flags: PMEClk- DSI- D1- D2- AuxCurrent=0mA
PME(D0+,D1-,D2-,D3hot+,D3cold+)
Status: D0 PME-Enable- DSel=0 DScale=1 PME-
Capabilities: [50] Vital Product Data <?>
Capabilities: [58] Message Signalled Interrupts: Mask- 64bit+
Queue=0/3 Enable-
Address: 0000000000000000 Data: 0000
Capabilities: [a0] MSI-X: Enable+ Mask- TabSize=17
Vector table: BAR=4 offset=00000000
PBA: BAR=4 offset=00001000
Capabilities: [ac] Express (v2) Endpoint, MSI 00
DevCap: MaxPayload 512 bytes, PhantFunc 0, Latency L0s
<4us, L1 <64us
ExtTag+ AttnBtn- AttnInd- PwrInd- RBE+ FLReset-
DevCtl: Report errors: Correctable- Non-Fatal+ Fatal+
Unsupported-
RlxdOrd+ ExtTag+ PhantFunc- AuxPwr+ NoSnoop+
MaxPayload 256 bytes, MaxReadReq 4096 bytes
DevSta: CorrErr- UncorrErr- FatalErr- UnsuppReq-
AuxPwr+ TransPend-
LnkCap: Port #0, Speed 5GT/s, Width x8, ASPM L0s L1,
Latency L0 <2us, L1 <4us
ClockPM+ Suprise- LLActRep- BwNot-
LnkCtl: ASPM Disabled; RCB 64 bytes Disabled- Retrain- CommClk-
ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
LnkSta: Speed 5GT/s, Width x8, TrErr- Train- SlotClk+
DLActive- BWMgmt- ABWMgmt-
Capabilities: [100] Advanced Error Reporting <?>
Capabilities: [13c] Device Serial Number 4c-49-7a-fe-ff-6e-c1-80
Capabilities: [150] Power Budgeting <?>
Capabilities: [160] Virtual Channel <?>
Capabilities: [1b8] #0e
Capabilities: [220] #15
Kernel driver in use: bnx2x
Kernel modules: bnx2x
04:00.6 Ethernet controller: Broadcom Corporation Device 168e (rev 10)
Subsystem: Hewlett-Packard Company Device 1798
Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop-
ParErr+ Stepping- SERR- FastB2B- DisINTx+
Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort-
<TAbort- <MAbort- >SERR- <PERR- INTx-
Latency: 0, Cache Line Size: 64 bytes
Interrupt: pin D routed to IRQ 38
Region 0: Memory at e1000000 (64-bit, prefetchable) [size=8M]
Region 2: Memory at e0800000 (64-bit, prefetchable) [size=8M]
Region 4: Memory at e07f0000 (64-bit, prefetchable) [size=64K]
Capabilities: [48] Power Management version 3
Flags: PMEClk- DSI- D1- D2- AuxCurrent=0mA
PME(D0+,D1-,D2-,D3hot+,D3cold+)
Status: D0 PME-Enable- DSel=0 DScale=1 PME-
Capabilities: [50] Vital Product Data <?>
Capabilities: [58] Message Signalled Interrupts: Mask- 64bit+
Queue=0/3 Enable-
Address: 0000000000000000 Data: 0000
Capabilities: [a0] MSI-X: Enable+ Mask- TabSize=17
Vector table: BAR=4 offset=00000000
PBA: BAR=4 offset=00001000
Capabilities: [ac] Express (v2) Endpoint, MSI 00
DevCap: MaxPayload 512 bytes, PhantFunc 0, Latency L0s
<4us, L1 <64us
ExtTag+ AttnBtn- AttnInd- PwrInd- RBE+ FLReset-
DevCtl: Report errors: Correctable- Non-Fatal+ Fatal+
Unsupported-
RlxdOrd+ ExtTag+ PhantFunc- AuxPwr+ NoSnoop+
MaxPayload 256 bytes, MaxReadReq 4096 bytes
DevSta: CorrErr- UncorrErr- FatalErr- UnsuppReq-
AuxPwr+ TransPend-
LnkCap: Port #0, Speed 5GT/s, Width x8, ASPM L0s L1,
Latency L0 <2us, L1 <4us
ClockPM+ Suprise- LLActRep- BwNot-
LnkCtl: ASPM Disabled; RCB 64 bytes Disabled- Retrain- CommClk-
ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
LnkSta: Speed 5GT/s, Width x8, TrErr- Train- SlotClk+
DLActive- BWMgmt- ABWMgmt-
Capabilities: [100] Advanced Error Reporting <?>
Capabilities: [13c] Device Serial Number 48-49-7a-fe-ff-6e-c1-80
Capabilities: [150] Power Budgeting <?>
Capabilities: [160] Virtual Channel <?>
Capabilities: [1b8] #0e
Capabilities: [220] #15
Kernel driver in use: bnx2x
Kernel modules: bnx2x
04:00.7 Ethernet controller: Broadcom Corporation Device 168e (rev 10)
Subsystem: Hewlett-Packard Company Device 1798
Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop-
ParErr+ Stepping- SERR- FastB2B- DisINTx+
Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort-
<TAbort- <MAbort- >SERR- <PERR- INTx-
Latency: 0, Cache Line Size: 64 bytes
Interrupt: pin A routed to IRQ 32
Region 0: Memory at df800000 (64-bit, prefetchable) [size=8M]
Region 2: Memory at df000000 (64-bit, prefetchable) [size=8M]
Region 4: Memory at deff0000 (64-bit, prefetchable) [size=64K]
Capabilities: [48] Power Management version 3
Flags: PMEClk- DSI- D1- D2- AuxCurrent=0mA
PME(D0+,D1-,D2-,D3hot+,D3cold+)
Status: D3 PME-Enable+ DSel=0 DScale=1 PME-
Capabilities: [50] Vital Product Data <?>
Capabilities: [58] Message Signalled Interrupts: Mask- 64bit+
Queue=0/3 Enable-
Address: 0000000000000000 Data: 0000
Capabilities: [a0] MSI-X: Enable+ Mask- TabSize=17
Vector table: BAR=4 offset=00000000
PBA: BAR=4 offset=00001000
Capabilities: [ac] Express (v2) Endpoint, MSI 00
DevCap: MaxPayload 512 bytes, PhantFunc 0, Latency L0s
<4us, L1 <64us
ExtTag+ AttnBtn- AttnInd- PwrInd- RBE+ FLReset-
DevCtl: Report errors: Correctable- Non-Fatal+ Fatal+
Unsupported-
RlxdOrd+ ExtTag+ PhantFunc- AuxPwr+ NoSnoop+
MaxPayload 256 bytes, MaxReadReq 4096 bytes
DevSta: CorrErr- UncorrErr- FatalErr- UnsuppReq-
AuxPwr+ TransPend-
LnkCap: Port #0, Speed 5GT/s, Width x8, ASPM L0s L1,
Latency L0 <2us, L1 <4us
ClockPM+ Suprise- LLActRep- BwNot-
LnkCtl: ASPM Disabled; RCB 64 bytes Disabled- Retrain- CommClk-
ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
LnkSta: Speed 5GT/s, Width x8, TrErr- Train- SlotClk+
DLActive- BWMgmt- ABWMgmt-
Capabilities: [100] Advanced Error Reporting <?>
Capabilities: [13c] Device Serial Number 4c-49-7a-fe-ff-6e-c1-80
Capabilities: [150] Power Budgeting <?>
Capabilities: [160] Virtual Channel <?>
Capabilities: [1b8] #0e
Capabilities: [220] #15
Kernel driver in use: bnx2x
Kernel modules: bnx2x
I have tested several things, and I added some traces in order to get
information.
For instance, I trace the load_code in the function named "bnx2x_nic_load".
[ 25.693677] bnx2x 0000:04:00.0: eth0: bnx2x_nic_load load_code=0x10130000
[ 25.693679] bnx2x 0000:04:00.0: eth0: bnx2x_nic_load start period
[ 102.748934] bnx2x 0000:04:00.1: eth1: bnx2x_nic_load load_code=0x10100000
[ 102.749065] bnx2x 0000:04:00.1: eth1: bnx2x_nic_load start period
[ 104.007074] bnx2x 0000:04:00.2: eth2: bnx2x_nic_load load_code=0x10120000
[ 104.007197] bnx2x 0000:04:00.2: eth2: bnx2x_nic_load NOT start period
[ 104.423789] bnx2x 0000:04:00.3: eth3: bnx2x_nic_load load_code=0x10120000
[ 104.423914] bnx2x 0000:04:00.3: eth3: bnx2x_nic_load NOT start period
[ 104.836505] bnx2x 0000:04:00.4: eth4: bnx2x_nic_load load_code=0x10120000
[ 104.836632] bnx2x 0000:04:00.4: eth4: bnx2x_nic_load NOT start period
[ 105.254220] bnx2x 0000:04:00.5: eth5: bnx2x_nic_load load_code=0x10120000
[ 105.254350] bnx2x 0000:04:00.5: eth5: bnx2x_nic_load NOT start period
[ 105.667935] bnx2x 0000:04:00.6: eth6: bnx2x_nic_load load_code=0x10120000
[ 105.668066] bnx2x 0000:04:00.6: eth6: bnx2x_nic_load NOT start period
[ 106.081652] bnx2x 0000:04:00.7: eth7: bnx2x_nic_load load_code=0x10120000
[ 106.081779] bnx2x 0000:04:00.7: eth7: bnx2x_nic_load NOT start period
This is a FlexNIC use.
Here is my (quick and dirty) patch which makes the link detection
working and adds the traces shown above :
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c
b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c
index 580b44e..dedd810 100644
--- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c
+++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c
@@ -1769,6 +1769,7 @@ int bnx2x_nic_load(struct bnx2x *bp, int load_mode)
*/
if (!BP_NOMCP(bp)) {
load_code = bnx2x_fw_command(bp, DRV_MSG_CODE_LOAD_REQ, 0);
+netdev_info(bp->dev, "bnx2x_nic_load bnx2x_fw_command
load_code=0x%08X\n",load_code);
if (!load_code) {
BNX2X_ERR("MCP response failure, aborting\n");
rc = -EBUSY;
@@ -1785,22 +1786,31 @@ int bnx2x_nic_load(struct bnx2x *bp, int load_mode)
DP(NETIF_MSG_IFUP, "NO MCP - load counts[%d] %d, %d, %d\n",
path, load_count[path][0], load_count[path][1],
load_count[path][2]);
+netdev_info(bp->dev, "bnx2x_nic_load NO MCP - load counts[%d]
%d, %d, %d\n",
+ path, load_count[path][0], load_count[path][1],
+ load_count[path][2]);
load_count[path][0]++;
load_count[path][1 + port]++;
DP(NETIF_MSG_IFUP, "NO MCP - new load counts[%d] %d, %d, %d\n",
path, load_count[path][0], load_count[path][1],
load_count[path][2]);
+netdev_info(bp->dev, "bnx2x_nic_load NO MCP - new load counts[%d]
%d, %d, %d\n",
+ path, load_count[path][0], load_count[path][1],
+ load_count[path][2]);
if (load_count[path][0] == 1)
load_code = FW_MSG_CODE_DRV_LOAD_COMMON;
else if (load_count[path][1 + port] == 1)
load_code = FW_MSG_CODE_DRV_LOAD_PORT;
else
load_code = FW_MSG_CODE_DRV_LOAD_FUNCTION;
+netdev_info(bp->dev, "bnx2x_nic_load autre load_code=0x%08X\n",load_code);
}
+netdev_info(bp->dev, "bnx2x_nic_load load_code=0x%08X\n",load_code);
if ((load_code == FW_MSG_CODE_DRV_LOAD_COMMON) ||
(load_code == FW_MSG_CODE_DRV_LOAD_COMMON_CHIP) ||
- (load_code == FW_MSG_CODE_DRV_LOAD_PORT)) {
+ (load_code == FW_MSG_CODE_DRV_LOAD_PORT) ||
+ (load_code == FW_MSG_CODE_DRV_LOAD_FUNCTION)) {
bp->port.pmf = 1;
/*
* We need the barrier to ensure the ordering between the
@@ -1808,9 +1818,13 @@ int bnx2x_nic_load(struct bnx2x *bp, int load_mode)
* bnx2x_periodic_task().
*/
smp_mb();
+netdev_info(bp->dev, "bnx2x_nic_load start period\n");
queue_delayed_work(bnx2x_wq, &bp->period_task, 0);
} else
+{
+netdev_info(bp->dev, "bnx2x_nic_load NOT start period\n");
bp->port.pmf = 0;
+}
DP(NETIF_MSG_LINK, "pmf %d\n", bp->port.pmf);
Hope it can help...
Regards,
JM
^ permalink raw reply related
* [PATCH net-next] tcp: avoid tcp loop connection on lo device
From: Shan Wei @ 2012-09-25 8:12 UTC (permalink / raw)
To: David Miller; +Cc: NetDev
Tcp supports simultaneous Connection, but we meat odd phenomenon that tcp client can receive what
send by itself. tcp client and tcp server communicate through loop device. tcp server selects
port 40000 to listen which is in local port range. But after tcp server program is killed, tcp client
still can connect successfully.
Client Server
connect <-----OK---------> listen:127.0.0.1,port:40000
send(d1) -----------------> recv
recv(d2) <----------------- send(d2)
----------------- killed(40000 not listened)
connect <-----OK--------->
send(d1) ----------------->
recv(d1) <-----------------
The simultaneous connection has no meaning for lo device, and for this case,
tcp client don't know whether server is listen on port 40000.
Just fix it sending reset to keep consistent state machine.
Reproduced step:
1. while true ; do nc 127.0.0.1 40001 ;done
2. ss -nt dst 127.0.0.1
State Recv-Q Send-Q Local Address:Port Peer Address:Port
ESTAB 0 0 127.0.0.1:40001 127.0.0.1:40001
Signed-off-by: Shan Wei <davidshan@tencent.com>
---
net/ipv4/tcp_input.c | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c
index e037697..a2f5a10 100644
--- a/net/ipv4/tcp_input.c
+++ b/net/ipv4/tcp_input.c
@@ -5659,6 +5659,7 @@ static int tcp_rcv_synsent_state_process(struct sock *sk, struct sk_buff *skb,
struct tcp_cookie_values *cvp = tp->cookie_values;
struct tcp_fastopen_cookie foc = { .len = -1 };
int saved_clamp = tp->rx_opt.mss_clamp;
+ struct inet_sock *isk = inet_sk(sk);
tcp_parse_options(skb, &tp->rx_opt, &hash_location, 0, &foc);
@@ -5832,8 +5833,13 @@ discard:
if (th->syn) {
/* We see SYN without ACK. It is attempt of
* simultaneous connect with crossed SYNs.
- * Particularly, it can be connect to self.
+ * But, avoid tcp loop connection on single socket.
*/
+
+ if (isk->inet_dport == isk->inet_sport &&
+ isk->inet_saddr == isk->inet_daddr)
+ goto reset_and_undo;
+
tcp_set_state(sk, TCP_SYN_RECV);
if (tp->rx_opt.saw_tstamp) {
--
1.7.1
^ permalink raw reply related
* [PATCH net-next] netxen: write IP address to firmware when using bonding
From: Nikolay Aleksandrov @ 2012-09-25 8:48 UTC (permalink / raw)
To: sony.chacko; +Cc: netdev, agospoda, rajesh.borundia, davem
From: Nikolay Aleksandrov <naleksan@redhat.com>
This patch allows LRO aggregation on bonded devices that contain an NX3031
device. It also adds a for_each_netdev_in_bond_rcu(bond, slave) macro
which executes for each slave that has bond as master.
Signed-off-by: Andy Gospodarek <agospoda@redhat.com>
Signed-off-by: Nikolay Aleksandrov <nikolay@redhat.com>
---
.../net/ethernet/qlogic/netxen/netxen_nic_main.c | 113 +++++++++++++++------
include/linux/netdevice.h | 3 +
2 files changed, 87 insertions(+), 29 deletions(-)
diff --git a/drivers/net/ethernet/qlogic/netxen/netxen_nic_main.c b/drivers/net/ethernet/qlogic/netxen/netxen_nic_main.c
index e2a4858..aaf6cf7 100644
--- a/drivers/net/ethernet/qlogic/netxen/netxen_nic_main.c
+++ b/drivers/net/ethernet/qlogic/netxen/netxen_nic_main.c
@@ -3244,6 +3244,25 @@ netxen_restore_indev_addr(struct net_device *netdev, unsigned long event)
}
}
+static inline int
+netxen_config_checkdev(struct net_device *dev)
+{
+ struct netxen_adapter *adapter;
+
+ if (!is_netxen_netdev(dev))
+ return -ENODEV;
+
+ adapter = netdev_priv(dev);
+
+ if(!adapter)
+ return -ENODEV;
+
+ if (adapter->is_up != NETXEN_ADAPTER_UP_MAGIC)
+ return -ENODEV;
+
+ return 0;
+}
+
static int netxen_netdev_event(struct notifier_block *this,
unsigned long event, void *ptr)
{
@@ -3260,18 +3279,27 @@ recheck:
goto recheck;
}
- if (!is_netxen_netdev(dev))
- goto done;
-
- adapter = netdev_priv(dev);
-
- if (!adapter)
- goto done;
+ /* If this is a bonding device, look for netxen-based slaves*/
+ if (dev->priv_flags & IFF_BONDING) {
+ struct net_device *slave;
- if (adapter->is_up != NETXEN_ADAPTER_UP_MAGIC)
- goto done;
+ rcu_read_lock();
+ for_each_netdev_in_bond_rcu(dev, slave) {
+ if (netxen_config_checkdev(slave) < 0)
+ continue;
+
+ adapter = netdev_priv(slave);
+ netxen_config_indev_addr(adapter, orig_dev, event);
+ }
+ rcu_read_unlock();
- netxen_config_indev_addr(adapter, orig_dev, event);
+ } else {
+ if (netxen_config_checkdev(dev) < 0)
+ goto done;
+
+ adapter = netdev_priv(dev);
+ netxen_config_indev_addr(adapter, orig_dev, event);
+ }
done:
return NOTIFY_DONE;
}
@@ -3296,30 +3324,57 @@ recheck:
goto recheck;
}
- if (!is_netxen_netdev(dev))
- goto done;
+ /* If this is a bonding device, look for netxen-based slaves*/
+ if (dev->priv_flags & IFF_BONDING) {
+ struct net_device *slave;
- adapter = netdev_priv(dev);
+ rcu_read_lock();
+ for_each_netdev_in_bond_rcu(dev, slave) {
+ if (netxen_config_checkdev(slave) < 0)
+ continue;
- if (!adapter || !netxen_destip_supported(adapter))
- goto done;
+ adapter = netdev_priv(slave);
- if (adapter->is_up != NETXEN_ADAPTER_UP_MAGIC)
- goto done;
+ if (!netxen_destip_supported(adapter))
+ continue;
- switch (event) {
- case NETDEV_UP:
- netxen_config_ipaddr(adapter, ifa->ifa_address, NX_IP_UP);
- netxen_list_config_vlan_ip(adapter, ifa, NX_IP_UP);
- break;
- case NETDEV_DOWN:
- netxen_config_ipaddr(adapter, ifa->ifa_address, NX_IP_DOWN);
- netxen_list_config_vlan_ip(adapter, ifa, NX_IP_DOWN);
- break;
- default:
- break;
- }
+ switch (event) {
+ case NETDEV_UP:
+ netxen_config_ipaddr(adapter, ifa->ifa_address, NX_IP_UP);
+ netxen_list_config_vlan_ip(adapter, ifa, NX_IP_UP);
+ break;
+ case NETDEV_DOWN:
+ netxen_config_ipaddr(adapter, ifa->ifa_address, NX_IP_DOWN);
+ netxen_list_config_vlan_ip(adapter, ifa, NX_IP_DOWN);
+ break;
+ default:
+ break;
+ }
+ }
+ rcu_read_unlock();
+ } else {
+ if (netxen_config_checkdev(dev) < 0)
+ goto done;
+
+ adapter = netdev_priv(dev);
+
+ if (!netxen_destip_supported(adapter))
+ goto done;
+
+ switch (event) {
+ case NETDEV_UP:
+ netxen_config_ipaddr(adapter, ifa->ifa_address, NX_IP_UP);
+ netxen_list_config_vlan_ip(adapter, ifa, NX_IP_UP);
+ break;
+ case NETDEV_DOWN:
+ netxen_config_ipaddr(adapter, ifa->ifa_address, NX_IP_DOWN);
+ netxen_list_config_vlan_ip(adapter, ifa, NX_IP_DOWN);
+ break;
+ default:
+ break;
+ }
+ }
done:
return NOTIFY_DONE;
}
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index 59dc05f3..463bb40 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -1578,6 +1578,9 @@ extern rwlock_t dev_base_lock; /* Device list lock */
list_for_each_entry_continue(d, &(net)->dev_base_head, dev_list)
#define for_each_netdev_continue_rcu(net, d) \
list_for_each_entry_continue_rcu(d, &(net)->dev_base_head, dev_list)
+#define for_each_netdev_in_bond_rcu(bond, slave) \
+ for_each_netdev_rcu(&init_net, slave) \
+ if (slave->master == bond)
#define net_device_entry(lh) list_entry(lh, struct net_device, dev_list)
static inline struct net_device *next_net_device(struct net_device *dev)
--
1.7.11.4
^ permalink raw reply related
* [PATCH] List interfaces without net address by default
From: Petr Písař @ 2012-09-25 9:36 UTC (permalink / raw)
To: netdev; +Cc: Petr Písař
This fixes regression in iproute2-3.5.1 when `ip addr show' skipped
interfaces without network layer address.
Wrong output:
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue state UNKNOWN
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
link/ether 00:50:54:00:0f:03 brd ff:ff:ff:ff:ff:ff
inet 10.34.25.198/23 brd 10.34.25.255 scope global eth0
inet6 2620:52:0:2219:250:54ff:fe00:f03/64 scope global dynamic
valid_lft 2591919sec preferred_lft 604719sec
inet6 fe80::250:54ff:fe00:f03/64 scope link
valid_lft forever preferred_lft forever
Expected output:
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue state UNKNOWN
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
link/ether 00:50:54:00:0f:03 brd ff:ff:ff:ff:ff:ff
inet 10.34.25.198/23 brd 10.34.25.255 scope global eth0
inet6 2620:52:0:2219:250:54ff:fe00:f03/64 scope global dynamic
valid_lft 2591896sec preferred_lft 604696sec
inet6 fe80::250:54ff:fe00:f03/64 scope link
valid_lft forever preferred_lft forever
5: veth1: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN qlen 1000
link/ether 8a:ec:35:34:1f:a8 brd ff:ff:ff:ff:ff:ff
6: veth0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN qlen 1000
link/ether 2e:97:ef:77:40:82 brd ff:ff:ff:ff:ff:ff
Signed-off-by: Petr Písař <ppisar@redhat.com>
---
ip/ipaddress.c | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/ip/ipaddress.c b/ip/ipaddress.c
index 69a63b3..4382ab5 100644
--- a/ip/ipaddress.c
+++ b/ip/ipaddress.c
@@ -785,6 +785,7 @@ static void ipaddr_filter(struct nlmsg_chain *linfo, struct nlmsg_chain *ainfo)
lp = &linfo->head;
while ( (l = *lp) != NULL) {
int ok = 0;
+ int missing_net_address = 1;
struct ifinfomsg *ifi = NLMSG_DATA(&l->h);
struct nlmsg_list *a;
@@ -792,8 +793,10 @@ static void ipaddr_filter(struct nlmsg_chain *linfo, struct nlmsg_chain *ainfo)
struct nlmsghdr *n = &a->h;
struct ifaddrmsg *ifa = NLMSG_DATA(n);
- if (ifa->ifa_index != ifi->ifi_index ||
- (filter.family && filter.family != ifa->ifa_family))
+ if (ifa->ifa_index != ifi->ifi_index)
+ continue;
+ missing_net_address = 0;
+ if (filter.family && filter.family != ifa->ifa_family)
continue;
if ((filter.scope^ifa->ifa_scope)&filter.scopemask)
continue;
@@ -828,6 +831,9 @@ static void ipaddr_filter(struct nlmsg_chain *linfo, struct nlmsg_chain *ainfo)
ok = 1;
break;
}
+ if (missing_net_address &&
+ (filter.family == AF_UNSPEC || filter.family == AF_PACKET))
+ ok = 1;
if (!ok) {
*lp = l->next;
free(l);
--
1.7.11.4
^ permalink raw reply related
* bridge igmp snooping implementation
From: Felix Fietkau @ 2012-09-25 10:18 UTC (permalink / raw)
To: netdev; +Cc: Herbert Xu
Hi,
I'v been looking at the bridge IGMP snooping code and I noticed that it
appears to not keep track of multicast group member IP addresses. Is
this intentional?
It seems to me that this would lead to issues when multiple members of
the same multicast group are behind the same bridge port, and one of
them leaves.
I'm currently looking into adding a feature that allows bridge ports to
be configured to selectively turn multicast traffic into unicast
traffic. For this I would need to change the code to keep track of
member IP and MAC addresses.
This helps a lot on 802.11, where unicast is often much cheaper than
multicast, even when sending out duplicate packets (higher data rates
and aggregation heavily reduce airtime utilization).
- Felix
^ permalink raw reply
* [PATCH] ipv6: del unreachable route when an addr is deleted on lo
From: Nicolas Dichtel @ 2012-09-25 10:24 UTC (permalink / raw)
To: netdev, yoshfuji, davem; +Cc: Nicolas Dichtel
When an address is added on loopback (ip -6 a a 2002::1/128 dev lo), two routes
are added:
- one in the local table:
local 2002::1 via :: dev lo proto none metric 0
- one the in main table (for the prefix):
unreachable 2002::1 dev lo proto kernel metric 256 error -101
When the address is deleted, the route inserted in the main table remains
because we use rt6_lookup(), which returns NULL when dst->error is set, which
is the case here! Thus, it is better to use ip6_route_lookup() to avoid this
kind of filter.
Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
---
net/ipv6/addrconf.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c
index 6bc85f7..b6b2f9f 100644
--- a/net/ipv6/addrconf.c
+++ b/net/ipv6/addrconf.c
@@ -788,8 +788,12 @@ static void ipv6_del_addr(struct inet6_ifaddr *ifp)
struct in6_addr prefix;
struct rt6_info *rt;
struct net *net = dev_net(ifp->idev->dev);
+ struct flowi6 fl6 = {};
ipv6_addr_prefix(&prefix, &ifp->addr, ifp->prefix_len);
- rt = rt6_lookup(net, &prefix, NULL, ifp->idev->dev->ifindex, 1);
+ fl6.flowi6_oif = ifp->idev->dev->ifindex;
+ fl6.daddr = prefix;
+ rt = (struct rt6_info *)ip6_route_lookup(net, &fl6,
+ RT6_LOOKUP_F_IFACE);
if (rt && addrconf_is_prefix_route(rt)) {
if (onlink == 0) {
--
1.7.12
^ permalink raw reply related
* [PATCH] net: sh-eth: fix sleeping in atomic context
From: Guennadi Liakhovetski @ 2012-09-25 10:38 UTC (permalink / raw)
To: linux-sh; +Cc: Paul Mundt, netdev
The .ndo_get_stats() net-device operation can sleep, which leads on sh_eth
to the following BUG on the armadillo800eva board:
BUG: sleeping function called from invalid context at drivers/base/power/runtime.c:867
in_atomic(): 1, irqs_disabled(): 0, pid: 561, name: rpc.statd
Backtrace:
[<c000bfa0>] (dump_backtrace+0x0/0x110) from [<c0276a44>] (dump_stack+0x18/0x1c)
r6:c0294118 r5:00000004 r4:c035e898 r3:60000013
[<c0276a2c>] (dump_stack+0x0/0x1c) from [<c0035c14>] (__might_sleep+0xec/0x10c)
[<c0035b28>] (__might_sleep+0x0/0x10c) from [<c019a918>] (__pm_runtime_resume+0x3c/0xac)
[<c019a8dc>] (__pm_runtime_resume+0x0/0xac) from [<c01b5a10>] (sh_eth_get_stats+0x24/0x180)
r6:c0294118 r5:de0c6400 r4:de0c6000 r3:c01b59ec
[<c01b59ec>] (sh_eth_get_stats+0x0/0x180) from [<c01f12e8>] (dev_get_stats+0x5c/0x84)
r6:c0294118 r5:de0c6000 r4:de1efad0 r3:c01b59ec
[<c01f128c>] (dev_get_stats+0x0/0x84) from [<c0202044>] (rtnl_fill_ifinfo+0x354/0x76c)
r6:00000000 r5:de0c6000 r4:de3df980 r3:00000334
[<c0201cf0>] (rtnl_fill_ifinfo+0x0/0x76c) from [<c0202554>] (rtnl_dump_ifinfo+0xf8/0x1a8)
[<c020245c>] (rtnl_dump_ifinfo+0x0/0x1a8) from [<c020a010>] (netlink_dump+0x58/0x1c0)
[<c0209fb8>] (netlink_dump+0x0/0x1c0) from [<c020a6f8>] (netlink_dump_start+0x108/0x144)
r7:de3a9e30 r6:de3bcd80 r5:de04f200 r4:de3a9e00
[<c020a5f0>] (netlink_dump_start+0x0/0x144) from [<c02036e4>] (rtnetlink_rcv_msg+0x160/0x2a0)
r8:c020245c r7:00000f40 r6:de1efd00 r5:de3de180 r4:de3da680
r3:de1efd00
[<c0203584>] (rtnetlink_rcv_msg+0x0/0x2a0) from [<c020b47c>] (netlink_rcv_skb+0x54/0xb8)
[<c020b428>] (netlink_rcv_skb+0x0/0xb8) from [<c0203578>] (rtnetlink_rcv+0x20/0x2c)
r6:de3a9e00 r5:de3de180 r4:de3de180 r3:c0203558
[<c0203558>] (rtnetlink_rcv+0x0/0x2c) from [<c020b1b4>] (netlink_unicast+0x14c/0x21c)
r4:de04f200 r3:c0203558
[<c020b068>] (netlink_unicast+0x0/0x21c) from [<c020bb4c>] (netlink_sendmsg+0x210/0x288)
r8:00000000 r7:de1efe78 r6:de1eff54 r5:de3a9e00 r4:de3de180
[<c020b93c>] (netlink_sendmsg+0x0/0x288) from [<c01e21e0>] (sock_sendmsg+0x9c/0xb8)
[<c01e2144>] (sock_sendmsg+0x0/0xb8) from [<c01e2904>] (sys_sendto+0xb8/0xdc)
r5:00000014 r4:de1efed4
[<c01e284c>] (sys_sendto+0x0/0xdc) from [<c0009120>] (ret_fast_syscall+0x0/0x30)
Remove sleeping functions from sh_eth_get_stats() to fix it.
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
---
I'm not sure, whether this is the correct fix, i.e., whether this function
is guaranteed to be called on a resumed device, but at least this fixes
this specific issue in 3.6-rc7, but leaves another BUG open:
BUG: sleeping function called from invalid context at include/linux/kernel.h:207
in_atomic(): 1, irqs_disabled(): 0, pid: 0, name: swapper
Backtrace:
[<c00114e4>] (dump_backtrace+0x0/0x110) from [<c02b687c>] (dump_stack+0x18/0x1c)
r6:c03a7cf8 r5:00000000 r4:00000000 r3:60000113
[<c02b6864>] (dump_stack+0x0/0x1c) from [<c003d704>] (__might_sleep+0xec/0x10c)
[<c003d618>] (__might_sleep+0x0/0x10c) from [<c0015a84>] (do_alignment+0x29c/0x700)
[<c00157e8>] (do_alignment+0x0/0x700) from [<c00084b4>] (do_DataAbort+0x3c/0xa0)
[<c0008478>] (do_DataAbort+0x0/0xa0) from [<c000da18>] (__dabt_svc+0x38/0x60)
Exception stack(0xc03a7cf8 to 0xc03a7d40)
7ce0: dd385cc0 dd2937c2
7d00: 00000000 dd385cc0 dd385cc0 c03cf8c8 dd23c7c0 00000000 00000001 00000000
7d20: 00000001 c03a7db4 c03a7d50 c03a7d40 c027832c c0277eb8 60000113 ffffffff
r7:c03a7d2c r6:ffffffff r5:60000113 r4:c0277eb8
[<c0277e80>] (icmp_echo+0x0/0x70) from [<c027832c>] (icmp_rcv+0x144/0x16c)
[<c02781e8>] (icmp_rcv+0x0/0x16c) from [<c024e7f4>] (ip_local_deliver+0x104/0x1b8)
r6:c03cf8c8 r5:00000001 r4:dd385cc0 r3:c02781e8
[<c024e6f0>] (ip_local_deliver+0x0/0x1b8) from [<c024e6ac>] (ip_rcv+0x4c0/0x504)
r7:00000000 r6:0125010d r5:dd2937ae r4:dd385cc0
[<c024e1ec>] (ip_rcv+0x0/0x504) from [<c022eb7c>] (__netif_receive_skb+0x4cc/0x560)
r9:00200000 r8:00000000 r7:00000008 r6:c03af040 r5:dd0e2000
r4:c03ae5e0
[<c022e6b0>] (__netif_receive_skb+0x0/0x560) from [<c022ec88>] (process_backlog+0x78/0x12c)
[<c022ec10>] (process_backlog+0x0/0x12c) from [<c022efa4>] (net_rx_action+0x58/0x148)
[<c022ef4c>] (net_rx_action+0x0/0x148) from [<c00211f4>] (__do_softirq+0x88/0x140)
[<c002116c>] (__do_softirq+0x0/0x140) from [<c002144c>] (irq_exit+0x4c/0x70)
[<c0021400>] (irq_exit+0x0/0x70) from [<c000e670>] (handle_IRQ+0x6c/0x8c)
[<c000e604>] (handle_IRQ+0x0/0x8c) from [<c00081d0>] (asm_do_IRQ+0x10/0x14)
r5:60000013 r4:c000e8c0
[<c00081c0>] (asm_do_IRQ+0x0/0x14) from [<c0016de8>] (shmobile_handle_irq_intc+0x8/0x40)
Exception stack(0xc03a7f38 to 0xc03a7f80)
7f20: 00000000 00000000
7f40: 00000000 00000000 c03a6000 ffffffff c039d3d0 7fffffff 40004059 412fc093
7f60: 00000000 c03a7f8c c03a7f90 c03a7f80 c000e8bc c000e8c0 60000013 ffffffff
[<c000e894>] (default_idle+0x0/0x34) from [<c000ee78>] (cpu_idle+0x58/0x9c)
[<c000ee20>] (cpu_idle+0x0/0x9c) from [<c02b22b4>] (rest_init+0x78/0x90)
r4:c03a6000 r3:c02bac68
[<c02b223c>] (rest_init+0x0/0x90) from [<c0383874>] (start_kernel+0x248/0x288)
r4:c03ae0ec r3:c03bff40
[<c038362c>] (start_kernel+0x0/0x288) from [<40008040>] (0x40008040)
drivers/net/ethernet/renesas/sh_eth.c | 3 ---
1 files changed, 0 insertions(+), 3 deletions(-)
diff --git a/drivers/net/ethernet/renesas/sh_eth.c b/drivers/net/ethernet/renesas/sh_eth.c
index bad8f2e..512c7cb 100644
--- a/drivers/net/ethernet/renesas/sh_eth.c
+++ b/drivers/net/ethernet/renesas/sh_eth.c
@@ -1809,8 +1809,6 @@ static struct net_device_stats *sh_eth_get_stats(struct net_device *ndev)
{
struct sh_eth_private *mdp = netdev_priv(ndev);
- pm_runtime_get_sync(&mdp->pdev->dev);
-
ndev->stats.tx_dropped += sh_eth_read(ndev, TROCR);
sh_eth_write(ndev, 0, TROCR); /* (write clear) */
ndev->stats.collisions += sh_eth_read(ndev, CDCR);
@@ -1826,7 +1824,6 @@ static struct net_device_stats *sh_eth_get_stats(struct net_device *ndev)
ndev->stats.tx_carrier_errors += sh_eth_read(ndev, CNDCR);
sh_eth_write(ndev, 0, CNDCR); /* (write clear) */
}
- pm_runtime_put_sync(&mdp->pdev->dev);
return &ndev->stats;
}
--
1.7.2.5
^ permalink raw reply related
* RE: bnx2x: link detected up at startup even when it should be down
From: Dmitry Kravkov @ 2012-09-25 10:42 UTC (permalink / raw)
To: Jean-Michel Hautbois
Cc: netdev, Barak Witkowski, Eilon Greenstein, davem@davemloft.net
In-Reply-To: <CAL8zT=gp5uZ-Q36=vw--j35txrnLRhguoiMHi8a1kzX=VC3nJg@mail.gmail.com>
> -----Original Message-----
> From: Jean-Michel Hautbois [mailto:jhautbois@gmail.com]
> Sent: Tuesday, September 25, 2012 10:11 AM
> To: Dmitry Kravkov
> Cc: netdev; Barak Witkowski; Eilon Greenstein; davem@davemloft.net
> Subject: Re: bnx2x: link detected up at startup even when it should be down
>
>
> I have tested several things, and I added some traces in order to get
> information.
> For instance, I trace the load_code in the function named "bnx2x_nic_load".
>
> [ 25.693677] bnx2x 0000:04:00.0: eth0: bnx2x_nic_load load_code=0x10130000
> [ 25.693679] bnx2x 0000:04:00.0: eth0: bnx2x_nic_load start period
> [ 102.748934] bnx2x 0000:04:00.1: eth1: bnx2x_nic_load load_code=0x10100000
> [ 102.749065] bnx2x 0000:04:00.1: eth1: bnx2x_nic_load start period
> [ 104.007074] bnx2x 0000:04:00.2: eth2: bnx2x_nic_load load_code=0x10120000
> [ 104.007197] bnx2x 0000:04:00.2: eth2: bnx2x_nic_load NOT start period
> [ 104.423789] bnx2x 0000:04:00.3: eth3: bnx2x_nic_load load_code=0x10120000
> [ 104.423914] bnx2x 0000:04:00.3: eth3: bnx2x_nic_load NOT start period
> [ 104.836505] bnx2x 0000:04:00.4: eth4: bnx2x_nic_load load_code=0x10120000
> [ 104.836632] bnx2x 0000:04:00.4: eth4: bnx2x_nic_load NOT start period
> [ 105.254220] bnx2x 0000:04:00.5: eth5: bnx2x_nic_load load_code=0x10120000
> [ 105.254350] bnx2x 0000:04:00.5: eth5: bnx2x_nic_load NOT start period
> [ 105.667935] bnx2x 0000:04:00.6: eth6: bnx2x_nic_load load_code=0x10120000
> [ 105.668066] bnx2x 0000:04:00.6: eth6: bnx2x_nic_load NOT start period
> [ 106.081652] bnx2x 0000:04:00.7: eth7: bnx2x_nic_load load_code=0x10120000
> [ 106.081779] bnx2x 0000:04:00.7: eth7: bnx2x_nic_load NOT start period
>
> This is a FlexNIC use.
> Here is my (quick and dirty) patch which makes the link detection
> working and adds the traces shown above :
>
> diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c
> b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c
> index 580b44e..dedd810 100644
> --- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c
> +++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c
> @@ -1769,6 +1769,7 @@ int bnx2x_nic_load(struct bnx2x *bp, int load_mode)
> */
> if (!BP_NOMCP(bp)) {
> load_code = bnx2x_fw_command(bp, DRV_MSG_CODE_LOAD_REQ, 0);
> +netdev_info(bp->dev, "bnx2x_nic_load bnx2x_fw_command
> load_code=0x%08X\n",load_code);
> if (!load_code) {
> BNX2X_ERR("MCP response failure, aborting\n");
> rc = -EBUSY;
> @@ -1785,22 +1786,31 @@ int bnx2x_nic_load(struct bnx2x *bp, int load_mode)
> DP(NETIF_MSG_IFUP, "NO MCP - load counts[%d] %d, %d, %d\n",
> path, load_count[path][0], load_count[path][1],
> load_count[path][2]);
> +netdev_info(bp->dev, "bnx2x_nic_load NO MCP - load counts[%d]
> %d, %d, %d\n",
> + path, load_count[path][0], load_count[path][1],
> + load_count[path][2]);
> load_count[path][0]++;
> load_count[path][1 + port]++;
> DP(NETIF_MSG_IFUP, "NO MCP - new load counts[%d] %d, %d, %d\n",
> path, load_count[path][0], load_count[path][1],
> load_count[path][2]);
> +netdev_info(bp->dev, "bnx2x_nic_load NO MCP - new load counts[%d]
> %d, %d, %d\n",
> + path, load_count[path][0], load_count[path][1],
> + load_count[path][2]);
> if (load_count[path][0] == 1)
> load_code = FW_MSG_CODE_DRV_LOAD_COMMON;
> else if (load_count[path][1 + port] == 1)
> load_code = FW_MSG_CODE_DRV_LOAD_PORT;
> else
> load_code = FW_MSG_CODE_DRV_LOAD_FUNCTION;
> +netdev_info(bp->dev, "bnx2x_nic_load autre
> load_code=0x%08X\n",load_code);
> }
>
> +netdev_info(bp->dev, "bnx2x_nic_load load_code=0x%08X\n",load_code);
> if ((load_code == FW_MSG_CODE_DRV_LOAD_COMMON) ||
> (load_code == FW_MSG_CODE_DRV_LOAD_COMMON_CHIP) ||
> - (load_code == FW_MSG_CODE_DRV_LOAD_PORT)) {
> + (load_code == FW_MSG_CODE_DRV_LOAD_PORT) ||
> + (load_code == FW_MSG_CODE_DRV_LOAD_FUNCTION)) {
> bp->port.pmf = 1;
> /*
> * We need the barrier to ensure the ordering between the
> @@ -1808,9 +1818,13 @@ int bnx2x_nic_load(struct bnx2x *bp, int load_mode)
> * bnx2x_periodic_task().
> */
> smp_mb();
> +netdev_info(bp->dev, "bnx2x_nic_load start period\n");
> queue_delayed_work(bnx2x_wq, &bp->period_task, 0);
> } else
> +{
> +netdev_info(bp->dev, "bnx2x_nic_load NOT start period\n");
> bp->port.pmf = 0;
> +}
>
> DP(NETIF_MSG_LINK, "pmf %d\n", bp->port.pmf);
>
Thanks Jean,
But your output does not suit the patch.
Your patch will start periodic for every instance, but printout show that it's started for PMF only (which is correct).
Generally if all functions are marked as PMF (port management function) you will get into the problem accessing shared port resources, like phys and internal data structures, then configuration/data will be corrupted.
Is it feasible to provide ethtool -i output and syslog when driver is loaded debug=0x4?
Thanks
^ permalink raw reply
* RE: removing the timer from cdc-ncm
From: Alexey ORISHKO @ 2012-09-25 11:18 UTC (permalink / raw)
To: Oliver Neukum
Cc: bjorn@mork.no, netdev@vger.kernel.org, linux-usb@vger.kernel.org
In-Reply-To: <6020948.EvS2esPpc0@linux-lqwf.site>
> -----Original Message-----
> From: Oliver Neukum [mailto:oneukum@suse.de]
>
> here is the patch that does everything I consider theoretically
> necessary to have bundling of frames in usbnet and adapting cdc-ncm to
> it.
>
> I'd appreciate any review in case I am doing something stupid.
>
I had a brief look at cdc_ncm and a few corrections needed:
- remove the following:
#include <linux/hrtimer.h>
...
/* Restart the timer, if amount of datagrams is less than given value */
#define CDC_NCM_RESTART_TIMER_DATAGRAM_CNT 3
#define CDC_NCM_TIMER_PENDING_CNT 2
#define CDC_NCM_TIMER_INTERVAL (400UL * NSEC_PER_USEC)
...
In struct cdc_ncm_ctx {
...
struct hrtimer tx_timer;
struct tasklet_struct bh;
...
In cdc_ncm_unbind():
if (hrtimer_active(&ctx->tx_timer))
hrtimer_cancel(&ctx->tx_timer);
tasklet_kill(&ctx->bh);
I didn't have time to check the new logic for data path, but I've
tried to run it on Ubuntu 12.04.
Linux host got panic right after data path has been established
(i.e. connected to mobile network).
Regards,
Alexey
^ permalink raw reply
* Re: bnx2x: link detected up at startup even when it should be down
From: Jean-Michel Hautbois @ 2012-09-25 12:22 UTC (permalink / raw)
To: Dmitry Kravkov
Cc: netdev, Barak Witkowski, Eilon Greenstein, davem@davemloft.net
In-Reply-To: <504C9EFCA2D0054393414C9CB605C37F3086A3@SJEXCHMB06.corp.ad.broadcom.com>
2012/9/25 Dmitry Kravkov <dmitry@broadcom.com>:
>> -----Original Message-----
>> From: Jean-Michel Hautbois [mailto:jhautbois@gmail.com]
>> Sent: Tuesday, September 25, 2012 10:11 AM
>> To: Dmitry Kravkov
>> Cc: netdev; Barak Witkowski; Eilon Greenstein; davem@davemloft.net
>> Subject: Re: bnx2x: link detected up at startup even when it should be down
>>
>>
>> I have tested several things, and I added some traces in order to get
>> information.
>> For instance, I trace the load_code in the function named "bnx2x_nic_load".
>>
>> [ 25.693677] bnx2x 0000:04:00.0: eth0: bnx2x_nic_load load_code=0x10130000
>> [ 25.693679] bnx2x 0000:04:00.0: eth0: bnx2x_nic_load start period
>> [ 102.748934] bnx2x 0000:04:00.1: eth1: bnx2x_nic_load load_code=0x10100000
>> [ 102.749065] bnx2x 0000:04:00.1: eth1: bnx2x_nic_load start period
>> [ 104.007074] bnx2x 0000:04:00.2: eth2: bnx2x_nic_load load_code=0x10120000
>> [ 104.007197] bnx2x 0000:04:00.2: eth2: bnx2x_nic_load NOT start period
>> [ 104.423789] bnx2x 0000:04:00.3: eth3: bnx2x_nic_load load_code=0x10120000
>> [ 104.423914] bnx2x 0000:04:00.3: eth3: bnx2x_nic_load NOT start period
>> [ 104.836505] bnx2x 0000:04:00.4: eth4: bnx2x_nic_load load_code=0x10120000
>> [ 104.836632] bnx2x 0000:04:00.4: eth4: bnx2x_nic_load NOT start period
>> [ 105.254220] bnx2x 0000:04:00.5: eth5: bnx2x_nic_load load_code=0x10120000
>> [ 105.254350] bnx2x 0000:04:00.5: eth5: bnx2x_nic_load NOT start period
>> [ 105.667935] bnx2x 0000:04:00.6: eth6: bnx2x_nic_load load_code=0x10120000
>> [ 105.668066] bnx2x 0000:04:00.6: eth6: bnx2x_nic_load NOT start period
>> [ 106.081652] bnx2x 0000:04:00.7: eth7: bnx2x_nic_load load_code=0x10120000
>> [ 106.081779] bnx2x 0000:04:00.7: eth7: bnx2x_nic_load NOT start period
>>
>> This is a FlexNIC use.
>> Here is my (quick and dirty) patch which makes the link detection
>> working and adds the traces shown above :
>>
>> diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c
>> b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c
>> index 580b44e..dedd810 100644
>> --- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c
>> +++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c
>> @@ -1769,6 +1769,7 @@ int bnx2x_nic_load(struct bnx2x *bp, int load_mode)
>> */
>> if (!BP_NOMCP(bp)) {
>> load_code = bnx2x_fw_command(bp, DRV_MSG_CODE_LOAD_REQ, 0);
>> +netdev_info(bp->dev, "bnx2x_nic_load bnx2x_fw_command
>> load_code=0x%08X\n",load_code);
>> if (!load_code) {
>> BNX2X_ERR("MCP response failure, aborting\n");
>> rc = -EBUSY;
>> @@ -1785,22 +1786,31 @@ int bnx2x_nic_load(struct bnx2x *bp, int load_mode)
>> DP(NETIF_MSG_IFUP, "NO MCP - load counts[%d] %d, %d, %d\n",
>> path, load_count[path][0], load_count[path][1],
>> load_count[path][2]);
>> +netdev_info(bp->dev, "bnx2x_nic_load NO MCP - load counts[%d]
>> %d, %d, %d\n",
>> + path, load_count[path][0], load_count[path][1],
>> + load_count[path][2]);
>> load_count[path][0]++;
>> load_count[path][1 + port]++;
>> DP(NETIF_MSG_IFUP, "NO MCP - new load counts[%d] %d, %d, %d\n",
>> path, load_count[path][0], load_count[path][1],
>> load_count[path][2]);
>> +netdev_info(bp->dev, "bnx2x_nic_load NO MCP - new load counts[%d]
>> %d, %d, %d\n",
>> + path, load_count[path][0], load_count[path][1],
>> + load_count[path][2]);
>> if (load_count[path][0] == 1)
>> load_code = FW_MSG_CODE_DRV_LOAD_COMMON;
>> else if (load_count[path][1 + port] == 1)
>> load_code = FW_MSG_CODE_DRV_LOAD_PORT;
>> else
>> load_code = FW_MSG_CODE_DRV_LOAD_FUNCTION;
>> +netdev_info(bp->dev, "bnx2x_nic_load autre
>> load_code=0x%08X\n",load_code);
>> }
>>
>> +netdev_info(bp->dev, "bnx2x_nic_load load_code=0x%08X\n",load_code);
>> if ((load_code == FW_MSG_CODE_DRV_LOAD_COMMON) ||
>> (load_code == FW_MSG_CODE_DRV_LOAD_COMMON_CHIP) ||
>> - (load_code == FW_MSG_CODE_DRV_LOAD_PORT)) {
>> + (load_code == FW_MSG_CODE_DRV_LOAD_PORT) ||
>> + (load_code == FW_MSG_CODE_DRV_LOAD_FUNCTION)) {
>> bp->port.pmf = 1;
>> /*
>> * We need the barrier to ensure the ordering between the
>> @@ -1808,9 +1818,13 @@ int bnx2x_nic_load(struct bnx2x *bp, int load_mode)
>> * bnx2x_periodic_task().
>> */
>> smp_mb();
>> +netdev_info(bp->dev, "bnx2x_nic_load start period\n");
>> queue_delayed_work(bnx2x_wq, &bp->period_task, 0);
>> } else
>> +{
>> +netdev_info(bp->dev, "bnx2x_nic_load NOT start period\n");
>> bp->port.pmf = 0;
>> +}
>>
>> DP(NETIF_MSG_LINK, "pmf %d\n", bp->port.pmf);
>>
> Thanks Jean,
> But your output does not suit the patch.
Yes, you are right, here it is :
Sep 25 07:56:08 debian kernel: [ 26.607197] bnx2x 0000:04:00.0:
eth0: bnx2x_nic_load bnx2x_fw_command load_code=0x10130000
Sep 25 07:56:08 debian kernel: [ 26.608642] bnx2x 0000:04:00.0:
eth0: bnx2x_nic_load load_code=0x10130000
Sep 25 07:56:08 debian kernel: [ 26.608644] bnx2x 0000:04:00.0:
eth0: bnx2x_nic_load start period
Sep 25 07:57:20 debian kernel: [ 101.068231] bnx2x 0000:04:00.1:
eth1: bnx2x_nic_load bnx2x_fw_command load_code=0x10100000
Sep 25 07:57:20 debian kernel: [ 101.068416] bnx2x 0000:04:00.1:
eth1: bnx2x_nic_load load_code=0x10100000
Sep 25 07:57:20 debian kernel: [ 101.068533] bnx2x 0000:04:00.1:
eth1: bnx2x_nic_load start period
Sep 25 07:57:21 debian kernel: [ 102.294393] bnx2x 0000:04:00.2:
eth2: bnx2x_nic_load bnx2x_fw_command load_code=0x10120000
Sep 25 07:57:21 debian kernel: [ 102.294585] bnx2x 0000:04:00.2:
eth2: bnx2x_nic_load load_code=0x10120000
Sep 25 07:57:21 debian kernel: [ 102.294711] bnx2x 0000:04:00.2:
eth2: bnx2x_nic_load start period
Sep 25 07:57:22 debian kernel: [ 102.782057] bnx2x 0000:04:00.3:
eth3: bnx2x_nic_load bnx2x_fw_command load_code=0x10120000
Sep 25 07:57:22 debian kernel: [ 102.782240] bnx2x 0000:04:00.3:
eth3: bnx2x_nic_load load_code=0x10120000
Sep 25 07:57:22 debian kernel: [ 102.782359] bnx2x 0000:04:00.3:
eth3: bnx2x_nic_load start period
Sep 25 07:57:22 debian kernel: [ 103.265731] bnx2x 0000:04:00.4:
eth4: bnx2x_nic_load bnx2x_fw_command load_code=0x10120000
Sep 25 07:57:22 debian kernel: [ 103.265924] bnx2x 0000:04:00.4:
eth4: bnx2x_nic_load load_code=0x10120000
Sep 25 07:57:22 debian kernel: [ 103.266051] bnx2x 0000:04:00.4:
eth4: bnx2x_nic_load start period
Sep 25 07:57:23 debian kernel: [ 103.758390] bnx2x 0000:04:00.5:
eth5: bnx2x_nic_load bnx2x_fw_command load_code=0x10120000
Sep 25 07:57:23 debian kernel: [ 103.758583] bnx2x 0000:04:00.5:
eth5: bnx2x_nic_load load_code=0x10120000
Sep 25 07:57:23 debian kernel: [ 103.758711] bnx2x 0000:04:00.5:
eth5: bnx2x_nic_load start period
Sep 25 07:57:23 debian kernel: [ 104.252053] bnx2x 0000:04:00.6:
eth6: bnx2x_nic_load bnx2x_fw_command load_code=0x10120000
Sep 25 07:57:23 debian kernel: [ 104.252247] bnx2x 0000:04:00.6:
eth6: bnx2x_nic_load load_code=0x10120000
Sep 25 07:57:23 debian kernel: [ 104.252373] bnx2x 0000:04:00.6:
eth6: bnx2x_nic_load start period
Sep 25 07:57:24 debian kernel: [ 104.836655] bnx2x 0000:04:00.7:
eth7: bnx2x_nic_load bnx2x_fw_command load_code=0x10120000
Sep 25 07:57:24 debian kernel: [ 104.836849] bnx2x 0000:04:00.7:
eth7: bnx2x_nic_load load_code=0x10120000
Sep 25 07:57:24 debian kernel: [ 104.836976] bnx2x 0000:04:00.7:
eth7: bnx2x_nic_load start period
Sep 25 07:57:25 debian kernel: [ 106.145755] bnx2x 0000:04:00.1:
eth1: bnx2x_nic_load bnx2x_fw_command load_code=0x10120000
Sep 25 07:57:25 debian kernel: [ 106.145940] bnx2x 0000:04:00.1:
eth1: bnx2x_nic_load load_code=0x10120000
Sep 25 07:57:25 debian kernel: [ 106.146056] bnx2x 0000:04:00.1:
eth1: bnx2x_nic_load start period
> Your patch will start periodic for every instance, but printout show that it's started for PMF only (which is correct).
> Generally if all functions are marked as PMF (port management function) you will get into the problem accessing shared port resources, like phys and internal data structures, then configuration/data will be corrupted.
>
> Is it feasible to provide ethtool -i output and syslog when driver is loaded debug=0x4?
$> ethtool -i eth0
driver: bnx2x
version: 1.70.30-1
firmware-version: bc 7.0.49
bus-info: 0000:04:00.0
And msglvl set to 4 says this :
Sep 25 12:29:20 debian kernel: [16410.336897] bnx2x:
[bnx2x_get_settings:251(eth0)]ethtool_cmd: cmd 1
Sep 25 12:29:20 debian kernel: [16410.337215] bnx2x:
[bnx2x_get_settings:251(eth1)]ethtool_cmd: cmd 1
Sep 25 12:29:20 debian kernel: [16410.337511] bnx2x:
[bnx2x_get_settings:251(eth2)]ethtool_cmd: cmd 1
Sep 25 12:29:21 debian kernel: [16410.395363] bnx2x:
[bnx2x_set_aer_mmd:3342(eth1)]Set AER to 0x2
Sep 25 12:29:21 debian kernel: [16410.633207] bnx2x:
[bnx2x_set_aer_mmd:3342(eth0)]Set AER to 0x0
Sep 25 12:29:21 debian kernel: [16411.174842] bnx2x:
[bnx2x_set_aer_mmd:3342(eth2)]Set AER to 0x0
Sep 25 12:29:22 debian kernel: [16411.396739] bnx2x:
[bnx2x_set_aer_mmd:3342(eth1)]Set AER to 0x2
Sep 25 12:29:22 debian kernel: [16411.432249] bnx2x:
[bnx2x_get_settings:251(eth0)]ethtool_cmd: cmd 1
Sep 25 12:29:22 debian kernel: [16411.432566] bnx2x:
[bnx2x_get_settings:251(eth1)]ethtool_cmd: cmd 1
Sep 25 12:29:22 debian kernel: [16411.433348] bnx2x:
[bnx2x_get_settings:251(eth2)]ethtool_cmd: cmd 1
Sep 25 12:29:22 debian kernel: [16411.634797] bnx2x:
[bnx2x_set_aer_mmd:3342(eth0)]Set AER to 0x0
Sep 25 12:29:22 debian kernel: [16412.176170] bnx2x:
[bnx2x_set_aer_mmd:3342(eth2)]Set AER to 0x0
Sep 25 12:29:23 debian kernel: [16412.408747] bnx2x:
[bnx2x_set_aer_mmd:3342(eth1)]Set AER to 0x2
Sep 25 12:29:23 debian kernel: [16412.489861] bnx2x:
[bnx2x_get_settings:251(eth0)]ethtool_cmd: cmd 1
Sep 25 12:29:23 debian kernel: [16412.490182] bnx2x:
[bnx2x_get_settings:251(eth1)]ethtool_cmd: cmd 1
Sep 25 12:29:23 debian kernel: [16412.490505] bnx2x:
[bnx2x_get_settings:251(eth2)]ethtool_cmd: cmd 1
Sep 25 12:29:23 debian kernel: [16412.635849] bnx2x:
[bnx2x_set_aer_mmd:3342(eth0)]Set AER to 0x0
Sep 25 12:29:23 debian kernel: [16413.177496] bnx2x:
[bnx2x_set_aer_mmd:3342(eth2)]Set AER to 0x0
Sep 25 12:29:24 debian kernel: [16413.411329] bnx2x:
[bnx2x_set_aer_mmd:3342(eth1)]Set AER to 0x2
JM
^ permalink raw reply
* [PATCH net-next] be2net: fix vfs enumeration
From: Ivan Vecera @ 2012-09-25 12:50 UTC (permalink / raw)
To: netdev; +Cc: sathya.perla, ajit.khaparde
Current VFs enumeration algorithm used in be_find_vfs does not take domain
number into the match. The match found in igb/ixgbe is more elegant and
safe.
Signed-off-by: Ivan Vecera <ivecera@redhat.com>
---
drivers/net/ethernet/emulex/benet/be_main.c | 6 ++----
1 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/net/ethernet/emulex/benet/be_main.c b/drivers/net/ethernet/emulex/benet/be_main.c
index 84379f4..966d9af 100644
--- a/drivers/net/ethernet/emulex/benet/be_main.c
+++ b/drivers/net/ethernet/emulex/benet/be_main.c
@@ -1076,7 +1076,7 @@ static int be_set_vf_tx_rate(struct net_device *netdev,
static int be_find_vfs(struct be_adapter *adapter, int vf_state)
{
struct pci_dev *dev, *pdev = adapter->pdev;
- int vfs = 0, assigned_vfs = 0, pos, vf_fn;
+ int vfs = 0, assigned_vfs = 0, pos;
u16 offset, stride;
pos = pci_find_ext_capability(pdev, PCI_EXT_CAP_ID_SRIOV);
@@ -1087,9 +1087,7 @@ static int be_find_vfs(struct be_adapter *adapter, int vf_state)
dev = pci_get_device(pdev->vendor, PCI_ANY_ID, NULL);
while (dev) {
- vf_fn = (pdev->devfn + offset + stride * vfs) & 0xFFFF;
- if (dev->is_virtfn && dev->devfn == vf_fn &&
- dev->bus->number == pdev->bus->number) {
+ if (dev->is_virtfn && dev->physfn == pdev) {
vfs++;
if (dev->dev_flags & PCI_DEV_FLAGS_ASSIGNED)
assigned_vfs++;
--
1.7.8.6
^ permalink raw reply related
* Re: bnx2x: link detected up at startup even when it should be down
From: Jean-Michel Hautbois @ 2012-09-25 12:54 UTC (permalink / raw)
To: Dmitry Kravkov
Cc: netdev, Barak Witkowski, Eilon Greenstein, davem@davemloft.net
In-Reply-To: <CAL8zT=hJ84woFg0KFxztuTxf2NJEBzThPRXDhZ9KnMJnBxmoZA@mail.gmail.com>
2012/9/25 Jean-Michel Hautbois <jhautbois@gmail.com>:
> 2012/9/25 Dmitry Kravkov <dmitry@broadcom.com>:
>>> -----Original Message-----
>>> From: Jean-Michel Hautbois [mailto:jhautbois@gmail.com]
>>> Sent: Tuesday, September 25, 2012 10:11 AM
>>> To: Dmitry Kravkov
>>> Cc: netdev; Barak Witkowski; Eilon Greenstein; davem@davemloft.net
>>> Subject: Re: bnx2x: link detected up at startup even when it should be down
>>>
>>>
>>> I have tested several things, and I added some traces in order to get
>>> information.
>>> For instance, I trace the load_code in the function named "bnx2x_nic_load".
>>>
>>> [ 25.693677] bnx2x 0000:04:00.0: eth0: bnx2x_nic_load load_code=0x10130000
>>> [ 25.693679] bnx2x 0000:04:00.0: eth0: bnx2x_nic_load start period
>>> [ 102.748934] bnx2x 0000:04:00.1: eth1: bnx2x_nic_load load_code=0x10100000
>>> [ 102.749065] bnx2x 0000:04:00.1: eth1: bnx2x_nic_load start period
>>> [ 104.007074] bnx2x 0000:04:00.2: eth2: bnx2x_nic_load load_code=0x10120000
>>> [ 104.007197] bnx2x 0000:04:00.2: eth2: bnx2x_nic_load NOT start period
>>> [ 104.423789] bnx2x 0000:04:00.3: eth3: bnx2x_nic_load load_code=0x10120000
>>> [ 104.423914] bnx2x 0000:04:00.3: eth3: bnx2x_nic_load NOT start period
>>> [ 104.836505] bnx2x 0000:04:00.4: eth4: bnx2x_nic_load load_code=0x10120000
>>> [ 104.836632] bnx2x 0000:04:00.4: eth4: bnx2x_nic_load NOT start period
>>> [ 105.254220] bnx2x 0000:04:00.5: eth5: bnx2x_nic_load load_code=0x10120000
>>> [ 105.254350] bnx2x 0000:04:00.5: eth5: bnx2x_nic_load NOT start period
>>> [ 105.667935] bnx2x 0000:04:00.6: eth6: bnx2x_nic_load load_code=0x10120000
>>> [ 105.668066] bnx2x 0000:04:00.6: eth6: bnx2x_nic_load NOT start period
>>> [ 106.081652] bnx2x 0000:04:00.7: eth7: bnx2x_nic_load load_code=0x10120000
>>> [ 106.081779] bnx2x 0000:04:00.7: eth7: bnx2x_nic_load NOT start period
>>>
>>> This is a FlexNIC use.
>>> Here is my (quick and dirty) patch which makes the link detection
>>> working and adds the traces shown above :
>>>
>>> diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c
>>> b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c
>>> index 580b44e..dedd810 100644
>>> --- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c
>>> +++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c
>>> @@ -1769,6 +1769,7 @@ int bnx2x_nic_load(struct bnx2x *bp, int load_mode)
>>> */
>>> if (!BP_NOMCP(bp)) {
>>> load_code = bnx2x_fw_command(bp, DRV_MSG_CODE_LOAD_REQ, 0);
>>> +netdev_info(bp->dev, "bnx2x_nic_load bnx2x_fw_command
>>> load_code=0x%08X\n",load_code);
>>> if (!load_code) {
>>> BNX2X_ERR("MCP response failure, aborting\n");
>>> rc = -EBUSY;
>>> @@ -1785,22 +1786,31 @@ int bnx2x_nic_load(struct bnx2x *bp, int load_mode)
>>> DP(NETIF_MSG_IFUP, "NO MCP - load counts[%d] %d, %d, %d\n",
>>> path, load_count[path][0], load_count[path][1],
>>> load_count[path][2]);
>>> +netdev_info(bp->dev, "bnx2x_nic_load NO MCP - load counts[%d]
>>> %d, %d, %d\n",
>>> + path, load_count[path][0], load_count[path][1],
>>> + load_count[path][2]);
>>> load_count[path][0]++;
>>> load_count[path][1 + port]++;
>>> DP(NETIF_MSG_IFUP, "NO MCP - new load counts[%d] %d, %d, %d\n",
>>> path, load_count[path][0], load_count[path][1],
>>> load_count[path][2]);
>>> +netdev_info(bp->dev, "bnx2x_nic_load NO MCP - new load counts[%d]
>>> %d, %d, %d\n",
>>> + path, load_count[path][0], load_count[path][1],
>>> + load_count[path][2]);
>>> if (load_count[path][0] == 1)
>>> load_code = FW_MSG_CODE_DRV_LOAD_COMMON;
>>> else if (load_count[path][1 + port] == 1)
>>> load_code = FW_MSG_CODE_DRV_LOAD_PORT;
>>> else
>>> load_code = FW_MSG_CODE_DRV_LOAD_FUNCTION;
>>> +netdev_info(bp->dev, "bnx2x_nic_load autre
>>> load_code=0x%08X\n",load_code);
>>> }
>>>
>>> +netdev_info(bp->dev, "bnx2x_nic_load load_code=0x%08X\n",load_code);
>>> if ((load_code == FW_MSG_CODE_DRV_LOAD_COMMON) ||
>>> (load_code == FW_MSG_CODE_DRV_LOAD_COMMON_CHIP) ||
>>> - (load_code == FW_MSG_CODE_DRV_LOAD_PORT)) {
>>> + (load_code == FW_MSG_CODE_DRV_LOAD_PORT) ||
>>> + (load_code == FW_MSG_CODE_DRV_LOAD_FUNCTION)) {
>>> bp->port.pmf = 1;
>>> /*
>>> * We need the barrier to ensure the ordering between the
>>> @@ -1808,9 +1818,13 @@ int bnx2x_nic_load(struct bnx2x *bp, int load_mode)
>>> * bnx2x_periodic_task().
>>> */
>>> smp_mb();
>>> +netdev_info(bp->dev, "bnx2x_nic_load start period\n");
>>> queue_delayed_work(bnx2x_wq, &bp->period_task, 0);
>>> } else
>>> +{
>>> +netdev_info(bp->dev, "bnx2x_nic_load NOT start period\n");
>>> bp->port.pmf = 0;
>>> +}
>>>
>>> DP(NETIF_MSG_LINK, "pmf %d\n", bp->port.pmf);
>>>
>> Thanks Jean,
>> But your output does not suit the patch.
>
> Yes, you are right, here it is :
> Sep 25 07:56:08 debian kernel: [ 26.607197] bnx2x 0000:04:00.0:
> eth0: bnx2x_nic_load bnx2x_fw_command load_code=0x10130000
> Sep 25 07:56:08 debian kernel: [ 26.608642] bnx2x 0000:04:00.0:
> eth0: bnx2x_nic_load load_code=0x10130000
> Sep 25 07:56:08 debian kernel: [ 26.608644] bnx2x 0000:04:00.0:
> eth0: bnx2x_nic_load start period
> Sep 25 07:57:20 debian kernel: [ 101.068231] bnx2x 0000:04:00.1:
> eth1: bnx2x_nic_load bnx2x_fw_command load_code=0x10100000
> Sep 25 07:57:20 debian kernel: [ 101.068416] bnx2x 0000:04:00.1:
> eth1: bnx2x_nic_load load_code=0x10100000
> Sep 25 07:57:20 debian kernel: [ 101.068533] bnx2x 0000:04:00.1:
> eth1: bnx2x_nic_load start period
> Sep 25 07:57:21 debian kernel: [ 102.294393] bnx2x 0000:04:00.2:
> eth2: bnx2x_nic_load bnx2x_fw_command load_code=0x10120000
> Sep 25 07:57:21 debian kernel: [ 102.294585] bnx2x 0000:04:00.2:
> eth2: bnx2x_nic_load load_code=0x10120000
> Sep 25 07:57:21 debian kernel: [ 102.294711] bnx2x 0000:04:00.2:
> eth2: bnx2x_nic_load start period
> Sep 25 07:57:22 debian kernel: [ 102.782057] bnx2x 0000:04:00.3:
> eth3: bnx2x_nic_load bnx2x_fw_command load_code=0x10120000
> Sep 25 07:57:22 debian kernel: [ 102.782240] bnx2x 0000:04:00.3:
> eth3: bnx2x_nic_load load_code=0x10120000
> Sep 25 07:57:22 debian kernel: [ 102.782359] bnx2x 0000:04:00.3:
> eth3: bnx2x_nic_load start period
> Sep 25 07:57:22 debian kernel: [ 103.265731] bnx2x 0000:04:00.4:
> eth4: bnx2x_nic_load bnx2x_fw_command load_code=0x10120000
> Sep 25 07:57:22 debian kernel: [ 103.265924] bnx2x 0000:04:00.4:
> eth4: bnx2x_nic_load load_code=0x10120000
> Sep 25 07:57:22 debian kernel: [ 103.266051] bnx2x 0000:04:00.4:
> eth4: bnx2x_nic_load start period
> Sep 25 07:57:23 debian kernel: [ 103.758390] bnx2x 0000:04:00.5:
> eth5: bnx2x_nic_load bnx2x_fw_command load_code=0x10120000
> Sep 25 07:57:23 debian kernel: [ 103.758583] bnx2x 0000:04:00.5:
> eth5: bnx2x_nic_load load_code=0x10120000
> Sep 25 07:57:23 debian kernel: [ 103.758711] bnx2x 0000:04:00.5:
> eth5: bnx2x_nic_load start period
> Sep 25 07:57:23 debian kernel: [ 104.252053] bnx2x 0000:04:00.6:
> eth6: bnx2x_nic_load bnx2x_fw_command load_code=0x10120000
> Sep 25 07:57:23 debian kernel: [ 104.252247] bnx2x 0000:04:00.6:
> eth6: bnx2x_nic_load load_code=0x10120000
> Sep 25 07:57:23 debian kernel: [ 104.252373] bnx2x 0000:04:00.6:
> eth6: bnx2x_nic_load start period
> Sep 25 07:57:24 debian kernel: [ 104.836655] bnx2x 0000:04:00.7:
> eth7: bnx2x_nic_load bnx2x_fw_command load_code=0x10120000
> Sep 25 07:57:24 debian kernel: [ 104.836849] bnx2x 0000:04:00.7:
> eth7: bnx2x_nic_load load_code=0x10120000
> Sep 25 07:57:24 debian kernel: [ 104.836976] bnx2x 0000:04:00.7:
> eth7: bnx2x_nic_load start period
> Sep 25 07:57:25 debian kernel: [ 106.145755] bnx2x 0000:04:00.1:
> eth1: bnx2x_nic_load bnx2x_fw_command load_code=0x10120000
> Sep 25 07:57:25 debian kernel: [ 106.145940] bnx2x 0000:04:00.1:
> eth1: bnx2x_nic_load load_code=0x10120000
> Sep 25 07:57:25 debian kernel: [ 106.146056] bnx2x 0000:04:00.1:
> eth1: bnx2x_nic_load start period
>
>> Your patch will start periodic for every instance, but printout show that it's started for PMF only (which is correct).
>> Generally if all functions are marked as PMF (port management function) you will get into the problem accessing shared port resources, like phys and internal data structures, then configuration/data will be corrupted.
>>
>> Is it feasible to provide ethtool -i output and syslog when driver is loaded debug=0x4?
> $> ethtool -i eth0
> driver: bnx2x
> version: 1.70.30-1
> firmware-version: bc 7.0.49
> bus-info: 0000:04:00.0
>
> And msglvl set to 4 says this :
> Sep 25 12:29:20 debian kernel: [16410.336897] bnx2x:
> [bnx2x_get_settings:251(eth0)]ethtool_cmd: cmd 1
> Sep 25 12:29:20 debian kernel: [16410.337215] bnx2x:
> [bnx2x_get_settings:251(eth1)]ethtool_cmd: cmd 1
> Sep 25 12:29:20 debian kernel: [16410.337511] bnx2x:
> [bnx2x_get_settings:251(eth2)]ethtool_cmd: cmd 1
> Sep 25 12:29:21 debian kernel: [16410.395363] bnx2x:
> [bnx2x_set_aer_mmd:3342(eth1)]Set AER to 0x2
> Sep 25 12:29:21 debian kernel: [16410.633207] bnx2x:
> [bnx2x_set_aer_mmd:3342(eth0)]Set AER to 0x0
> Sep 25 12:29:21 debian kernel: [16411.174842] bnx2x:
> [bnx2x_set_aer_mmd:3342(eth2)]Set AER to 0x0
> Sep 25 12:29:22 debian kernel: [16411.396739] bnx2x:
> [bnx2x_set_aer_mmd:3342(eth1)]Set AER to 0x2
> Sep 25 12:29:22 debian kernel: [16411.432249] bnx2x:
> [bnx2x_get_settings:251(eth0)]ethtool_cmd: cmd 1
> Sep 25 12:29:22 debian kernel: [16411.432566] bnx2x:
> [bnx2x_get_settings:251(eth1)]ethtool_cmd: cmd 1
> Sep 25 12:29:22 debian kernel: [16411.433348] bnx2x:
> [bnx2x_get_settings:251(eth2)]ethtool_cmd: cmd 1
> Sep 25 12:29:22 debian kernel: [16411.634797] bnx2x:
> [bnx2x_set_aer_mmd:3342(eth0)]Set AER to 0x0
> Sep 25 12:29:22 debian kernel: [16412.176170] bnx2x:
> [bnx2x_set_aer_mmd:3342(eth2)]Set AER to 0x0
> Sep 25 12:29:23 debian kernel: [16412.408747] bnx2x:
> [bnx2x_set_aer_mmd:3342(eth1)]Set AER to 0x2
> Sep 25 12:29:23 debian kernel: [16412.489861] bnx2x:
> [bnx2x_get_settings:251(eth0)]ethtool_cmd: cmd 1
> Sep 25 12:29:23 debian kernel: [16412.490182] bnx2x:
> [bnx2x_get_settings:251(eth1)]ethtool_cmd: cmd 1
> Sep 25 12:29:23 debian kernel: [16412.490505] bnx2x:
> [bnx2x_get_settings:251(eth2)]ethtool_cmd: cmd 1
> Sep 25 12:29:23 debian kernel: [16412.635849] bnx2x:
> [bnx2x_set_aer_mmd:3342(eth0)]Set AER to 0x0
> Sep 25 12:29:23 debian kernel: [16413.177496] bnx2x:
> [bnx2x_set_aer_mmd:3342(eth2)]Set AER to 0x0
> Sep 25 12:29:24 debian kernel: [16413.411329] bnx2x:
> [bnx2x_set_aer_mmd:3342(eth1)]Set AER to 0x2
>
> JM
After a reboot (with the added if but no netif_msg) :
[ 998.244250] bnx2x: [bnx2x_get_settings:251(eth0)]ethtool_cmd: cmd 1
[ 998.244251] supported 0x7460 advertising 0x7460 speed 2500
[ 998.244252] duplex 1 port 3 phy_address 1 transceiver 0
[ 998.244252] autoneg 1 maxtxpkt 0 maxrxpkt 0
[ 998.244551] bnx2x: [bnx2x_get_settings:251(eth1)]ethtool_cmd: cmd 1
[ 998.244552] supported 0x7460 advertising 0x7460 speed 8000
[ 998.244552] duplex 1 port 3 phy_address 1 transceiver 0
[ 998.244553] autoneg 1 maxtxpkt 0 maxrxpkt 0
[ 998.244851] bnx2x: [bnx2x_get_settings:251(eth2)]ethtool_cmd: cmd 1
[ 998.244852] supported 0x7460 advertising 0x7460 speed 2500
[ 998.244852] duplex 1 port 3 phy_address 1 transceiver 0
[ 998.244853] autoneg 1 maxtxpkt 0 maxrxpkt 0
[ 998.246453] bnx2x: [bnx2x_get_settings:251(eth3)]ethtool_cmd: cmd 1
[ 998.246454] supported 0x7460 advertising 0x7460 speed 1000
[ 998.246454] duplex 1 port 3 phy_address 1 transceiver 0
[ 998.246455] autoneg 1 maxtxpkt 0 maxrxpkt 0
[ 998.255995] bnx2x: [bnx2x_set_aer_mmd:3342(eth3)]Set AER to 0x2
[ 998.643647] bnx2x: [bnx2x_set_aer_mmd:3342(eth1)]Set AER to 0x2
[ 998.723597] bnx2x: [bnx2x_set_aer_mmd:3342(eth0)]Set AER to 0x0
[ 998.735816] bnx2x: [bnx2x_set_aer_mmd:3342(eth2)]Set AER to 0x0
[ 999.255050] bnx2x: [bnx2x_get_settings:251(eth0)]ethtool_cmd: cmd 1
[ 999.255051] supported 0x7460 advertising 0x7460 speed 2500
[ 999.255052] duplex 1 port 3 phy_address 1 transceiver 0
[ 999.255052] autoneg 1 maxtxpkt 0 maxrxpkt 0
[ 999.255356] bnx2x: [bnx2x_get_settings:251(eth1)]ethtool_cmd: cmd 1
[ 999.255356] supported 0x7460 advertising 0x7460 speed 8000
[ 999.255357] duplex 1 port 3 phy_address 1 transceiver 0
[ 999.255358] autoneg 1 maxtxpkt 0 maxrxpkt 0
[ 999.255651] bnx2x: [bnx2x_get_settings:251(eth2)]ethtool_cmd: cmd 1
[ 999.255652] supported 0x7460 advertising 0x7460 speed 2500
[ 999.255653] duplex 1 port 3 phy_address 1 transceiver 0
[ 999.255653] autoneg 1 maxtxpkt 0 maxrxpkt 0
[ 999.255943] bnx2x: [bnx2x_get_settings:251(eth3)]ethtool_cmd: cmd 1
[ 999.255944] supported 0x7460 advertising 0x7460 speed 1000
[ 999.255944] duplex 1 port 3 phy_address 1 transceiver 0
[ 999.255945] autoneg 1 maxtxpkt 0 maxrxpkt 0
[ 999.257380] bnx2x: [bnx2x_set_aer_mmd:3342(eth3)]Set AER to 0x2
[ 999.644969] bnx2x: [bnx2x_set_aer_mmd:3342(eth1)]Set AER to 0x2
[ 999.724909] bnx2x: [bnx2x_set_aer_mmd:3342(eth0)]Set AER to 0x0
[ 999.737130] bnx2x: [bnx2x_set_aer_mmd:3342(eth2)]Set AER to 0x0
[ 1000.258622] bnx2x: [bnx2x_set_aer_mmd:3342(eth3)]Set AER to 0x2
[ 1000.263951] bnx2x: [bnx2x_get_settings:251(eth0)]ethtool_cmd: cmd 1
[ 1000.263952] supported 0x7460 advertising 0x7460 speed 2500
[ 1000.263952] duplex 1 port 3 phy_address 1 transceiver 0
[ 1000.263953] autoneg 1 maxtxpkt 0 maxrxpkt 0
[ 1000.264240] bnx2x: [bnx2x_get_settings:251(eth1)]ethtool_cmd: cmd 1
[ 1000.264241] supported 0x7460 advertising 0x7460 speed 8000
[ 1000.264241] duplex 1 port 3 phy_address 1 transceiver 0
[ 1000.264242] autoneg 1 maxtxpkt 0 maxrxpkt 0
[ 1000.264525] bnx2x: [bnx2x_get_settings:251(eth2)]ethtool_cmd: cmd 1
[ 1000.264525] supported 0x7460 advertising 0x7460 speed 2500
[ 1000.264526] duplex 1 port 3 phy_address 1 transceiver 0
[ 1000.264527] autoneg 1 maxtxpkt 0 maxrxpkt 0
[ 1000.264815] bnx2x: [bnx2x_get_settings:251(eth3)]ethtool_cmd: cmd 1
[ 1000.264816] supported 0x7460 advertising 0x7460 speed 1000
[ 1000.264816] duplex 1 port 3 phy_address 1 transceiver 0
[ 1000.264817] autoneg 1 maxtxpkt 0 maxrxpkt 0
[ 1000.646283] bnx2x: [bnx2x_set_aer_mmd:3342(eth1)]Set AER to 0x2
[ 1000.726224] bnx2x: [bnx2x_set_aer_mmd:3342(eth0)]Set AER to 0x0
[ 1000.738445] bnx2x: [bnx2x_set_aer_mmd:3342(eth2)]Set AER to 0x0
[ 1001.260013] bnx2x: [bnx2x_set_aer_mmd:3342(eth3)]Set AER to 0x2
[ 1001.272929] bnx2x: [bnx2x_get_settings:251(eth0)]ethtool_cmd: cmd 1
[ 1001.272930] supported 0x7460 advertising 0x7460 speed 2500
[ 1001.272931] duplex 1 port 3 phy_address 1 transceiver 0
[ 1001.272931] autoneg 1 maxtxpkt 0 maxrxpkt 0
[ 1001.273221] bnx2x: [bnx2x_get_settings:251(eth1)]ethtool_cmd: cmd 1
[ 1001.273222] supported 0x7460 advertising 0x7460 speed 8000
[ 1001.273222] duplex 1 port 3 phy_address 1 transceiver 0
[ 1001.273223] autoneg 1 maxtxpkt 0 maxrxpkt 0
[ 1001.273503] bnx2x: [bnx2x_get_settings:251(eth2)]ethtool_cmd: cmd 1
[ 1001.273504] supported 0x7460 advertising 0x7460 speed 2500
[ 1001.273505] duplex 1 port 3 phy_address 1 transceiver 0
[ 1001.273505] autoneg 1 maxtxpkt 0 maxrxpkt 0
[ 1001.273790] bnx2x: [bnx2x_get_settings:251(eth3)]ethtool_cmd: cmd 1
[ 1001.273790] supported 0x7460 advertising 0x7460 speed 1000
[ 1001.273791] duplex 1 port 3 phy_address 1 transceiver 0
[ 1001.273791] autoneg 1 maxtxpkt 0 maxrxpkt 0
[ 1001.647598] bnx2x: [bnx2x_set_aer_mmd:3342(eth1)]Set AER to 0x2
[ 1001.727540] bnx2x: [bnx2x_set_aer_mmd:3342(eth0)]Set AER to 0x0
[ 1001.739762] bnx2x: [bnx2x_set_aer_mmd:3342(eth2)]Set AER to 0x0
[ 1002.261261] bnx2x: [bnx2x_set_aer_mmd:3342(eth3)]Set AER to 0x2
[ 1002.281715] bnx2x: [bnx2x_get_settings:251(eth0)]ethtool_cmd: cmd 1
[ 1002.281715] supported 0x7460 advertising 0x7460 speed 2500
[ 1002.281716] duplex 1 port 3 phy_address 1 transceiver 0
[ 1002.281717] autoneg 1 maxtxpkt 0 maxrxpkt 0
[ 1002.282002] bnx2x: [bnx2x_get_settings:251(eth1)]ethtool_cmd: cmd 1
[ 1002.282003] supported 0x7460 advertising 0x7460 speed 8000
[ 1002.282003] duplex 1 port 3 phy_address 1 transceiver 0
[ 1002.282004] autoneg 1 maxtxpkt 0 maxrxpkt 0
[ 1002.282294] bnx2x: [bnx2x_get_settings:251(eth2)]ethtool_cmd: cmd 1
[ 1002.282295] supported 0x7460 advertising 0x7460 speed 2500
[ 1002.282296] duplex 1 port 3 phy_address 1 transceiver 0
[ 1002.282296] autoneg 1 maxtxpkt 0 maxrxpkt 0
[ 1002.282583] bnx2x: [bnx2x_get_settings:251(eth3)]ethtool_cmd: cmd 1
[ 1002.282584] supported 0x7460 advertising 0x7460 speed 1000
[ 1002.282584] duplex 1 port 3 phy_address 1 transceiver 0
[ 1002.282585] autoneg 1 maxtxpkt 0 maxrxpkt 0
[ 1002.648914] bnx2x: [bnx2x_set_aer_mmd:3342(eth1)]Set AER to 0x2
[ 1002.728852] bnx2x: [bnx2x_set_aer_mmd:3342(eth0)]Set AER to 0x0
[ 1002.741076] bnx2x: [bnx2x_set_aer_mmd:3342(eth2)]Set AER to 0x0
[ 1003.262650] bnx2x: [bnx2x_set_aer_mmd:3342(eth3)]Set AER to 0x2
[ 1003.290582] bnx2x: [bnx2x_get_settings:251(eth0)]ethtool_cmd: cmd 1
[ 1003.290583] supported 0x7460 advertising 0x7460 speed 2500
[ 1003.290584] duplex 1 port 3 phy_address 1 transceiver 0
[ 1003.290584] autoneg 1 maxtxpkt 0 maxrxpkt 0
[ 1003.290886] bnx2x: [bnx2x_get_settings:251(eth1)]ethtool_cmd: cmd 1
[ 1003.290887] supported 0x7460 advertising 0x7460 speed 8000
[ 1003.290887] duplex 1 port 3 phy_address 1 transceiver 0
[ 1003.290888] autoneg 1 maxtxpkt 0 maxrxpkt 0
[ 1003.291188] bnx2x: [bnx2x_get_settings:251(eth2)]ethtool_cmd: cmd 1
[ 1003.291188] supported 0x7460 advertising 0x7460 speed 2500
[ 1003.291189] duplex 1 port 3 phy_address 1 transceiver 0
[ 1003.291190] autoneg 1 maxtxpkt 0 maxrxpkt 0
[ 1003.291493] bnx2x: [bnx2x_get_settings:251(eth3)]ethtool_cmd: cmd 1
[ 1003.291494] supported 0x7460 advertising 0x7460 speed 1000
[ 1003.291494] duplex 1 port 3 phy_address 1 transceiver 0
[ 1003.291495] autoneg 1 maxtxpkt 0 maxrxpkt 0
[ 1003.650229] bnx2x: [bnx2x_set_aer_mmd:3342(eth1)]Set AER to 0x2
[ 1003.730167] bnx2x: [bnx2x_set_aer_mmd:3342(eth0)]Set AER to 0x0
[ 1003.742391] bnx2x: [bnx2x_set_aer_mmd:3342(eth2)]Set AER to 0x0
[ 1004.263895] bnx2x: [bnx2x_set_aer_mmd:3342(eth3)]Set AER to 0x2
[ 1004.299670] bnx2x: [bnx2x_get_settings:251(eth0)]ethtool_cmd: cmd 1
[ 1004.299671] supported 0x7460 advertising 0x7460 speed 2500
[ 1004.299672] duplex 1 port 3 phy_address 1 transceiver 0
[ 1004.299673] autoneg 1 maxtxpkt 0 maxrxpkt 0
[ 1004.299986] bnx2x: [bnx2x_get_settings:251(eth1)]ethtool_cmd: cmd 1
[ 1004.299987] supported 0x7460 advertising 0x7460 speed 8000
[ 1004.299987] duplex 1 port 3 phy_address 1 transceiver 0
[ 1004.299988] autoneg 1 maxtxpkt 0 maxrxpkt 0
[ 1004.300293] bnx2x: [bnx2x_get_settings:251(eth2)]ethtool_cmd: cmd 1
[ 1004.300293] supported 0x7460 advertising 0x7460 speed 2500
[ 1004.300294] duplex 1 port 3 phy_address 1 transceiver 0
[ 1004.300295] autoneg 1 maxtxpkt 0 maxrxpkt 0
[ 1004.300600] bnx2x: [bnx2x_get_settings:251(eth3)]ethtool_cmd: cmd 1
[ 1004.300600] supported 0x7460 advertising 0x7460 speed 1000
[ 1004.300601] duplex 1 port 3 phy_address 1 transceiver 0
[ 1004.300601] autoneg 1 maxtxpkt 0 maxrxpkt 0
[ 1004.651587] bnx2x: [bnx2x_set_aer_mmd:3342(eth1)]Set AER to 0x2
[ 1004.731481] bnx2x: [bnx2x_set_aer_mmd:3342(eth0)]Set AER to 0x0
[ 1004.743705] bnx2x: [bnx2x_set_aer_mmd:3342(eth2)]Set AER to 0x0
[ 1005.265285] bnx2x: [bnx2x_set_aer_mmd:3342(eth3)]Set AER to 0x2
[ 1005.308537] bnx2x: [bnx2x_get_settings:251(eth0)]ethtool_cmd: cmd 1
[ 1005.308538] supported 0x7460 advertising 0x7460 speed 2500
[ 1005.308538] duplex 1 port 3 phy_address 1 transceiver 0
[ 1005.308539] autoneg 1 maxtxpkt 0 maxrxpkt 0
[ 1005.308840] bnx2x: [bnx2x_get_settings:251(eth1)]ethtool_cmd: cmd 1
[ 1005.308841] supported 0x7460 advertising 0x7460 speed 8000
[ 1005.308841] duplex 1 port 3 phy_address 1 transceiver 0
[ 1005.308842] autoneg 1 maxtxpkt 0 maxrxpkt 0
[ 1005.309147] bnx2x: [bnx2x_get_settings:251(eth2)]ethtool_cmd: cmd 1
[ 1005.309147] supported 0x7460 advertising 0x7460 speed 2500
[ 1005.309148] duplex 1 port 3 phy_address 1 transceiver 0
[ 1005.309149] autoneg 1 maxtxpkt 0 maxrxpkt 0
[ 1005.309448] bnx2x: [bnx2x_get_settings:251(eth3)]ethtool_cmd: cmd 1
[ 1005.309448] supported 0x7460 advertising 0x7460 speed 1000
[ 1005.309449] duplex 1 port 3 phy_address 1 transceiver 0
[ 1005.309450] autoneg 1 maxtxpkt 0 maxrxpkt 0
[ 1005.652906] bnx2x: [bnx2x_set_aer_mmd:3342(eth1)]Set AER to 0x2
[ 1005.732798] bnx2x: [bnx2x_set_aer_mmd:3342(eth0)]Set AER to 0x0
[ 1005.745020] bnx2x: [bnx2x_set_aer_mmd:3342(eth2)]Set AER to 0x0
[ 1006.266543] bnx2x: [bnx2x_set_aer_mmd:3342(eth3)]Set AER to 0x2
[ 1006.317428] bnx2x: [bnx2x_get_settings:251(eth0)]ethtool_cmd: cmd 1
[ 1006.317429] supported 0x7460 advertising 0x7460 speed 2500
[ 1006.317430] duplex 1 port 3 phy_address 1 transceiver 0
[ 1006.317431] autoneg 1 maxtxpkt 0 maxrxpkt 0
[ 1006.317731] bnx2x: [bnx2x_get_settings:251(eth1)]ethtool_cmd: cmd 1
[ 1006.317732] supported 0x7460 advertising 0x7460 speed 8000
[ 1006.317733] duplex 1 port 3 phy_address 1 transceiver 0
[ 1006.317733] autoneg 1 maxtxpkt 0 maxrxpkt 0
[ 1006.318031] bnx2x: [bnx2x_get_settings:251(eth2)]ethtool_cmd: cmd 1
[ 1006.318031] supported 0x7460 advertising 0x7460 speed 2500
[ 1006.318032] duplex 1 port 3 phy_address 1 transceiver 0
[ 1006.318033] autoneg 1 maxtxpkt 0 maxrxpkt 0
[ 1006.318329] bnx2x: [bnx2x_get_settings:251(eth3)]ethtool_cmd: cmd 1
[ 1006.318330] supported 0x7460 advertising 0x7460 speed 1000
[ 1006.318331] duplex 1 port 3 phy_address 1 transceiver 0
[ 1006.318331] autoneg 1 maxtxpkt 0 maxrxpkt 0
[ 1006.654172] bnx2x: [bnx2x_set_aer_mmd:3342(eth1)]Set AER to 0x2
[ 1006.734109] bnx2x: [bnx2x_set_aer_mmd:3342(eth0)]Set AER to 0x0
[ 1006.746331] bnx2x: [bnx2x_set_aer_mmd:3342(eth2)]Set AER to 0x0
^ permalink raw reply
* Re: [PATCH V3 0/8] ipvs: IPv6 fragment handling for IPVS
From: Jesper Dangaard Brouer @ 2012-09-25 13:11 UTC (permalink / raw)
To: Julian Anastasov
Cc: Hans Schillstrom, Hans Schillstrom, netdev, Patrick McHardy,
Pablo Neira Ayuso, lvs-devel, Thomas Graf, Wensong Zhang,
netfilter-devel, Simon Horman
In-Reply-To: <alpine.LFD.2.00.1209130143410.1653@ja.ssi.bg>
On Thu, 2012-09-13 at 01:57 +0300, Julian Anastasov wrote:
> Hello,
>
> On Tue, 11 Sep 2012, Jesper Dangaard Brouer wrote:
>
> > The following patchset implement IPv6 fragment handling for IPVS.
> >
> > This work is based upon patches from Hans Schillstrom. I have taken
> > over the patchset, in close agreement with Hans, because he don't have
> > (gotten allocated) time to complete his work.
> >
> > I have cleaned up the patchset significantly, and split the patchset
> > up into eight patches.
> >
> > The first 4 patches, are ready to be merged
> >
> > Patch01: Trivial changes, use compressed IPv6 address in output
> > Patch02: IPv6 extend ICMPv6 handling for future types
> > Patch03: Use config macro IS_ENABLED()
> > Patch04: Fix bug in IPVS IPv6 NAT mangling of ports inside ICMPv6 packets
> >
> > The next 4 patches, I consider V3 of the patches I have submitted
> > earlier, where I have incorporated all of Julian's feedback. I have
> > also tried to make the patches easier to review, by reorganizing the
> > changes, to be more strictly split (exthdr vs. fragment handling).
> >
> > I have also removed the API changes, and moved those to patch07. This
> > is done, (1) to make it easier to review the patches, and (2) to allow
> > easier integration of Patricks idea and my RFC patch of caching exthdr
> > info in skb->cb[]. Thus, we can get these patches applied (and later
> > go back and apply the caching scheme easier).
> >
> > Patch05: Fix faulty IPv6 extension header handling in IPVS
> > Patch06: Complete IPv6 fragment handling for IPVS
> > Patch07: IPVS API change to avoid rescan of IPv6 exthdr
> > Patch08: IPVS SIP fragment handling
> >
> > The SIP frag handling have been split into its own patch, as I have
> > not been able to test this part my self.
> >
> > This patchset is based upon:
> > Pablo's nf-next tree: git://1984.lsi.us.es/nf-next
> > On top of commit 0edd94887d19ad73539477395c17ea0d6898947a
> >
> > ---
> >
> > Jesper Dangaard Brouer (8):
> > ipvs: SIP fragment handling
> > ipvs: API change to avoid rescan of IPv6 exthdr
> > ipvs: Complete IPv6 fragment handling for IPVS
> > ipvs: Fix faulty IPv6 extension header handling in IPVS
> > ipvs: Fix bug in IPv6 NAT mangling of ports inside ICMPv6 packets
> > ipvs: Use config macro IS_ENABLED()
> > ipvs: IPv6 extend ICMPv6 handling for future types
> > ipvs: Trivial changes, use compressed IPv6 address in output
>
> Some comments:
>
> - About patch 4: ip_vs_icmp_xmit_v6 already calls skb_make_writable
> before ip_vs_nat_icmp_v6, that is why we provide 'offset'.
I see, that call path is correct, BUT I was talking about another call
path of ip_vs_nat_icmp_v6(), via handle_response_icmp() (which also
calls skb_make_writable). That call path is triggered, if the
real-server, have shutdown its service and send back an ICMPv6 packet.
Hmm, testing it again, I cannot trigger this issue. Perhaps I was
confusing my self and were using my test script that added IPv6 exthdrs
to the packet. Adding print statements to the code, also show the
correct offset now.
I'm dropping this patch-4, and I'll adjust/fix patch-5 ("ipvs: fix
faulty IPv6 extension header handling in IPVS") accordingly. And I'll
double check patch-5, that exthdr have been accounted for (in the offset
used by skb_make_writable() before calling ip_vs_nat_icmp_v6()).
> - May be we can provide the offset of ICMPv6 header
> from ip_vs_in_icmp_v6 to ip_vs_icmp_xmit_v6 as additional
> argument (icmp_offset) and then to ip_vs_nat_icmp_v6. By this
> way we can avoid the two ipv6_find_hdr calls if we also provide
> the iph argument from ip_vs_icmp_xmit_v6 to ip_vs_nat_icmp_v6,
> its ->len points to the ports. ip_vs_in_icmp_v6 provides
> also protocol in this ciph, so may be we have everything.
Is this comment for the API patch-7 ("ipvs: API change to avoid rescan
of IPv6 exthdr") ?
The API patch is going to save 19 calls to ipv6_find_hdr ().
> - in ip_vs_in_icmp_v6 there must be 'offs_ciph = ciph.len;'
> just before this line:
>
> if (IPPROTO_TCP == ciph.protocol || IPPROTO_UDP == ciph.protocol ||
>
It would be a lot easier for me, if you commented directly on the
patches.
I can see that 'offs_ciph = ciph.len;' is set earlier in this patch, but
that value is primarily used by IP_VS_DBG_PKT. And offs_ciph, needs to
be updated, again, with the value of ciph.len after the call to
ipv6_find_hdr(). So, yes you are right ;-)
I'll rename offs_ciph to "writable" to emphasize what we are using this
value for.
> The idea is that we linearize for writing the inner
> IP header and optionally the 2 ports. That is why old
> logic was 'offset += 2 * sizeof(__u16);'
The port logic was kept. But I'll make it more clear whats happening,
and keep the "+=" coding style.
> - initially, ip_vs_fill_iph_skb fills iphdr->flags from
> current fragment, later ip_vs_out_icmp_v6 uses the same
> ipvsh when calling ipv6_find_hdr. Should we initialize
> ipvsh->flags to 0 before calling ipv6_find_hdr because
> it is I/O argument?
As we don't use the flag, after this point, we can just give
ipv6_find_hdr() a NULL value instead.
But I must give you, that it's a little confusing the way we reuse the
ipvsh variable (in ip_vs_out_icmp_v6()). Think, this needs to be
rewritten to use a separate variable, like in ip_vs_in_icmp_v6().
> - in patch 5: in ip_vs_nat_icmp_v6 skb_make_writable can
> move data to other addresses on linearization. Any pointers
> like 'ciph' should be recalculated based on offsets. But
> it does not matter because we should not call skb_make_writable
> here.
Yes, as mentioned earlier, I'll fix up patch-5 and remove the
skb_make_writable call.
> I also see that we should not send ICMP
> errors (FRAG NEEDED/TOO BIG) in response to large
> ICMP error packets but it is not related to your changes,
> it needs separate change to all transmitters.
Yes, its unrelated, lets fix that in another patchset.
I'll hopefully soon have a patchset ready with these changes/updates...
--
Best regards,
Jesper Dangaard Brouer
MSc.CS, Sr. Network Kernel Developer at Red Hat
Author of http://www.iptv-analyzer.org
LinkedIn: http://www.linkedin.com/in/brouer
^ permalink raw reply
* RE: bnx2x: link detected up at startup even when it should be down
From: Dmitry Kravkov @ 2012-09-25 13:11 UTC (permalink / raw)
To: Jean-Michel Hautbois
Cc: netdev, Barak Witkowski, Eilon Greenstein, davem@davemloft.net
In-Reply-To: <CAL8zT=j9LC5hKtmkzBA-Epa+NhX1YpC9RodJ-C+UunTH_HRVKQ@mail.gmail.com>
> -----Original Message-----
> From: Jean-Michel Hautbois [mailto:jhautbois@gmail.com]
> Sent: Tuesday, September 25, 2012 2:54 PM
> To: Dmitry Kravkov
> Cc: netdev; Barak Witkowski; Eilon Greenstein; davem@davemloft.net
> Subject: Re: bnx2x: link detected up at startup even when it should be down
> After a reboot (with the added if but no netif_msg) :
I'm looking for link messages during device load.
These (get_setting/set_settings) appear at the later stages.
Will you able to load driver with module param debug=0x4 instead? So we can catch all link related messages
(This can be done via /etc/modprobe.conf)
>
> [ 998.244250] bnx2x: [bnx2x_get_settings:251(eth0)]ethtool_cmd: cmd 1
> [ 998.244251] supported 0x7460 advertising 0x7460 speed 2500
> [ 998.244252] duplex 1 port 3 phy_address 1 transceiver 0
> [ 998.244252] autoneg 1 maxtxpkt 0 maxrxpkt 0
> [ 998.244551] bnx2x: [bnx2x_get_settings:251(eth1)]ethtool_cmd: cmd 1
> [ 998.244552] supported 0x7460 advertising 0x7460 speed 8000
> [ 998.244552] duplex 1 port 3 phy_address 1 transceiver 0
> [ 998.244553] autoneg 1 maxtxpkt 0 maxrxpkt 0
> [ 998.244851] bnx2x: [bnx2x_get_settings:251(eth2)]ethtool_cmd: cmd 1
> [ 998.244852] supported 0x7460 advertising 0x7460 speed 2500
> [ 998.244852] duplex 1 port 3 phy_address 1 transceiver 0
> [ 998.244853] autoneg 1 maxtxpkt 0 maxrxpkt 0
> [ 998.246453] bnx2x: [bnx2x_get_settings:251(eth3)]ethtool_cmd: cmd 1
> [ 998.246454] supported 0x7460 advertising 0x7460 speed 1000
> [ 998.246454] duplex 1 port 3 phy_address 1 transceiver 0
> [ 998.246455] autoneg 1 maxtxpkt 0 maxrxpkt 0
> [ 998.255995] bnx2x: [bnx2x_set_aer_mmd:3342(eth3)]Set AER to 0x2
> [ 998.643647] bnx2x: [bnx2x_set_aer_mmd:3342(eth1)]Set AER to 0x2
> [ 998.723597] bnx2x: [bnx2x_set_aer_mmd:3342(eth0)]Set AER to 0x0
> [ 998.735816] bnx2x: [bnx2x_set_aer_mmd:3342(eth2)]Set AER to 0x0
> [ 999.255050] bnx2x: [bnx2x_get_settings:251(eth0)]ethtool_cmd: cmd 1
> [ 999.255051] supported 0x7460 advertising 0x7460 speed 2500
> [ 999.255052] duplex 1 port 3 phy_address 1 transceiver 0
> [ 999.255052] autoneg 1 maxtxpkt 0 maxrxpkt 0
> [ 999.255356] bnx2x: [bnx2x_get_settings:251(eth1)]ethtool_cmd: cmd 1
> [ 999.255356] supported 0x7460 advertising 0x7460 speed 8000
> [ 999.255357] duplex 1 port 3 phy_address 1 transceiver 0
> [ 999.255358] autoneg 1 maxtxpkt 0 maxrxpkt 0
> [ 999.255651] bnx2x: [bnx2x_get_settings:251(eth2)]ethtool_cmd: cmd 1
> [ 999.255652] supported 0x7460 advertising 0x7460 speed 2500
> [ 999.255653] duplex 1 port 3 phy_address 1 transceiver 0
> [ 999.255653] autoneg 1 maxtxpkt 0 maxrxpkt 0
> [ 999.255943] bnx2x: [bnx2x_get_settings:251(eth3)]ethtool_cmd: cmd 1
> [ 999.255944] supported 0x7460 advertising 0x7460 speed 1000
> [ 999.255944] duplex 1 port 3 phy_address 1 transceiver 0
> [ 999.255945] autoneg 1 maxtxpkt 0 maxrxpkt 0
> [ 999.257380] bnx2x: [bnx2x_set_aer_mmd:3342(eth3)]Set AER to 0x2
> [ 999.644969] bnx2x: [bnx2x_set_aer_mmd:3342(eth1)]Set AER to 0x2
> [ 999.724909] bnx2x: [bnx2x_set_aer_mmd:3342(eth0)]Set AER to 0x0
> [ 999.737130] bnx2x: [bnx2x_set_aer_mmd:3342(eth2)]Set AER to 0x0
> [ 1000.258622] bnx2x: [bnx2x_set_aer_mmd:3342(eth3)]Set AER to 0x2
> [ 1000.263951] bnx2x: [bnx2x_get_settings:251(eth0)]ethtool_cmd: cmd 1
> [ 1000.263952] supported 0x7460 advertising 0x7460 speed 2500
> [ 1000.263952] duplex 1 port 3 phy_address 1 transceiver 0
> [ 1000.263953] autoneg 1 maxtxpkt 0 maxrxpkt 0
> [ 1000.264240] bnx2x: [bnx2x_get_settings:251(eth1)]ethtool_cmd: cmd 1
> [ 1000.264241] supported 0x7460 advertising 0x7460 speed 8000
> [ 1000.264241] duplex 1 port 3 phy_address 1 transceiver 0
> [ 1000.264242] autoneg 1 maxtxpkt 0 maxrxpkt 0
> [ 1000.264525] bnx2x: [bnx2x_get_settings:251(eth2)]ethtool_cmd: cmd 1
> [ 1000.264525] supported 0x7460 advertising 0x7460 speed 2500
> [ 1000.264526] duplex 1 port 3 phy_address 1 transceiver 0
> [ 1000.264527] autoneg 1 maxtxpkt 0 maxrxpkt 0
> [ 1000.264815] bnx2x: [bnx2x_get_settings:251(eth3)]ethtool_cmd: cmd 1
> [ 1000.264816] supported 0x7460 advertising 0x7460 speed 1000
> [ 1000.264816] duplex 1 port 3 phy_address 1 transceiver 0
> [ 1000.264817] autoneg 1 maxtxpkt 0 maxrxpkt 0
> [ 1000.646283] bnx2x: [bnx2x_set_aer_mmd:3342(eth1)]Set AER to 0x2
> [ 1000.726224] bnx2x: [bnx2x_set_aer_mmd:3342(eth0)]Set AER to 0x0
> [ 1000.738445] bnx2x: [bnx2x_set_aer_mmd:3342(eth2)]Set AER to 0x0
> [ 1001.260013] bnx2x: [bnx2x_set_aer_mmd:3342(eth3)]Set AER to 0x2
> [ 1001.272929] bnx2x: [bnx2x_get_settings:251(eth0)]ethtool_cmd: cmd 1
> [ 1001.272930] supported 0x7460 advertising 0x7460 speed 2500
> [ 1001.272931] duplex 1 port 3 phy_address 1 transceiver 0
> [ 1001.272931] autoneg 1 maxtxpkt 0 maxrxpkt 0
> [ 1001.273221] bnx2x: [bnx2x_get_settings:251(eth1)]ethtool_cmd: cmd 1
> [ 1001.273222] supported 0x7460 advertising 0x7460 speed 8000
> [ 1001.273222] duplex 1 port 3 phy_address 1 transceiver 0
> [ 1001.273223] autoneg 1 maxtxpkt 0 maxrxpkt 0
> [ 1001.273503] bnx2x: [bnx2x_get_settings:251(eth2)]ethtool_cmd: cmd 1
> [ 1001.273504] supported 0x7460 advertising 0x7460 speed 2500
> [ 1001.273505] duplex 1 port 3 phy_address 1 transceiver 0
> [ 1001.273505] autoneg 1 maxtxpkt 0 maxrxpkt 0
> [ 1001.273790] bnx2x: [bnx2x_get_settings:251(eth3)]ethtool_cmd: cmd 1
> [ 1001.273790] supported 0x7460 advertising 0x7460 speed 1000
> [ 1001.273791] duplex 1 port 3 phy_address 1 transceiver 0
> [ 1001.273791] autoneg 1 maxtxpkt 0 maxrxpkt 0
> [ 1001.647598] bnx2x: [bnx2x_set_aer_mmd:3342(eth1)]Set AER to 0x2
> [ 1001.727540] bnx2x: [bnx2x_set_aer_mmd:3342(eth0)]Set AER to 0x0
> [ 1001.739762] bnx2x: [bnx2x_set_aer_mmd:3342(eth2)]Set AER to 0x0
> [ 1002.261261] bnx2x: [bnx2x_set_aer_mmd:3342(eth3)]Set AER to 0x2
> [ 1002.281715] bnx2x: [bnx2x_get_settings:251(eth0)]ethtool_cmd: cmd 1
> [ 1002.281715] supported 0x7460 advertising 0x7460 speed 2500
> [ 1002.281716] duplex 1 port 3 phy_address 1 transceiver 0
> [ 1002.281717] autoneg 1 maxtxpkt 0 maxrxpkt 0
> [ 1002.282002] bnx2x: [bnx2x_get_settings:251(eth1)]ethtool_cmd: cmd 1
> [ 1002.282003] supported 0x7460 advertising 0x7460 speed 8000
> [ 1002.282003] duplex 1 port 3 phy_address 1 transceiver 0
> [ 1002.282004] autoneg 1 maxtxpkt 0 maxrxpkt 0
> [ 1002.282294] bnx2x: [bnx2x_get_settings:251(eth2)]ethtool_cmd: cmd 1
> [ 1002.282295] supported 0x7460 advertising 0x7460 speed 2500
> [ 1002.282296] duplex 1 port 3 phy_address 1 transceiver 0
> [ 1002.282296] autoneg 1 maxtxpkt 0 maxrxpkt 0
> [ 1002.282583] bnx2x: [bnx2x_get_settings:251(eth3)]ethtool_cmd: cmd 1
> [ 1002.282584] supported 0x7460 advertising 0x7460 speed 1000
> [ 1002.282584] duplex 1 port 3 phy_address 1 transceiver 0
> [ 1002.282585] autoneg 1 maxtxpkt 0 maxrxpkt 0
> [ 1002.648914] bnx2x: [bnx2x_set_aer_mmd:3342(eth1)]Set AER to 0x2
> [ 1002.728852] bnx2x: [bnx2x_set_aer_mmd:3342(eth0)]Set AER to 0x0
> [ 1002.741076] bnx2x: [bnx2x_set_aer_mmd:3342(eth2)]Set AER to 0x0
> [ 1003.262650] bnx2x: [bnx2x_set_aer_mmd:3342(eth3)]Set AER to 0x2
> [ 1003.290582] bnx2x: [bnx2x_get_settings:251(eth0)]ethtool_cmd: cmd 1
> [ 1003.290583] supported 0x7460 advertising 0x7460 speed 2500
> [ 1003.290584] duplex 1 port 3 phy_address 1 transceiver 0
> [ 1003.290584] autoneg 1 maxtxpkt 0 maxrxpkt 0
> [ 1003.290886] bnx2x: [bnx2x_get_settings:251(eth1)]ethtool_cmd: cmd 1
> [ 1003.290887] supported 0x7460 advertising 0x7460 speed 8000
> [ 1003.290887] duplex 1 port 3 phy_address 1 transceiver 0
> [ 1003.290888] autoneg 1 maxtxpkt 0 maxrxpkt 0
> [ 1003.291188] bnx2x: [bnx2x_get_settings:251(eth2)]ethtool_cmd: cmd 1
> [ 1003.291188] supported 0x7460 advertising 0x7460 speed 2500
> [ 1003.291189] duplex 1 port 3 phy_address 1 transceiver 0
> [ 1003.291190] autoneg 1 maxtxpkt 0 maxrxpkt 0
> [ 1003.291493] bnx2x: [bnx2x_get_settings:251(eth3)]ethtool_cmd: cmd 1
> [ 1003.291494] supported 0x7460 advertising 0x7460 speed 1000
> [ 1003.291494] duplex 1 port 3 phy_address 1 transceiver 0
> [ 1003.291495] autoneg 1 maxtxpkt 0 maxrxpkt 0
> [ 1003.650229] bnx2x: [bnx2x_set_aer_mmd:3342(eth1)]Set AER to 0x2
> [ 1003.730167] bnx2x: [bnx2x_set_aer_mmd:3342(eth0)]Set AER to 0x0
> [ 1003.742391] bnx2x: [bnx2x_set_aer_mmd:3342(eth2)]Set AER to 0x0
> [ 1004.263895] bnx2x: [bnx2x_set_aer_mmd:3342(eth3)]Set AER to 0x2
> [ 1004.299670] bnx2x: [bnx2x_get_settings:251(eth0)]ethtool_cmd: cmd 1
> [ 1004.299671] supported 0x7460 advertising 0x7460 speed 2500
> [ 1004.299672] duplex 1 port 3 phy_address 1 transceiver 0
> [ 1004.299673] autoneg 1 maxtxpkt 0 maxrxpkt 0
> [ 1004.299986] bnx2x: [bnx2x_get_settings:251(eth1)]ethtool_cmd: cmd 1
> [ 1004.299987] supported 0x7460 advertising 0x7460 speed 8000
> [ 1004.299987] duplex 1 port 3 phy_address 1 transceiver 0
> [ 1004.299988] autoneg 1 maxtxpkt 0 maxrxpkt 0
> [ 1004.300293] bnx2x: [bnx2x_get_settings:251(eth2)]ethtool_cmd: cmd 1
> [ 1004.300293] supported 0x7460 advertising 0x7460 speed 2500
> [ 1004.300294] duplex 1 port 3 phy_address 1 transceiver 0
> [ 1004.300295] autoneg 1 maxtxpkt 0 maxrxpkt 0
> [ 1004.300600] bnx2x: [bnx2x_get_settings:251(eth3)]ethtool_cmd: cmd 1
> [ 1004.300600] supported 0x7460 advertising 0x7460 speed 1000
> [ 1004.300601] duplex 1 port 3 phy_address 1 transceiver 0
> [ 1004.300601] autoneg 1 maxtxpkt 0 maxrxpkt 0
> [ 1004.651587] bnx2x: [bnx2x_set_aer_mmd:3342(eth1)]Set AER to 0x2
> [ 1004.731481] bnx2x: [bnx2x_set_aer_mmd:3342(eth0)]Set AER to 0x0
> [ 1004.743705] bnx2x: [bnx2x_set_aer_mmd:3342(eth2)]Set AER to 0x0
> [ 1005.265285] bnx2x: [bnx2x_set_aer_mmd:3342(eth3)]Set AER to 0x2
> [ 1005.308537] bnx2x: [bnx2x_get_settings:251(eth0)]ethtool_cmd: cmd 1
> [ 1005.308538] supported 0x7460 advertising 0x7460 speed 2500
> [ 1005.308538] duplex 1 port 3 phy_address 1 transceiver 0
> [ 1005.308539] autoneg 1 maxtxpkt 0 maxrxpkt 0
> [ 1005.308840] bnx2x: [bnx2x_get_settings:251(eth1)]ethtool_cmd: cmd 1
> [ 1005.308841] supported 0x7460 advertising 0x7460 speed 8000
> [ 1005.308841] duplex 1 port 3 phy_address 1 transceiver 0
> [ 1005.308842] autoneg 1 maxtxpkt 0 maxrxpkt 0
> [ 1005.309147] bnx2x: [bnx2x_get_settings:251(eth2)]ethtool_cmd: cmd 1
> [ 1005.309147] supported 0x7460 advertising 0x7460 speed 2500
> [ 1005.309148] duplex 1 port 3 phy_address 1 transceiver 0
> [ 1005.309149] autoneg 1 maxtxpkt 0 maxrxpkt 0
> [ 1005.309448] bnx2x: [bnx2x_get_settings:251(eth3)]ethtool_cmd: cmd 1
> [ 1005.309448] supported 0x7460 advertising 0x7460 speed 1000
> [ 1005.309449] duplex 1 port 3 phy_address 1 transceiver 0
> [ 1005.309450] autoneg 1 maxtxpkt 0 maxrxpkt 0
> [ 1005.652906] bnx2x: [bnx2x_set_aer_mmd:3342(eth1)]Set AER to 0x2
> [ 1005.732798] bnx2x: [bnx2x_set_aer_mmd:3342(eth0)]Set AER to 0x0
> [ 1005.745020] bnx2x: [bnx2x_set_aer_mmd:3342(eth2)]Set AER to 0x0
> [ 1006.266543] bnx2x: [bnx2x_set_aer_mmd:3342(eth3)]Set AER to 0x2
> [ 1006.317428] bnx2x: [bnx2x_get_settings:251(eth0)]ethtool_cmd: cmd 1
> [ 1006.317429] supported 0x7460 advertising 0x7460 speed 2500
> [ 1006.317430] duplex 1 port 3 phy_address 1 transceiver 0
> [ 1006.317431] autoneg 1 maxtxpkt 0 maxrxpkt 0
> [ 1006.317731] bnx2x: [bnx2x_get_settings:251(eth1)]ethtool_cmd: cmd 1
> [ 1006.317732] supported 0x7460 advertising 0x7460 speed 8000
> [ 1006.317733] duplex 1 port 3 phy_address 1 transceiver 0
> [ 1006.317733] autoneg 1 maxtxpkt 0 maxrxpkt 0
> [ 1006.318031] bnx2x: [bnx2x_get_settings:251(eth2)]ethtool_cmd: cmd 1
> [ 1006.318031] supported 0x7460 advertising 0x7460 speed 2500
> [ 1006.318032] duplex 1 port 3 phy_address 1 transceiver 0
> [ 1006.318033] autoneg 1 maxtxpkt 0 maxrxpkt 0
> [ 1006.318329] bnx2x: [bnx2x_get_settings:251(eth3)]ethtool_cmd: cmd 1
> [ 1006.318330] supported 0x7460 advertising 0x7460 speed 1000
> [ 1006.318331] duplex 1 port 3 phy_address 1 transceiver 0
> [ 1006.318331] autoneg 1 maxtxpkt 0 maxrxpkt 0
> [ 1006.654172] bnx2x: [bnx2x_set_aer_mmd:3342(eth1)]Set AER to 0x2
> [ 1006.734109] bnx2x: [bnx2x_set_aer_mmd:3342(eth0)]Set AER to 0x0
> [ 1006.746331] bnx2x: [bnx2x_set_aer_mmd:3342(eth2)]Set AER to 0x0
^ permalink raw reply
* Re: bnx2x: link detected up at startup even when it should be down
From: Jean-Michel Hautbois @ 2012-09-25 13:16 UTC (permalink / raw)
To: Dmitry Kravkov
Cc: netdev, Barak Witkowski, Eilon Greenstein, davem@davemloft.net
In-Reply-To: <504C9EFCA2D0054393414C9CB605C37F30910B@SJEXCHMB06.corp.ad.broadcom.com>
2012/9/25 Dmitry Kravkov <dmitry@broadcom.com>:
>> -----Original Message-----
>> From: Jean-Michel Hautbois [mailto:jhautbois@gmail.com]
>> Sent: Tuesday, September 25, 2012 2:54 PM
>> To: Dmitry Kravkov
>> Cc: netdev; Barak Witkowski; Eilon Greenstein; davem@davemloft.net
>> Subject: Re: bnx2x: link detected up at startup even when it should be down
>
>
>> After a reboot (with the added if but no netif_msg) :
>
> I'm looking for link messages during device load.
> These (get_setting/set_settings) appear at the later stages.
> Will you able to load driver with module param debug=0x4 instead? So we can catch all link related messages
> (This can be done via /etc/modprobe.conf)
>
Sorry, you said after a reboot, so I used ethtool, I tried to set
bnx2x.debug=4 in cmdline but does not seem to work...
Looking at it...
^ permalink raw reply
* Warning! Your mailbox is almost full.
From: WEBMAIL UPGRADE @ 2012-09-22 13:58 UTC (permalink / raw)
You have exceeded your email limit quota of 450MB. You need to upgrade
your email limit quota to 2GB within the next 48 hours. Use the below
web link to upgrade your email account:
click link below:
http://www.formchamp.com/goform.php?id=38467
Thank you for using our email.
Copyright ©2012 Email Helpdesk Centre.
^ permalink raw reply
* Re: [PATCH] ipv6: del unreachable route when an addr is deleted on lo
From: Eric Dumazet @ 2012-09-25 13:43 UTC (permalink / raw)
To: Nicolas Dichtel; +Cc: netdev, yoshfuji, davem
In-Reply-To: <1348568699-3932-1-git-send-email-nicolas.dichtel@6wind.com>
On Tue, 2012-09-25 at 12:24 +0200, Nicolas Dichtel wrote:
> When an address is added on loopback (ip -6 a a 2002::1/128 dev lo), two routes
> are added:
> - one in the local table:
> local 2002::1 via :: dev lo proto none metric 0
> - one the in main table (for the prefix):
> unreachable 2002::1 dev lo proto kernel metric 256 error -101
>
> When the address is deleted, the route inserted in the main table remains
> because we use rt6_lookup(), which returns NULL when dst->error is set, which
> is the case here! Thus, it is better to use ip6_route_lookup() to avoid this
> kind of filter.
>
> Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
> ---
> net/ipv6/addrconf.c | 6 +++++-
> 1 file changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c
> index 6bc85f7..b6b2f9f 100644
> --- a/net/ipv6/addrconf.c
> +++ b/net/ipv6/addrconf.c
> @@ -788,8 +788,12 @@ static void ipv6_del_addr(struct inet6_ifaddr *ifp)
> struct in6_addr prefix;
> struct rt6_info *rt;
> struct net *net = dev_net(ifp->idev->dev);
> + struct flowi6 fl6 = {};
> ipv6_addr_prefix(&prefix, &ifp->addr, ifp->prefix_len);
> - rt = rt6_lookup(net, &prefix, NULL, ifp->idev->dev->ifindex, 1);
> + fl6.flowi6_oif = ifp->idev->dev->ifindex;
> + fl6.daddr = prefix;
> + rt = (struct rt6_info *)ip6_route_lookup(net, &fl6,
> + RT6_LOOKUP_F_IFACE);
>
rt cant be NULL here ( but can be ip6_null_entry )
> if (rt && addrconf_is_prefix_route(rt)) {
So this condition is obsolete...
^ permalink raw reply
* Re: bnx2x: link detected up at startup even when it should be down
From: Jean-Michel Hautbois @ 2012-09-25 14:00 UTC (permalink / raw)
To: Dmitry Kravkov
Cc: netdev, Barak Witkowski, Eilon Greenstein, davem@davemloft.net
In-Reply-To: <CAL8zT=h31Prm2dpyKM8wwg_cb1a8_0yP2ziNzhNFC-3J1M0Khg@mail.gmail.com>
2012/9/25 Jean-Michel Hautbois <jhautbois@gmail.com>:
> 2012/9/25 Dmitry Kravkov <dmitry@broadcom.com>:
>>> -----Original Message-----
>>> From: Jean-Michel Hautbois [mailto:jhautbois@gmail.com]
>>> Sent: Tuesday, September 25, 2012 2:54 PM
>>> To: Dmitry Kravkov
>>> Cc: netdev; Barak Witkowski; Eilon Greenstein; davem@davemloft.net
>>> Subject: Re: bnx2x: link detected up at startup even when it should be down
>>
>>
>>> After a reboot (with the added if but no netif_msg) :
>>
>> I'm looking for link messages during device load.
>> These (get_setting/set_settings) appear at the later stages.
>> Will you able to load driver with module param debug=0x4 instead? So we can catch all link related messages
>> (This can be done via /etc/modprobe.conf)
>>
>
> Sorry, you said after a reboot, so I used ethtool, I tried to set
> bnx2x.debug=4 in cmdline but does not seem to work...
> Looking at it...
Here is what I get when starting with cmdline and bnx2x.debug=4 :
[ 0.000000] Command line: initrd=initrd_Diskless_full.img rw
root=/dev/ram0 ip=dhcp bnx2x.poll=1 bnx2x.debug=4 BOOT_IMAGE=vmlinuz
BOOTIF=01-80-c1-6e-7a-49-48
[ 0.000000] Kernel command line: initrd=initrd_Diskless_full.img rw
root=/dev/ram0 ip=dhcp bnx2x.poll=1 bnx2x.debug=4 BOOT_IMAGE=vmlinuz
BOOTIF=01-80-c1-6e-7a-49-48
[ 18.858801] bnx2x: Broadcom NetXtreme II 5771x/578xx 10/20-Gigabit
Ethernet Driver bnx2x 1.70.30-1 (2012/08/17)
[ 18.858875] bnx2x 0000:04:00.0: PCI INT A -> GSI 32 (level, low) -> IRQ 32
[ 18.858884] bnx2x 0000:04:00.0: setting latency timer to 64
[ 18.859838] bnx2x 0000:04:00.0: part number
394D4342-31383735-31543030-47303030
[ 18.860409] bnx2x 0000:04:00.0: irq 90 for MSI/MSI-X
[ 18.860418] bnx2x 0000:04:00.0: irq 91 for MSI/MSI-X
[ 18.860732] bnx2x 0000:04:00.0: eth0: Broadcom NetXtreme II
BCM57810 10 Gigabit Ethernet (B0) PCI-E x8 5GHz (Gen2) found at mem
ea000000, IRQ 32, node addr 80:c1:6e:7a:49:48
[ 18.861031] bnx2x 0000:04:00.1: PCI INT B -> GSI 36 (level, low) -> IRQ 36
[ 18.861035] bnx2x 0000:04:00.1: setting latency timer to 64
[ 18.861968] bnx2x 0000:04:00.1: part number
394D4342-31383735-31543030-47303030
[ 18.862540] bnx2x 0000:04:00.1: irq 92 for MSI/MSI-X
[ 18.862548] bnx2x 0000:04:00.1: irq 93 for MSI/MSI-X
[ 18.862816] bnx2x 0000:04:00.1: eth1: Broadcom NetXtreme II
BCM57810 10 Gigabit Ethernet (B0) PCI-E x8 5GHz (Gen2) found at mem
e8800000, IRQ 36, node addr 80:c1:6e:7a:49:4c
[ 18.862848] bnx2x 0000:04:00.2: PCI INT B -> GSI 36 (level, low) -> IRQ 36
[ 18.862852] bnx2x 0000:04:00.2: setting latency timer to 64
[ 18.863784] bnx2x 0000:04:00.2: part number
394D4342-31383735-31543030-47303030
[ 18.864347] bnx2x 0000:04:00.2: irq 94 for MSI/MSI-X
[ 18.864355] bnx2x 0000:04:00.2: irq 95 for MSI/MSI-X
[ 18.864628] bnx2x 0000:04:00.2: eth2: Broadcom NetXtreme II
BCM57810 10 Gigabit Ethernet (B0) PCI-E x8 5GHz (Gen2) found at mem
e7000000, IRQ 36, node addr 80:c1:6e:7a:49:49
[ 18.864662] bnx2x 0000:04:00.3: PCI INT C -> GSI 37 (level, low) -> IRQ 37
[ 18.864666] bnx2x 0000:04:00.3: setting latency timer to 64
[ 18.865598] bnx2x 0000:04:00.3: part number
394D4342-31383735-31543030-47303030
[ 18.866360] bnx2x 0000:04:00.3: irq 96 for MSI/MSI-X
[ 18.866369] bnx2x 0000:04:00.3: irq 97 for MSI/MSI-X
[ 18.866646] bnx2x 0000:04:00.3: eth3: Broadcom NetXtreme II
BCM57810 10 Gigabit Ethernet (B0) PCI-E x8 5GHz (Gen2) found at mem
e5800000, IRQ 37, node addr 80:c1:6e:7a:49:4d
[ 18.866677] bnx2x 0000:04:00.4: PCI INT C -> GSI 37 (level, low) -> IRQ 37
[ 18.866682] bnx2x 0000:04:00.4: setting latency timer to 64
[ 18.867615] bnx2x 0000:04:00.4: part number
394D4342-31383735-31543030-47303030
[ 18.868177] bnx2x 0000:04:00.4: irq 98 for MSI/MSI-X
[ 18.868185] bnx2x 0000:04:00.4: irq 99 for MSI/MSI-X
[ 18.868458] bnx2x 0000:04:00.4: eth4: Broadcom NetXtreme II
BCM57810 10 Gigabit Ethernet (B0) PCI-E x8 5GHz (Gen2) found at mem
e4000000, IRQ 37, node addr 80:c1:6e:7a:49:4a
[ 18.868492] bnx2x 0000:04:00.5: PCI INT D -> GSI 38 (level, low) -> IRQ 38
[ 18.868496] bnx2x 0000:04:00.5: setting latency timer to 64
[ 18.869431] bnx2x 0000:04:00.5: part number
394D4342-31383735-31543030-47303030
[ 18.870187] bnx2x 0000:04:00.5: irq 100 for MSI/MSI-X
[ 18.870196] bnx2x 0000:04:00.5: irq 101 for MSI/MSI-X
[ 18.870474] bnx2x 0000:04:00.5: eth5: Broadcom NetXtreme II
BCM57810 10 Gigabit Ethernet (B0) PCI-E x8 5GHz (Gen2) found at mem
e2800000, IRQ 38, node addr 80:c1:6e:7a:49:4e
[ 18.870500] bnx2x 0000:04:00.6: PCI INT D -> GSI 38 (level, low) -> IRQ 38
[ 18.870504] bnx2x 0000:04:00.6: setting latency timer to 64
[ 18.871436] bnx2x 0000:04:00.6: part number
394D4342-31383735-31543030-47303030
[ 18.872188] bnx2x 0000:04:00.6: irq 102 for MSI/MSI-X
[ 18.872197] bnx2x 0000:04:00.6: irq 103 for MSI/MSI-X
[ 18.872499] bnx2x 0000:04:00.6: eth6: Broadcom NetXtreme II
BCM57810 10 Gigabit Ethernet (B0) PCI-E x8 5GHz (Gen2) found at mem
e1000000, IRQ 38, node addr 80:c1:6e:7a:49:4b
[ 18.872527] bnx2x 0000:04:00.7: PCI INT A -> GSI 32 (level, low) -> IRQ 32
[ 18.872530] bnx2x 0000:04:00.7: setting latency timer to 64
[ 18.873465] bnx2x 0000:04:00.7: part number
394D4342-31383735-31543030-47303030
[ 18.874227] bnx2x 0000:04:00.7: irq 104 for MSI/MSI-X
[ 18.874236] bnx2x 0000:04:00.7: irq 105 for MSI/MSI-X
[ 18.874514] bnx2x 0000:04:00.7: eth7: Broadcom NetXtreme II
BCM57810 10 Gigabit Ethernet (B0) PCI-E x8 5GHz (Gen2) found at mem
df800000, IRQ 32, node addr 80:c1:6e:7a:49:4f
[ 18.874550] bnx2x 0000:05:00.0: PCI INT A -> GSI 40 (level, low) -> IRQ 40
[ 18.874554] bnx2x 0000:05:00.0: setting latency timer to 64
[ 18.875488] bnx2x 0000:05:00.0: part number 0-0-0-0
[ 18.876060] bnx2x 0000:05:00.0: irq 106 for MSI/MSI-X
[ 18.876073] bnx2x 0000:05:00.0: irq 107 for MSI/MSI-X
[ 18.876344] bnx2x 0000:05:00.0: eth8: Broadcom NetXtreme II
BCM57810 10 Gigabit Ethernet (B0) PCI-E x8 5GHz (Gen2) found at mem
f6000000, IRQ 40, node addr 2c:76:8a:59:b3:90
[ 18.876377] bnx2x 0000:05:00.1: PCI INT B -> GSI 44 (level, low) -> IRQ 44
[ 18.876381] bnx2x 0000:05:00.1: setting latency timer to 64
[ 18.877314] bnx2x 0000:05:00.1: part number 0-0-0-0
[ 18.877876] bnx2x 0000:05:00.1: irq 108 for MSI/MSI-X
[ 18.877884] bnx2x 0000:05:00.1: irq 109 for MSI/MSI-X
[ 18.878155] bnx2x 0000:05:00.1: eth9: Broadcom NetXtreme II
BCM57810 10 Gigabit Ethernet (B0) PCI-E x8 5GHz (Gen2) found at mem
f4800000, IRQ 44, node addr 2c:76:8a:59:b3:94
[ 18.878180] bnx2x 0000:05:00.2: PCI INT B -> GSI 44 (level, low) -> IRQ 44
[ 18.878184] bnx2x 0000:05:00.2: setting latency timer to 64
[ 18.879121] bnx2x 0000:05:00.2: part number 0-0-0-0
[ 18.879682] bnx2x 0000:05:00.2: irq 110 for MSI/MSI-X
[ 18.879690] bnx2x 0000:05:00.2: irq 111 for MSI/MSI-X
[ 18.879966] bnx2x 0000:05:00.2: eth10: Broadcom NetXtreme II
BCM57810 10 Gigabit Ethernet (B0) PCI-E x8 5GHz (Gen2) found at mem
f3000000, IRQ 44, node addr 2c:76:8a:59:b3:91
[ 18.879991] bnx2x 0000:05:00.3: PCI INT C -> GSI 45 (level, low) -> IRQ 45
[ 18.879995] bnx2x 0000:05:00.3: setting latency timer to 64
[ 18.880927] bnx2x 0000:05:00.3: part number 0-0-0-0
[ 18.881492] bnx2x 0000:05:00.3: irq 112 for MSI/MSI-X
[ 18.881500] bnx2x 0000:05:00.3: irq 113 for MSI/MSI-X
[ 18.881780] bnx2x 0000:05:00.3: eth11: Broadcom NetXtreme II
BCM57810 10 Gigabit Ethernet (B0) PCI-E x8 5GHz (Gen2) found at mem
f1800000, IRQ 45, node addr 2c:76:8a:59:b3:95
[ 18.881806] bnx2x 0000:05:00.4: PCI INT C -> GSI 45 (level, low) -> IRQ 45
[ 18.881810] bnx2x 0000:05:00.4: setting latency timer to 64
[ 18.882743] bnx2x 0000:05:00.4: part number 0-0-0-0
[ 18.883309] bnx2x 0000:05:00.4: irq 114 for MSI/MSI-X
[ 18.883318] bnx2x 0000:05:00.4: irq 115 for MSI/MSI-X
[ 18.883592] bnx2x 0000:05:00.4: eth12: Broadcom NetXtreme II
BCM57810 10 Gigabit Ethernet (B0) PCI-E x8 5GHz (Gen2) found at mem
f0000000, IRQ 45, node addr 2c:76:8a:59:b3:92
[ 18.883628] bnx2x 0000:05:00.5: PCI INT D -> GSI 46 (level, low) -> IRQ 46
[ 18.883632] bnx2x 0000:05:00.5: setting latency timer to 64
[ 18.884796] bnx2x 0000:05:00.5: part number 0-0-0-0
[ 18.885488] bnx2x 0000:05:00.5: irq 116 for MSI/MSI-X
[ 18.885496] bnx2x 0000:05:00.5: irq 117 for MSI/MSI-X
[ 18.885784] bnx2x 0000:05:00.5: eth13: Broadcom NetXtreme II
BCM57810 10 Gigabit Ethernet (B0) PCI-E x8 5GHz (Gen2) found at mem
ee800000, IRQ 46, node addr 2c:76:8a:59:b3:96
[ 18.885809] bnx2x 0000:05:00.6: PCI INT D -> GSI 46 (level, low) -> IRQ 46
[ 18.885813] bnx2x 0000:05:00.6: setting latency timer to 64
[ 18.886747] bnx2x 0000:05:00.6: part number 0-0-0-0
[ 18.887440] bnx2x 0000:05:00.6: irq 118 for MSI/MSI-X
[ 18.887448] bnx2x 0000:05:00.6: irq 119 for MSI/MSI-X
[ 18.887736] bnx2x 0000:05:00.6: eth14: Broadcom NetXtreme II
BCM57810 10 Gigabit Ethernet (B0) PCI-E x8 5GHz (Gen2) found at mem
ed000000, IRQ 46, node addr 2c:76:8a:59:b3:93
[ 18.887761] bnx2x 0000:05:00.7: PCI INT A -> GSI 40 (level, low) -> IRQ 40
[ 18.887765] bnx2x 0000:05:00.7: setting latency timer to 64
[ 18.888701] bnx2x 0000:05:00.7: part number 0-0-0-0
[ 18.889269] bnx2x 0000:05:00.7: irq 124 for MSI/MSI-X
[ 18.889278] bnx2x 0000:05:00.7: irq 125 for MSI/MSI-X
[ 18.889558] bnx2x 0000:05:00.7: eth15: Broadcom NetXtreme II
BCM57810 10 Gigabit Ethernet (B0) PCI-E x8 5GHz (Gen2) found at mem
eb800000, IRQ 40, node addr 2c:76:8a:59:b3:97
[ 26.315404] bnx2x 0000:04:00.0: eth0: using MSI-X IRQs: sp 90
fp[0] 91 ... fp[0] 91
[ 26.767893] bnx2x 0000:04:00.0: eth0: NIC Link is Up, 2500 Mbps
full duplex, Flow control: ON - receive & transmit
[ 26.902940] bnx2x 0000:05:00.0: eth8: using MSI-X IRQs: sp 106
fp[0] 107 ... fp[0] 107
[ 27.497395] bnx2x 0000:05:00.0: eth8: NIC Link is Up, 2500 Mbps
full duplex, Flow control: ON - receive & transmit
[ 107.683651] bnx2x 0000:04:00.1: eth1: using MSI-X IRQs: sp 92
fp[0] 93 ... fp[0] 93
[ 108.138200] bnx2x 0000:04:00.1: eth1: NIC Link is Up, 8000 Mbps
full duplex, Flow control: ON - receive & transmit
[ 108.267249] bnx2x 0000:05:00.1: eth9: using MSI-X IRQs: sp 108
fp[0] 109 ... fp[0] 109
[ 108.546115] bnx2x 0000:04:00.2: eth2: using MSI-X IRQs: sp 94
fp[0] 95 ... fp[0] 95
[ 108.563938] bnx2x 0000:04:00.2: eth2: NIC Link is Up, 2500 Mbps
full duplex, Flow control: ON - receive & transmit
[ 108.715802] bnx2x 0000:05:00.1: eth9: NIC Link is Up, 8000 Mbps
full duplex, Flow control: ON - receive & transmit
[ 108.717056] bnx2x 0000:05:00.2: eth10: using MSI-X IRQs: sp 110
fp[0] 111 ... fp[0] 111
[ 108.742813] bnx2x 0000:05:00.2: eth10: NIC Link is Up, 2500 Mbps
full duplex, Flow control: ON - receive & transmit
[ 108.967781] bnx2x 0000:04:00.3: eth3: using MSI-X IRQs: sp 96
fp[0] 97 ... fp[0] 97
[ 108.985640] bnx2x 0000:04:00.3: eth3: NIC Link is Up, 1000 Mbps
full duplex, Flow control: ON - receive & transmit
[ 109.138763] bnx2x 0000:05:00.3: eth11: using MSI-X IRQs: sp 112
fp[0] 113 ... fp[0] 113
[ 109.156525] bnx2x 0000:05:00.3: eth11: NIC Link is Up, 1000 Mbps
full duplex, Flow control: ON - receive & transmit
[ 109.301397] bnx2x 0000:05:00.3: eth11: NIC Link is Down
[ 109.378543] bnx2x 0000:04:00.4: eth4: using MSI-X IRQs: sp 98
fp[0] 99 ... fp[0] 99
[ 109.396368] bnx2x 0000:04:00.4: eth4: NIC Link is Up, 2500 Mbps
full duplex, Flow control: ON - receive & transmit
[ 109.553369] bnx2x 0000:05:00.4: eth12: using MSI-X IRQs: sp 114
fp[0] 115 ... fp[0] 115
[ 109.571232] bnx2x 0000:05:00.4: eth12: NIC Link is Up, 2500 Mbps
full duplex, Flow control: ON - receive & transmit
[ 109.795207] bnx2x 0000:04:00.5: eth5: using MSI-X IRQs: sp 100
fp[0] 101 ... fp[0] 101
[ 109.813079] bnx2x 0000:04:00.5: eth5: NIC Link is Up, 1000 Mbps
full duplex, Flow control: ON - receive & transmit
[ 109.966199] bnx2x 0000:05:00.5: eth13: using MSI-X IRQs: sp 116
fp[0] 117 ... fp[0] 117
[ 109.983964] bnx2x 0000:05:00.5: eth13: NIC Link is Up, 1000 Mbps
full duplex, Flow control: ON - receive & transmit
[ 110.205039] bnx2x 0000:04:00.6: eth6: using MSI-X IRQs: sp 102
fp[0] 103 ... fp[0] 103
[ 110.222802] bnx2x 0000:04:00.6: eth6: NIC Link is Up, 2500 Mbps
full duplex, Flow control: ON - receive & transmit
[ 110.375810] bnx2x 0000:05:00.6: eth14: using MSI-X IRQs: sp 118
fp[0] 119 ... fp[0] 119
[ 110.393678] bnx2x 0000:05:00.6: eth14: NIC Link is Up, 2500 Mbps
full duplex, Flow control: ON - receive & transmit
[ 110.614756] bnx2x 0000:04:00.7: eth7: using MSI-X IRQs: sp 104
fp[0] 105 ... fp[0] 105
[ 110.632521] bnx2x 0000:04:00.7: eth7: NIC Link is Up, 10000 Mbps
full duplex, Flow control: ON - receive & transmit
[ 110.785633] bnx2x 0000:05:00.7: eth15: using MSI-X IRQs: sp 124
fp[0] 125 ... fp[0] 125
[ 110.803399] bnx2x 0000:05:00.7: eth15: NIC Link is Up, 10000 Mbps
full duplex, Flow control: ON - receive & transmit
[ 111.632943] bnx2x 0000:04:00.1: eth1: using MSI-X IRQs: sp 92
fp[0] 93 ... fp[0] 93
[ 111.651829] bnx2x 0000:04:00.1: eth1: NIC Link is Up, 8000 Mbps
full duplex, Flow control: ON - receive & transmit
[ 111.859779] bnx2x 0000:05:00.1: eth9: using MSI-X IRQs: sp 108
fp[0] 109 ... fp[0] 109
[ 111.877664] bnx2x 0000:05:00.1: eth9: NIC Link is Up, 8000 Mbps
full duplex, Flow control: ON - receive & transmit
FYI, eth4 and eth5 are seen UP and they should be down.
JM
^ permalink raw reply
* Re: [PATCH v3] ucc_geth: Lockless xmit
From: Joakim Tjernlund @ 2012-09-25 14:09 UTC (permalink / raw)
To: Francois Romieu; +Cc: netdev
In-Reply-To: <20120924211014.GA17378@electric-eye.fr.zoreil.com>
Francois Romieu <romieu@fr.zoreil.com> wrote on 2012/09/24 23:10:14:
>
> Joakim Tjernlund <joakim.tjernlund@transmode.se> :
> [...]
> > I don't get it. The skb test is there just for one special case, when
> > the BD ring is empty the (bd_status & T_R) == 0 will be true as well so
> > one need something more than the bd_status test.
>
> Sure but the converse is not true : (bd_status & T_R) == 0 && skb does not
> mean that the skb has been sent. It happens when said skb is about to be
> given to the hardware by hard_start_xmit as well.
duhh, I was too tired when trying to make sense of smp & racing in general, thanks.
Will probably be some time before I get to this again due to other stuff though.
The other patches are independent of this one, I hope they are good/accepted?
Jocke
^ permalink raw reply
* Re: bridge igmp snooping implementation
From: Lin Ming @ 2012-09-25 15:12 UTC (permalink / raw)
To: Felix Fietkau; +Cc: netdev, Herbert Xu
In-Reply-To: <506184ED.5040104@openwrt.org>
On Tue, Sep 25, 2012 at 6:18 PM, Felix Fietkau <nbd@openwrt.org> wrote:
> Hi,
>
> I'v been looking at the bridge IGMP snooping code and I noticed that it
> appears to not keep track of multicast group member IP addresses. Is
> this intentional?
>
> It seems to me that this would lead to issues when multiple members of
> the same multicast group are behind the same bridge port, and one of
> them leaves.
>
> I'm currently looking into adding a feature that allows bridge ports to
> be configured to selectively turn multicast traffic into unicast
> traffic. For this I would need to change the code to keep track of
> member IP and MAC addresses.
Good idea. This can help to resolve my problem at:
http://marc.info/?l=linux-netdev&m=134855468803809&w=2
Thanks.
>
> This helps a lot on 802.11, where unicast is often much cheaper than
> multicast, even when sending out duplicate packets (higher data rates
> and aggregation heavily reduce airtime utilization).
>
> - Felix
^ 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