From: "Kasai Takanori" Subject: [PATCH] Exceed maximum number of ioemu's NIC for VNIF. Date: Wed, 30 May 2007 22:34:23 +0900 Message-ID: <0cc201c7a2bf$415792e0$dab2220a@VF03007L> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_NextPart_000_0CBF_01C7A30A.ABFC2F20" Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel List-Id: xen-devel@lists.xenproject.org This is a multi-part message in MIME format. ------=_NextPart_000_0CBF_01C7A30A.ABFC2F20 Content-Type: text/plain; format=flowed; charset="iso-2022-jp"; reply-type=original Content-Transfer-Encoding: 7bit Hi All, We tested the PV driver on HVM domain. When ten vif was defined in configuration file for VNIF, the HVM domain was not able to be created. ---------------------------------------------------------- # grep vif RHEL5GA_test.conf vif = [ 'mac=02:17:42:2f:01:11, bridge=xenbr0', 'mac=02:17:42:2f:03:11, bridge=xenbr2', 'mac=02:17:42:2f:01:12, bridge=xenbr0', 'mac=02:17:42:2f:03:12, bridge=xenbr2', 'mac=02:17:42:2f:01:13, bridge=xenbr0', 'mac=02:17:42:2f:03:13, bridge=xenbr2', 'mac=02:17:42:2f:01:14, bridge=xenbr0', 'mac=02:17:42:2f:03:14, bridge=xenbr2', 'mac=02:17:42:2f:01:15, bridge=xenbr0', 'mac=02:17:42:2f:03:15, bridge=xenbr2' ] # xm create -f RHEL5GA.conf Using config file "./RHEL5GA.conf". Started domain RHEL5GA # xm list Name ID Mem VCPUs State Time(s) Domain-0 0 1024 4 r----- 291.1 RHEL5GA 10 2048 1 ------ 0.0 # cat /var/log/xen/qemu-XXX.log domid: 10 qemu: the number of cpus is 1 Too Many NICs ---------------------------------------------------------- The cause is to exceed the number of maximum in ioemu NIC.(MAX_NICS=8) However, VNIF can be used because of nine more expanding grant table. We usually use and operate VNIF of ten or more. Even if the maximum number of ioemu NICs is exceeded when VNIF is used, the HVM domain should be able to be created. It was corrected that ioemu disregarded it when the maximum number of NIC was exceeded. It has been confirmed that the problem solves by this patch. Signed-off-by: Takanori Kasai Signed-off-by: Tsunehisa Doi Best Regards, -- Takanori Kasai ------=_NextPart_000_0CBF_01C7A30A.ABFC2F20 Content-Type: application/octet-stream; name="exceed-ioemu-max-nics-for-vnif.patch" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="exceed-ioemu-max-nics-for-vnif.patch" # HG changeset patch=0A= # User kasai.takanori@jp.fujitsu.com=0A= # Date 1180525386 -32400=0A= # Node ID f62da1e67aa00e9c50368240a3b692b659d4fd97=0A= # Parent c1681085bf42c8fa639774ac91f3ca8fd2b127a0=0A= Exceed maximum number of ioemu's NIC for VNIF.=0A= =0A= Signed-off-by: Takanori Kasai =0A= Signed-off-by: Tsunehisa Doi =0A= =0A= diff -r c1681085bf42 -r f62da1e67aa0 tools/ioemu/vl.c=0A= --- a/tools/ioemu/vl.c Wed May 30 20:29:38 2007 +0900=0A= +++ b/tools/ioemu/vl.c Wed May 30 20:43:06 2007 +0900=0A= @@ -3963,30 +3963,31 @@ static int net_client_init(const char *s=0A= NICInfo *nd;=0A= uint8_t *macaddr;=0A= =0A= - if (nb_nics >=3D MAX_NICS) {=0A= + if (nb_nics < MAX_NICS) {=0A= + nd =3D &nd_table[nb_nics];=0A= + macaddr =3D nd->macaddr;=0A= + macaddr[0] =3D 0x52;=0A= + macaddr[1] =3D 0x54;=0A= + macaddr[2] =3D 0x00;=0A= + macaddr[3] =3D 0x12;=0A= + macaddr[4] =3D 0x34;=0A= + macaddr[5] =3D 0x56 + nb_nics;=0A= +=0A= + if (get_param_value(buf, sizeof(buf), "macaddr", p)) {=0A= + if (parse_macaddr(macaddr, buf) < 0) {=0A= + fprintf(stderr, "invalid syntax for ethernet = address\n");=0A= + return -1;=0A= + }=0A= + }=0A= + if (get_param_value(buf, sizeof(buf), "model", p)) {=0A= + nd->model =3D strdup(buf);=0A= + }=0A= + nd->vlan =3D vlan;=0A= + nb_nics++;=0A= + }=0A= + else {=0A= fprintf(stderr, "Too Many NICs\n");=0A= - return -1;=0A= - }=0A= - nd =3D &nd_table[nb_nics];=0A= - macaddr =3D nd->macaddr;=0A= - macaddr[0] =3D 0x52;=0A= - macaddr[1] =3D 0x54;=0A= - macaddr[2] =3D 0x00;=0A= - macaddr[3] =3D 0x12;=0A= - macaddr[4] =3D 0x34;=0A= - macaddr[5] =3D 0x56 + nb_nics;=0A= -=0A= - if (get_param_value(buf, sizeof(buf), "macaddr", p)) {=0A= - if (parse_macaddr(macaddr, buf) < 0) {=0A= - fprintf(stderr, "invalid syntax for ethernet = address\n");=0A= - return -1;=0A= - }=0A= - }=0A= - if (get_param_value(buf, sizeof(buf), "model", p)) {=0A= - nd->model =3D strdup(buf);=0A= - }=0A= - nd->vlan =3D vlan;=0A= - nb_nics++;=0A= + }=0A= ret =3D 0;=0A= } else=0A= if (!strcmp(device, "none")) {=0A= ------=_NextPart_000_0CBF_01C7A30A.ABFC2F20 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel ------=_NextPart_000_0CBF_01C7A30A.ABFC2F20--