[PATCH v2 11/20] net/virtio: annotate lock for guest announce

Maxime Coquelin maxime.coquelin at redhat.com
Thu Mar 2 10:28:50 CET 2023


On 3/2/23 10:26, David Marchand wrote:
> On Mon, Feb 27, 2023 at 5:28 PM Maxime Coquelin
> <maxime.coquelin at redhat.com> wrote:
>> As discussed with David off-list, I think we could simplify and inline
>> virtio_dev_pause()/virtio_dev_resume() into virtio_notify_peers() since
>> there are no other users of these functions (see below).
> 
> I was looking at doing this and, as we discussed offlist, realised
> what the "inject" code was doing.
> 
> I don't like the idea of keeping virtio_inject_pkts as a helper.
> This is tightly linked to the hw->started + usleep() trick, and this
> code has no check about its requirement on hw->started == 0.
> I'd rather "inline" and remove this helper too.

Makes sense, do you want to submit it or are you willing me to do it?

> As a second step, I wrote a fix using an additional lock per txq to
> remove this usleep() thing.
> Though I think it is too late to consider merging this new change in
> the release.
> WDYT?

I agree this is too late for this release. Let's try this for v23.07.

Thanks,
Maxime



More information about the dev mailing list