Re: [PATCH net-next v7] net/ncsi: Extend NC-SI Netlink interface to allow user space to send NC-SI command

2018-10-11 Thread Samuel Mendoza-Jonas
ut () > -> Netlink interface (msg with zero data length) > -> user space application > > Error: > Error detected > -> ncsi_send_netlink_err () > -> Netlink interface (err msg) > -> user space application > > > Signed-off-by: Justin Lee > Reviewed-by: Samuel Mendoza-Jonas

Re: [RFC PATCH 2/2] net/ncsi: Configure multi-package, multi-channel modes with failover

2018-10-10 Thread Samuel Mendoza-Jonas
over channels. > > If the NCSI_ATTR_MULTI_FLAG attribute is also present then the preferred > > channel is configured for Tx/Rx and the other channels are enabled only > > for Rx. > > > > Signed-off-by: Samuel Mendoza-Jonas > > --- > > include/uapi/linux/ncs

Re: [PATCH net-next v5] net/ncsi: Extend NC-SI Netlink interface to allow user space to send NC-SI command

2018-10-10 Thread Samuel Mendoza-Jonas
On Wed, 2018-10-10 at 18:11 +, justin.l...@dell.com wrote: > + > + len = nla_len(info->attrs[NCSI_ATTR_DATA]); > + if (len < sizeof(struct ncsi_pkt_hdr)) { > + netdev_info(ndp->ndev.dev, "NCSI: no command to send %u\n", > + package_id); > +

Re: [PATCH net-next v3] net/ncsi: Extend NC-SI Netlink interface to allow user space to send NC-SI command

2018-10-09 Thread Samuel Mendoza-Jonas
ut () > -> Netlink interface (msg with zero data length) > -> user space application > > Error: > Error detected > -> ncsi_send_netlink_err () > -> Netlink interface (err msg) > -> user space application Hi Justin, I've built a

Re: [PATCH v3] net/ncsi: Add NCSI OEM command support

2018-10-04 Thread Samuel Mendoza-Jonas
handler for OEM > commands > ncsi_rsp_handler_oem: This is a generic response handler for OEM commands > > Signed-off-by: Vijay Khemka Reviewed-by: Samuel Mendoza-Jonas Technically this patch should also be marked [PATCH net-next] to target David's next tree. > --- > net/ncsi/inter

Re: [PATCH net v2] net/ncsi: Extend NC-SI Netlink interface to allow user space to send NC-SI command

2018-10-01 Thread Samuel Mendoza-Jonas
On Fri, 2018-09-28 at 18:15 +, justin.l...@dell.com wrote: > The new command (NCSI_CMD_SEND_CMD) is added to allow user space application > to send NC-SI command to the network card. > Also, add a new attribute (NCSI_ATTR_DATA) for transferring request and > response. > > The work flow is

Re: [PATCH v2] net/ncsi: Add NCSI OEM command support

2018-10-01 Thread Samuel Mendoza-Jonas
handler for OEM > commands > ncsi_rsp_handler_oem: This is a generic response handler for OEM commands > > Signed-off-by: Vijay Khemka Hi Vijay - looks good to me, and should be a good common base for your and Justin's changes. Reviewed-by: Samuel Mendoza-Jonas > --- > net/ncsi

Re: [PATCH net] net/ncsi: Extend NC-SI Netlink interface to allow user space to send NC-SI command

2018-09-27 Thread Samuel Mendoza-Jonas
On Thu, 2018-09-27 at 21:08 +, justin.l...@dell.com wrote: > The new command (NCSI_CMD_SEND_CMD) is added to allow user space application > to send NC-SI command to the network card. > Also, add a new attribute (NCSI_ATTR_DATA) for transferring request and > response. > > The work flow is

Re: [PATCH] net/ncsi: Add NCSI OEM command for FB Tiogapass

2018-09-26 Thread Samuel Mendoza-Jonas
On Thu, 2018-09-27 at 13:43 +1000, Samuel Mendoza-Jonas wrote: > On Mon, 2018-09-24 at 17:08 -0700, Vijay Khemka wrote: > > This patch adds OEM command to get mac address from NCSI device and and > > configure the same to the network card. > > > > ncsi_cmd_arg - Modifie

Re: [PATCH] net/ncsi: Add NCSI OEM command for FB Tiogapass

2018-09-25 Thread Samuel Mendoza-Jonas
On Tue, 2018-09-25 at 18:16 +, Vijay Khemka wrote: > Hi Joel, > Thanks, I am adding netdev mailing list here. > Yes, this command is supported for all Mellanox card. It is as per Mellanox > specification. > > Regards > -Vijay Hi Vijay, Thanks for the patch; before I get too into a review

Re: [PATCH 4/4] MAINTAINERS: Add Sam as the maintainer for NCSI

2018-06-18 Thread Samuel Mendoza-Jonas
On Mon, 2018-06-18 at 16:49 +0930, Joel Stanley wrote: > Sam has been handing the maintenance of NCSI for a number release cycles > now. > > Signed-off-by: Joel Stanley I'm exposed! Acked-by: Samuel Mendoza-Jonas > --- > MAINTAINERS | 5 + > 1 file changed, 5 in

Re: [PATCH 3/4] net/ncsi: Use netdev_dbg for debug messages

2018-06-18 Thread Samuel Mendoza-Jonas
> DEBUG is set or this specific netdev_dbg is enabled > via the dynamic debug control file. Right this is fine for these sort of messages; very noisy and not particularly critical. For this and the other logging updates: Acked-by: Samuel Mendoza-Jonas > > > Signed-off-by: Joel Stanley

[PATCH RESEND net-next] net/ncsi: Refactor MAC, VLAN filters

2018-04-16 Thread Samuel Mendoza-Jonas
639] == Reported-by: Joel Stanley <j...@jms.id.au> Signed-off-by: Samuel Mendoza-Jonas <s...@mendozajonas.com> --- net/ncsi/internal.h | 34 +++--- net/ncsi/ncsi-manage.c | 226 +--- net/ncsi/ncsi-netlink.c | 20 ++-- net/ncsi/ncsi-

