Thread (32 messages) 32 messages, 4 authors, 2024-07-01

Re: [PATCH net-next v6 07/10] virtio_net: xsk: rx: support fill with xsk buffer

From: Paolo Abeni <pabeni@redhat.com>
Date: 2024-06-20 10:20:52
Also in: bpf, virtualization

Hi,

On Tue, 2024-06-18 at 15:56 +0800, Xuan Zhuo wrote:
quoted hunk ↗ jump to hunk
@@ -1032,6 +1034,53 @@ static void check_sq_full_and_disable(struct virtnet_info *vi,
 	}
 }
 
+static void sg_fill_dma(struct scatterlist *sg, dma_addr_t addr, u32 len)
+{
+	sg->dma_address = addr;
+	sg->length = len;
+}
+
+static int virtnet_add_recvbuf_xsk(struct virtnet_info *vi, struct receive_queue *rq,
+				   struct xsk_buff_pool *pool, gfp_t gfp)
+{
+	struct xdp_buff **xsk_buffs;
+	dma_addr_t addr;
+	u32 len, i;
+	int err = 0;
Minor nit: the reverse xmas tree order is based on the full line len,
should be:
	int err = 0;
	u32 len, i;

[...]
quoted hunk ↗ jump to hunk
@@ -2226,6 +2281,7 @@ static bool try_fill_recv(struct virtnet_info *vi, struct receive_queue *rq,
 		u64_stats_update_end_irqrestore(&rq->stats.syncp, flags);
 	}
 
+	oom = err == -ENOMEM;
 	return !oom;
Minor nit: 'oom' is used only in the above to lines. You could drop
such variable and just:
	return err != -ENOMEM;

Please _do not_ repost just for the above, but please include such
changes if you should repost for other reasons.

Also try to include a detailed changelog in each patch after the tag
area and a '---' separator, it will simplify the review process.

Thanks,

Paolo
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help