[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-arm] [Qemu-devel] [PATCH 5/6] slirp/ncsi: add a "Get Parameter
From: |
Philippe Mathieu-Daudé |
Subject: |
Re: [Qemu-arm] [Qemu-devel] [PATCH 5/6] slirp/ncsi: add a "Get Parameter" response |
Date: |
Tue, 29 May 2018 10:11:59 -0300 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 |
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;
> +
> + /* 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-arm] [PATCH 2/6] ftgmac100: add IEEE 802.1Q VLAN support, (continued)
[Qemu-arm] [PATCH 1/6] ftgmac100: compute maximum frame size depending on the protocol, Cédric Le Goater, 2018/05/29
[Qemu-arm] [PATCH 3/6] net/ftgmac100: fix multicast hash routine, Cédric Le Goater, 2018/05/29
[Qemu-arm] [PATCH 4/6] slirp/ncsi: fix "Get Version ID" payload length, Cédric Le Goater, 2018/05/29
[Qemu-arm] [PATCH 5/6] slirp/ncsi: add a "Get Parameter" response, Cédric Le Goater, 2018/05/29
- Re: [Qemu-arm] [Qemu-devel] [PATCH 5/6] slirp/ncsi: add a "Get Parameter" response,
Philippe Mathieu-Daudé <=
[Qemu-arm] [PATCH 6/6] slirp/ncsi: add checksum support, Cédric Le Goater, 2018/05/29
Re: [Qemu-arm] [PATCH 0/6] ftgmac100 and NC-SI enhancements for the Aspeed SoC, Philippe Mathieu-Daudé, 2018/05/29
Re: [Qemu-arm] [Qemu-devel] [PATCH 0/6] ftgmac100 and NC-SI enhancements for the Aspeed SoC, Joel Stanley, 2018/05/30