qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] Add support for ethtool via TARGET_SIOCETHTOOL


From: Shu-Chun Weng
Subject: Re: [Qemu-devel] [PATCH] Add support for ethtool via TARGET_SIOCETHTOOL ioctls.
Date: Fri, 16 Aug 2019 17:04:04 -0700

Thank you Aleksandar,

I've updated the patch description and will send out v2 soon.

As for the length of the line: all lines in file syscall_defs.h are of
length 81 with a fixed width comment at the end. I'm not sure if making the
one line I add 80-character-wide is the right choice.

Shu-Chun

On Fri, Aug 16, 2019 at 3:37 PM Aleksandar Markovic <
address@hidden> wrote:

>
> 16.08.2019. 23.28, "Shu-Chun Weng via Qemu-devel" <address@hidden>
> је написао/ла:
> >
> > 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 <address@hidden>
> > ---
>
> 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
> >
> >
>

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]