From: Simon Horman <horms@kernel.org>
To: Harshitha Ramamurthy <hramamurthy@google.com>
Cc: netdev@vger.kernel.org, jeroendb@google.com,
andrew+netdev@lunn.ch, davem@davemloft.net, edumazet@google.com,
kuba@kernel.org, pabeni@redhat.com, willemb@google.com,
pkaligineedi@google.com, joshwash@google.com,
linux-kernel@vger.kernel.org,
Mina Almasry <almasrymina@google.com>,
Ziwei Xiao <ziweixiao@google.com>
Subject: Re: [PATCH net-next] gve: support unreadable netmem
Date: Thu, 24 Jul 2025 12:57:22 +0100 [thread overview]
Message-ID: <20250724115722.GK1150792@horms.kernel.org> (raw)
In-Reply-To: <20250723222829.3528565-1-hramamurthy@google.com>
On Wed, Jul 23, 2025 at 10:28:29PM +0000, Harshitha Ramamurthy wrote:
...
> diff --git a/drivers/net/ethernet/google/gve/gve_rx_dqo.c b/drivers/net/ethernet/google/gve/gve_rx_dqo.c
...
> @@ -793,13 +811,19 @@ static int gve_rx_dqo(struct napi_struct *napi, struct gve_rx_ring *rx,
> rx->rx_hsplit_unsplit_pkt += unsplit;
> rx->rx_hsplit_bytes += hdr_len;
> u64_stats_update_end(&rx->statss);
> + } else if (!rx->ctx.skb_head && rx->dqo.page_pool &&
> + netmem_is_net_iov(buf_state->page_info.netmem)) {
> + /* when header split is disabled, the header went to the packet
> + * buffer. If the packet buffer is a net_iov, those can't be
> + * easily mapped into the kernel space to access the header
> + * required to process the packet.
> + */
> + gve_free_buffer(rx, buf_state);
> + return -EFAULT;
nit: I think it would be nice to consistently handle error paths
in this function using goto error.
> }
>
> /* Sync the portion of dma buffer for CPU to read. */
> - dma_sync_single_range_for_cpu(&priv->pdev->dev, buf_state->addr,
> - buf_state->page_info.page_offset +
> - buf_state->page_info.pad,
> - buf_len, DMA_FROM_DEVICE);
> + gve_dma_sync(priv, rx, buf_state, buf_len);
>
> /* Append to current skb if one exists. */
> if (rx->ctx.skb_head) {
prev parent reply other threads:[~2025-07-24 11:57 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-23 22:28 Harshitha Ramamurthy
2025-07-24 11:57 ` Simon Horman [this message]
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=20250724115722.GK1150792@horms.kernel.org \
--to=horms@kernel.org \
--cc=almasrymina@google.com \
--cc=andrew+netdev@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=hramamurthy@google.com \
--cc=jeroendb@google.com \
--cc=joshwash@google.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=pkaligineedi@google.com \
--cc=willemb@google.com \
--cc=ziweixiao@google.com \
/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
all inboxes | Powered by JetHome®