<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/net/ncsi/internal.h, branch linux-5.0.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.0.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.0.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2018-11-28T00:37:20Z</updated>
<entry>
<title>net/ncsi: Add NCSI Mellanox OEM command</title>
<updated>2018-11-28T00:37:20Z</updated>
<author>
<name>Vijay Khemka</name>
</author>
<published>2018-11-26T21:49:04Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=16e8c4ca21a238cdf0355475bf15bd72e92feb8f'/>
<id>urn:sha1:16e8c4ca21a238cdf0355475bf15bd72e92feb8f</id>
<content type='text'>
This patch adds OEM Mellanox commands and response handling. It also
defines OEM Get MAC Address handler to get and configure the device.

ncsi_oem_gma_handler_mlx: This handler send NCSI mellanox command for
getting mac address.
ncsi_rsp_handler_oem_mlx: This handles response received for all
mellanox OEM commands.
ncsi_rsp_handler_oem_mlx_gma: This handles get mac address response and
set it to device.

Signed-off-by: Vijay Khemka &lt;vijaykhemka@fb.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net/ncsi: Configure multi-package, multi-channel modes with failover</title>
<updated>2018-11-18T05:09:49Z</updated>
<author>
<name>Samuel Mendoza-Jonas</name>
</author>
<published>2018-11-16T04:51:59Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=8d951a75d022d94a05f5fa74217670a981e8302d'/>
<id>urn:sha1:8d951a75d022d94a05f5fa74217670a981e8302d</id>
<content type='text'>
This patch extends the ncsi-netlink interface with two new commands and
three new attributes to configure multiple packages and/or channels at
once, and configure specific failover modes.

NCSI_CMD_SET_PACKAGE mask and NCSI_CMD_SET_CHANNEL_MASK set a whitelist
of packages or channels allowed to be configured with the
NCSI_ATTR_PACKAGE_MASK and NCSI_ATTR_CHANNEL_MASK attributes
respectively. If one of these whitelists is set only packages or
channels matching the whitelist are considered for the channel queue in
ncsi_choose_active_channel().

These commands may also use the NCSI_ATTR_MULTI_FLAG to signal that
multiple packages or channels may be configured simultaneously. NCSI
hardware arbitration (HWA) must be available in order to enable
multi-package mode. Multi-channel mode is always available.

If the NCSI_ATTR_CHANNEL_ID attribute is present in the
NCSI_CMD_SET_CHANNEL_MASK command the it sets the preferred channel as
with the NCSI_CMD_SET_INTERFACE command. The combination of preferred
channel and channel whitelist defines a primary channel and the allowed
failover 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 &lt;sam@mendozajonas.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net/ncsi: Reset channel state in ncsi_start_dev()</title>
<updated>2018-11-18T05:09:49Z</updated>
<author>
<name>Samuel Mendoza-Jonas</name>
</author>
<published>2018-11-16T04:51:58Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=2878a2cfe57a5db21844801cf502fe535a3134b2'/>
<id>urn:sha1:2878a2cfe57a5db21844801cf502fe535a3134b2</id>
<content type='text'>
When the NCSI driver is stopped with ncsi_stop_dev() the channel
monitors are stopped and the state set to "inactive". However the
channels are still configured and active from the perspective of the
network controller. We should suspend each active channel but in the
context of ncsi_stop_dev() the transmit queue has been or is about to be
stopped so we won't have time to do so.

Instead when ncsi_start_dev() is called if the NCSI topology has already
been probed then call ncsi_reset_dev() to suspend any channels that were
previously active. This resets the network controller to a known state,
provides an up to date view of channel link state, and makes sure that
mode flags such as NCSI_MODE_TX_ENABLE are properly reset.

In addition to ncsi_start_dev() use ncsi_reset_dev() in ncsi-netlink.c
to update the channel configuration more cleanly.

Signed-off-by: Samuel Mendoza-Jonas &lt;sam@mendozajonas.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net/ncsi: Probe single packages to avoid conflict</title>
<updated>2018-11-18T05:09:49Z</updated>
<author>
<name>Samuel Mendoza-Jonas</name>
</author>
<published>2018-11-16T04:51:55Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=8e13f70be05ee49985dfc3c766868bc85ed43b8a'/>
<id>urn:sha1:8e13f70be05ee49985dfc3c766868bc85ed43b8a</id>
<content type='text'>
Currently the NCSI driver sends a select-package command to all possible
packages simultaneously to discover what packages are available. However
at this stage in the probe process the driver does not know if
hardware arbitration is available: if it isn't then this process could
cause collisions on the RMII bus when packages try to respond.