[PATCH net-next] net/ncsi: Refactor MAC, VLAN filters

2018-04-08 Thread Samuel Mendoza-Jonas
639] == Reported-by: Joel Stanley <j...@jms.id.au> Signed-off-by: Samuel Mendoza-Jonas <s...@mendozajonas.com> --- net/ncsi/internal.h | 34 +++--- net/ncsi/ncsi-manage.c | 226 +--- net/ncsi/ncsi-netlink.c | 20 ++-- net/ncsi/ncsi-

[PATCH net-next v2] net/ncsi: Add generic netlink family

2018-03-04 Thread Samuel Mendoza-Jonas
, and NCSI_CMD_CLEAR_INTERFACE which clears any preferred setting. Signed-off-by: Samuel Mendoza-Jonas <s...@mendozajonas.com> --- v2: Add a separate NCSI_CMD_CLEAR_INTERFACE command instead of allowing missing attributes in NCSI_CMD_SET_INTERFACE. include/uapi/linux/ncsi.h | 115 + net/ncsi/Ma

Re: [PATCH net-next] net/ncsi: Add generic netlink family

2018-02-26 Thread Samuel Mendoza-Jonas
On Mon, 2018-02-26 at 11:31 -0500, David Miller wrote: > From: Samuel Mendoza-Jonas <s...@mendozajonas.com> > Date: Fri, 23 Feb 2018 15:15:18 +1100 > > > + * @NCSI_CMD_SET_INTERFACE: set preferred package and channel combination. > > + * Requires NCSI_ATT

[PATCH net-next] net/ncsi: Add generic netlink family

2018-02-22 Thread Samuel Mendoza-Jonas
-by: Samuel Mendoza-Jonas <s...@mendozajonas.com> --- include/uapi/linux/ncsi.h | 113 + net/ncsi/Makefile | 2 +- net/ncsi/internal.h | 3 + net/ncsi/ncsi-manage.c| 30 +++- net/ncsi/ncsi-netlink.c | 394 ++ net/ncs

Re: [RFC PATCH] net/ncsi: Add generic netlink family

2018-02-15 Thread Samuel Mendoza-Jonas
On Thu, 2018-02-15 at 14:50 +1030, Joel Stanley wrote: > Hey Sam, > > On Thu, Feb 15, 2018 at 2:00 PM, Samuel Mendoza-Jonas > <s...@mendozajonas.com> wrote: > > Add a generic netlink family for NCSI. This supports two commands; > > NCSI_CMD_PKG_INFO which r

[PATCH net-next] net/ncsi: Don't take any action on HNCDSC AEN

