qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v2] linux-user: Add support for SIOCETHTOOL ioct


From: Laurent Vivier
Subject: Re: [Qemu-devel] [PATCH v2] linux-user: Add support for SIOCETHTOOL ioctl
Date: Fri, 23 Aug 2019 17:52:43 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0

Le 17/08/2019 à 02:07, Shu-Chun Weng via Qemu-devel a écrit :
> 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.

I think it's a little bit more complicated...

According to kernel code in dev_ethtool(), ifr_data points to 32bit
value which is a sub-command (ETHTOOL_*), so this value must be
converted to the good endianness.

Then this sub-command can have parameters and thus these parameters must
be converted too.

Thanks,
Laurent



reply via email to

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