Update the probe loop to probe each package one by one, and once
complete check if HWA is universally supported.

Signed-off-by: Samuel Mendoza-Jonas &lt;sam@mendozajonas.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net/ncsi: Add NCSI Broadcom OEM command</title>
<updated>2018-10-18T05:14:54Z</updated>
<author>
<name>Vijay Khemka</name>
</author>
<published>2018-10-16T19:13:19Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=cb10c7c0dfd9e6fd3d69ced98b05cbd198c48cf6'/>
<id>urn:sha1:cb10c7c0dfd9e6fd3d69ced98b05cbd198c48cf6</id>
<content type='text'>
This patch adds OEM Broadcom commands and response handling. It also
defines OEM Get MAC Address handler to get and configure the device.

ncsi_oem_gma_handler_bcm: This handler send NCSI broadcom command for
getting mac address.
ncsi_rsp_handler_oem_bcm: This handles response received for all
broadcom OEM commands.
ncsi_rsp_handler_oem_bcm_gma: This handles get mac address response and
set it to device.

Signed-off-by: Vijay Khemka &lt;vijaykhemka@fb.com&gt;
Reviewed-by: Samuel Mendoza-Jonas &lt;sam@mendozajonas.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net/ncsi: Extend NC-SI Netlink interface to allow user space to send NC-SI command</title>
<updated>2018-10-16T05:00:59Z</updated>
<author>
<name>Justin.Lee1@Dell.com</name>
</author>
<published>2018-10-11T18:07:37Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=9771b8ccdfa6dcb1ac5128ca7fe8649f3092d392'/>
<id>urn:sha1:9771b8ccdfa6dcb1ac5128ca7fe8649f3092d392</id>
<content type='text'>
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 as below.

Request:
User space application
	-&gt; Netlink interface (msg)
	-&gt; new Netlink handler - ncsi_send_cmd_nl()
	-&gt; ncsi_xmit_cmd()

Response:
Response received - ncsi_rcv_rsp()
	-&gt; internal response handler - ncsi_rsp_handler_xxx()
	-&gt; ncsi_rsp_handler_netlink()
	-&gt; ncsi_send_netlink_rsp ()
	-&gt; Netlink interface (msg)
	-&gt; user space application

Command timeout - ncsi_request_timeout()
	-&gt; ncsi_send_netlink_timeout ()
	-&gt; Netlink interface (msg with zero data length)
	-&gt; user space application

Error:
Error detected
	-&gt; ncsi_send_netlink_err ()
	-&gt; Netlink interface (err msg)
	-&gt; user space application

Signed-off-by: Justin Lee &lt;justin.lee1@dell.com&gt;
Reviewed-by: Samuel Mendoza-Jonas &lt;sam@mendozajonas.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net/ncsi: Add NCSI OEM command support</title>
<updated>2018-10-05T21:54:47Z</updated>
<author>
<name>Vijay Khemka</name>
</author>
<published>2018-10-05T17:46:01Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=fb4ee67529ff3e4c5874768477887c2df5714c96'/>
<id>urn:sha1:fb4ee67529ff3e4c5874768477887c2df5714c96</id>
<content type='text'>
This patch adds OEM commands and response handling. It also defines OEM
command and response structure as per NCSI specification along with its
handlers.

ncsi_cmd_handler_oem: This is a generic command request handler for OEM
commands
ncsi_rsp_handler_oem: This is a generic response handler for OEM commands

Signed-off-by: Vijay Khemka &lt;vijaykhemka@fb.com&gt;
Reviewed-by: Justin Lee &lt;justin.lee1@dell.com&gt;
Reviewed-by: Samuel Mendoza-Jonas &lt;sam@mendozajonas.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net/ncsi: Refactor MAC, VLAN filters</title>
<updated>2018-04-17T17:50:58Z</updated>
<author>
<name>Samuel Mendoza-Jonas</name>
</author>
<published>2018-04-17T04:23:23Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=062b3e1b6d4f2a33c1d0fd7ae9b4550da5cf7e4b'/>
<id>urn:sha1:062b3e1b6d4f2a33c1d0fd7ae9b4550da5cf7e4b</id>
<content type='text'>
The NCSI driver defines a generic ncsi_channel_filter struct that can be
used to store arbitrarily formatted filters, and several generic methods
of accessing data stored in such a filter.
However in both the driver and as defined in the NCSI specification
there are only two actual filters: VLAN ID filters and MAC address
filters. The splitting of the MAC filter into unicast, multicast, and
mixed is also technically not necessary as these are stored in the same
location in hardware.

