s390/qeth: clean up Output Queue selection
Consolidate duplicated code, fix the misuse of RTN_UNSPEC and simplify the handling of non-unicast traffic on IQD devices. Signed-off-by: Julian Wiedmann <jwi@linux.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
9aa17df3b8
commit
86c0cdb9e0
@@ -185,12 +185,12 @@ static void qeth_l2_del_all_macs(struct qeth_card *card)
|
||||
static int qeth_l2_get_cast_type(struct qeth_card *card, struct sk_buff *skb)
|
||||
{
|
||||
if (card->info.type == QETH_CARD_TYPE_OSN)
|
||||
return RTN_UNSPEC;
|
||||
return RTN_UNICAST;
|
||||
if (is_broadcast_ether_addr(skb->data))
|
||||
return RTN_BROADCAST;
|
||||
if (is_multicast_ether_addr(skb->data))
|
||||
return RTN_MULTICAST;
|
||||
return RTN_UNSPEC;
|
||||
return RTN_UNICAST;
|
||||
}
|
||||
|
||||
static void qeth_l2_fill_header(struct qeth_hdr *hdr, struct sk_buff *skb,
|
||||
@@ -768,18 +768,13 @@ static netdev_tx_t qeth_l2_hard_start_xmit(struct sk_buff *skb,
|
||||
int tx_bytes = skb->len;
|
||||
int rc;
|
||||
|
||||
if (card->qdio.do_prio_queueing || (cast_type &&
|
||||
card->info.is_multicast_different))
|
||||
queue = card->qdio.out_qs[qeth_get_priority_queue(card, skb,
|
||||
ipv, cast_type)];
|
||||
else
|
||||
queue = card->qdio.out_qs[card->qdio.default_out_queue];
|
||||
|
||||
if ((card->state != CARD_STATE_UP) || !card->lan_online) {
|
||||
card->stats.tx_carrier_errors++;
|
||||
goto tx_drop;
|
||||
}
|
||||
|
||||
queue = qeth_get_tx_queue(card, skb, ipv, cast_type);
|
||||
|
||||
if (card->options.performance_stats) {
|
||||
card->perf_stats.outbound_cnt++;
|
||||
card->perf_stats.outbound_start_time = qeth_get_micros();
|
||||
|
Reference in New Issue
Block a user