All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jason Baron <jbaron@akamai.com>
To: "Michael S. Tsirkin" <mst@redhat.com>
Cc: jasowang@redhat.com, qemu-devel@nongnu.org,
	virtio-dev@lists.oasis-open.org
Subject: Re: [Qemu-devel] [PATCH 1/4] eth: add speed and duplex definitions
Date: Wed, 7 Mar 2018 22:46:34 -0500	[thread overview]
Message-ID: <2477b427-76bb-93fa-507a-d37cca371a2a@akamai.com> (raw)
In-Reply-To: <20180306201354-mutt-send-email-mst@kernel.org>



On 03/06/2018 01:15 PM, Michael S. Tsirkin wrote:
> On Tue, Mar 06, 2018 at 12:53:14PM -0500, Jason Baron wrote:
>>
>>
>> On 03/02/2018 12:54 PM, Michael S. Tsirkin wrote:
>>> On Thu, Mar 01, 2018 at 10:46:33PM -0500, Jason Baron wrote:
>>>> Pull in definitions for SPEED_UNKNOWN, DUPLEX_UNKNOWN, DUPLEX_HALF,
>>>> and DUPLEX_FULL.
>>>>
>>>> Signed-off-by: Jason Baron <jbaron@akamai.com>
>>>> Cc: "Michael S. Tsirkin" <mst@redhat.com>
>>>> Cc: Jason Wang <jasowang@redhat.com>
>>>> Cc: virtio-dev@lists.oasis-open.org
>>>> ---
>>>>  include/net/eth.h | 7 +++++++
>>>>  1 file changed, 7 insertions(+)
>>>>
>>>> diff --git a/include/net/eth.h b/include/net/eth.h
>>>> index 09054a5..9843678 100644
>>>> --- a/include/net/eth.h
>>>> +++ b/include/net/eth.h
>>>> @@ -417,4 +417,11 @@ bool
>>>>  eth_parse_ipv6_hdr(const struct iovec *pkt, int pkt_frags,
>>>>                     size_t ip6hdr_off, eth_ip6_hdr_info *info);
>>>>  
>>>> +/* ethtool defines - from linux/ethtool.h */
>>>> +#define SPEED_UNKNOWN           -1
>>>> +
>>>> +#define DUPLEX_HALF             0x00
>>>> +#define DUPLEX_FULL             0x01
>>>> +#define DUPLEX_UNKNOWN          0xff
>>>> +
>>>>  #endif
>>>
>>> While that's not a lot, I think we should import linux/ethtool.h into
>>> include/standard-headers/linux/ using scripts/update-linux-headers.sh
>>>
>>
>> Ok, I had started down that path, by including
>> include/uapi/linux/ethtool.h but that resulted in a few other headers -
>> kernel.h, sysinfo.h. And so it seemed like a lot of headers for only a
>> few lines. But I will re-visit it...
>>
>> Thanks,
>>
>> -Jason
> 
> I don't know why is sysinfo there. Want to try sending a patch to
> drop it from linux/kernel.h?
> 

Seems like this also ripples into glibc headers, if you look at:
/usr/include/x86_64-linux-gnu/sys/sysinfo.h. It also includes kernel.h
in order to get struct sysinfo. So that would need updating as well.

I've done a v2 that just pulls in sysinfo.h, it doesn't look too bad,
but let me know...

Thanks,

-Jason

WARNING: multiple messages have this Message-ID (diff)
From: Jason Baron <jbaron@akamai.com>
To: "Michael S. Tsirkin" <mst@redhat.com>
Cc: jasowang@redhat.com, qemu-devel@nongnu.org,
	virtio-dev@lists.oasis-open.org
Subject: [virtio-dev] Re: [PATCH 1/4] eth: add speed and duplex definitions
Date: Wed, 7 Mar 2018 22:46:34 -0500	[thread overview]
Message-ID: <2477b427-76bb-93fa-507a-d37cca371a2a@akamai.com> (raw)
In-Reply-To: <20180306201354-mutt-send-email-mst@kernel.org>



On 03/06/2018 01:15 PM, Michael S. Tsirkin wrote:
> On Tue, Mar 06, 2018 at 12:53:14PM -0500, Jason Baron wrote:
>>
>>
>> On 03/02/2018 12:54 PM, Michael S. Tsirkin wrote:
>>> On Thu, Mar 01, 2018 at 10:46:33PM -0500, Jason Baron wrote:
>>>> Pull in definitions for SPEED_UNKNOWN, DUPLEX_UNKNOWN, DUPLEX_HALF,
>>>> and DUPLEX_FULL.
>>>>
>>>> Signed-off-by: Jason Baron <jbaron@akamai.com>
>>>> Cc: "Michael S. Tsirkin" <mst@redhat.com>
>>>> Cc: Jason Wang <jasowang@redhat.com>
>>>> Cc: virtio-dev@lists.oasis-open.org
>>>> ---
>>>>  include/net/eth.h | 7 +++++++
>>>>  1 file changed, 7 insertions(+)
>>>>
>>>> diff --git a/include/net/eth.h b/include/net/eth.h
>>>> index 09054a5..9843678 100644
>>>> --- a/include/net/eth.h
>>>> +++ b/include/net/eth.h
>>>> @@ -417,4 +417,11 @@ bool
>>>>  eth_parse_ipv6_hdr(const struct iovec *pkt, int pkt_frags,
>>>>                     size_t ip6hdr_off, eth_ip6_hdr_info *info);
>>>>  
>>>> +/* ethtool defines - from linux/ethtool.h */
>>>> +#define SPEED_UNKNOWN           -1
>>>> +
>>>> +#define DUPLEX_HALF             0x00
>>>> +#define DUPLEX_FULL             0x01
>>>> +#define DUPLEX_UNKNOWN          0xff
>>>> +
>>>>  #endif
>>>
>>> While that's not a lot, I think we should import linux/ethtool.h into
>>> include/standard-headers/linux/ using scripts/update-linux-headers.sh
>>>
>>
>> Ok, I had started down that path, by including
>> include/uapi/linux/ethtool.h but that resulted in a few other headers -
>> kernel.h, sysinfo.h. And so it seemed like a lot of headers for only a
>> few lines. But I will re-visit it...
>>
>> Thanks,
>>
>> -Jason
> 
> I don't know why is sysinfo there. Want to try sending a patch to
> drop it from linux/kernel.h?
> 