2017-12-14 Thread Samuel Mendoza-Jonas
. Signed-off-by: Samuel Mendoza-Jonas <s...@mendozajonas.com> --- net/ncsi/ncsi-aen.c | 35 +++ 1 file changed, 3 insertions(+), 32 deletions(-) diff --git a/net/ncsi/ncsi-aen.c b/net/ncsi/ncsi-aen.c index 67e708e98ccf..e7b05de1e6d1 100644 --- a/net/ncsi/ncsi-aen.c

[PATCH net-next 2/2] net/ncsi: Don't return error on normal response

2017-11-07 Thread Samuel Mendoza-Jonas
. Signed-off-by: Samuel Mendoza-Jonas <s...@mendozajonas.com> --- net/ncsi/ncsi-rsp.c | 31 ++- 1 file changed, 14 insertions(+), 17 deletions(-) diff --git a/net/ncsi/ncsi-rsp.c b/net/ncsi/ncsi-rsp.c index 58186c4102f0..efd933ff5570 100644 --- a/net/ncsi/ncsi

[PATCH net-next 1/2] net/ncsi: Improve general state logging

2017-11-07 Thread Samuel Mendoza-Jonas
The NCSI driver is mostly silent which becomes a headache when trying to determine what has occurred on the NCSI connection. This adds additional logging in a few key areas such as state transitions and calling out certain errors more visibly. Signed-off-by: Samuel Mendoza-Jonas &l

[PATCH net 1/5] net/ncsi: Fix AEN HNCDSC packet length

2017-10-18 Thread Samuel Mendoza-Jonas
Correct the value of the HNCDSC AEN packet. Fixes: 7a82ecf4cfb85 "net/ncsi: NCSI AEN packet handler" Signed-off-by: Samuel Mendoza-Jonas <s...@mendozajonas.com> --- net/ncsi/ncsi-aen.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/ncsi/ncsi-aen.c b/net

[PATCH net 3/5] net/ncsi: Disable HWA mode when no channels are found

2017-10-18 Thread Samuel Mendoza-Jonas
ed-off-by: Gavin Shan <gws...@linux.vnet.ibm.com> Signed-off-by: Samuel Mendoza-Jonas <s...@mendozajonas.com> --- net/ncsi/ncsi-manage.c | 12 ++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/net/ncsi/ncsi-manage.c b/net/ncsi/ncsi-manage.c index b022deb39d31..0

[PATCH net 2/5] net/ncsi: Stop monitor if channel times out or is inactive

2017-10-18 Thread Samuel Mendoza-Jonas
0x164) [ 459.04] [<80033614>] (kthread) from [<8000a5e8>] (ret_from_fork+0x14/0x2c) This also updates the monitor instead of just returning if ncsi_xmit_cmd() fails to send the get-link-status command so that the monitor properly times out. Fixes: e6f44ed6d04d3 &quo

[PATCH net 4/5] net/ncsi: Enforce failover on link monitor timeout

2017-10-18 Thread Samuel Mendoza-Jonas
failing channel should be set to active in order for deinitialization and failover to be done. Signed-off-by: Gavin Shan <gws...@linux.vnet.ibm.com> Signed-off-by: Samuel Mendoza-Jonas <s...@mendozajonas.com> --- net/ncsi/ncsi-manage.c | 8 +--- 1 file changed, 5 insertions(+)

[PATCH net 5/5] net/ncsi: Fix length of GVI response packet

2017-10-18 Thread Samuel Mendoza-Jonas
n <gws...@linux.vnet.ibm.com> Signed-off-by: Samuel Mendoza-Jonas <s...@mendozajonas.com> --- 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 265b9a892d41..927dad4759d1 100644 --- a/net/ncsi/ncsi-rsp.c +++ b/n

[PATCH net] net/ncsi: Don't limit vids based on hot_channel

2017-10-10 Thread Samuel Mendoza-Jonas
only drop a new VLAN id if we are already tracking the maximum allowed by the NCSI specification. Per-channel limits are already handled by ncsi_add_filter(), but add a message to set_one_vid() to make it obvious that the channel can not support any more VLAN ids. Signed-off-by: Samuel Mendoza-Jonas

Re: [PATCH net] net/ncsi: Don't assume last available channel exists

2017-09-26 Thread Samuel Mendoza-Jonas
On Thu, 2017-09-21 at 18:11 -0700, David Miller wrote: > From: Samuel Mendoza-Jonas <s...@mendozajonas.com> > Date: Fri, 22 Sep 2017 11:00:00 +1000 > > > If we haven't configured a channel yet (or are in the process of doing > > so) we won't have a hot_channe

