On Mon, May 08, 2017 at 02:56:32AM +0200, Andrew Lunn wrote:
>> I need to dig how libpcap receives packets. It's appreciated if you
>> can give some hints about that. However, I don't see the benefit to
>> receive packets by libpcap, could you claim?
>
>The base interface should already be doing it
On Thu, May 04, 2017 at 02:00:35PM +0200, Andrew Lunn wrote:
>On Thu, May 04, 2017 at 04:31:57PM +1000, Gavin Shan wrote:
>> On Wed, May 03, 2017 at 02:52:54PM +0200, Andrew Lunn wrote:
>> >On Wed, May 03, 2017 at 02:44:39PM +1000, Gavin Shan wrote:
>> >> This int
On Thu, May 04, 2017 at 09:31:20AM +, David Laight wrote:
>From: Gavin Shan
>> Sent: 04 May 2017 07:16
>> On Wed, May 03, 2017 at 10:19:44PM -0700, Stephen Hemminger wrote:
>> >On Wed, 3 May 2017 14:44:35 +1000
>> >Gavin Shan wrote:
>...
>> >&
On Wed, May 03, 2017 at 02:52:54PM +0200, Andrew Lunn wrote:
>On Wed, May 03, 2017 at 02:44:39PM +1000, Gavin Shan wrote:
>> This introduces /sys/kernel/debug/ncsi/eth0/pkt. The debugfs entry
>> can accept parameters to produce NCSI command packet. The received
>> NCSI respons
On Wed, May 03, 2017 at 10:21:11PM -0700, Stephen Hemminger wrote:
>On Wed, 3 May 2017 14:44:35 +1000
>Gavin Shan wrote:
>
>> +void ncsi_ethtool_register_dev(struct net_device *dev)
>> +{
>> +struct ethtool_ops *ops;
>> +
>> +ops = (struct ethto
On Wed, May 03, 2017 at 10:19:44PM -0700, Stephen Hemminger wrote:
>On Wed, 3 May 2017 14:44:35 +1000
>Gavin Shan wrote:
>
>> +static int ethtool_get_ncsi_channels(struct net_device *dev,
>> + void __user *useraddr)
>
>Please don't
On Thu, May 04, 2017 at 02:49:33AM +0200, Andrew Lunn wrote:
>> +void ncsi_ethtool_register_dev(struct net_device *dev)
>> +{
>> +struct ethtool_ops *ops;
>> +
>> +ops = (struct ethtool_ops *)(dev->ethtool_ops);
>
>Why do you need the cast here?
>
>Ah, is it because net_device has:
>
>
On Thu, May 04, 2017 at 02:34:52AM +0200, Andrew Lunn wrote:
>On Thu, May 04, 2017 at 10:05:34AM +1000, Gavin Shan wrote:
>> On Wed, May 03, 2017 at 09:18:23AM -0400, David Miller wrote:
>> >From: Andrew Lunn
>> >Date: Wed, 3 May 2017 14:47:22 +0200
>> >
>
On Wed, May 03, 2017 at 08:16:43PM -0400, David Miller wrote:
>From: Gavin Shan
>Date: Thu, 4 May 2017 10:05:34 +1000
>> On Wed, May 03, 2017 at 09:18:23AM -0400, David Miller wrote:
>>>From: Andrew Lunn
>>>Date: Wed, 3 May 2017 14:47:22 +0200
>>>
>&g
On Wed, May 03, 2017 at 02:58:02PM +0200, Andrew Lunn wrote:
>On Wed, May 03, 2017 at 02:44:31PM +1000, Gavin Shan wrote:
>> This series supports NCSI debugging infrastructure by adding several
>> ethtool commands and one debugfs file. It was inspired by the reported
>>
On Wed, May 03, 2017 at 01:25:18AM -0400, David Miller wrote:
>
>Sorry, the net-next tree is closed right now as we are in the merge
>window.
>
>Please resubmit this when the net-next tree opens back up.
>
>Thank you.
>
Sorry that I didn't catch the merge window. Thanks for the tip. I'll
resubmit
On Wed, May 03, 2017 at 09:18:23AM -0400, David Miller wrote:
>From: Andrew Lunn
>Date: Wed, 3 May 2017 14:47:22 +0200
>
>> On Wed, May 03, 2017 at 02:44:37PM +1000, Gavin Shan wrote:
>>> This adds ethtool command (ETHTOOL_GNCSISTATS) to retrieve the
>>> NCSI har
bc84
Signed-off-by: Gavin Shan
---
include/linux/ethtool.h | 2 +
include/uapi/linux/ethtool.h | 151 +++
net/core/ethtool.c | 22 +++
net/ncsi/ncsi-ethtool.c | 120 ++
4 files changed, 295
:0
pt_rx_channel_err:0
pt_rx_us_err: 0
pt_rx_os_err: 0
Signed-off-by: Gavin Shan
---
include/linux/ethtool.h | 2 +
include/uapi/linux/ethtool.h | 124 +++
net/core/ethtool.c | 29 ++
net/ncsi/ncsi
100
GLS 10 00
SMA 100
DBF 100
GC 002
GP 200
AEN OK TIMEOUT ERROR
Signed-off-by: Gavin Shan
the total number of NCSI channels
so that userspace can allocate enough memory to convey data. Here
is the example output from modified (private) ethtool:
# ethtool --ncsi eth0 channels
2 channels:
0:0 Active
0:1
Signed-off-by: Gavin Shan
---
include/linux/ethtool.h | 2 ++
include
ve in order for deinitialization
and failover to be done.
Signed-off-by: Gavin Shan
---
net/ncsi/ncsi-manage.c | 8 +---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/net/ncsi/ncsi-manage.c b/net/ncsi/ncsi-manage.c
index c71a3a5..13ad1f26 100644
--- a/net/ncsi/ncsi-manage.c
+++
When there are no NCSI channels probed, HWA (Hardware Arbitration)
mode is enabled. It's not correct because HWA depends on the fact:
NCSI channels exist and all of them support HWA mode. This disables
HWA when no channels are probed.
Signed-off-by: Gavin Shan
---
net/ncsi/ncsi-manage.c
se if needed.
Reported-by: Sridevi Ramesh
Signed-off-by: Gavin Shan
---
net/ncsi/ncsi-manage.c | 16 ++--
1 file changed, 14 insertions(+), 2 deletions(-)
diff --git a/net/ncsi/ncsi-manage.c b/net/ncsi/ncsi-manage.c
index 5073e15..c71a3a5 100644
--- a/net/ncsi/ncsi-manage.c
+++ b/net
pplied,
no error reported from DP response packets.
# ethtool --ncsi eth0 swstats
:
RESPONSE OK TIMEOUT ERROR
===
DP 300
Signed-off-by: Gavin Shan
---
net/ncsi/ncsi-rsp.c | 2 +-
1 file changed, 1 insertion(+),
b
Kicinski)
v2:
* Use debugfs instead of procfs (Joe
Perches)
Gavin Shan (10):
net/ncsi: Disable HWA mode when no channels are found
net/ncsi: Properly track channel monitor timer state
net/ncsi: Enforce failover on link monitor timeout
net/ncsi: Ethtool o
this applied, no error reported on GVI response packets:
# ethtool --ncsi eth0 swstats
:
RESPONSE OK TIMEOUT ERROR
===
GVI 200
Signed-off-by: Gavin Shan
---
net/ncsi/ncsi-rsp.c | 2 +-
1 file changed, 1 insertion
cat /sys/kernel/debug/ncsi/eth0/pkt
NCSI response [CIS] packet received
00 01 dd 80 00 0004
Signed-off-by: Gavin Shan
---
net/ncsi/internal.h| 54
net/ncsi/ncsi-cmd.c| 1 +
net/ncsi/ncsi-debug.c | 714 +
net/ncsi/n
On Thu, Apr 20, 2017 at 05:58:58PM -0700, David Miller wrote:
>From: Gavin Shan
>Date: Fri, 21 Apr 2017 09:38:12 +1000
>
>> (1) ethtool usually dumps statistics collected by hardware, but this
>> debugfs file dumps the statistics of packets seen (collected) by
>>
On Thu, Apr 20, 2017 at 05:59:27PM -0700, Florian Fainelli wrote:
>On 04/20/2017 05:44 PM, Gavin Shan wrote:
>> On Thu, Apr 20, 2017 at 05:26:14PM -0700, Florian Fainelli wrote:
>>> On 04/20/2017 04:38 PM, Gavin Shan wrote:
>>>> On Thu, Apr 20, 2017 at 01:21:
On Thu, Apr 20, 2017 at 05:26:14PM -0700, Florian Fainelli wrote:
>On 04/20/2017 04:38 PM, Gavin Shan wrote:
>> On Thu, Apr 20, 2017 at 01:21:03PM -0400, David Miller wrote:
>>> From: Gavin Shan
>>> Date: Tue, 18 Apr 2017 16:51:32 +1000
>>>
>>>> Th
On Thu, Apr 20, 2017 at 01:21:03PM -0400, David Miller wrote:
>From: Gavin Shan
>Date: Tue, 18 Apr 2017 16:51:32 +1000
>
>> This creates /sys/kernel/debug/ncsi//stats to dump the NCSI
>> packets sent and received over all packages and channels. It's useful
>> to di
ve in order for deinitialization
and failover to be done.
Signed-off-by: Gavin Shan
---
net/ncsi/ncsi-manage.c | 8 +---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/net/ncsi/ncsi-manage.c b/net/ncsi/ncsi-manage.c
index c71a3a5..13ad1f26 100644
--- a/net/ncsi/ncsi-manage.c
+++
When there are no NCSI channels probed, HWA (Hardware Arbitration)
mode is enabled. It's not correct because HWA depends on the fact:
NCSI channels exist and all of them support HWA mode. This disables
HWA when no channels are probed.
Signed-off-by: Gavin Shan
---
net/ncsi/ncsi-manage.c
With this applied, no error reported on GVI response packets:
# cat /sys/kernel/debug/ncsi/eth0/stats
:
RSP OK TIMEOUT ERROR
===
GVI 200
Signed-off-by: Gavin Shan
---
net/ncsi/ncsi-rsp.c | 2 +-
1 file changed, 1
f's in *.c (Jakub
Kicinski)
v2:
* Use debugfs instead of procfs (Joe
Perches)
Gavin Shan (8):
net/ncsi: Disable HWA mode when no channels are found
net/ncsi: Properly track channel monitor timer state
net/ncsi: Enforce failover on link monitor timeout
se if needed.
Reported-by: Sridevi Ramesh
Signed-off-by: Gavin Shan
---
net/ncsi/ncsi-manage.c | 16 ++--
1 file changed, 14 insertions(+), 2 deletions(-)
diff --git a/net/ncsi/ncsi-manage.c b/net/ncsi/ncsi-manage.c
index 5073e15..c71a3a5 100644
--- a/net/ncsi/ncsi-manage.c
+++ b/net
300
DP 300
Signed-off-by: Gavin Shan
---
net/ncsi/ncsi-rsp.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/ncsi/ncsi-rsp.c b/net/ncsi/ncsi-rsp.c
index 24154fc..092f2d8 100644
--- a/net/ncsi/ncsi-rsp.c
+++ b/net/ncsi/ncsi-rsp.c
@@ -11
cat /sys/kernel/debug/ncsi/eth0/pkt
NCSI response [CIS] packet received
00 01 dd 80 00 0004
Signed-off-by: Gavin Shan
---
net/ncsi/internal.h| 43 +++
net/ncsi/ncsi-cmd.c| 1 +
net/ncsi/ncsi-debug.c | 697 ++---
net/ncsi/n
directories so far.
/sys/kernel/debug/ncsi/eth0
/sys/kernel/debug/ncsi/eth0/p0
/sys/kernel/debug/ncsi/eth0/p0/c0
/sys/kernel/debug/ncsi/eth0/p0/c1
Signed-off-by: Gavin Shan
---
net/ncsi/Kconfig | 9 +
net/ncsi/Makefile | 1 +
net/ncsi/internal.h| 45
02
GC 200
AEN OK TIMEOUT ERROR
===
Signed-off-by: Gavin Shan
---
net/ncsi/internal.h| 17
net/ncsi/ncsi-aen.c| 13 ++-
net/ncsi/ncsi-cmd.c| 12 ++-
net/ncsi/ncsi-debu
On Thu, Apr 13, 2017 at 07:30:45PM -0700, Joe Perches wrote:
>On Thu, 2017-04-13 at 17:48 +1000, Gavin Shan wrote:
>> This creates /sys/kernel/debug/ncsi//stats to dump the NCSI
>> packets sent and received over all packages and channels. It's useful
>> to diagnose NCSI
On Thu, Apr 13, 2017 at 06:50:42PM -0700, Jakub Kicinski wrote:
>On Thu, 13 Apr 2017 17:48:18 +1000, Gavin Shan wrote:
>> This creates /sys/kernel/debug/ncsi//stats to dump the NCSI
>> packets sent and received over all packages and channels. It's useful
>> to diagnose
On Mon, Apr 17, 2017 at 01:36:19PM -0400, David Miller wrote:
>From: Cédric Le Goater
>Date: Fri, 14 Apr 2017 10:56:37 +0200
>
>> htonl was used instead of ntohl. Surely a typo.
>>
>> Signed-off-by: Cédric Le Goater
>
>I don't think so, "checksum" is of type "u32" thus is in host byte
>order. T
On Thu, Apr 13, 2017 at 03:50:40AM -0700, Joe Perches wrote:
>On Thu, 2017-04-13 at 17:48 +1000, Gavin Shan wrote:
>> This creates /sys/kernel/debug/ncsi//stats to dump the NCSI
>> packets sent and received over all packages and channels. It's useful
>> to diagnose NCSI
On Thu, Apr 13, 2017 at 03:41:46AM -0700, Joe Perches wrote:
>On Thu, 2017-04-13 at 17:48 +1000, Gavin Shan wrote:
>> This creates debugfs directories as NCSI debugging infrastructure.
>> With the patch applied, We will see below debugfs directories. Every
>> NCSI packag
On Thu, Apr 13, 2017 at 12:46:32PM +1000, Gavin Shan wrote:
>This series supports NCSI debugging infrastructure by adding several
>procfs files. It was inspired by the reported issues: No available
>package and channel are probed successfully. Obviously, we don't
>have a debuggi
300
DP 300
Signed-off-by: Gavin Shan
---
net/ncsi/ncsi-rsp.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/ncsi/ncsi-rsp.c b/net/ncsi/ncsi-rsp.c
index 93ebe0f..095726f 100644
--- a/net/ncsi/ncsi-rsp.c
+++ b/net/ncsi/ncsi-rsp.c
@@ -11
When there are no NCSI channels probed, HWA (Hardware Arbitration)
mode is enabled. It's not correct because HWA depends on the fact:
NCSI channels exist and all of them support HWA mode. This disables
HWA when no channels are probed.
Signed-off-by: Gavin Shan
---
net/ncsi/ncsi-manage.c
se if needed.
Reported-by: Sridevi Ramesh
Signed-off-by: Gavin Shan
---
net/ncsi/ncsi-manage.c | 16 ++--
1 file changed, 14 insertions(+), 2 deletions(-)
diff --git a/net/ncsi/ncsi-manage.c b/net/ncsi/ncsi-manage.c
index 5073e15..c71a3a5 100644
--- a/net/ncsi/ncsi-manage.c
+++ b/net
02
GC 200
AEN OK TIMEOUT ERROR
===
Signed-off-by: Gavin Shan
---
net/ncsi/internal.h| 10 +++
net/ncsi/ncsi-aen.c| 15 +++-
net/ncsi/ncsi-cmd.c| 18 +++-
net/ncsi/ncsi-debu
With this applied, no error reported on GVI response packets:
# cat /sys/kernel/debug/ncsi/eth0/stats
:
RSP OK TIMEOUT ERROR
===
GVI 200
Signed-off-by: Gavin Shan
---
net/ncsi/ncsi-rsp.c | 2 +-
1 file changed, 1
ve in order for deinitialization
and failover to be done.
Signed-off-by: Gavin Shan
---
net/ncsi/ncsi-manage.c | 8 +---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/net/ncsi/ncsi-manage.c b/net/ncsi/ncsi-manage.c
index c71a3a5..13ad1f26 100644
--- a/net/ncsi/ncsi-manage.c
+++
cat /sys/kernel/debug/ncsi/eth0/pkt
NCSI response [CIS] packet received
00 01 dd 80 00 0004
Signed-off-by: Gavin Shan
---
net/ncsi/internal.h| 13 +
net/ncsi/ncsi-cmd.c| 5 +
net/ncsi/ncsi-debug.c | 694 ++---
net/ncsi/n
directories so far.
/sys/kernel/debug/ncsi/eth0
/sys/kernel/debug/ncsi/eth0/p0
/sys/kernel/debug/ncsi/eth0/p0/c0
/sys/kernel/debug/ncsi/eth0/p0/c1
Signed-off-by: Gavin Shan
---
net/ncsi/Kconfig | 9 +
net/ncsi/Makefile | 1 +
net/ncsi/internal.h| 45
n sent
and received NCSI packets; generate NCSI command packet manually.
PATCH[7,8/8] fixes two issues found from the debugging functionality.
Changelog
=
v2:
* Use debugfs instead of procfs (Joe Perches).
Gavin Shan (8):
net/ncsi: Disable HWA mode when no channels are found
net/ncsi: Prop
On Wed, Apr 12, 2017 at 09:28:26PM -0700, Joe Perches wrote:
>On Thu, 2017-04-13 at 12:46 +1000, Gavin Shan wrote:
>> This creates procfs directories as NCSI debugging infrastructure.
>> With the patch applied, We will see below procfs directories. Every
>> NCSI packag
directories so far.
/proc/ncsi/eth0
/proc/ncsi/eth0/p0
/proc/ncsi/eth0/p0/c0
/proc/ncsi/eth0/p0/c1
Signed-off-by: Gavin Shan
---
net/ncsi/Kconfig | 9 +
net/ncsi/Makefile | 1 +
net/ncsi/internal.h| 45
net/ncsi/ncsi-debug.c | 95
se if needed.
Reported-by: Sridevi Ramesh
Signed-off-by: Gavin Shan
---
net/ncsi/ncsi-manage.c | 16 ++--
1 file changed, 14 insertions(+), 2 deletions(-)
diff --git a/net/ncsi/ncsi-manage.c b/net/ncsi/ncsi-manage.c
index 5073e15..c71a3a5 100644
--- a/net/ncsi/ncsi-manage.c
+++ b/net
ve in order for deinitialization
and failover to be done.
Signed-off-by: Gavin Shan
---
net/ncsi/ncsi-manage.c | 8 +---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/net/ncsi/ncsi-manage.c b/net/ncsi/ncsi-manage.c
index c71a3a5..13ad1f26 100644
--- a/net/ncsi/ncsi-manage.c
+++
When there are no NCSI channels probed, HWA (Hardware Arbitration)
mode is enabled. It's not correct because HWA depends on the fact:
NCSI channels exist and all of them support HWA mode. This disables
HWA when no channels are probed.
Signed-off-by: Gavin Shan
---
net/ncsi/ncsi-manage.c
d received NCSI packets; generate NCSI command packet manually.
PATCH[7,8/8] fixes two issues found from the debugging functionality.
Gavin Shan (8):
net/ncsi: Disable HWA mode when no channels are found
net/ncsi: Properly track channel monitor timer state
net/ncsi: Enforce failover on li
pkt
NCSI response [CIS] packet received
00 01 dd 80 00 0004
Signed-off-by: Gavin Shan
---
net/ncsi/internal.h| 13 +
net/ncsi/ncsi-cmd.c| 5 +
net/ncsi/ncsi-debug.c | 693 ++---
net/ncsi/ncsi-manage.c | 3 +
net/ncsi/ncsi-rs
200
AEN OK TIMEOUT ERROR
===
Signed-off-by: Gavin Shan
---
net/ncsi/internal.h| 10 +++
net/ncsi/ncsi-aen.c| 15 +++-
net/ncsi/ncsi-cmd.c| 18 +++-
net/ncsi/ncsi-debu
300
Signed-off-by: Gavin Shan
---
net/ncsi/ncsi-rsp.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/ncsi/ncsi-rsp.c b/net/ncsi/ncsi-rsp.c
index 93ebe0f..095726f 100644
--- a/net/ncsi/ncsi-rsp.c
+++ b/net/ncsi/ncsi-rsp.c
@@ -118,7 +118,7 @@ static int ncsi_rsp_
error reported on GVI response packets:
# cat /proc/ncsi/eth0/stats
:
RSP OK TIMEOUT ERROR
===
GVI 200
Signed-off-by: Gavin Shan
---
net/ncsi/ncsi-rsp.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff
xgbe]
> [] sriov_numvfs_store+0xdc/0x130
>...
>RIP [] pci_iov_release+0x57/0x60
>
>Use the existing mutex lock to protect each enable/disable operation.
>
>-v2: move the existing lock from protecting the config of the IOV bus
>to protecting the writes to sriov_numvfs in sysfs
On Fri, Jan 06, 2017 at 12:55:08AM +, Tantilov, Emil S wrote:
>>On Wed, Jan 04, 2017 at 04:00:20PM +, Tantilov, Emil S wrote:
On Tue, Jan 03, 2017 at 04:48:31PM -0800, Emil Tantilov wrote:
>Enabling/disabling SRIOV via sysfs by echo-ing multiple values
>simultaneously:
>
>>>
On Wed, Jan 04, 2017 at 04:00:20PM +, Tantilov, Emil S wrote:
>>On Tue, Jan 03, 2017 at 04:48:31PM -0800, Emil Tantilov wrote:
>>>Enabling/disabling SRIOV via sysfs by echo-ing multiple values
>>>simultaneously:
>>>
>>>echo 63 > /sys/class/net/ethX/device/sriov_numvfs&
>>>echo 63 > /sys/class/n
On Tue, Jan 03, 2017 at 04:48:31PM -0800, Emil Tantilov wrote:
>Enabling/disabling SRIOV via sysfs by echo-ing multiple values
>simultaneously:
>
>echo 63 > /sys/class/net/ethX/device/sriov_numvfs&
>echo 63 > /sys/class/net/ethX/device/sriov_numvfs
>
>sleep 5
>
>echo 0 > /sys/class/net/ethX/device/
On Tue, Nov 29, 2016 at 07:57:51AM +0100, Brice Goglin wrote:
>Hello
>
>My Dell PowerEdge R815 doesn't have IPMI anymore when I boot a 4.8
>kernel, the BMC doesn't even ping anymore. Its Ethernet devices are 4 of
>those:
>
>01:00.0 Ethernet controller: Broadcom Corporation NetXtreme II BCM5709 Giga
On Fri, Oct 14, 2016 at 01:53:29PM +1100, Gavin Shan wrote:
>This series fixes 2 issues that were found during NCSI's availability
>testing on BCM5718 and improves HNCDSC AEN handler:
>
> * PATCH[1] and PATCH[2] refactors the code so that minimal code
> change is put to P
. Also, it becomes easy to
add more states in the state machine without affecting current code.
No logical changes introduced by this.
Suggested-by: Joel Stanley
Signed-off-by: Gavin Shan
---
net/ncsi/ncsi-manage.c | 78 --
1 file changed, 50
) is selected as active one as expected.
Signed-off-by: Gavin Shan
---
net/ncsi/internal.h| 1 +
net/ncsi/ncsi-manage.c | 28 +++-
2 files changed, 28 insertions(+), 1 deletion(-)
diff --git a/net/ncsi/internal.h b/net/ncsi/internal.h
index 13290a7..eac4858 100644
This improves AEN handler for Host Network Controller Driver Status
Change (HNCDSC):
* The channel's lock should be hold when accessing its state.
* Do failover when host driver isn't ready.
* Configure channel when host driver becomes ready.
Signed-off-by: Gavin Shan
---
is chosen to be active one
if none of available channels in link-up state. With this, C0 is still
the active one after unplugging C0's cable. LSC AEN packet received
on C0 when plugging its cable back.
Signed-off-by: Gavin Shan
---
net/ncsi/internal.h| 1 +
net/ncs
PATCH[v2 1].
* Avoid if/else statements in ncsi_suspend_channel() as Joel suggested.
* Added comments to explain why we need retrieve last link states in
ncsi_suspend_channel().
Gavin Shan (4):
net/ncsi: Avoid if statements in ncsi_suspend_channel()
net/ncsi: Fix stale link state o
On Fri, Oct 14, 2016 at 04:32:36PM +1030, Joel Stanley wrote:
>On Fri, Oct 14, 2016 at 1:23 PM, Gavin Shan wrote:
>> The issue was found on BCM5718 which has two NCSI channels in one
>> package: C0 and C1. C0 is in link-up state while C1 is in link-down
>> state. C0 is cho
On Fri, Oct 14, 2016 at 04:32:28PM +1030, Joel Stanley wrote:
>On Fri, Oct 14, 2016 at 1:23 PM, Gavin Shan wrote:
>> The issue was found on BCM5718 which has two NCSI channels in one
>> package: C0 and C1. Both of them are connected to different LANs,
>> means they are in li
On Fri, Oct 14, 2016 at 04:32:22PM +1030, Joel Stanley wrote:
>Hi Gavin,
>
>On Fri, Oct 14, 2016 at 1:23 PM, Gavin Shan wrote:
>> This splits out the code that handles ncsi_dev_state_suspend_select
>> so that we can add more code to the handler in subsequent patch.
>>
selected as active one as expected.
Signed-off-by: Gavin Shan
---
net/ncsi/internal.h| 1 +
net/ncsi/ncsi-manage.c | 20 +++-
2 files changed, 20 insertions(+), 1 deletion(-)
diff --git a/net/ncsi/internal.h b/net/ncsi/internal.h
index 13290a7..eac4858 100644
--- a/net/ncsi
This splits out the code that handles ncsi_dev_state_suspend_select
so that we can add more code to the handler in subsequent patch.
Apart from adding a error tag to reuse the code in error path,
no logical changes introduced.
Signed-off-by: Gavin Shan
---
net/ncsi/ncsi-manage.c | 38
In ncsi_suspend_channel(), we fetch the active package and
channel to local variables for twice. It's unnecessary. This
drops one of them. No functional changes introduced.
Signed-off-by: Gavin Shan
---
net/ncsi/ncsi-manage.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/net/ncsi
fore doing
failover.
* PATCH[4] chooses the hot channel, which was ever chosen as active
channel, when the available channels are all in link-down state.
* PATCH[5] improves Host Network Controller Driver Status Change
(HNCDSC) AEN handler
Gavin Shan (5):
net/ncsi: Not fetch active p
This improves AEN handler for Host Network Controller Driver Status
Change (HNCDSC):
* The channel's lock should be hold when accessing its state.
* Do failover when host driver isn't ready.
* Configure channel when host driver becomes ready.
Signed-off-by: Gavin Shan
---
is chosen to be active one
if none of available channels in link-up state. With this, C0 is still
the active one after unplugging C0's cable. LSC AEN packet received
on C0 when plugging its cable back.
Signed-off-by: Gavin Shan
---
net/ncsi/internal.h| 1 +
net/ncs
annel monitoring is predefined. The channel
is regarded alive if the network controller responses to one of
two GLS commands or both of them in 5 seconds.
Signed-off-by: Gavin Shan
Reviewed-by: Joel Stanley
---
net/ncsi/internal.h| 12 +---
net/ncsi/ncsi-manage.c
or will be seen.
Changelog
=
v2:
* The NCSI's lock is taken when reading or updating its state as the
{READ,WRITE}_ONCE() isn't reliable.
Gavin Shan (8):
net/ncsi: Avoid unused-value build warning from ia64-linux-gcc
net/ncsi: Introduce NCSI_RESERVED_CHANNEL
net/ncsi: Don't
n round-robin fashion and ID#0 won't be assigned.
Signed-off-by: Gavin Shan
Reviewed-by: Joel Stanley
---
net/ncsi/internal.h| 1 +
net/ncsi/ncsi-manage.c | 17 +
2 files changed, 10 insertions(+), 8 deletions(-)
diff --git a/net/ncsi/internal.h b/net/ncsi/internal.h
inde
This defines NCSI_RESERVED_CHANNEL as the reserved NCSI channel
ID (0x1f). No logical changes introduced.
Signed-off-by: Gavin Shan
Reviewed-by: Joel Stanley
---
net/ncsi/internal.h| 1 +
net/ncsi/ncsi-manage.c | 14 +++---
2 files changed, 8 insertions(+), 7 deletions(-)
diff
This stops NCSI device when closing the network device so that the
NCSI device can be reenabled later.
Signed-off-by: Gavin Shan
Reviewed-by: Joel Stanley
---
drivers/net/ethernet/faraday/ftgmac100.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/net/ethernet/faraday/ftgmac100.c
command argument struct. Each bit of the newly introduced
field can be used for one property. No functional changes introduced.
Signed-off-by: Gavin Shan
Reviewed-by: Joel Stanley
---
net/ncsi/internal.h| 8 +---
net/ncsi/ncsi-cmd.c| 2 +-
net/ncsi/ncsi-manage.c | 19
7;xchg'
xchg(&nc->state, NCSI_CHANNEL_INACTIVE);
This removes the atomic access to NCSI channel's state avoid the above
build warning. We have to hold the channel's lock when its state is readed
or updated. No functional changes introduced.
Signed-off-by: Gavin Shan
Reviewed-by:
We needn't send CIS (Clear Initial State) command to the NCSI
reserved channel (0x1f) in the enumeration. We shouldn't receive
a valid response from CIS on NCSI channel 0x1f.
Signed-off-by: Gavin Shan
Reviewed-by: Joel Stanley
---
net/ncsi/ncsi-manage.c | 4 ++--
1 file changed, 2
channels to inactive state; Report
NCSI link down.
Signed-off-by: Gavin Shan
Reviewed-by: Joel Stanley
---
include/net/ncsi.h | 5 +
net/ncsi/ncsi-manage.c | 37 -
2 files changed, 29 insertions(+), 13 deletions(-)
diff --git a/include/net/ncsi.h b
On Thu, Sep 29, 2016 at 01:54:04AM -0400, David Miller wrote:
>From: Gavin Shan
>Date: Thu, 29 Sep 2016 15:03:08 +1000
>
>> This replaces the atomic access to NCSI channel's state with READ_ONCE()
>> and WRITE_ONCE() to avoid the above build warning. We needn't
channels to inactive state; Report
NCSI link down.
Signed-off-by: Gavin Shan
Reviewed-by: Joel Stanley
---
include/net/ncsi.h | 5 +
net/ncsi/ncsi-manage.c | 33 ++---
2 files changed, 27 insertions(+), 11 deletions(-)
diff --git a/include/net/ncsi.h b
This stops NCSI device when closing the network device so that the
NCSI device can be reenabled later.
Signed-off-by: Gavin Shan
Reviewed-by: Joel Stanley
---
drivers/net/ethernet/faraday/ftgmac100.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/net/ethernet/faraday/ftgmac100.c
8] reworks the channel monitoring to improve the
code readability and its robustness.
* PATCH[7/8] and PATCH[8/8] introduces ncsi_stop_dev() so that the network
device can be closed and opened afterwards. No error will be seen.
Gavin Shan (8):
net/ncsi: Avoid unused-value build warning
7;xchg'
xchg(&nc->state, NCSI_CHANNEL_INACTIVE);
This replaces the atomic access to NCSI channel's state with READ_ONCE()
and WRITE_ONCE() to avoid the above build warning. We needn't hold the
channel's lock when updating its state as well. No logical changes
introduced.
annel monitoring is predefined. The channel
is regarded alive if the network controller responses to one of
two GLS commands or both of them in 5 seconds.
Signed-off-by: Gavin Shan
Reviewed-by: Joel Stanley
---
net/ncsi/internal.h| 12 +---
net/ncsi/ncsi-manage.c
command argument struct. Each bit of the newly introduced
field can be used for one property. No functional changes introduced.
Signed-off-by: Gavin Shan
Reviewed-by: Joel Stanley
---
net/ncsi/internal.h| 8 +---
net/ncsi/ncsi-cmd.c| 2 +-
net/ncsi/ncsi-manage.c | 19
n round-robin fashion and ID#0 won't be assigned.
Signed-off-by: Gavin Shan
Reviewed-by: Joel Stanley
---
net/ncsi/internal.h| 1 +
net/ncsi/ncsi-manage.c | 17 +
2 files changed, 10 insertions(+), 8 deletions(-)
diff --git a/net/ncsi/internal.h b/net/ncsi/internal.h
inde
We needn't send CIS (Clear Initial State) command to the NCSI
reserved channel (0x1f) in the enumeration. We shouldn't receive
a valid response from CIS on NCSI channel 0x1f.
Signed-off-by: Gavin Shan
Reviewed-by: Joel Stanley
---
net/ncsi/ncsi-manage.c | 4 ++--
1 file changed, 2
This defines NCSI_RESERVED_CHANNEL as the reserved NCSI channel
ID (0x1f). No logical changes introduced.
Signed-off-by: Gavin Shan
Reviewed-by: Joel Stanley
---
net/ncsi/internal.h| 1 +
net/ncsi/ncsi-manage.c | 14 +++---
2 files changed, 8 insertions(+), 7 deletions(-)
diff
1 - 100 of 171 matches
Mail list logo