[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH V4 2/7] qapi/net.json: Add L4_Connection definition
From: |
Markus Armbruster |
Subject: |
Re: [PATCH V4 2/7] qapi/net.json: Add L4_Connection definition |
Date: |
Wed, 24 Mar 2021 07:51:32 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) |
Markus Armbruster <armbru@redhat.com> writes:
> "Dr. David Alan Gilbert" <dgilbert@redhat.com> writes:
[...]
>> I think there should also beb
>> a separate type that represents an IP address+port, so that what you end
>> up with is:
>>
>> IPFlowSpec
>> ID
>> Protocol
>> Source
>> Dest
>
> I understand the motivation. Three drawbacks, though.
>
> One, it gets us another level of nesting on the wire, i.e. something
> like
>
> {"source": {"address": SRC-ADDR, "port": SRC-PORT},
> "destination": {"address": DST-ADDR, "port": DST-PORT}}
>
> instead of
>
> {"source-address": SRC-ADDR, "source-port": SRC-PORT,
> "destination-address": DST-ADDR, "destination-port": DST-PORT}
>
> QMP clients shouldn't care.
>
> Two, we have many (address, port) pairs in the schema that don't use
> nesting. Adding nesting sometimes makes QMP less consistent.
>
> Three, human-friendly interface wrappers tend to dislike nesting. This
> particular case seems okay; we end up with dotted keys like
> source.address instead of source-address. In a case where we need just
> one (address, port), we'd get some-silly-name.address instead of just
> address, though.
>
> I've occasionally felt a mild need for letting me say "this struct
> member should be unboxed on the wire", i.e. have its curlies peeled off.
> Never enough to justify the additional generator complexity, though.
Just remembered we actually have
##
# @InetSocketAddressBase:
#
# @host: host part of the address
# @port: port part of the address
##
{ 'struct': 'InetSocketAddressBase',
'data': {
'host': 'str',
'port': 'str' } }
It's from commit eb87203b64 "rbd: Reject -blockdev server.*.{numeric,
to, ipv4, ipv6}".
- Re: [PATCH V4 1/7] qapi/net.json: Add IP_PROTOCOL definition, (continued)
- [PATCH V4 2/7] qapi/net.json: Add L4_Connection definition, Zhang Chen, 2021/03/19
- Re: [PATCH V4 2/7] qapi/net.json: Add L4_Connection definition, Markus Armbruster, 2021/03/19
- RE: [PATCH V4 2/7] qapi/net.json: Add L4_Connection definition, Zhang, Chen, 2021/03/22
- Re: [PATCH V4 2/7] qapi/net.json: Add L4_Connection definition, Markus Armbruster, 2021/03/22
- RE: [PATCH V4 2/7] qapi/net.json: Add L4_Connection definition, Zhang, Chen, 2021/03/23
- Re: [PATCH V4 2/7] qapi/net.json: Add L4_Connection definition, Markus Armbruster, 2021/03/23
- Re: [PATCH V4 2/7] qapi/net.json: Add L4_Connection definition, Dr. David Alan Gilbert, 2021/03/23
- Re: [PATCH V4 2/7] qapi/net.json: Add L4_Connection definition, Markus Armbruster, 2021/03/24
- Re: [PATCH V4 2/7] qapi/net.json: Add L4_Connection definition,
Markus Armbruster <=
- RE: [PATCH V4 2/7] qapi/net.json: Add L4_Connection definition, Zhang, Chen, 2021/03/25
- RE: [PATCH V4 2/7] qapi/net.json: Add L4_Connection definition, Zhang, Chen, 2021/03/23
Re: [PATCH V4 2/7] qapi/net.json: Add L4_Connection definition, Markus Armbruster, 2021/03/19
Re: [PATCH V4 2/7] qapi/net.json: Add L4_Connection definition, Markus Armbruster, 2021/03/24
[PATCH V4 3/7] qapi/net: Add new QMP command for COLO passthrough, Zhang Chen, 2021/03/19
Re: [PATCH V4 3/7] qapi/net: Add new QMP command for COLO passthrough, Markus Armbruster, 2021/03/22