Skip to content

Commit

Permalink
net/af_iucv: build SG skbs for TRANS_HIPER sockets
Browse files Browse the repository at this point in the history
The TX path no longer falls apart when some of its SG skbs are later
linearized by lower layers of the stack. So enable the use of SG skbs
in iucv_sock_sendmsg() again.

This effectively reverts
commit dc5367b ("net/af_iucv: don't use paged skbs for TX on HiperSockets").

Signed-off-by: Julian Wiedmann <jwi@linux.ibm.com>
Acked-by: Willem de Bruijn <willemb@google.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
  • Loading branch information
julianwiedmann authored and kuba-moo committed Jan 29, 2021
1 parent 80bc97a commit 2c3b445
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions net/iucv/af_iucv.c
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,9 @@ static int afiucv_hs_send(struct iucv_message *imsg, struct sock *sock,
err = -EMSGSIZE;
goto err_free;
}
skb_trim(skb, skb->dev->mtu);
err = pskb_trim(skb, skb->dev->mtu);
if (err)
goto err_free;
}
skb->protocol = cpu_to_be16(ETH_P_AF_IUCV);

Expand Down Expand Up @@ -996,7 +998,7 @@ static int iucv_sock_sendmsg(struct socket *sock, struct msghdr *msg,
if (iucv->transport == AF_IUCV_TRANS_HIPER) {
headroom = sizeof(struct af_iucv_trans_hdr) +
LL_RESERVED_SPACE(iucv->hs_dev);
linear = len;
linear = min(len, PAGE_SIZE - headroom);
} else {
if (len < PAGE_SIZE) {
linear = len;
Expand Down

0 comments on commit 2c3b445

Please sign in to comment.