From: <Justin.Lee1@Dell.com>
To: <sam@mendozajonas.com>, <netdev@vger.kernel.org>
Cc: <davem@davemloft.net>, <linux-kernel@vger.kernel.org>,
<openbmc@lists.ozlabs.org>
Subject: RE: [PATCH net-next v3 6/6] net/ncsi: Configure multi-package, multi-channel modes with failover
Date: Fri, 9 Nov 2018 21:58:44 +0000 [thread overview]
Message-ID: <b2c6aea94f1648648dd349d23ce61bf6@AUSX13MPS302.AMER.DELL.COM> (raw)
In-Reply-To: <ce6a678b1a0673050bc8070cb99dd68d1929c227.camel@mendozajonas.com>
Hi Samuel,
After running more testing, I notice that the extra patch causing failover function
to fail. Also, occasionally, I will see two channels having TX enabled if I
send netlink command back-to-back.
cat /sys/kernel/debug/ncsi_protocol/ncsi_device_
IFIDX IFNAME NAME PID CID RX TX MP MC WP WC PC CS PS LS RU CR NQ HA
=====================================================================
2 eth2 ncsi0 000 000 1 1 1 1 1 1 1 2 1 1 1 1 0 1
2 eth2 ncsi1 000 001 1 1 1 1 1 1 0 2 1 1 1 1 0 1
2 eth2 ncsi2 001 000 0 0 1 1 0 0 0 1 0 1 1 1 0 1
2 eth2 ncsi3 001 001 0 0 1 1 0 0 0 1 0 1 1 1 0 1
=====================================================================
MP: Multi-mode Package WP: Whitelist Package
MC: Multi-mode Channel WC: Whitelist Channel
PC: Primary Channel CS: Channel State IA/A/IV 1/2/3
PS: Poll Status LS: Link Status
RU: Running CR: Carrier OK
NQ: Queue Stopped HA: Hardware Arbitration
Thanks,
Justin
> From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
> From: Samuel Mendoza-Jonas <sam@mendozajonas.com>
> Date: Fri, 9 Nov 2018 13:11:03 +1100
> Subject: [PATCH] net/ncsi: Reset state fixes, single-channel LSC
>
> ---
> net/ncsi/ncsi-aen.c | 8 +++++---
> net/ncsi/ncsi-manage.c | 19 +++++++++++++++----
> 2 files changed, 20 insertions(+), 7 deletions(-)
>
> diff --git a/net/ncsi/ncsi-aen.c b/net/ncsi/ncsi-aen.c
> index 39c2e9eea2ba..034cb1dc5566 100644
> --- a/net/ncsi/ncsi-aen.c
> +++ b/net/ncsi/ncsi-aen.c
> @@ -93,14 +93,16 @@ static int ncsi_aen_handler_lsc(struct ncsi_dev_priv *ndp,
> if ((had_link == has_link) || chained)
> return 0;
>
> - if (!ndp->multi_package && !nc->package->multi_channel) {
> - if (had_link)
> - ndp->flags |= NCSI_DEV_RESHUFFLE;
> + if (!ndp->multi_package && !nc->package->multi_channel && had_link) {
> + ndp->flags |= NCSI_DEV_RESHUFFLE;
> ncsi_stop_channel_monitor(nc);
> spin_lock_irqsave(&ndp->lock, flags);
> list_add_tail_rcu(&nc->link, &ndp->channel_queue);
> spin_unlock_irqrestore(&ndp->lock, flags);
> return ncsi_process_next_channel(ndp);
> + } else {
> + /* Configured channel came up */
> + return 0;
It is always going to else statement if multi_package and/or mutlit_channel is enabled.
npcm7xx-emc f0825000.eth eth2: NCSI: ncsi_aen_handler_lsc() - pkg 0 ch 0 state down
npcm7xx-emc f0825000.eth eth2: NCSI: ncsi_aen_handler_lsc() - had_link 1, has_link 0, chained 0
These codes have no chance to run.
if (had_link) {
ncm = &nc->modes[NCSI_MODE_TX_ENABLE];
if (ncsi_channel_is_last(ndp, nc)) {
/* No channels left, reconfigure */
return ncsi_reset_dev(&ndp->ndev);
} else if (ncm->enable) {
/* Need to failover Tx channel */
ncsi_update_tx_channel(ndp, nc->package, nc, NULL);
}
> }
>
next prev parent reply other threads:[~2018-11-09 21:58 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-08 2:49 [PATCH net-next v3 0/6] net/ncsi: Allow enabling multiple packages & channels Samuel Mendoza-Jonas
2018-11-08 2:49 ` [PATCH net-next v3 1/6] net/ncsi: Don't enable all channels when HWA available Samuel Mendoza-Jonas
2018-11-08 2:49 ` [PATCH net-next v3 2/6] net/ncsi: Probe single packages to avoid conflict Samuel Mendoza-Jonas
2018-11-08 2:49 ` [PATCH net-next v3 3/6] net/ncsi: Don't deselect package in suspend if active Samuel Mendoza-Jonas
2018-11-08 2:49 ` [PATCH net-next v3 4/6] net/ncsi: Don't mark configured channels inactive Samuel Mendoza-Jonas
2018-11-08 2:49 ` [PATCH net-next v3 5/6] net/ncsi: Reset channel state in ncsi_start_dev() Samuel Mendoza-Jonas
2018-11-08 2:49 ` [PATCH net-next v3 6/6] net/ncsi: Configure multi-package, multi-channel modes with failover Samuel Mendoza-Jonas
2018-11-08 22:48 ` Justin.Lee1
2018-11-09 2:17 ` Samuel Mendoza-Jonas
2018-11-09 18:07 ` Justin.Lee1
2018-11-09 21:58 ` Justin.Lee1 [this message]
2018-11-12 0:38 ` Samuel Mendoza-Jonas
2018-11-13 18:00 ` Justin.Lee1
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=b2c6aea94f1648648dd349d23ce61bf6@AUSX13MPS302.AMER.DELL.COM \
--to=justin.lee1@dell.com \
--cc=davem@davemloft.net \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=openbmc@lists.ozlabs.org \
--cc=sam@mendozajonas.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox