From nobody Mon May 20 01:44:51 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail(p=quarantine dis=none) header.from=akamai.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1542812735603226.89807948646194; Wed, 21 Nov 2018 07:05:35 -0800 (PST) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 9F618A0378; Wed, 21 Nov 2018 15:05:32 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 9F1C95C265; Wed, 21 Nov 2018 15:05:31 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id A0F9412E36; Wed, 21 Nov 2018 15:05:28 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id wALF5QHi029366 for ; Wed, 21 Nov 2018 10:05:26 -0500 Received: by smtp.corp.redhat.com (Postfix) id B2B167EFEA; Wed, 21 Nov 2018 15:05:26 +0000 (UTC) Received: from mx1.redhat.com (ext-mx14.extmail.prod.ext.phx2.redhat.com [10.5.110.43]) by smtp.corp.redhat.com (Postfix) with ESMTPS id C708B8271A; Wed, 21 Nov 2018 15:05:21 +0000 (UTC) Received: from mx0b-00190b01.pphosted.com (mx0b-00190b01.pphosted.com [67.231.157.127]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 473E33002E1F; Wed, 21 Nov 2018 15:05:16 +0000 (UTC) Received: from pps.filterd (m0050096.ppops.net [127.0.0.1]) by m0050096.ppops.net-00190b01. (8.16.0.27/8.16.0.27) with SMTP id wALEvSkr009509; Wed, 21 Nov 2018 15:05:12 GMT Received: from prod-mail-ppoint1 (prod-mail-ppoint1.akamai.com [184.51.33.18]) by m0050096.ppops.net-00190b01. with ESMTP id 2nvty42thc-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 21 Nov 2018 15:05:12 +0000 Received: from pps.filterd (prod-mail-ppoint1.akamai.com [127.0.0.1]) by prod-mail-ppoint1.akamai.com (8.16.0.21/8.16.0.21) with SMTP id wALEokfv010597; Wed, 21 Nov 2018 10:05:11 -0500 Received: from prod-mail-relay10.akamai.com ([172.27.118.251]) by prod-mail-ppoint1.akamai.com with ESMTP id 2ntf70bc1r-1; Wed, 21 Nov 2018 10:05:11 -0500 Received: from bos-lpjec.kendall.corp.akamai.com (bos-lpjec.kendall.corp.akamai.com [172.28.12.125]) by prod-mail-relay10.akamai.com (Postfix) with ESMTP id 409301FCD8; Wed, 21 Nov 2018 15:05:11 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=akamai.com; h=from : to : cc : subject : date : message-id; s=jan2016.eng; bh=lT8EGfoxZWovp4amQ+F2I4oRFjF9sC7C6HEiFBBUFko=; b=it1q5sufSvZTL/aggjgy7duj03DF7+tLCNo9bU0ohM8N/Yl0F6YmBq9K9sxqFc5+axsO 8LQrDpzpBp6Z87Rc95+ZHQjXG83xSvabo9jQA+Qr5KthFEl34BAsI+uLIqcMwd9X4hFM 0dFWbr62SQKmTTwMegsTEyaZeB+F23pe6EE2D+bPPDbKdDUDJCj3lcbrlH3357Z0sHiA kcpgrWIGt3DcVfGVMHrWICc9XfpkmWNS6nd3X42LWzr6C7fotURzE3fny8/f31HnycL1 b+7c5k1JPHxT9mGbcsvjigy6N9hV6UhuS/X6NZ18U3JynSbSMdU4ea2E5PFYktwPQ83u 0Q== From: Jason Baron To: libvir-list@redhat.com Date: Wed, 21 Nov 2018 10:04:56 -0500 Message-Id: <1542812696-27642-1-git-send-email-jbaron@akamai.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2018-11-21_05:, , signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=1 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1811210129 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2018-11-21_05:, , signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 priorityscore=1501 malwarescore=0 suspectscore=1 phishscore=0 bulkscore=0 spamscore=0 clxscore=1011 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1811210130 X-Greylist: Sender passed SPF test, Sender IP whitelisted by DNSRBL, ACL 216 matched, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.43]); Wed, 21 Nov 2018 15:05:16 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.43]); Wed, 21 Nov 2018 15:05:16 +0000 (UTC) for IP:'67.231.157.127' DOMAIN:'mx0b-00190b01.pphosted.com' HELO:'mx0b-00190b01.pphosted.com' FROM:'jbaron@akamai.com' RCPT:'' X-RedHat-Spam-Score: -1.57 (DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, RCVD_IN_DNSWL_NONE) 67.231.157.127 mx0b-00190b01.pphosted.com 67.231.157.127 mx0b-00190b01.pphosted.com X-Scanned-By: MIMEDefang 2.84 on 10.5.110.43 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-loop: libvir-list@redhat.com Cc: laine@laine.org, mst@redhat.com Subject: [libvirt] [PATCH] qemu: handle multicast overflow on macvtap for NIC_RX_FILTER_CHANGED X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Wed, 21 Nov 2018 15:05:33 +0000 (UTC) X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" Guest network devices can set 'overflow' when there are a number of multica= st ips configured. For virtio_net, the limit is only 64. In this case, the list of mac addresses is empty and the 'overflow' condition is set. Thus, the gu= est will currently receive no multicast traffic in this state. When 'overflow' is set in the guest, let's turn this into ALLMULTI on the h= ost. Signed-off-by: Jason Baron Acked-by: Michael S. Tsirkin --- src/qemu/qemu_driver.c | 26 +++++++++++++++++++------- 1 file changed, 19 insertions(+), 7 deletions(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 7fb9102..ea36db8 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -4443,11 +4443,11 @@ static void syncNicRxFilterMultiMode(char *ifname, virNetDevRxFilterPtr guestFilter, virNetDevRxFilterPtr hostFilter) { - if (hostFilter->multicast.mode !=3D guestFilter->multicast.mode) { + if (hostFilter->multicast.mode !=3D guestFilter->multicast.mode || + guestFilter->multicast.overflow) { switch (guestFilter->multicast.mode) { case VIR_NETDEV_RX_FILTER_MODE_ALL: if (virNetDevSetRcvAllMulti(ifname, true)) { - VIR_WARN("Couldn't set allmulticast flag to 'on' for " "device %s while responding to " "NIC_RX_FILTER_CHANGED", ifname); @@ -4455,17 +4455,29 @@ syncNicRxFilterMultiMode(char *ifname, virNetDevRxF= ilterPtr guestFilter, break; =20 case VIR_NETDEV_RX_FILTER_MODE_NORMAL: - if (virNetDevSetRcvMulti(ifname, true)) { + if (guestFilter->multicast.overflow && + (hostFilter->multicast.mode =3D=3D VIR_NETDEV_RX_FILTE= R_MODE_ALL)) { + break; + } =20 + if (virNetDevSetRcvMulti(ifname, true)) { VIR_WARN("Couldn't set multicast flag to 'on' for " "device %s while responding to " "NIC_RX_FILTER_CHANGED", ifname); } =20 - if (virNetDevSetRcvAllMulti(ifname, false)) { - VIR_WARN("Couldn't set allmulticast flag to 'off' for " - "device %s while responding to " - "NIC_RX_FILTER_CHANGED", ifname); + if (guestFilter->multicast.overflow =3D=3D true) { + if (virNetDevSetRcvAllMulti(ifname, true)) { + VIR_WARN("Couldn't set allmulticast flag to 'on' f= or " + "device %s while responding to " + "NIC_RX_FILTER_CHANGED", ifname); + } + } else { + if (virNetDevSetRcvAllMulti(ifname, false)) { + VIR_WARN("Couldn't set allmulticast flag to 'off'= for " + "device %s while responding to " + "NIC_RX_FILTER_CHANGED", ifname); + } } break; =20 --=20 2.7.4 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list