<feed xmlns='http://www.w3.org/2005/Atom'>
<title>talos-obmc-linux/net, branch dev-4.13</title>
<subtitle>Talos™ II Linux sources for OpenBMC</subtitle>
<id>https://git.raptorcs.com/git/talos-obmc-linux/atom?h=dev-4.13</id>
<link rel='self' href='https://git.raptorcs.com/git/talos-obmc-linux/atom?h=dev-4.13'/>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/talos-obmc-linux/'/>
<updated>2018-04-17T04:51:58+00:00</updated>
<entry>
<title>net/ncsi: Refactor MAC, VLAN filters</title>
<updated>2018-04-17T04:51:58+00:00</updated>
<author>
<name>Samuel Mendoza-Jonas</name>
<email>sam@mendozajonas.com</email>
</author>
<published>2018-04-17T04:23:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/talos-obmc-linux/commit/?id=5c0befc84d0aa6d8c97074053a00c5b83efe19d2'/>
<id>urn:sha1:5c0befc84d0aa6d8c97074053a00c5b83efe19d2</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] ==================================================================

OpenBMC-Staging-Count: 1
Reported-by: Joel Stanley &lt;joel@jms.id.au&gt;
Signed-off-by: Samuel Mendoza-Jonas &lt;sam@mendozajonas.com&gt;
Signed-off-by: Joel Stanley &lt;joel@jms.id.au&gt;
</content>
</entry>
<entry>
<title>net/ncsi: Add generic netlink family</title>
<updated>2018-03-07T03:13:21+00:00</updated>
<author>
<name>Samuel Mendoza-Jonas</name>
<email>sam@mendozajonas.com</email>
</author>
<published>2018-03-05T00:39:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/talos-obmc-linux/commit/?id=81c499e06ba8bf8b781bd946971c1bc51a90c33f'/>
<id>urn:sha1:81c499e06ba8bf8b781bd946971c1bc51a90c33f</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;
(cherry picked from commit 955dc68cb9b23b42999cafe6df3684309bc686c6)
Signed-off-by: Joel Stanley &lt;joel@jms.id.au&gt;
</content>
</entry>
<entry>
<title>net/ncsi: Don't take any action on HNCDSC AEN</title>
<updated>2018-01-18T17:17:11+00:00</updated>
<author>
<name>Samuel Mendoza-Jonas</name>
<email>sam@mendozajonas.com</email>
</author>
<published>2017-12-20T03:02:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/talos-obmc-linux/commit/?id=528c040baf2746c894f7d915e2b2d18ee4808b5c'/>
<id>urn:sha1:528c040baf2746c894f7d915e2b2d18ee4808b5c</id>
<content type='text'>
The current HNCDSC handler takes the status flag from the AEN packet and
will update or change the current channel based on this flag and the
current channel status.

However the flag from the HNCDSC packet merely represents the host link
state. While the state of the host interface is potentially interesting
information it should not affect the state of the NCSI link. Indeed the
NCSI specification makes no mention of any recommended action related to
the host network controller driver state.

Update the HNCDSC handler to record the host network driver status but
take no other action.

Signed-off-by: Samuel Mendoza-Jonas &lt;sam@mendozajonas.com&gt;
Acked-by: Jeremy Kerr &lt;jk@ozlabs.org&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
(cherry picked from commit 75e8e15635e08f2598ecd20f4f71f4d043dd6e68)
Signed-off-by: Joel Stanley &lt;joel@jms.id.au&gt;
</content>
</entry>
<entry>
<title>Merge tag 'v4.13.16' into dev-4.13</title>
<updated>2017-11-28T07:41:55+00:00</updated>
<author>
<name>Joel Stanley</name>
<email>joel@jms.id.au</email>
</author>
<published>2017-11-28T07:41:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/talos-obmc-linux/commit/?id=e62c292fd1d47c0bd0e2b82fcfacc8be0f1fb0f3'/>
<id>urn:sha1:e62c292fd1d47c0bd0e2b82fcfacc8be0f1fb0f3</id>
<content type='text'>
This is the 4.13.16 stable release
</content>
</entry>
<entry>
<title>net/ncsi: Don't return error on normal response</title>
<updated>2017-11-28T04:06:38+00:00</updated>
<author>
<name>Samuel Mendoza-Jonas</name>
<email>sam@mendozajonas.com</email>
</author>
<published>2017-11-08T05:30:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/talos-obmc-linux/commit/?id=0ba5dce271fb0466f4a06d01d06841fd61394475'/>
<id>urn:sha1:0ba5dce271fb0466f4a06d01d06841fd61394475</id>
<content type='text'>
Several response handlers return EBUSY if the data corresponding to the
command/response pair is already set. There is no reason to return an
error here; the channel is advertising something as enabled because we
told it to enable it, and it's possible that the feature has been
enabled previously.

