<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/drivers/s390/net, branch v4.11</title>
<subtitle>Linux kernel for Apalis and Colibri modules</subtitle>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/'/>
<entry>
<title>s390/qeth: no ETH header for outbound AF_IUCV</title>
<updated>2017-03-24T19:40:00+00:00</updated>
<author>
<name>Julian Wiedmann</name>
<email>jwi@linux.vnet.ibm.com</email>
</author>
<published>2017-03-23T13:55:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=acd9776b5c45ef02d1a210969a6fcc058afb76e3'/>
<id>acd9776b5c45ef02d1a210969a6fcc058afb76e3</id>
<content type='text'>
With AF_IUCV traffic, the skb passed to hard_start_xmit() has a 14 byte
slot at skb-&gt;data, intended for an ETH header. qeth_l3_fill_af_iucv_hdr()
fills this ETH header... and then immediately moves it to the
skb's headroom, where it disappears and is never seen again.

But it's still possible for us to return NETDEV_TX_BUSY after the skb has
been modified. Since we didn't get a private copy of the skb, the next
time the skb is delivered to hard_start_xmit() it no longer has the
expected layout (we moved the ETH header to the headroom, so skb-&gt;data
now starts at the IUCV_TRANS header). So when qeth_l3_fill_af_iucv_hdr()
does another round of rebuilding, the resulting qeth header ends up
all wrong. On transmission, the buffer is then rejected by
the HiperSockets device with SBALF15 = x'04'.
When this error is passed back to af_iucv as TX_NOTIFY_UNREACHABLE, it
tears down the offending socket.

As the ETH header for AF_IUCV serves no purpose, just align the code to
what we do for IP traffic on L3 HiperSockets: keep the ETH header at
skb-&gt;data, and pass down data_offset = ETH_HLEN to qeth_fill_buffer().
When mapping the payload into the SBAL elements, the ETH header is then
stripped off. This avoids the skb manipulations in
qeth_l3_fill_af_iucv_hdr(), and any buffer re-entering hard_start_xmit()
after NETDEV_TX_BUSY is now processed properly.

Signed-off-by: Julian Wiedmann &lt;jwi@linux.vnet.ibm.com&gt;
Signed-off-by: Ursula Braun &lt;ubraun@linux.vnet.ibm.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
With AF_IUCV traffic, the skb passed to hard_start_xmit() has a 14 byte
slot at skb-&gt;data, intended for an ETH header. qeth_l3_fill_af_iucv_hdr()
fills this ETH header... and then immediately moves it to the
skb's headroom, where it disappears and is never seen again.

But it's still possible for us to return NETDEV_TX_BUSY after the skb has
been modified. Since we didn't get a private copy of the skb, the next
time the skb is delivered to hard_start_xmit() it no longer has the
expected layout (we moved the ETH header to the headroom, so skb-&gt;data
now starts at the IUCV_TRANS header). So when qeth_l3_fill_af_iucv_hdr()
does another round of rebuilding, the resulting qeth header ends up
all wrong. On transmission, the buffer is then rejected by
the HiperSockets device with SBALF15 = x'04'.
When this error is passed back to af_iucv as TX_NOTIFY_UNREACHABLE, it
tears down the offending socket.

As the ETH header for AF_IUCV serves no purpose, just align the code to
what we do for IP traffic on L3 HiperSockets: keep the ETH header at
skb-&gt;data, and pass down data_offset = ETH_HLEN to qeth_fill_buffer().
When mapping the payload into the SBAL elements, the ETH header is then
stripped off. This avoids the skb manipulations in
qeth_l3_fill_af_iucv_hdr(), and any buffer re-entering hard_start_xmit()
after NETDEV_TX_BUSY is now processed properly.

