qeth: rework TSO functions
The maximum TSO size OSA can handle is 15 * PAGE_SIZE. This patch reduces gso_max_size to this value and adds some sanity checks and statistics to the TSO implementation. Since only layer 3 is able to do TSO move all TSO related functions to the qeth_l3 module. Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
aa90922479
commit
c3b4a740db
@@ -270,41 +270,6 @@ int qeth_realloc_buffer_pool(struct qeth_card *card, int bufcnt)
|
||||
return qeth_alloc_buffer_pool(card);
|
||||
}
|
||||
|
||||
int qeth_set_large_send(struct qeth_card *card,
|
||||
enum qeth_large_send_types type)
|
||||
{
|
||||
int rc = 0;
|
||||
|
||||
if (card->dev == NULL) {
|
||||
card->options.large_send = type;
|
||||
return 0;
|
||||
}
|
||||
if (card->state == CARD_STATE_UP)
|
||||
netif_tx_disable(card->dev);
|
||||
card->options.large_send = type;
|
||||
switch (card->options.large_send) {
|
||||
case QETH_LARGE_SEND_TSO:
|
||||
if (qeth_is_supported(card, IPA_OUTBOUND_TSO)) {
|
||||
card->dev->features |= NETIF_F_TSO | NETIF_F_SG |
|
||||
NETIF_F_HW_CSUM;
|
||||
} else {
|
||||
card->dev->features &= ~(NETIF_F_TSO | NETIF_F_SG |
|
||||
NETIF_F_HW_CSUM);
|
||||
card->options.large_send = QETH_LARGE_SEND_NO;
|
||||
rc = -EOPNOTSUPP;
|
||||
}
|
||||
break;
|
||||
default: /* includes QETH_LARGE_SEND_NO */
|
||||
card->dev->features &= ~(NETIF_F_TSO | NETIF_F_SG |
|
||||
NETIF_F_HW_CSUM);
|
||||
break;
|
||||
}
|
||||
if (card->state == CARD_STATE_UP)
|
||||
netif_wake_queue(card->dev);
|
||||
return rc;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(qeth_set_large_send);
|
||||
|
||||
static int qeth_issue_next_read(struct qeth_card *card)
|
||||
{
|
||||
int rc;
|
||||
@@ -4460,6 +4425,7 @@ static struct {
|
||||
{"tx do_QDIO time"},
|
||||
{"tx do_QDIO count"},
|
||||
{"tx csum"},
|
||||
{"tx lin"},
|
||||
};
|
||||
|
||||
int qeth_core_get_sset_count(struct net_device *dev, int stringset)
|
||||
@@ -4517,6 +4483,7 @@ void qeth_core_get_ethtool_stats(struct net_device *dev,
|
||||
data[31] = card->perf_stats.outbound_do_qdio_time;
|
||||
data[32] = card->perf_stats.outbound_do_qdio_cnt;
|
||||
data[33] = card->perf_stats.tx_csum;
|
||||
data[34] = card->perf_stats.tx_lin;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(qeth_core_get_ethtool_stats);
|
||||
|
||||
|
Reference in New Issue
Block a user