Jason Wang
2017-Sep-01 03:08 UTC
[PATCH net-next] virtio-net: invoke zerocopy callback on xmit path if no tx napi
On 2017?08?30? 11:11, Willem de Bruijn wrote:> On Tue, Aug 29, 2017 at 9:45 PM, Jason Wang <jasowang at redhat.com> wrote: >> >> On 2017?08?30? 03:35, Willem de Bruijn wrote: >>> On Fri, Aug 25, 2017 at 9:03 PM, Willem de Bruijn >>> <willemdebruijn.kernel at gmail.com> wrote: >>>> On Fri, Aug 25, 2017 at 7:32 PM, Michael S. Tsirkin <mst at redhat.com> >>>> wrote: >>>>> On Fri, Aug 25, 2017 at 06:44:36PM -0400, Willem de Bruijn wrote:[...]>>> Incomplete results at this stage, but I do see this correlation between >>> flows. It occurs even while not running out of zerocopy descriptors, >>> which I cannot yet explain. >>> >>> Running two threads in a guest, each with a udp socket, each >>> sending up to 100 datagrams, or until EAGAIN, every msec. >>> >>> Sender A sends 1B datagrams. >>> Sender B sends VHOST_GOODCOPY_LEN, which is enough >>> to trigger zcopy_used in vhost net. >>> >>> A local receive process on the host receives both flows. To avoid >>> a deep copy when looping the packet onto the receive path, >>> changed skb_orphan_frags_rx to always return false (gross hack). >>> >>> The flow with the larger packets is redirected through netem on ifb0: >>> >>> modprobe ifb >>> ip link set dev ifb0 up >>> tc qdisc add dev ifb0 root netem limit $LIMIT rate 1MBit >>> >>> tc qdisc add dev tap0 ingress >>> tc filter add dev tap0 parent ffff: protocol ip \ >>> u32 match ip dport 8000 0xffff \ >>> action mirred egress redirect dev ifb0 >>> >>> For 10 second run, packet count with various ifb0 queue lengths $LIMIT: >>> >>> no filter >>> rx.A: ~840,000 >>> rx.B: ~840,000 >> >> Just to make sure I understand the case here. What did rx.B mean here? I >> thought all traffic sent by Sender B has been redirected to ifb0? > It has been, but the packet still arrives at the destination socket. > IFB is a special virtual device that applies traffic shaping and > then reinjects it back at the point it was intercept by mirred. > > rx.B is indeed arrival rate at the receiver, similar to rx.A. >I see, then ifb looks pretty fit to the test.
Apparently Analagous Threads
- [PATCH net-next] virtio-net: invoke zerocopy callback on xmit path if no tx napi
- [PATCH net-next] virtio-net: invoke zerocopy callback on xmit path if no tx napi
- [PATCH net-next] virtio-net: invoke zerocopy callback on xmit path if no tx napi
- [PATCH net-next] virtio-net: invoke zerocopy callback on xmit path if no tx napi
- [PATCH net-next v2] vhost_net: do not stall on zerocopy depletion