Re: linux-next: manual merge of the vhost tree with the net-next tree

From: Stephen Rothwell
Date: Mon Jul 10 2023 - 21:01:14 EST


Hi all,

On Fri, 23 Jun 2023 13:04:43 +1000 Stephen Rothwell <sfr@xxxxxxxxxxxxxxxx> wrote:
>
> Today's linux-next merge of the vhost tree got a conflict in:
>
> drivers/net/virtio_net.c
>
> between commit:
>
> 80f50f918c6e ("virtio_net: separate the logic of freeing the rest mergeable buf")
>
> from the net-next tree and commit:
>
> 21081476b808 ("virtio_net: support dma premapped")

This is now commit

c8dc5b9adff9 ("virtio_net: support dma premapped")

> from the vhost tree.
>
> I fixed it up (see below) and can carry the fix as necessary. This
> is now fixed as far as linux-next is concerned, but any non trivial
> conflicts should be mentioned to your upstream maintainer when your tree
> is submitted for merging. You may also want to consider cooperating
> with the maintainer of the conflicting tree to minimise any particularly
> complex conflicts.
>
> diff --cc drivers/net/virtio_net.c
> index 0db14f6b87d3,d67b36fdba0d..000000000000
> --- a/drivers/net/virtio_net.c
> +++ b/drivers/net/virtio_net.c
> @@@ -1128,28 -1136,6 +1233,28 @@@ err
> return NULL;
> }
>
> +static void mergeable_buf_free(struct receive_queue *rq, int num_buf,
> + struct net_device *dev,
> + struct virtnet_rq_stats *stats)
> +{
> + struct page *page;
> + void *buf;
> + int len;
> +
> + while (num_buf-- > 1) {
> - buf = virtqueue_get_buf(rq->vq, &len);
> ++ buf = virtnet_rq_get_buf(rq, &len, NULL);
> + if (unlikely(!buf)) {
> + pr_debug("%s: rx error: %d buffers missing\n",
> + dev->name, num_buf);
> + dev->stats.rx_length_errors++;
> + break;
> + }
> + stats->bytes += len;
> + page = virt_to_head_page(buf);
> + put_page(page);
> + }
> +}
> +
> /* Why not use xdp_build_skb_from_frame() ?
> * XDP core assumes that xdp frags are PAGE_SIZE in length, while in
> * virtio-net there are 2 points that do not match its requirements:

This is now a conflict between the vhost tree and Linus' tree.

--
Cheers,
Stephen Rothwell

Attachment: pgp12469pCZkN.pgp
Description: OpenPGP digital signature