Re: [PATCH net] net/ncsi: Don't assume last available channel exists

2017-09-21 Thread Samuel Mendoza-Jonas
On Wed, 2017-09-20 at 16:05 -0700, David Miller wrote: > From: Samuel Mendoza-Jonas <s...@mendozajonas.com> > Date: Wed, 20 Sep 2017 14:12:51 +1000 > > > When handling new VLAN tags in NCSI we check the maximum allowed number > > of filters on the last active ("ho

[PATCH net] net/ncsi: Don't assume last available channel exists

2017-09-19 Thread Samuel Mendoza-Jonas
is missing. Signed-off-by: Samuel Mendoza-Jonas <s...@mendozajonas.com> --- net/ncsi/ncsi-manage.c | 21 +++-- 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/net/ncsi/ncsi-manage.c b/net/ncsi/ncsi-manage.c index 3fd3c39e6278..fc800f934beb 100644 --- a/net/nc

[PATCH net-next] net/ncsi: Define {add,kill}_vid callbacks for !CONFIG_NET_NCSI

2017-08-30 Thread Samuel Mendoza-Jonas
an_rx_kill_vid" [drivers/net/ethernet/faraday/ftgmac100.ko] >>> undefined! >>> ERROR: "ncsi_vlan_rx_add_vid" [drivers/net/ethernet/faraday/ftgmac100.ko] >>> undefined! Add definitions for !CONFIG_NET_NCSI to bring it into line with the rest of

Re: [PATCH net-next v3 0/3] NCSI VLAN Filtering Support

2017-08-29 Thread Samuel Mendoza-Jonas
On Mon, 2017-08-28 at 16:50 -0700, David Miller wrote: > From: Samuel Mendoza-Jonas <s...@mendozajonas.com> > Date: Mon, 28 Aug 2017 16:18:40 +1000 > > > This series (mainly patch 2) adds VLAN filtering to the NCSI implementation. > > A fair amount of code alrea

[PATCH net-next v3 0/3] NCSI VLAN Filtering Support

2017-08-28 Thread Samuel Mendoza-Jonas
changes when kicking updated channel Samuel Mendoza-Jonas (3): net/ncsi: Fix several packet definitions net/ncsi: Configure VLAN tag filter ftgmac100: Support NCSI VLAN filtering when available drivers/net/ethernet/faraday/ftgmac100.c | 5 + include/net/ncsi.h | 2

[PATCH net-next v3 1/3] net/ncsi: Fix several packet definitions

2017-08-28 Thread Samuel Mendoza-Jonas
Signed-off-by: Samuel Mendoza-Jonas <s...@mendozajonas.com> --- v2: Rebased on latest net-next net/ncsi/ncsi-cmd.c | 10 +- net/ncsi/ncsi-pkt.h | 2 +- net/ncsi/ncsi-rsp.c | 3 ++- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/net/ncsi/ncsi-cmd.c b/net/ncsi/ncsi

[PATCH net-next v3 2/3] net/ncsi: Configure VLAN tag filter

2017-08-28 Thread Samuel Mendoza-Jonas
f VLAN tag filters is determined by the "Get Capabilities" response from the channel. Signed-off-by: Samuel Mendoza-Jonas <s...@mendozajonas.com> --- v3: - Add comment describing change to ncsi_find_filter() - Catch NULL in clear_one_vid() from ncsi_get_filter() - S

[PATCH net-next v3 3/3] ftgmac100: Support NCSI VLAN filtering when available

2017-08-28 Thread Samuel Mendoza-Jonas
Mendoza-Jonas <s...@mendozajonas.com> --- v2: Moved ftgmac100 change into same patch and reordered drivers/net/ethernet/faraday/ftgmac100.c | 5 + 1 file changed, 5 insertions(+) diff --git a/drivers/net/ethernet/faraday/ftgmac100.c b/drivers/net/ethernet/faraday/ftgmac100.c

Re: [PATCH net-next v2 2/3] net/ncsi: Configure VLAN tag filter

2017-08-13 Thread Samuel Mendoza-Jonas
On Mon, 2017-08-14 at 11:39 +0930, Joel Stanley wrote: > On Mon, Aug 14, 2017 at 10:59 AM, Samuel Mendoza-Jonas > <s...@mendozajonas.com> wrote: > > Make use of the ndo_vlan_rx_{add,kill}_vid callbacks to have the NCSI > > stack process new VLAN tags and configure

[PATCH net-next v2 3/3] ftgmac100: Support NCSI VLAN filtering when available

2017-08-13 Thread Samuel Mendoza-Jonas
Mendoza-Jonas <s...@mendozajonas.com> --- v2: Moved ftgmac100 change into same patch and reordered drivers/net/ethernet/faraday/ftgmac100.c | 5 + 1 file changed, 5 insertions(+) diff --git a/drivers/net/ethernet/faraday/ftgmac100.c b/drivers/net/ethernet/faraday/ftgmac100.c

[PATCH net-next v2 2/3] net/ncsi: Configure VLAN tag filter

2017-08-13 Thread Samuel Mendoza-Jonas
f VLAN tag filters is determined by the "Get Capabilities" response from the channel. Signed-off-by: Samuel Mendoza-Jonas <s...@mendozajonas.com> --- include/net/ncsi.h | 2 + net/ncsi/internal.h| 11 ++ net/ncsi/ncsi-manage.c | 295 ++

[PATCH net-next v2 0/3] NCSI VLAN Filtering Support

2017-08-13 Thread Samuel Mendoza-Jonas
adds the appropriate flag and callbacks to the ftgmac100 driver to enable filtering as it's a large consumer of NCSI (and what I've been testing on). Samuel Mendoza-Jonas (3): net/ncsi: Fix several packet definitions net/ncsi: Configure VLAN tag filter ftgmac100: Support NCSI VLAN filtering

