Alvaro Karsz
2023-Apr-30 18:15 UTC
[RFC PATCH net 0/3] virtio-net: allow usage of small vrings
> > This patchset follows a discussion in the mailing list [1]. > > > > This fixes only part of the bug, rings with less than 4 entries won't > > work. > > Why the difference? >Because the RING_SIZE < 4 case requires much more adjustments. * We may need to squeeze the virtio header into the headroom. * We may need to squeeze the GSO header into the headroom, or block the features. * At the moment, without NETIF_F_SG, we can receive a skb with 2 segments, we may need to reduce it to 1. * We may need to change all the control commands, so class, command and command specific data will fit in a single segment. * We may need to disable the control command and all the features depending on it. * We may need to disable NAPI? There may be more changes.. I was thinking that it may be easier to start with the easier case RING_SIZE >= 4, make sure everything is working fine, then send a follow up patchset with the required adjustments for RING_SIZE < 4.
Michael S. Tsirkin
2023-May-01 10:27 UTC
[RFC PATCH net 0/3] virtio-net: allow usage of small vrings
On Sun, Apr 30, 2023 at 06:15:03PM +0000, Alvaro Karsz wrote:> > > > This patchset follows a discussion in the mailing list [1]. > > > > > > This fixes only part of the bug, rings with less than 4 entries won't > > > work. > > > > Why the difference? > > > > Because the RING_SIZE < 4 case requires much more adjustments. > > * We may need to squeeze the virtio header into the headroom. > * We may need to squeeze the GSO header into the headroom, or block the features.We alread do this though no? I think we'll need to tweak hard_header_len to guarantee it's there as opposed to needed_headroom ...> * At the moment, without NETIF_F_SG, we can receive a skb with 2 segments, we may need to reduce it to 1.You are saying clearing NETIF_F_SG does not guarantee a linear skb?> * We may need to change all the control commands, so class, command and command specific data will fit in a single segment. > * We may need to disable the control command and all the features depending on it.well if we don't commands just fail as we can't add them right? no corruption or stalls ...> * We may need to disable NAPI?hmm why napi?> There may be more changes.. > > I was thinking that it may be easier to start with the easier case RING_SIZE >= 4, make sure everything is working fine, then send a follow up patchset with the required adjustments for RING_SIZE < 4.it's ok but I'm just trying to figure out where does 4 come from.
Reasonably Related Threads
- [RFC PATCH net 0/3] virtio-net: allow usage of small vrings
- [RFC PATCH net 0/3] virtio-net: allow usage of small vrings
- [RFC PATCH net 0/3] virtio-net: allow usage of small vrings
- Wrappers for vringh (was Re: [PATCHv2 vringh 1/3] remoteproc: Add support for vringh (Host vrings))
- Wrappers for vringh (was Re: [PATCHv2 vringh 1/3] remoteproc: Add support for vringh (Host vrings))