From: Aleksandar Markovic <aleksandar.m.mail@gmail.com>
To: Shu-Chun Weng <scw@google.com>
Cc: arunkaly@google.com, Riku Voipio <riku.voipio@iki.fi>,
qemu-devel@nongnu.org, Laurent Vivier <laurent@vivier.eu>
Subject: Re: [Qemu-devel] [PATCH] Add support for ethtool via TARGET_SIOCETHTOOL ioctls.
Date: Sat, 17 Aug 2019 00:37:00 +0200 [thread overview]
Message-ID: <CAL1e-=hMssOVfvGWsyWmUgPyG-1ovMva9W5-T+GJgoyn_29-VQ@mail.gmail.com> (raw)
In-Reply-To: <20190816211356.59244-1-scw@google.com>
16.08.2019. 23.28, "Shu-Chun Weng via Qemu-devel" <qemu-devel@nongnu.org>
је написао/ла:
>
> The ioctl numeric values are platform-independent and determined by
> the file include/uapi/linux/sockios.h in Linux kernel source code:
>
> #define SIOCETHTOOL 0x8946
>
> These ioctls get (or set) the field ifr_data of type char* in the
> structure ifreq. Such functionality is achieved in QEMU by using
> MK_STRUCT() and MK_PTR() macros with an appropriate argument, as
> it was done for existing similar cases.
>
> Signed-off-by: Shu-Chun Weng <scw@google.com>
> ---
Shu-Chun, hi, and welcome!
Just a couple of cosmetic things:
- by convention, the title of this patch should start with "linux-user:",
since this patch affects linux user QEMU module;
- the patch title is too long (and has some minor mistakes) -
"linux-user: Add support for SIOCETHTOOL ioctl" should be good enough;
- the lenght of the code lines that you add or modify must not be greater
than 80.
Sincerely,
Aleksandar
> linux-user/ioctls.h | 1 +
> linux-user/syscall_defs.h | 2 ++
> 2 files changed, 3 insertions(+)
>
> diff --git a/linux-user/ioctls.h b/linux-user/ioctls.h
> index 3281c97ca2..9d231df665 100644
> --- a/linux-user/ioctls.h
> +++ b/linux-user/ioctls.h
> @@ -208,6 +208,7 @@
> IOCTL(SIOCGIFINDEX, IOC_W | IOC_R, MK_PTR(MK_STRUCT(STRUCT_int_ifreq)))
> IOCTL(SIOCSIFPFLAGS, IOC_W, MK_PTR(MK_STRUCT(STRUCT_short_ifreq)))
> IOCTL(SIOCGIFPFLAGS, IOC_W | IOC_R,
MK_PTR(MK_STRUCT(STRUCT_short_ifreq)))
> + IOCTL(SIOCETHTOOL, IOC_R | IOC_W, MK_PTR(MK_STRUCT(STRUCT_ptr_ifreq)))
> IOCTL(SIOCSIFLINK, 0, TYPE_NULL)
> IOCTL_SPECIAL(SIOCGIFCONF, IOC_W | IOC_R, do_ioctl_ifconf,
> MK_PTR(MK_STRUCT(STRUCT_ifconf)))
> diff --git a/linux-user/syscall_defs.h b/linux-user/syscall_defs.h
> index 0662270300..276f96039f 100644
> --- a/linux-user/syscall_defs.h
> +++ b/linux-user/syscall_defs.h
> @@ -819,6 +819,8 @@ struct target_pollfd {
> #define TARGET_SIOCGIFTXQLEN 0x8942 /* Get the tx queue
length */
> #define TARGET_SIOCSIFTXQLEN 0x8943 /* Set the tx queue
length */
>
> +#define TARGET_SIOCETHTOOL 0x8946 /* Ethtool interface
*/
> +
> /* ARP cache control calls. */
> #define TARGET_OLD_SIOCDARP 0x8950 /* old delete ARP table
entry */
> #define TARGET_OLD_SIOCGARP 0x8951 /* old get ARP table
entry */
> --
> 2.23.0.rc1.153.gdeed80330f-goog
>
>
next prev parent reply other threads:[~2019-08-16 22:37 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-16 21:13 [Qemu-devel] [PATCH] Add support for ethtool via TARGET_SIOCETHTOOL ioctls Shu-Chun Weng via Qemu-devel
2019-08-16 21:45 ` no-reply
2019-08-16 22:37 ` Aleksandar Markovic [this message]
2019-08-17 0:04 ` Shu-Chun Weng via Qemu-devel
2019-08-17 0:05 ` mailer
2019-08-17 0:07 ` [Qemu-devel] [PATCH v2] linux-user: Add support for SIOCETHTOOL ioctl Shu-Chun Weng via Qemu-devel
2019-08-17 0:25 ` no-reply
2019-08-23 15:52 ` Laurent Vivier
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='CAL1e-=hMssOVfvGWsyWmUgPyG-1ovMva9W5-T+GJgoyn_29-VQ@mail.gmail.com' \
--to=aleksandar.m.mail@gmail.com \
--cc=arunkaly@google.com \
--cc=laurent@vivier.eu \
--cc=qemu-devel@nongnu.org \
--cc=riku.voipio@iki.fi \
--cc=scw@google.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).