All of lore.kernel.org
 help / color / mirror / Atom feed
From: Samuel Thibault <samuel.thibault@ens-lyon.org>
To: qemu-devel@nongnu.org
Cc: "Cédric Le Goater" <clg@kaod.org>,
	stefanha@redhat.com, jan.kiszka@siemens.com,
	"Samuel Thibault" <samuel.thibault@ens-lyon.org>
Subject: [Qemu-devel] [PULL 8/9] slirp/ncsi: add a "Get Parameters" response
Date: Thu, 31 May 2018 21:22:36 +0200	[thread overview]
Message-ID: <20180531192237.3994-9-samuel.thibault@ens-lyon.org> (raw)
In-Reply-To: <20180531192237.3994-1-samuel.thibault@ens-lyon.org>

From: Cédric Le Goater <clg@kaod.org>

Command 0x17 'Get Parameters' is used to get configuration parameter
values currently in effect on the controller and it is mandatory in
the NS-CI specification.

Provide a minimum response to exercise the kernel.

Signed-off-by: Cédric Le Goater <clg@kaod.org>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Tested-by: Joel Stanley <joel@jms.id.au>
Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
---
 slirp/ncsi.c | 16 +++++++++++++++-
 1 file changed, 15 insertions(+), 1 deletion(-)

diff --git a/slirp/ncsi.c b/slirp/ncsi.c
index 02d0e9def3..7b3fff207a 100644
--- a/slirp/ncsi.c
+++ b/slirp/ncsi.c
@@ -35,6 +35,20 @@ static int ncsi_rsp_handler_gls(struct ncsi_rsp_pkt_hdr *rnh)
     return 0;
 }
 
+/* Get 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;
+
+    /* no MAC address filters or VLAN filters on the channel */
+    rsp->mac_cnt = 0;
+    rsp->mac_enable = 0;
+    rsp->vlan_cnt = 0;
+    rsp->vlan_enable = 0;
+
+    return 0;
+}
+
 static const struct ncsi_rsp_handler {
         unsigned char   type;
         int             payload;
@@ -62,7 +76,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 },
-- 
2.17.0

  parent reply	other threads:[~2018-05-31 19:22 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-31 19:22 [Qemu-devel] [PULL 0/9] slirp updates Samuel Thibault
2018-05-31 19:22 ` [Qemu-devel] [PULL 1/9] slirp: Add domainname option to slirp's DHCP server Samuel Thibault
2018-05-31 19:42   ` Eric Blake
2018-05-31 19:22 ` [Qemu-devel] [PULL 2/9] slirp: disable Nagle in outgoing connections Samuel Thibault
2018-05-31 19:22 ` [Qemu-devel] [PULL 3/9] slirp: disable Nagle in ingoing connections Samuel Thibault
2018-05-31 19:22 ` [Qemu-devel] [PULL 4/9] slirp/debug: Print IP addresses in human readable form Samuel Thibault
2018-05-31 19:22 ` [Qemu-devel] [PULL 5/9] net/slirp: Convert atoi to qemu_strtoi to allow error checking Samuel Thibault
2018-05-31 19:22 ` [Qemu-devel] [PULL 6/9] slirp: Send window updates to guest after window was closed Samuel Thibault
2018-05-31 19:22 ` [Qemu-devel] [PULL 7/9] slirp/ncsi: fix "Get Version ID" payload length Samuel Thibault
2018-05-31 19:22 ` Samuel Thibault [this message]
2018-05-31 19:22 ` [Qemu-devel] [PULL 9/9] slirp/ncsi: add checksum support Samuel Thibault
2018-05-31 19:40 ` [Qemu-devel] [PULL 0/9] slirp updates no-reply
2018-06-01 13:50 ` Peter Maydell
2018-06-01 13:57   ` Samuel Thibault

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180531192237.3994-9-samuel.thibault@ens-lyon.org \
    --to=samuel.thibault@ens-lyon.org \
    --cc=clg@kaod.org \
    --cc=jan.kiszka@siemens.com \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.