Skip to content

Commit

Permalink
s390/qeth: remove skb_is_nonlinear() check on IQD
Browse files Browse the repository at this point in the history
qeth doesn't advertise NETIF_F_SG for L3 IQDs. So trust the stack to
not hand us any nonlinear skbs, and remove an always-true condition.

With the fact that data_offset < 0 is no longer possible on IQDs,
apply a small cleanup to subsequent code.

Signed-off-by: Julian Wiedmann <jwi@linux.vnet.ibm.com>
Acked-by: Ursula Braun <ubraun@linux.vnet.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Julian Wiedmann authored and David S. Miller committed Jun 6, 2017
1 parent 4845b93 commit 94a9c98
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions drivers/s390/net/qeth_l3_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -2676,8 +2676,7 @@ static netdev_tx_t qeth_l3_hard_start_xmit(struct sk_buff *skb,
use_tso = skb_is_gso(skb) &&
(qeth_get_ip_protocol(skb) == IPPROTO_TCP) && (ipv == 4);

if ((card->info.type == QETH_CARD_TYPE_IQD) &&
!skb_is_nonlinear(skb)) {
if (card->info.type == QETH_CARD_TYPE_IQD) {
new_skb = skb;
data_offset = ETH_HLEN;
hdr = kmem_cache_alloc(qeth_core_header_cache, GFP_ATOMIC);
Expand All @@ -2690,12 +2689,7 @@ static netdev_tx_t qeth_l3_hard_start_xmit(struct sk_buff *skb,
+ VLAN_HLEN);
if (!new_skb)
goto tx_drop;
}

if (card->info.type == QETH_CARD_TYPE_IQD) {
if (data_offset < 0)
skb_pull(new_skb, ETH_HLEN);
} else {
if (ipv == 4) {
skb_pull(new_skb, ETH_HLEN);
}
Expand Down

0 comments on commit 94a9c98

Please sign in to comment.