To save complexity, particularly in the set up and accessing of these
generic filters, remove them in favour of two specific structs. These
can be acted on directly and do not need several generic helper
functions to use.

This also fixes a memory error found by KASAN on ARM32 (which is not
upstream yet), where response handlers accessing a filter's data field
could write past allocated memory.

[  114.926512] ==================================================================
[  114.933861] BUG: KASAN: slab-out-of-bounds in ncsi_configure_channel+0x4b8/0xc58
[  114.941304] Read of size 2 at addr 94888558 by task kworker/0:2/546
[  114.947593]
[  114.949146] CPU: 0 PID: 546 Comm: kworker/0:2 Not tainted 4.16.0-rc6-00119-ge156398bfcad #13
...
[  115.170233] The buggy address belongs to the object at 94888540
[  115.170233]  which belongs to the cache kmalloc-32 of size 32
[  115.181917] The buggy address is located 24 bytes inside of
[  115.181917]  32-byte region [94888540, 94888560)
[  115.192115] The buggy address belongs to the page:
[  115.196943] page:9eeac100 count:1 mapcount:0 mapping:94888000 index:0x94888fc1
[  115.204200] flags: 0x100(slab)
[  115.207330] raw: 00000100 94888000 94888fc1 0000003f 00000001 9eea2014 9eecaa74 96c003e0
[  115.215444] page dumped because: kasan: bad access detected
[  115.221036]
[  115.222544] Memory state around the buggy address:
[  115.227384]  94888400: fb fb fb fb fc fc fc fc 04 fc fc fc fc fc fc fc
[  115.233959]  94888480: 00 00 00 fc fc fc fc fc 00 04 fc fc fc fc fc fc
[  115.240529] &gt;94888500: 00 00 04 fc fc fc fc fc 00 00 04 fc fc fc fc fc
[  115.247077]                                             ^
[  115.252523]  94888580: 00 04 fc fc fc fc fc fc 06 fc fc fc fc fc fc fc
[  115.259093]  94888600: 00 00 06 fc fc fc fc fc 00 00 04 fc fc fc fc fc
[  115.265639] ==================================================================

Reported-by: Joel Stanley &lt;joel@jms.id.au&gt;
Signed-off-by: Samuel Mendoza-Jonas &lt;sam@mendozajonas.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net/ncsi: Add generic netlink family</title>
<updated>2018-03-05T15:43:37Z</updated>
<author>
<name>Samuel Mendoza-Jonas</name>
</author>
<published>2018-03-05T00:39:05Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=955dc68cb9b23b42999cafe6df3684309bc686c6'/>
<id>urn:sha1:955dc68cb9b23b42999cafe6df3684309bc686c6</id>
<content type='text'>
Add a generic netlink family for NCSI. This supports three commands;
NCSI_CMD_PKG_INFO which returns information on packages and their
associated channels, NCSI_CMD_SET_INTERFACE which allows a specific
package or package/channel combination to be set as the preferred
choice, and NCSI_CMD_CLEAR_INTERFACE which clears any preferred setting.

Signed-off-by: Samuel Mendoza-Jonas &lt;sam@mendozajonas.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net/ncsi: Don't limit vids based on hot_channel</title>
<updated>2017-10-12T03:10:37Z</updated>
<author>
<name>Samuel Mendoza-Jonas</name>
</author>
<published>2017-10-11T05:54:27Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=6e9c0075409d4ec1bc63558ee5a93916a6d7d16f'/>
<id>urn:sha1:6e9c0075409d4ec1bc63558ee5a93916a6d7d16f</id>
<content type='text'>
Currently we drop any new VLAN ids if there are more than the current
(or last used) channel can support. Most importantly this is a problem
if no channel has been selected yet, resulting in a segfault.

Secondly this does not necessarily reflect the capabilities of any other
channels. Instead 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 &lt;sam@mendozajonas.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
</feed>
