Commit a875fd16 authored by Julian Wiedmann's avatar Julian Wiedmann Committed by David S. Miller

s390/qeth: indicate contiguous TX buffer elements

The TX path usually maps the full content of a page into a buffer
element. But there's specific skb layouts (ie. linearized TSO skbs)
where the HW header (1) requires a separate buffer element, and (2) is
page-contiguous with the packet data that's mapped into the next buffer
element.
Flag such buffer elements accordingly, so that HW can optimize its data
access for them.
Signed-off-by: default avatarJulian Wiedmann <jwi@linux.ibm.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent fff1aceb
...@@ -4110,8 +4110,16 @@ static unsigned int qeth_fill_buffer(struct qeth_qdio_out_buffer *buf, ...@@ -4110,8 +4110,16 @@ static unsigned int qeth_fill_buffer(struct qeth_qdio_out_buffer *buf,
buffer->element[element].addr = virt_to_phys(hdr); buffer->element[element].addr = virt_to_phys(hdr);
buffer->element[element].length = hd_len; buffer->element[element].length = hd_len;
buffer->element[element].eflags = SBAL_EFLAGS_FIRST_FRAG; buffer->element[element].eflags = SBAL_EFLAGS_FIRST_FRAG;
/* remember to free cache-allocated HW header: */
buf->is_header[element] = ((void *)hdr != skb->data); /* HW header is allocated from cache: */
if ((void *)hdr != skb->data)
buf->is_header[element] = 1;
/* HW header was pushed and is contiguous with linear part: */
else if (length > 0 && !PAGE_ALIGNED(data) &&
(data == (char *)hdr + hd_len))
buffer->element[element].eflags |=
SBAL_EFLAGS_CONTIGUOUS;
element++; element++;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment