mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 03:27:44 -04:00
virtio: fixes, cleanups, performance
A bunch of changes to virtio, most affecting virtio net. ptr_ring batched zeroing - first of batching enhancements that seems ready. Signed-off-by: Michael S. Tsirkin <[email protected]> -----BEGIN PGP SIGNATURE----- iQEcBAABAgAGBQJZEceWAAoJECgfDbjSjVRpg8YIAIbB1UJZkrHh/fdCQjM2O53T ESS62W91LBT+weYH/N79RrfnGWzDOHrCQ8Or1nAKQZx2vU1aroqYXeJ9o0liRBYr hGZB1/bg8obA5XkKUfME2+XClakvuXABUJbky08iDL9nILlrvIVLoUgZ9ouL0vTj oUv4n6jtguNFV7tk/injGNRparEVdcefX0dbPxXomx5tSeD2fOE96/Q4q2eD3f7r NHD4DailEJC7ndJGa6b4M9g8shkXzgEnSw+OJHpcJcxCnAzkVT94vsU7OluiDvmG bfdGZNb0ohDYZLbJDR8aiMkoad8bIVLyGlhqnMBiZQEOF4oiWM9UJLvp5Lq9g7A= =Sb7L -----END PGP SIGNATURE----- Merge tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost Pull virtio updates from Michael Tsirkin: "Fixes, cleanups, performance A bunch of changes to virtio, most affecting virtio net. Also ptr_ring batched zeroing - first of batching enhancements that seems ready." * tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost: s390/virtio: change maintainership tools/virtio: fix spelling mistake: "wakeus" -> "wakeups" virtio_net: tidy a couple debug statements ptr_ring: support testing different batching sizes ringtest: support test specific parameters ptr_ring: batch ring zeroing virtio: virtio_driver doc virtio_net: don't reset twice on XDP on/off virtio_net: fix support for small rings virtio_net: reduce alignment for buffers virtio_net: rework mergeable buffer handling virtio_net: allow specifying context for rx virtio: allow extra context per descriptor tools/virtio: fix build breakage virtio: add context flag to find vqs virtio: wrap find_vqs ringtest: fix an assert statement
This commit is contained in:
commit
c44b594303
32 changed files with 330 additions and 146 deletions
|
|
@ -278,7 +278,7 @@ static void vop_del_vqs(struct virtio_device *dev)
|
|||
static struct virtqueue *vop_find_vq(struct virtio_device *dev,
|
||||
unsigned index,
|
||||
void (*callback)(struct virtqueue *vq),
|
||||
const char *name)
|
||||
const char *name, bool ctx)
|
||||
{
|
||||
struct _vop_vdev *vdev = to_vopvdev(dev);
|
||||
struct vop_device *vpdev = vdev->vpdev;
|
||||
|
|
@ -314,6 +314,7 @@ static struct virtqueue *vop_find_vq(struct virtio_device *dev,
|
|||
le16_to_cpu(config.num), MIC_VIRTIO_RING_ALIGN,
|
||||
dev,
|
||||
false,
|
||||
ctx,
|
||||
(void __force *)va, vop_notify, callback, name);
|
||||
if (!vq) {
|
||||
err = -ENOMEM;
|
||||
|
|
@ -374,7 +375,8 @@ unmap:
|
|||
static int vop_find_vqs(struct virtio_device *dev, unsigned nvqs,
|
||||
struct virtqueue *vqs[],
|
||||
vq_callback_t *callbacks[],
|
||||
const char * const names[], struct irq_affinity *desc)
|
||||
const char * const names[], const bool *ctx,
|
||||
struct irq_affinity *desc)
|
||||
{
|
||||
struct _vop_vdev *vdev = to_vopvdev(dev);
|
||||
struct vop_device *vpdev = vdev->vpdev;
|
||||
|
|
@ -388,7 +390,8 @@ static int vop_find_vqs(struct virtio_device *dev, unsigned nvqs,
|
|||
for (i = 0; i < nvqs; ++i) {
|
||||
dev_dbg(_vop_dev(vdev), "%s: %d: %s\n",
|
||||
__func__, i, names[i]);
|
||||
vqs[i] = vop_find_vq(dev, i, callbacks[i], names[i]);
|
||||
vqs[i] = vop_find_vq(dev, i, callbacks[i], names[i],
|
||||
ctx ? ctx[i] : false);
|
||||
if (IS_ERR(vqs[i])) {
|
||||
err = PTR_ERR(vqs[i]);
|
||||
goto error;
|
||||
|
|
|
|||
Loading…
Reference in a new issue