Re: [PATCH 2/2] net: Drop the NetLegacy structure, always use Netdev instead

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

 



Thomas Huth <thuth@xxxxxxxxxx> writes:

> Now that the "name" parameter is gone, there is hardly any difference
> between NetLegacy and Netdev anymore. Drop NetLegacy and always use
> Netdev to simplify the code quite a bit.
>
> Signed-off-by: Thomas Huth <thuth@xxxxxxxxxx>

Took me a minute to see the actual difference.

Here's Netdev:

    { 'union': 'Netdev',
      'base': { 'id': 'str', 'type': 'NetClientDriver' },
      'discriminator': 'type',
      'data': {
        'nic':      'NetLegacyNicOptions',
        'user':     'NetdevUserOptions',
        'tap':      'NetdevTapOptions',
        'l2tpv3':   'NetdevL2TPv3Options',
        'socket':   'NetdevSocketOptions',
        'vde':      'NetdevVdeOptions',
        'bridge':   'NetdevBridgeOptions',
        'hubport':  'NetdevHubPortOptions',
        'netmap':   'NetdevNetmapOptions',
        'vhost-user': 'NetdevVhostUserOptions' } }

    { 'enum': 'NetClientDriver',
      'data': [ 'none', 'nic', 'user', 'tap', 'l2tpv3', 'socket', 'vde',
                'bridge', 'hubport', 'netmap', 'vhost-user' ] }

Here's NetLegacy:

    { 'struct': 'NetLegacy',
      'data': {
        '*id':   'str',
        'opts':  'NetLegacyOptions' } }

    { 'union': 'NetLegacyOptions',
      'base': { 'type': 'NetLegacyOptionsType' },
      'discriminator': 'type',
      'data': {
        'nic':      'NetLegacyNicOptions',
        'user':     'NetdevUserOptions',
        'tap':      'NetdevTapOptions',
        'l2tpv3':   'NetdevL2TPv3Options',
        'socket':   'NetdevSocketOptions',
        'vde':      'NetdevVdeOptions',
        'bridge':   'NetdevBridgeOptions',
        'netmap':   'NetdevNetmapOptions',
        'vhost-user': 'NetdevVhostUserOptions' } }

    { 'enum': 'NetLegacyOptionsType',
      'data': ['none', 'nic', 'user', 'tap', 'l2tpv3', 'socket', 'vde',
               'bridge', 'netmap', 'vhost-user'] }

Difference: NetLegacy wraps the union in @opts.

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux