lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Message-ID: <20231015191756.GD1386676@kernel.org> Date: Sun, 15 Oct 2023 21:17:56 +0200 From: Simon Horman <horms@...nel.org> To: Xuan Zhuo <xuanzhuo@...ux.alibaba.com> Cc: virtualization@...ts.linux-foundation.org, "David S. Miller" <davem@...emloft.net>, Eric Dumazet <edumazet@...gle.com>, Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>, "Michael S. Tsirkin" <mst@...hat.com>, Jason Wang <jasowang@...hat.com>, Alexei Starovoitov <ast@...nel.org>, Daniel Borkmann <daniel@...earbox.net>, Jesper Dangaard Brouer <hawk@...nel.org>, John Fastabend <john.fastabend@...il.com>, netdev@...r.kernel.org, bpf@...r.kernel.org Subject: Re: [PATCH vhost 12/22] virtio_net: xsk: bind/unbind xsk On Wed, Oct 11, 2023 at 05:27:18PM +0800, Xuan Zhuo wrote: ... > +static int virtnet_xsk_pool_disable(struct net_device *dev, u16 qid) > +{ > + struct virtnet_info *vi = netdev_priv(dev); > + struct device *dma_dev; > + struct virtnet_rq *rq; > + struct virtnet_sq *sq; > + int err1, err2; > + > + if (qid >= vi->curr_queue_pairs) > + return -EINVAL; > + > + sq = &vi->sq[qid]; > + rq = &vi->rq[qid]; > + > + dma_dev = virtqueue_dma_dev(rq->vq); > + > + dma_unmap_single(dma_dev, sq->xsk.hdr_dma_address, vi->hdr_len, DMA_TO_DEVICE); > + > + xsk_pool_dma_unmap(sq->xsk.pool, 0); nit: the line above makes Sparse a bit unhappy: .../xsk.c:168:35: warning: incorrect type in argument 1 (different address spaces) .../xsk.c:168:35: expected struct xsk_buff_pool *pool .../xsk.c:168:35: got struct xsk_buff_pool [noderef] __rcu *pool > + > + /* Sync with the XSK wakeup and with NAPI. */ > + synchronize_net(); > + > + err1 = virtnet_sq_bind_xsk_pool(vi, sq, NULL); > + err2 = virtnet_rq_bind_xsk_pool(vi, rq, NULL); > + > + return err1 | err2; > +} ...
Powered by blists - more mailing lists