提交 f1588177 编写于 作者: J Julian Wiedmann 提交者: David S. Miller

s390/qeth: pass full IQD header length to fill_buffer()

This is a prerequisite for unifying the code to build header elements.
The TSO header has a different size, so we can no longer rely on implicitly
adding the size of a normal qeth_hdr.

No functional change.
Signed-off-by: NJulian Wiedmann <jwi@linux.vnet.ibm.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 9c3bfda9
...@@ -3981,8 +3981,7 @@ static int qeth_fill_buffer(struct qeth_qdio_out_q *queue, ...@@ -3981,8 +3981,7 @@ static int qeth_fill_buffer(struct qeth_qdio_out_q *queue,
is_first_elem = false; is_first_elem = false;
buffer->element[element].addr = hdr; buffer->element[element].addr = hdr;
buffer->element[element].length = sizeof(struct qeth_hdr) + buffer->element[element].length = hd_len;
hd_len;
buffer->element[element].eflags = SBAL_EFLAGS_FIRST_FRAG; buffer->element[element].eflags = SBAL_EFLAGS_FIRST_FRAG;
buf->is_header[element] = 1; buf->is_header[element] = 1;
buf->next_element_to_fill++; buf->next_element_to_fill++;
......
...@@ -695,7 +695,7 @@ static int qeth_l2_xmit_iqd(struct qeth_card *card, struct sk_buff *skb, ...@@ -695,7 +695,7 @@ static int qeth_l2_xmit_iqd(struct qeth_card *card, struct sk_buff *skb,
goto out; goto out;
} }
rc = qeth_do_send_packet_fast(card, queue, skb, hdr, data_offset, rc = qeth_do_send_packet_fast(card, queue, skb, hdr, data_offset,
data_offset); sizeof(*hdr) + data_offset);
out: out:
if (rc) if (rc)
kmem_cache_free(qeth_core_header_cache, hdr); kmem_cache_free(qeth_core_header_cache, hdr);
......
...@@ -2670,6 +2670,7 @@ static netdev_tx_t qeth_l3_hard_start_xmit(struct sk_buff *skb, ...@@ -2670,6 +2670,7 @@ static netdev_tx_t qeth_l3_hard_start_xmit(struct sk_buff *skb,
if (card->info.type == QETH_CARD_TYPE_IQD) { if (card->info.type == QETH_CARD_TYPE_IQD) {
new_skb = skb; new_skb = skb;
data_offset = ETH_HLEN; data_offset = ETH_HLEN;
hd_len = sizeof(*hdr);
hdr = kmem_cache_alloc(qeth_core_header_cache, GFP_ATOMIC); hdr = kmem_cache_alloc(qeth_core_header_cache, GFP_ATOMIC);
if (!hdr) if (!hdr)
goto tx_drop; goto tx_drop;
...@@ -2771,7 +2772,7 @@ static netdev_tx_t qeth_l3_hard_start_xmit(struct sk_buff *skb, ...@@ -2771,7 +2772,7 @@ static netdev_tx_t qeth_l3_hard_start_xmit(struct sk_buff *skb,
hd_len, elements); hd_len, elements);
} else } else
rc = qeth_do_send_packet_fast(card, queue, new_skb, hdr, rc = qeth_do_send_packet_fast(card, queue, new_skb, hdr,
data_offset, 0); data_offset, hd_len);
if (!rc) { if (!rc) {
card->stats.tx_packets++; card->stats.tx_packets++;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册