Signed-off-by: Julian Wiedmann &lt;jwi@linux.vnet.ibm.com&gt;
Signed-off-by: Ursula Braun &lt;ubraun@linux.vnet.ibm.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>s390/qeth: size calculation outbound buffers</title>
<updated>2017-03-24T19:39:59+00:00</updated>
<author>
<name>Julian Wiedmann</name>
<email>jwi@linux.vnet.ibm.com</email>
</author>
<published>2017-03-23T13:55:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=7d969d2e8890f546c8cec634b3aa5f57d4eef883'/>
<id>7d969d2e8890f546c8cec634b3aa5f57d4eef883</id>
<content type='text'>
Depending on the device type, hard_start_xmit() builds different output
buffer formats. For instance with HiperSockets, on both L2 and L3 we
strip the ETH header from the skb - L3 doesn't need it, and L2 carries
it in the buffer's header element.
For this, we pass data_offset = ETH_HLEN all the way down to
__qeth_fill_buffer(), where skb-&gt;data is then adjusted accordingly.
But the initial size calculation still considers the *full* skb length
(including the ETH header). So qeth_get_elements_no() can erroneously
reject a skb as too big, even though it would actually fit into an
output buffer once the ETH header has been trimmed off later.

Fix this by passing an additional offset to qeth_get_elements_no(),
that indicates where in the skb the on-wire data actually begins.
Since the current code uses data_offset=-1 for some special handling
on OSA, we need to clamp data_offset to 0...

On HiperSockets this helps when sending ~MTU-size skbs with weird page
alignment. No change for OSA or AF_IUCV.

Signed-off-by: Julian Wiedmann &lt;jwi@linux.vnet.ibm.com&gt;
Signed-off-by: Ursula Braun &lt;ubraun@linux.vnet.ibm.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Depending on the device type, hard_start_xmit() builds different output
buffer formats. For instance with HiperSockets, on both L2 and L3 we
strip the ETH header from the skb - L3 doesn't need it, and L2 carries
it in the buffer's header element.
For this, we pass data_offset = ETH_HLEN all the way down to
__qeth_fill_buffer(), where skb-&gt;data is then adjusted accordingly.
But the initial size calculation still considers the *full* skb length
(including the ETH header). So qeth_get_elements_no() can erroneously
reject a skb as too big, even though it would actually fit into an
output buffer once the ETH header has been trimmed off later.

Fix this by passing an additional offset to qeth_get_elements_no(),
that indicates where in the skb the on-wire data actually begins.
Since the current code uses data_offset=-1 for some special handling
on OSA, we need to clamp data_offset to 0...

On HiperSockets this helps when sending ~MTU-size skbs with weird page
alignment. No change for OSA or AF_IUCV.