Seems like this also ripples into glibc headers, if you look at:
/usr/include/x86_64-linux-gnu/sys/sysinfo.h. It also includes kernel.h
in order to get struct sysinfo. So that would need updating as well.

I've done a v2 that just pulls in sysinfo.h, it doesn't look too bad,
but let me know...

Thanks,

-Jason


---------------------------------------------------------------------
To unsubscribe, e-mail: virtio-dev-unsubscribe@lists.oasis-open.org
For additional commands, e-mail: virtio-dev-help@lists.oasis-open.org


  reply	other threads:[~2018-03-08  3:46 UTC|newest]

Thread overview: 43+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-02  3:46 [Qemu-devel] [PATCH 0/4] virtio-net: allow linkspeed and duplex setting Jason Baron
2018-03-02  3:46 ` [Qemu-devel] [PATCH 1/4] eth: add speed and duplex definitions Jason Baron
2018-03-02  3:46   ` [virtio-dev] " Jason Baron
2018-03-02 17:54   ` [Qemu-devel] " Michael S. Tsirkin
2018-03-02 17:54     ` [virtio-dev] " Michael S. Tsirkin
2018-03-06 17:53     ` [Qemu-devel] " Jason Baron
2018-03-06 17:53       ` [virtio-dev] " Jason Baron
2018-03-06 18:15       ` [Qemu-devel] " Michael S. Tsirkin
2018-03-06 18:15         ` [virtio-dev] " Michael S. Tsirkin
2018-03-08  3:46         ` Jason Baron [this message]
2018-03-08  3:46           ` Jason Baron
2018-03-02  3:46 ` [Qemu-devel] [PATCH 2/4] rocker: drop local " Jason Baron
2018-03-02  3:46   ` [virtio-dev] " Jason Baron
2018-03-02 17:57   ` [Qemu-devel] " Michael S. Tsirkin
2018-03-02 17:57     ` [virtio-dev] " Michael S. Tsirkin
2018-03-02  3:46 ` [Qemu-devel] [PATCH 3/4] virtio-net: use 64-bit values for feature flags Jason Baron
2018-03-02  3:46   ` [virtio-dev] " Jason Baron
2018-03-02  3:46 ` [Qemu-devel] [PATCH 4/4] virtio-net: add linkspeed and duplex settings to virtio-net Jason Baron
2018-03-02  3:46   ` [virtio-dev] " Jason Baron
2018-03-02  7:14   ` [Qemu-devel] " Jason Wang
2018-03-02  7:14     ` [virtio-dev] " Jason Wang
2018-03-02 16:59     ` [Qemu-devel] " Jason Baron
2018-03-02 16:59       ` [virtio-dev] " Jason Baron
2018-03-02 20:22       ` [Qemu-devel] " Michael S. Tsirkin
2018-03-02 20:22         ` [virtio-dev] " Michael S. Tsirkin
2018-03-06 17:57         ` [Qemu-devel] " Jason Baron
2018-03-06 17:57           ` [virtio-dev] " Jason Baron
2018-03-02 20:19     ` [Qemu-devel] " Michael S. Tsirkin
2018-03-02 20:19       ` [virtio-dev] " Michael S. Tsirkin
2018-03-04 13:05       ` [Qemu-devel] [virtio-dev] " Yan Vugenfirer
2018-03-04 13:05         ` Yan Vugenfirer
2018-03-06 18:02         ` [Qemu-devel] " Jason Baron
2018-03-06 18:02           ` Jason Baron
2018-03-06 18:13           ` [Qemu-devel] " Michael S. Tsirkin
2018-03-06 18:13             ` Michael S. Tsirkin
2018-03-08 12:48             ` [Qemu-devel] " Yan Vugenfirer
2018-03-08 12:48               ` Yan Vugenfirer
2018-03-02  3:56 ` [Qemu-devel] [PATCH 0/4] virtio-net: allow linkspeed and duplex setting no-reply
2018-03-02  3:56 ` no-reply
2018-03-02  3:58 ` no-reply
2018-03-02  3:59 ` no-reply
2018-03-02  4:24 ` no-reply
2018-03-02  4:25 ` no-reply

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=2477b427-76bb-93fa-507a-d37cca371a2a@akamai.com \
    --to=jbaron@akamai.com \
    --cc=jasowang@redhat.com \
    --cc=mst@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=virtio-dev@lists.oasis-open.org \
    /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.