Signed-off-by: Samuel Mendoza-Jonas &lt;sam@mendozajonas.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
(cherry picked from commit 04bad8bda9e25afe676a6f4452f3b304c1fdea16)
Signed-off-by: Joel Stanley &lt;joel@jms.id.au&gt;
</content>
</entry>
<entry>
<title>net/ncsi: Improve general state logging</title>
<updated>2017-11-28T04:06:32+00:00</updated>
<author>
<name>Samuel Mendoza-Jonas</name>
<email>sam@mendozajonas.com</email>
</author>
<published>2017-11-08T05:30:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/talos-obmc-linux/commit/?id=b96da3cc0d4fbc0db491933f720b8eddee6f56a3'/>
<id>urn:sha1:b96da3cc0d4fbc0db491933f720b8eddee6f56a3</id>
<content type='text'>
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 &lt;sam@mendozajonas.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
(cherry picked from commit 9ef8690be13d8ae3130749fbcc0cc21e4e3f738c)
Signed-off-by: Joel Stanley &lt;joel@jms.id.au&gt;
</content>
</entry>
<entry>
<title>net/ncsi: Make local function ncsi_get_filter() static</title>
<updated>2017-11-28T04:06:26+00:00</updated>
<author>
<name>Wei Yongjun</name>
<email>weiyongjun1@huawei.com</email>
</author>
<published>2017-11-02T11:15:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/talos-obmc-linux/commit/?id=7eff27b37607e0e9b68c029512e74c03f5e44f8f'/>
<id>urn:sha1:7eff27b37607e0e9b68c029512e74c03f5e44f8f</id>
<content type='text'>
Fixes the following sparse warnings:

net/ncsi/ncsi-manage.c:41:5: warning:
 symbol 'ncsi_get_filter' was not declared. Should it be static?

Signed-off-by: Wei Yongjun &lt;weiyongjun1@huawei.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
(cherry picked from commit 5a6d80034471d4407052c4bf3758071df5cadf33)
Signed-off-by: Joel Stanley &lt;joel@jms.id.au&gt;
</content>
</entry>
<entry>
<title>net/ncsi: Fix length of GVI response packet</title>
<updated>2017-11-28T04:06:18+00:00</updated>
<author>
<name>Gavin Shan</name>
<email>gwshan@linux.vnet.ibm.com</email>
</author>
<published>2017-10-19T02:43:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/talos-obmc-linux/commit/?id=ba309989affb08715891a5b18b952087296696c4'/>
<id>urn:sha1:ba309989affb08715891a5b18b952087296696c4</id>
<content type='text'>
The length of GVI (GetVersionInfo) response packet should be 40 instead
of 36. This issue was found from /sys/kernel/debug/ncsi/eth0/stats.

 # ethtool --ncsi eth0 swstats
     :
 RESPONSE     OK       TIMEOUT  ERROR
 =======================================
 GVI          0        0        2

With this applied, no error reported on GVI response packets:

 # ethtool --ncsi eth0 swstats
     :
 RESPONSE     OK       TIMEOUT  ERROR
 =======================================
 GVI          2        0        0

Signed-off-by: Gavin Shan &lt;gwshan@linux.vnet.ibm.com&gt;
Signed-off-by: Samuel Mendoza-Jonas &lt;sam@mendozajonas.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
(cherry picked from commit 0a90e251988ceedc528c8db98f25b051cf190f44)
Signed-off-by: Joel Stanley &lt;joel@jms.id.au&gt;
</content>
</entry>
<entry>
<title>net/ncsi: Enforce failover on link monitor timeout</title>
<updated>2017-11-28T04:06:09+00:00</updated>
<author>
<name>Gavin Shan</name>
<email>gwshan@linux.vnet.ibm.com</email>
</author>
<published>2017-10-19T02:43:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/talos-obmc-linux/commit/?id=3870d67fdac99b59691719167082e62358b10060'/>
<id>urn:sha1:3870d67fdac99b59691719167082e62358b10060</id>
<content type='text'>
The NCSI channel has been configured to provide service if its link
monitor timer is enabled, regardless of its state (inactive or active).
So the timeout event on the link monitor indicates the out-of-service
on that channel, for which a failover is needed.

This sets NCSI_DEV_RESHUFFLE flag to enforce failover on link monitor
timeout, regardless the channel's original state (inactive or active).
Also, the link is put into "down" state to give the failing channel
lowest priority when selecting for the active channel. The state of
failing channel should be set to active in order for deinitialization
and failover to be done.

Signed-off-by: Gavin Shan &lt;gwshan@linux.vnet.ibm.com&gt;
Signed-off-by: Samuel Mendoza-Jonas &lt;sam@mendozajonas.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
(cherry picked from commit 52b4c8627f9f0d882e969967a207a27a80c9c753)
Signed-off-by: Joel Stanley &lt;joel@jms.id.au&gt;
</content>
</entry>
<entry>
<title>net/ncsi: Disable HWA mode when no channels are found</title>
<updated>2017-11-28T04:06:04+00:00</updated>
<author>
<name>Gavin Shan</name>
<email>gwshan@linux.vnet.ibm.com</email>
</author>
<published>2017-10-19T02:43:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/talos-obmc-linux/commit/?id=4cfb2b553d3cf1605a2fb9ddd3d114edf48682de'/>
<id>urn:sha1:4cfb2b553d3cf1605a2fb9ddd3d114edf48682de</id>
<content type='text'>
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 &lt;gwshan@linux.vnet.ibm.com&gt;
Signed-off-by: Samuel Mendoza-Jonas &lt;sam@mendozajonas.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
(cherry picked from commit 100ef01f3ea4badbee6479290a41f74abd0e523f)
Signed-off-by: Joel Stanley &lt;joel@jms.id.au&gt;
</content>
</entry>
</feed>
