Re: [PATCH v3 net-next 14/14] mlx5: support BIG TCP packets
From: Eric Dumazet <edumazet@google.com>
Date: 2022-03-10 05:43:32
On Wed, Mar 9, 2022 at 9:40 PM Eric Dumazet [off-list ref] wrote:
On Wed, Mar 9, 2022 at 8:44 PM Jakub Kicinski [off-list ref] wrote:quoted
On Wed, 9 Mar 2022 16:28:46 -0800 Eric Dumazet wrote:quoted
@@ -918,12 +953,27 @@ void mlx5i_sq_xmit(struct mlx5e_txqsq *sq, struct sk_buff *skb, eseg->mss = attr.mss; if (attr.ihs) { - memcpy(eseg->inline_hdr.start, skb->data, attr.ihs); + if (unlikely(attr.hopbyhop)) { + /* remove the HBH header. + * Layout: [Ethernet header][IPv6 header][HBH][TCP header] + */ + memcpy(eseg->inline_hdr.start, skb->data, ETH_HLEN + sizeof(*h6)); + h6 = (struct ipv6hdr *)((char *)eseg->inline_hdr.start + ETH_HLEN); + h6->nexthdr = IPPROTO_TCP; + /* Copy the TCP header after the IPv6 one */ + memcpy(h6 + 1, + skb->data + ETH_HLEN + sizeof(*h6) + + sizeof(struct hop_jumbo_hdr), + tcp_hdrlen(skb)); + /* Leave ipv6 payload_len set to 0, as LSO v2 specs request. */ + } else { + memcpy(eseg->inline_hdr.start, skb->data, attr.ihs); + }Compiler says there's no h6 in mlx5i_sq_xmit().Ah, we missed CONFIG_MLX5_CORE_IPOIB=y it seems. Let me take a look before sending the fix.
I will squash this:
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_tx.cb/drivers/net/ethernet/mellanox/mlx5/core/en_tx.c index c6f6ca2d216692e1d3fd99e540198b11145788cd..b4fc45ba1b347fb9ad0f46b9c091cc45e4d3d84f 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en_tx.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en_tx.c@@ -954,6 +954,8 @@ void mlx5i_sq_xmit(struct mlx5e_txqsq *sq, structsk_buff *skb,
if (attr.ihs) {
if (unlikely(attr.hopbyhop)) {
+ struct ipv6hdr *h6;
+
/* remove the HBH header.
* Layout: [Ethernet header][IPv6
header][HBH][TCP header]
*/