From: Dimitris Michailidis <dm@chelsio.com>
To: netdev@vger.kernel.org
Cc: Dimitris Michailidis <dm@chelsio.com>
Subject: [PATCH net-next 3/9] cxgb4: fix TSO descriptors
Date: Mon, 2 Aug 2010 16:19:18 -0700 [thread overview]
Message-ID: <1280791164-14181-4-git-send-email-dm@chelsio.com> (raw)
In-Reply-To: <1280791164-14181-3-git-send-email-dm@chelsio.com>
Commit 1704d74894912b8ecc3e95cecd7bde336a0b1bf2 ("cxgb4vf: small changes
to message processing structures/macros") was incomplete and causes cxgb4
to write bad TSO descriptors. Fix that up by reverting the offending part
of that commit and adjusting field accesses now that they are one level
deeper.
Signed-off-by: Dimitris Michailidis <dm@chelsio.com>
---
drivers/net/cxgb4/sge.c | 22 +++++++++++-----------
1 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/drivers/net/cxgb4/sge.c b/drivers/net/cxgb4/sge.c
index 304302a..5cacfc7 100644
--- a/drivers/net/cxgb4/sge.c
+++ b/drivers/net/cxgb4/sge.c
@@ -931,23 +931,23 @@ out_free: dev_kfree_skb(skb);
ssi = skb_shinfo(skb);
if (ssi->gso_size) {
- struct cpl_tx_pkt_lso_core *lso = (void *)(wr + 1);
+ struct cpl_tx_pkt_lso *lso = (void *)wr;
bool v6 = (ssi->gso_type & SKB_GSO_TCPV6) != 0;
int l3hdr_len = skb_network_header_len(skb);
int eth_xtra_len = skb_network_offset(skb) - ETH_HLEN;
wr->op_immdlen = htonl(FW_WR_OP(FW_ETH_TX_PKT_WR) |
FW_WR_IMMDLEN(sizeof(*lso)));
- lso->lso_ctrl = htonl(LSO_OPCODE(CPL_TX_PKT_LSO) |
- LSO_FIRST_SLICE | LSO_LAST_SLICE |
- LSO_IPV6(v6) |
- LSO_ETHHDR_LEN(eth_xtra_len / 4) |
- LSO_IPHDR_LEN(l3hdr_len / 4) |
- LSO_TCPHDR_LEN(tcp_hdr(skb)->doff));
- lso->ipid_ofst = htons(0);
- lso->mss = htons(ssi->gso_size);
- lso->seqno_offset = htonl(0);
- lso->len = htonl(skb->len);
+ lso->c.lso_ctrl = htonl(LSO_OPCODE(CPL_TX_PKT_LSO) |
+ LSO_FIRST_SLICE | LSO_LAST_SLICE |
+ LSO_IPV6(v6) |
+ LSO_ETHHDR_LEN(eth_xtra_len / 4) |
+ LSO_IPHDR_LEN(l3hdr_len / 4) |
+ LSO_TCPHDR_LEN(tcp_hdr(skb)->doff));
+ lso->c.ipid_ofst = htons(0);
+ lso->c.mss = htons(ssi->gso_size);
+ lso->c.seqno_offset = htonl(0);
+ lso->c.len = htonl(skb->len);
cpl = (void *)(lso + 1);
cntrl = TXPKT_CSUM_TYPE(v6 ? TX_CSUM_TCPIP6 : TX_CSUM_TCPIP) |
TXPKT_IPHDR_LEN(l3hdr_len) |
--
1.5.4
next prev parent reply other threads:[~2010-08-02 23:19 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-08-02 23:19 [PATCH net-next 0/9] cxgb4 updates Dimitris Michailidis
2010-08-02 23:19 ` [PATCH net-next 1/9] cxgb4: disable an interrupt that is neither used nor serviced Dimitris Michailidis
2010-08-02 23:19 ` [PATCH net-next 2/9] cxgb4: don't offload Rx checksums for IPv6 fragments Dimitris Michailidis
2010-08-02 23:19 ` Dimitris Michailidis [this message]
2010-08-02 23:19 ` [PATCH net-next 4/9] cxgb4: get on-chip queue info from FW and create a memory window for them Dimitris Michailidis
2010-08-02 23:19 ` [PATCH net-next 5/9] cxgb4: advertise NETIF_F_TSO_ECN Dimitris Michailidis
2010-08-02 23:19 ` [PATCH net-next 6/9] cxgb4: support running the driver on PCI functions besides 0 Dimitris Michailidis
2010-08-02 23:19 ` [PATCH net-next 7/9] cxgb4: fix wrong shift direction Dimitris Michailidis
2010-08-02 23:19 ` [PATCH net-next 8/9] cxgb4: add new PCI IDs Dimitris Michailidis
2010-08-02 23:19 ` [PATCH net-next 9/9] cxgb4: update driver version Dimitris Michailidis
2010-08-02 23:27 ` [PATCH net-next 0/9] cxgb4 updates David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1280791164-14181-4-git-send-email-dm@chelsio.com \
--to=dm@chelsio.com \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).