|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH v2 0/4] XenVif receive backpressure adjustments
This series on xenvif, and the cache logging change to xenbus
Reviewed-by: Owen Smith <owen.smith@xxxxxxxxxx>
________________________________________
From: win-pv-devel <win-pv-devel-bounces@xxxxxxxxxxxxxxxxxxxx> on behalf of Tu
Dinh <ngoc-tu.dinh@xxxxxxxxxx>
Sent: 15 July 2026 11:18 AM
To: win-pv-devel@xxxxxxxxxxxxxxxxxxxx
Cc: Tu Dinh
Subject: [PATCH v2 0/4] XenVif receive backpressure adjustments
Changes in v2:
* The error message in ReceiverPacketCtor() has been kept, since that
is a genuine OOM and not related to quota limits.
* The moving of __ReceiverRingReturnPacket has been split to a separate
patch.
* CacheCreateSlab quota errors now only suppressed in release builds.
To be accompanied with the Xenbus patch for suppressing quota-related
error messages in CacheCreateSlab.
Currently, traffic floods can cause anything from system lockups to
resource exhaustion (OOM) due to insufficient backpressure. The causes
are uncontrolled packet cache allocation, uncontrolled restarts and
queue DPC cascades.
An easy reproducer is to start a UDP flood from a Linux VM:
#!/bin/sh
set -e
IFACE="enX0" # replace with real VM's iface name
SRC_MAC="02:00:00:00:00:01"
DST_MAC="02:00:00:00:00:02" # replace with real victim VIF's MAC
DST_IP="192.0.2.1" # replace with real victim VIF's IP
UDP_PORT="9"
modprobe pktgen
PG=/proc/net/pktgen
echo rem_device_all > "$PG/kpktgend_0"
echo "add_device $IFACE" > "$PG/kpktgend_0"
echo clone_skb 1000 > "$PG/$IFACE"
echo pkt_size 60 > "$PG/$IFACE"
echo count 0 > "$PG/$IFACE"
echo delay 0 > "$PG/$IFACE"
echo "dst_mac $DST_MAC" > "$PG/$IFACE"
echo "src_mac $SRC_MAC" > "$PG/$IFACE"
echo "dst $DST_IP" > "$PG/$IFACE"
echo "dst_min $DST_IP" > "$PG/$IFACE"
echo "dst_max $DST_IP" > "$PG/$IFACE"
echo "udp_dst_min $UDP_PORT" > "$PG/$IFACE"
echo "udp_dst_max $UDP_PORT" > "$PG/$IFACE"
echo start > "$PG/pgctrl"
To stop:
echo stop > /proc/net/pktgen/pgctrl
The following patches attempt to address this problem by adding
backpressure at key exhaustion-prone locations (packet cache size, ring
restart behavior, ring unpause behavior). With these patches, the victim
VM's system and networking remain responsive throughout the flood.
Tu Dinh (4):
Cap the size of the receiver PacketCache
Move __ReceiverRingReturnPacket below ReceiverRingFill
Conditionally restart the RX ring from packet return
Avoid requeuing QueueDpc in __ReceiverRingSwizzle
src/xenvif/receiver.c | 109 +++++++++++++++++++++++-------------------
1 file changed, 61 insertions(+), 48 deletions(-)
--
2.54.0.windows.1
--
Ngoc Tu Dinh | Vates XCP-ng Developer
XCP-ng & Xen Orchestra - Vates solutions
web: https://vates.tech
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |