Skip to content

Commit

Permalink
s390/qeth: pass proto to qeth_l3_get_cast_type()
Browse files Browse the repository at this point in the history
qeth_l3_hard_start_xmit() already determined the skb's proto. Avoid
doing so a second time when it calls qeth_l3_get_cast_type().

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
Julian Wiedmann authored and Jakub Kicinski committed Jan 29, 2021
1 parent 17f3a8b commit c61dff3
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions drivers/s390/net/qeth_l3_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1610,9 +1610,8 @@ static int qeth_l3_get_cast_type_rcu(struct sk_buff *skb, struct dst_entry *dst,
}
}

static int qeth_l3_get_cast_type(struct sk_buff *skb)
static int qeth_l3_get_cast_type(struct sk_buff *skb, __be16 proto)
{
__be16 proto = vlan_get_protocol(skb);
struct dst_entry *dst;
int cast_type;

Expand Down Expand Up @@ -1771,7 +1770,7 @@ static netdev_tx_t qeth_l3_hard_start_xmit(struct sk_buff *skb,
}

if (!(dev->flags & IFF_BROADCAST) &&
qeth_l3_get_cast_type(skb) == RTN_BROADCAST)
qeth_l3_get_cast_type(skb, proto) == RTN_BROADCAST)
goto tx_drop;

if (proto == htons(ETH_P_IP) || IS_IQD(card))
Expand Down Expand Up @@ -1831,8 +1830,10 @@ static netdev_features_t qeth_l3_osa_features_check(struct sk_buff *skb,
static u16 qeth_l3_iqd_select_queue(struct net_device *dev, struct sk_buff *skb,
struct net_device *sb_dev)
{
return qeth_iqd_select_queue(dev, skb, qeth_l3_get_cast_type(skb),
sb_dev);
__be16 proto = vlan_get_protocol(skb);

return qeth_iqd_select_queue(dev, skb,
qeth_l3_get_cast_type(skb, proto), sb_dev);
}

static u16 qeth_l3_osa_select_queue(struct net_device *dev, struct sk_buff *skb,
Expand Down

0 comments on commit c61dff3

Please sign in to comment.