From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pf1-f181.google.com (mail-pf1-f181.google.com [209.85.210.181]) by mx.groups.io with SMTP id smtpd.web08.9931.1657636266664562481 for ; Tue, 12 Jul 2022 07:31:06 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20210112 header.b=TKOh9MC1; spf=pass (domain: gmail.com, ip: 209.85.210.181, mailfrom: ayushdevel1325@gmail.com) Received: by mail-pf1-f181.google.com with SMTP id e16so7615086pfm.11 for ; Tue, 12 Jul 2022 07:31:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=message-id:date:mime-version:user-agent:content-language:to:cc:from :subject; bh=iiQLcEGG9XcwzleEpDgz9fqVtEiC75owc4uA3vTZ4iU=; b=TKOh9MC1N6bjr1fScgGxkwDG35X+j7I3WWSqEEtUV8NH0QgdRxlQAeQIZLZRHAh9Vj 9a1AViqzaNtuOGqeNnoOVKBdd8GuTdge4EAtxbE12k3ac10/kbNt/t0nePD3GtwrLVus AkpXrTU1p3ziOH2CgWSdU3Aj54lBtjM/RzkIjrFoB9PF6MGjNAyfs84TfQRPkMvqvllg 6G7n7waAL+OxFvowmGmak74bx/JNh1TGBDjc5PvD2emlI7RpLyvGonLT94BeAYuhdkSA ERZJBssTihP85ICO3NNauq0KIeaDoEzYrivm9XC2roXz34SwTIGu+mUJVypDKjW37WNL NVbw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent :content-language:to:cc:from:subject; bh=iiQLcEGG9XcwzleEpDgz9fqVtEiC75owc4uA3vTZ4iU=; b=hsNaWZJTT3qPHlv3iMiVoKwkRxImfXREs8xeZy2cpT1RQrR1pVkuFJStcwMCkQBkI1 Ms3rf1t7iaIuq6pwdNL0r5TNefyfkTwj5N3jJpa/6OwF8MGv6Sp9pIT2r7vpOrOjJtNl 4mRW9n9REVHSlB8mafp4fV9rFEiuo3WMnoajahzFHoxJcsqjcQ6+i0TV4PazP1zeYBue EQPb4R7H7eNuV/QQmv+XvFev6+R+t1RIZmxlAXud9tO5fKlUIC5fYXI+LVtE3fVA2O9j rx5FecP8m3Mf/Eu0Ddqw/ms2HlreRWG7ABW7EpPojyCzeqI3zs596OrSvOglOHbdEjnw njrg== X-Gm-Message-State: AJIora+5kS+kq8kBwdhTMbA59CPepaaUyVFHI9dgNEHsd/CqFtOL0k5o m3tRRDr1wlJaRaGmrhSOMNSvnSX8wJELvg== X-Google-Smtp-Source: AGRyM1tUx8osTGyMC+J+XD8766K+swNLmUbbHB7LFxJeY0TOSWxV2H5PjorxoIWuMqMKzBQNG1mcwA== X-Received: by 2002:a05:6a00:1941:b0:50d:807d:530b with SMTP id s1-20020a056a00194100b0050d807d530bmr23627444pfk.17.1657636265813; Tue, 12 Jul 2022 07:31:05 -0700 (PDT) Return-Path: Received: from ?IPV6:2401:4900:1f3e:2e8d:c9ea:4f84:eaf8:6bbf? ([2401:4900:1f3e:2e8d:c9ea:4f84:eaf8:6bbf]) by smtp.gmail.com with ESMTPSA id t8-20020a17090a0d0800b001efb6d18b8dsm9165399pja.8.2022.07.12.07.31.02 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 12 Jul 2022 07:31:04 -0700 (PDT) Message-ID: <3961cd4e-6c75-7a5a-d4cf-f19c315d7de7@gmail.com> Date: Tue, 12 Jul 2022 20:01:00 +0530 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0 To: devel@edk2.groups.io Cc: mikuback@linux.microsoft.com, michael.d.kinney@intel.com, jabeena.b.gaibusab@intel.com, jiewen.yao@intel.com From: "Ayush Singh" Subject: Using UEFI Network Protocols in QEMU-OVMF Content-Type: multipart/alternative; boundary="------------t0tbmlsmuMrb54HiKoS7LJYb" Content-Language: en-US --------------t0tbmlsmuMrb54HiKoS7LJYb Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Hello everyone. I am trying to implement networking in Rust std using the TCP4 and TCP6 UEFI Protocols (It is required for running Rust CI tests). For providing the network device in qemu, I am using the following options: ``` -netdev user,id=net0,hostfwd=tcp::12345-:12345 -device virtio-net-pci,netdev=net0,mac=00:00:00:00:00:00 ``` I am using these options since they are what are used by other Rust qemu targets. Anyway, the thing is, when I query for `EFI_TCP6_SERVICE_BINDING_PROTOCOL`, using the `BootServices->LocateHandle()` function, I get a buffer containing 8 Handles. Since I only supply one network device, I expected to get at-most 1 device with this handle. So can anyone explain what is going on here? Can the same device publish the Service binding protocol multiple times? Using `-net none` option gives 0 Handles, so that works how I would expect. Yours Sincerely Ayush Singh --------------t0tbmlsmuMrb54HiKoS7LJYb Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit

Hello everyone. I am trying to implement networking in Rust std using the TCP4 and TCP6 UEFI Protocols (It is required for running Rust CI tests). For providing the network device in qemu, I am using the following options:

```

-netdev user,id=net0,hostfwd=tcp::12345-:12345 -device virtio-net-pci,netdev=net0,mac=00:00:00:00:00:00

```

I am using these options since they are what are used by other Rust qemu targets. Anyway, the thing is, when I query for `EFI_TCP6_SERVICE_BINDING_PROTOCOL`, using the `BootServices->LocateHandle()` function, I get a buffer containing 8 Handles.

Since I only supply one network device, I expected to get at-most 1 device with this handle. So can anyone explain what is going on here? Can the same device publish the Service binding protocol multiple times?

Using `-net none` option gives 0 Handles, so that works how I would expect.


Yours Sincerely

Ayush Singh

--------------t0tbmlsmuMrb54HiKoS7LJYb--