[PATCH net-next v2 1/3] net/ncsi: Fix several packet definitions

2017-08-13 Thread Samuel Mendoza-Jonas
Signed-off-by: Samuel Mendoza-Jonas <s...@mendozajonas.com> --- v2: Rebased on latest net-next net/ncsi/ncsi-cmd.c | 10 +- net/ncsi/ncsi-pkt.h | 2 +- net/ncsi/ncsi-rsp.c | 3 ++- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/net/ncsi/ncsi-cmd.c b/net/ncsi/ncsi

Re: [PATCH 0/3] NCSI VLAN Filtering Support

2017-08-13 Thread Samuel Mendoza-Jonas
On Fri, 2017-08-11 at 14:48 -0700, David Miller wrote: > From: Samuel Mendoza-Jonas <s...@mendozajonas.com> > Date: Fri, 11 Aug 2017 16:16:45 +1000 > > > This series (mainly patch 3) adds VLAN filtering to the NCSI implementation. > > A fair amount of code alrea

[PATCH 1/3] ftgmac: Include NETIF_F_HW_VLAN_CTAG_FILTER in features

2017-08-11 Thread Samuel Mendoza-Jonas
This is required for the VLAN core to call the add/kill callback for VLAN IDs. 'ftgmac100' already supports VLAN tagging but this flag lets the network stack know that we want to be notified of VLAN tags being added or removed when we have NCSI support. Signed-off-by: Samuel Mendoza-Jonas &l

[PATCH 2/3] net/ncsi: Fix several packet definitions

2017-08-11 Thread Samuel Mendoza-Jonas
Signed-off-by: Samuel Mendoza-Jonas <s...@mendozajonas.com> --- net/ncsi/ncsi-cmd.c | 10 +- net/ncsi/ncsi-pkt.h | 2 +- net/ncsi/ncsi-rsp.c | 3 ++- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/net/ncsi/ncsi-cmd.c b/net/ncsi/ncsi-cmd.c index db7083bfd476..1fec9f

[PATCH 0/3] NCSI VLAN Filtering Support

2017-08-11 Thread Samuel Mendoza-Jonas
adds the appropriate flag to the ftgmac100 driver to enable filtering as it's a large consumer of NCSI (and what I've been testing on). Samuel Mendoza-Jonas (3): ftgmac: Include NETIF_F_HW_VLAN_CTAG_FILTER in features net/ncsi: Fix several packet definitions net/ncsi: Configure VLAN tag filter

[PATCH 3/3] net/ncsi: Configure VLAN tag filter

2017-08-11 Thread Samuel Mendoza-Jonas
f VLAN tag filters is determined by the "Get Capabilities" response from the channel. Signed-off-by: Samuel Mendoza-Jonas <s...@mendozajonas.com> --- drivers/net/ethernet/faraday/ftgmac100.c | 2 + include/net/ncsi.h | 2 + net/ncsi/internal.h