Signed-off-by: Julian Wiedmann &lt;jwi@linux.vnet.ibm.com&gt;
Signed-off-by: Ursula Braun &lt;ubraun@linux.vnet.ibm.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>s390/qeth: fix retrieval of vipa and proxy-arp addresses</title>
<updated>2017-01-12T15:02:43+00:00</updated>
<author>
<name>Ursula Braun</name>
<email>ubraun@linux.vnet.ibm.com</email>
</author>
<published>2017-01-12T14:48:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=e48b9eaaa29a0a7d5da2df136b07eefa0180d584'/>
<id>e48b9eaaa29a0a7d5da2df136b07eefa0180d584</id>
<content type='text'>
qeth devices in layer3 mode need a separate handling of vipa and proxy-arp
addresses. vipa and proxy-arp addresses processed by qeth can be read from
userspace. Introduced with commit 5f78e29ceebf ("qeth: optimize IP handling
in rx_mode callback") the retrieval of vipa and proxy-arp addresses is
broken, if more than one vipa or proxy-arp address are set.

The qeth code used local variable "int i" for 2 different purposes. This
patch now spends 2 separate local variables of type "int".
While touching these functions hash_for_each_safe() is converted to
hash_for_each(), since there is no removal of hash entries.

Signed-off-by: Ursula Braun &lt;ubraun@linux.vnet.ibm.com&gt;
Reviewed-by: Julian Wiedmann &lt;jwi@linux.vnet.ibm.com&gt;
Reference-ID: RQM 3524
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
qeth devices in layer3 mode need a separate handling of vipa and proxy-arp
addresses. vipa and proxy-arp addresses processed by qeth can be read from
userspace. Introduced with commit 5f78e29ceebf ("qeth: optimize IP handling
in rx_mode callback") the retrieval of vipa and proxy-arp addresses is
broken, if more than one vipa or proxy-arp address are set.

The qeth code used local variable "int i" for 2 different purposes. This
patch now spends 2 separate local variables of type "int".
While touching these functions hash_for_each_safe() is converted to
hash_for_each(), since there is no removal of hash entries.

Signed-off-by: Ursula Braun &lt;ubraun@linux.vnet.ibm.com&gt;
Reviewed-by: Julian Wiedmann &lt;jwi@linux.vnet.ibm.com&gt;
Reference-ID: RQM 3524
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>s390/qeth: issue STARTLAN as first IPA command</title>
<updated>2017-01-12T15:02:43+00:00</updated>
<author>
<name>Julian Wiedmann</name>
<email>jwi@linux.vnet.ibm.com</email>
</author>
<published>2017-01-12T14:48:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=1034051045d125579ab1e8fcd5a724eeb0e70149'/>
<id>1034051045d125579ab1e8fcd5a724eeb0e70149</id>
<content type='text'>
STARTLAN needs to be the first IPA command after MPC initialization
completes.
So move the qeth_send_startlan() call from the layer disciplines
into the core path, right after the MPC handshake.
While at it, replace the magic LAN OFFLINE return code
with the existing enum.

Signed-off-by: Julian Wiedmann &lt;jwi@linux.vnet.ibm.com&gt;
Reviewed-by: Thomas Richter &lt;tmricht@linux.vnet.ibm.com&gt;
Reviewed-by: Ursula Braun &lt;ubraun@linux.vnet.ibm.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
STARTLAN needs to be the first IPA command after MPC initialization
completes.
So move the qeth_send_startlan() call from the layer disciplines
into the core path, right after the MPC handshake.
While at it, replace the magic LAN OFFLINE return code
with the existing enum.

Signed-off-by: Julian Wiedmann &lt;jwi@linux.vnet.ibm.com&gt;
Reviewed-by: Thomas Richter &lt;tmricht@linux.vnet.ibm.com&gt;
Reviewed-by: Ursula Braun &lt;ubraun@linux.vnet.ibm.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>s390/qeth: shuffle MAC management functions around</title>
<updated>2017-01-12T15:02:43+00:00</updated>
<author>
<name>Julian Wiedmann</name>
<email>jwi@linux.vnet.ibm.com</email>
</author>
<published>2017-01-12T14:48:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=ac988d78dc998ec1ce909d2f2ddf0f81e88e54d5'/>
<id>ac988d78dc998ec1ce909d2f2ddf0f81e88e54d5</id>
<content type='text'>
Move all MAC utility functions in one place, and drop the
forward declarations.

Signed-off-by: Julian Wiedmann &lt;jwi@linux.vnet.ibm.com&gt;
Reviewed-by: Thomas Richter &lt;tmricht@linux.vnet.ibm.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Move all MAC utility functions in one place, and drop the
forward declarations.

Signed-off-by: Julian Wiedmann &lt;jwi@linux.vnet.ibm.com&gt;
Reviewed-by: Thomas Richter &lt;tmricht@linux.vnet.ibm.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>s390/qeth: extract qeth_l2_remove_mac()</title>
<updated>2017-01-12T15:02:43+00:00</updated>
<author>
<name>Julian Wiedmann</name>
<email>jwi@linux.vnet.ibm.com</email>
</author>
<published>2017-01-12T14:48:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=979d79292af327a12e913ef17f29b85428d0ba0f'/>
<id>979d79292af327a12e913ef17f29b85428d0ba0f</id>
<content type='text'>
This matches qeth_l2_write_mac().

Signed-off-by: Julian Wiedmann &lt;jwi@linux.vnet.ibm.com&gt;
Reviewed-by: Thomas Richter &lt;tmricht@linux.vnet.ibm.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This matches qeth_l2_write_mac().

Signed-off-by: Julian Wiedmann &lt;jwi@linux.vnet.ibm.com&gt;
Reviewed-by: Thomas Richter &lt;tmricht@linux.vnet.ibm.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>s390/qeth: consolidate errno translation</title>
<updated>2017-01-12T15:02:43+00:00</updated>
<author>
<name>Julian Wiedmann</name>
<email>jwi@linux.vnet.ibm.com</email>
</author>
<published>2017-01-12T14:48:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=754e0b8d92e5ba24a711d51b5fdbbd211e2fdd24'/>
<id>754e0b8d92e5ba24a711d51b5fdbbd211e2fdd24</id>
<content type='text'>
Consolidate errno handling for MAC management: Instead of doing this in every
caller, do it in one place.

Signed-off-by: Julian Wiedmann &lt;jwi@linux.vnet.ibm.com&gt;
Reviewed-by: Thomas Richter &lt;tmricht@linux.vnet.ibm.com&gt;
Suggested-by: Ursula Braun &lt;ubraun@linux.vnet.ibm.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Consolidate errno handling for MAC management: Instead of doing this in every
caller, do it in one place.

Signed-off-by: Julian Wiedmann &lt;jwi@linux.vnet.ibm.com&gt;
Reviewed-by: Thomas Richter &lt;tmricht@linux.vnet.ibm.com&gt;
Suggested-by: Ursula Braun &lt;ubraun@linux.vnet.ibm.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>s390/qeth: don't convert return code twice</title>
<updated>2017-01-12T15:02:43+00:00</updated>
<author>
<name>Julian Wiedmann</name>
<email>jwi@linux.vnet.ibm.com</email>
</author>
<published>2017-01-12T14:48:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=4b764d1de395090662fd0291968d5ded523f07e4'/>
<id>4b764d1de395090662fd0291968d5ded523f07e4</id>
<content type='text'>
qeth_l2_send_groupmac() already translates the return code, so
calling qeth_setdel_makerc() a second time only produces garbage.

Signed-off-by: Julian Wiedmann &lt;jwi@linux.vnet.ibm.com&gt;
Reviewed-by: Thomas Richter &lt;tmricht@linux.vnet.ibm.com&gt;
Reviewed-by: Ursula Braun &lt;ubraun@linux.vnet.ibm.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
qeth_l2_send_groupmac() already translates the return code, so
calling qeth_setdel_makerc() a second time only produces garbage.

Signed-off-by: Julian Wiedmann &lt;jwi@linux.vnet.ibm.com&gt;
Reviewed-by: Thomas Richter &lt;tmricht@linux.vnet.ibm.com&gt;
Reviewed-by: Ursula Braun &lt;ubraun@linux.vnet.ibm.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>s390/qeth: drop qeth_l2_del_all_macs() parameter</title>
<updated>2017-01-12T15:02:43+00:00</updated>
<author>
<name>Julian Wiedmann</name>
<email>jwi@linux.vnet.ibm.com</email>
</author>
<published>2017-01-12T14:48:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=c07cbf2e209198526e059b9e6bb538b18875a19d'/>
<id>c07cbf2e209198526e059b9e6bb538b18875a19d</id>
<content type='text'>
The only caller passes del = 0, so remove both the parameter and
the code that handles != 0.

Signed-off-by: Julian Wiedmann &lt;jwi@linux.vnet.ibm.com&gt;
Reviewed-by: Thomas Richter &lt;tmricht@linux.vnet.ibm.com&gt;
Acked-by: Ursula Braun &lt;ubraun@linux.vnet.ibm.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The only caller passes del = 0, so remove both the parameter and
the code that handles != 0.

Signed-off-by: Julian Wiedmann &lt;jwi@linux.vnet.ibm.com&gt;
Reviewed-by: Thomas Richter &lt;tmricht@linux.vnet.ibm.com&gt;
Acked-by: Ursula Braun &lt;ubraun@linux.vnet.ibm.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>s390/qeth: Remove QETH_IP_HEADER_SIZE</title>
<updated>2017-01-12T15:02:43+00:00</updated>
<author>
<name>Julian Wiedmann</name>
<email>jwi@linux.vnet.ibm.com</email>
</author>
<published>2017-01-12T14:48:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=c2a7ee2a3beebc1d870c6ba20acf94383d7978f9'/>
<id>c2a7ee2a3beebc1d870c6ba20acf94383d7978f9</id>
<content type='text'>
Remove unused define QETH_IP_HEADER_SIZE.

Signed-off-by: Julian Wiedmann &lt;jwi@linux.vnet.ibm.com&gt;
Reviewed-by: Thomas Richter &lt;tmricht@linux.vnet.ibm.com&gt;
Acked-by: Ursula Braun &lt;ubraun@linux.vnet.ibm.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Remove unused define QETH_IP_HEADER_SIZE.

Signed-off-by: Julian Wiedmann &lt;jwi@linux.vnet.ibm.com&gt;
Reviewed-by: Thomas Richter &lt;tmricht@linux.vnet.ibm.com&gt;
Acked-by: Ursula Braun &lt;ubraun@linux.vnet.ibm.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
</feed>
