[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 5/6] slirp/ncsi: add a "Get Parameter" response
From: |
Cédric Le Goater |
Subject: |
Re: [Qemu-devel] [PATCH 5/6] slirp/ncsi: add a "Get Parameter" response |
Date: |
Tue, 29 May 2018 19:12:12 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.2 |
On 05/29/2018 03:11 PM, Philippe Mathieu-Daudé wrote:
> Hi Cédric,
>
> In title: "Get Parameters" (plural)
>
> On 05/29/2018 03:28 AM, Cédric Le Goater wrote:
>> This is a minimum response to exercise the kernel.
>
> This type is mandatory in DMTF Standard v1.0.1 indeed (DSP0222).
>
>>
>> Signed-off-by: Cédric Le Goater <address@hidden>
>> ---
>> slirp/ncsi.c | 23 ++++++++++++++++++++++-
>> 1 file changed, 22 insertions(+), 1 deletion(-)
>>
>> diff --git a/slirp/ncsi.c b/slirp/ncsi.c
>> index 02d0e9def3e8..f00253641ea4 100644
>> --- a/slirp/ncsi.c
>> +++ b/slirp/ncsi.c
>> @@ -35,6 +35,27 @@ static int ncsi_rsp_handler_gls(struct ncsi_rsp_pkt_hdr
>> *rnh)
>> return 0;
>> }
>>
>> +/* Get Parameter */
>
> "Parameters"
>
>> +static int ncsi_rsp_handler_gp(struct ncsi_rsp_pkt_hdr *rnh)
>> +{
>> + struct ncsi_rsp_gp_pkt *rsp = (struct ncsi_rsp_gp_pkt *) rnh;
>> +
>> + rsp->mac_cnt = 0x0;
>
> "MAC Address Count: The number of MAC addresses supported by the channel"
>
> 0 means "no [MAC Address] filter [in use]"
>
>> + rsp->mac_enable = 0x0;
>
> "MAC Address Flags: all [MAC Address filters] disabled" ...
>
>> +
>> + /* TODO: provide the guest configured MAC */
>> + rsp->mac[0] = 0xaa;
>> + rsp->mac[1] = 0xbb;
>> + rsp->mac[2] = 0xcc;
>> + rsp->mac[3] = 0xdd;
>> + rsp->mac[4] = 0xee;
>> + rsp->mac[5] = 0xff;
>
> So there is no need to set this filter,
> or you have to set:
>
> rsp->mac_cnt = 1;
> rsp->mac_enable = 1 << 0;
>
> Also, you forgot to set:
>
> rsp->vlan_cnt = 0;
> rsp->vlan_enable = 0;
yes. I will clean up the handler.
Thanks,
C.
>> +
>> + /* more data follows */
>> +
>> + return 0;
>> +}
>> +
>> static const struct ncsi_rsp_handler {
>> unsigned char type;
>> int payload;
>> @@ -62,7 +83,7 @@ static const struct ncsi_rsp_handler {
>> { NCSI_PKT_RSP_SNFC, 4, NULL },
>> { NCSI_PKT_RSP_GVI, 40, NULL },
>> { NCSI_PKT_RSP_GC, 32, ncsi_rsp_handler_gc },
>> - { NCSI_PKT_RSP_GP, -1, NULL },
>> + { NCSI_PKT_RSP_GP, 40, ncsi_rsp_handler_gp },
>> { NCSI_PKT_RSP_GCPS, 172, NULL },
>> { NCSI_PKT_RSP_GNS, 172, NULL },
>> { NCSI_PKT_RSP_GNPTS, 172, NULL },
>>
- Re: [Qemu-devel] [Qemu-arm] [PATCH 2/6] ftgmac100: add IEEE 802.1Q VLAN support, (continued)
[Qemu-devel] [PATCH 1/6] ftgmac100: compute maximum frame size depending on the protocol, Cédric Le Goater, 2018/05/29
[Qemu-devel] [PATCH 3/6] net/ftgmac100: fix multicast hash routine, Cédric Le Goater, 2018/05/29
[Qemu-devel] [PATCH 4/6] slirp/ncsi: fix "Get Version ID" payload length, Cédric Le Goater, 2018/05/29
[Qemu-devel] [PATCH 5/6] slirp/ncsi: add a "Get Parameter" response, Cédric Le Goater, 2018/05/29
[Qemu-devel] [PATCH 6/6] slirp/ncsi: add checksum support, Cédric Le Goater, 2018/05/29
Re: [Qemu-devel] [Qemu-arm] [PATCH 0/6] ftgmac100 and NC-SI enhancements for the Aspeed SoC, Philippe Mathieu-Daudé, 2018/05/29
Re: [Qemu-devel] [PATCH 0/6] ftgmac100 and NC-SI enhancements for the Aspeed SoC, Joel Stanley, 2018/05/30