Skip to content
Snippets Groups Projects
  1. Apr 25, 2017
  2. Mar 06, 2017
  3. Jan 10, 2017
  4. Sep 15, 2016
  5. Jul 19, 2016
    • Eric Blake's avatar
      net: Use correct type for bool flag · 0e55c381
      Eric Blake authored
      
      is_netdev is only used as a bool, so make it one.
      
      Signed-off-by: default avatarEric Blake <eblake@redhat.com>
      Message-Id: <1468468228-27827-14-git-send-email-eblake@redhat.com>
      Reviewed-by: default avatarMarkus Armbruster <armbru@redhat.com>
      Signed-off-by: default avatarMarkus Armbruster <armbru@redhat.com>
      0e55c381
    • Eric Blake's avatar
      qapi: Change Netdev into a flat union · f394b2e2
      Eric Blake authored
      
      This is a mostly-mechanical conversion that creates a new flat
      union 'Netdev' QAPI type that covers all the branches of the
      former 'NetClientOptions' simple union, where the branches are
      now listed in a new 'NetClientDriver' enum rather than generated
      from the simple union.  The existence of a flat union has no
      change to the command line syntax accepted for new code, and
      will make it possible for a future patch to switch the QMP
      command to parse a boxed union for no change to valid QMP; but
      it does have some ripple effect on the C code when dealing with
      the new types.
      
      While making the conversion, note that the 'NetLegacy' type
      remains unchanged: it applies only to legacy command line options,
      and will not be ported to QMP, so it should remain a wrapper
      around a simple union; to avoid confusion, the type named
      'NetClientOptions' is now gone, and we introduce 'NetLegacyOptions'
      in its place.  Then, in the C code, we convert from NetLegacy to
      Netdev as soon as possible, so that the bulk of the net stack
      only has to deal with one QAPI type, not two.  Note that since
      the old legacy code always rejected 'hubport', we can just omit
      that branch from the new 'NetLegacyOptions' simple union.
      
      Based on an idea originally by Zoltán Kővágó <DirtY.iCE.hu@gmail.com>:
      Message-Id: <01a527fbf1a5de880091f98cf011616a78adeeee.1441627176.git.DirtY.iCE.hu@gmail.com>
      although the sed script in that patch no longer applies due to
      other changes in the tree since then, and I also did some manual
      cleanups (such as fixing whitespace to keep checkpatch happy).
      
      Signed-off-by: default avatarEric Blake <eblake@redhat.com>
      Message-Id: <1468468228-27827-13-git-send-email-eblake@redhat.com>
      Reviewed-by: default avatarMarkus Armbruster <armbru@redhat.com>
      [Fixup from Eric squashed in]
      Signed-off-by: default avatarMarkus Armbruster <armbru@redhat.com>
      f394b2e2
  6. Jul 12, 2016
  7. Jul 07, 2016
  8. Jun 17, 2016
  9. Jun 02, 2016
  10. Jun 01, 2016
  11. Mar 22, 2016
  12. Mar 08, 2016
  13. Feb 23, 2016
  14. Feb 04, 2016
    • Hailiang Zhang's avatar
      net/filter: Fix the output information for command 'info network' · aa9156f4
      Hailiang Zhang authored
      
      The properties of netfilter object could be changed by 'qom-set'
      command, but the output of 'info network' command is not updated,
      because it got the old information through nf->info_str, it will
      not be updated while we change the value of netfilter's property.
      
      Here we split a helper function that could collect the output
      information for filter, and also remove the useless member
      'info_str' from struct NetFilterState.
      
      Signed-off-by: default avatarzhanghailiang <zhang.zhanghailiang@huawei.com>
      Cc: Jason Wang <jasowang@redhat.com>
      Cc: Eric Blake <eblake@redhat.com>
      Cc: Markus Armbruster <armbru@redhat.com>
      Cc: Yang Hongyang <hongyang.yang@easystack.cn>
      Reviewed-by: default avatarEric Blake <eblake@redhat.com>
      Signed-off-by: default avatarJason Wang <jasowang@redhat.com>
      aa9156f4
    • Li Zhijian's avatar
      net: always walk through filters in reverse if traffic is egress · 25aaadf0
      Li Zhijian authored
      
      Previously, if we attach more than one filters for a single netdev,
      both ingress and egress traffic will go through net filters in same
      order like:
      
      ingress: netdev ->filter1 ->filter2 ->...filter[n] ->emulated device
      egress: emulated device ->filter1 ->filter2 ->...filter[n] ->netdev.
      
      This is against the natural feeling and will complicate filters
      configuration since in some scenes, we hope filters handle the egress
      traffic in a reverse order. For example, in colo-proxy (will be
      implemented later), we have a redirector filter and a colo-rewriter
      filter, we need the filter behave like:
      
      ingress(->)/egress(<-): chardev<->redirector<->colo-rewriter<->emulated device
      
      Since both buffer filter and dump do not require strict order of
      filters, this patch switches to always let egress traffic walk through
      net filters in reverse to simplify the possible filters configuration
      in the future.
      
      Signed-off-by: default avatarWen Congyang <wency@cn.fujitsu.com>
      Signed-off-by: default avatarLi Zhijian <lizhijian@cn.fujitsu.com>
      Reviewed-by: default avatarYang Hongyang <hongyang.yang@easystack.cn>
      Signed-off-by: default avatarJason Wang <jasowang@redhat.com>
      25aaadf0
  15. Jan 11, 2016
  16. Oct 22, 2015
  17. Oct 12, 2015
  18. Sep 24, 2015
  19. Jun 22, 2015
    • Markus Armbruster's avatar
      qmp: Wean off qerror_report() · 485febc6
      Markus Armbruster authored
      
      The traditional QMP command handler interface
      
          int qmp_FOO(Monitor *mon, const QDict *params, QObject **ret_data);
      
      doesn't provide for returning an Error object.  Instead, the handler
      is expected to stash it in the monitor with qerror_report().
      
      When we rebased QMP on top of QAPI, we didn't change this interface.
      Instead, commit 776574d6 introduced "middle mode" as a temporary aid
      for converting existing QMP commands to QAPI one by one.  More than
      three years later, we're still using it.
      
      Middle mode has two effects:
      
      * Instead of the native input marshallers
      
            static void qmp_marshal_input_FOO(QDict *, QObject **, Error **)
      
        it generates input marshallers conforming to the traditional QMP
        command handler interface.
      
      * It suppresses generation of code to register them with
        qmp_register_command()
      
        This permits giving them internal linkage.
      
      As long as we need qmp-commands.hx, we can't use the registry behind
      qmp_register_command(), so the latter has to stay for now.
      
      The former has to go to get rid of qerror_report().  Changing all QMP
      commands to fit the QAPI mold in one go was impractical back when we
      started, but by now there are just a few stragglers left:
      do_qmp_capabilities(), qmp_qom_set(), qmp_qom_get(), qmp_object_add(),
      qmp_netdev_add(), do_device_add().
      
      Switch middle mode to generate native input marshallers, and adapt the
      stragglers.  Simplifies both the monitor code and the stragglers.
      
      Rename do_qmp_capabilities() to qmp_capabilities(), and
      do_device_add() to qmp_device_add, because that's how QMP command
      handlers are named today.
      
      Signed-off-by: default avatarMarkus Armbruster <armbru@redhat.com>
      Reviewed-by: default avatarStefan Hajnoczi <stefanha@redhat.com>
      Reviewed-by: default avatarEric Blake <eblake@redhat.com>
      Reviewed-by: default avatarLuiz Capitulino <lcapitulino@redhat.com>
      485febc6
  20. Jun 19, 2015
  21. Jun 17, 2015
  22. Jun 10, 2015
  23. May 11, 2015
  24. Feb 26, 2015
  25. Feb 18, 2015
    • Markus Armbruster's avatar
      hmp: Name HMP info handler functions hmp_info_SUBCOMMAND() · 1ce6be24
      Markus Armbruster authored
      
      Some are called do_info_SUBCOMMAND() (old ones, usually), some
      hmp_info_SUBCOMMAND(), some SUBCOMMAND_info(), sometimes SUBCOMMAND
      pointlessly differs in spelling.
      
      Normalize to hmp_info_SUBCOMMAND(), where SUBCOMMAND is exactly the
      subcommand name with '-' replaced by '_'.
      
      Exceptions:
      
      * sun4m_irq_info(), sun4m_pic_info() renamed to sun4m_hmp_info_irq(),
        sun4m_hmp_info_pic().
      
      * lm32_irq_info(), lm32_pic_info() renamed to lm32_hmp_info_irq(),
        lm32_hmp_info_pic().
      
      Signed-off-by: default avatarMarkus Armbruster <armbru@redhat.com>
      1ce6be24
    • Markus Armbruster's avatar
      hmp: Name HMP command handler functions hmp_COMMAND() · 3e5a50d6
      Markus Armbruster authored
      
      Some are called do_COMMAND() (old ones, usually), some hmp_COMMAND(),
      and sometimes COMMAND pointlessly differs in spelling.
      
      Normalize to hmp_COMMAND(), where COMMAND is exactly the command name
      with '-' replaced by '_'.
      
      Exceptions:
      
      * do_device_add() and client_migrate_info() *not* renamed to
        hmp_device_add(), hmp_client_migrate_info(), because they're also
        QMP handlers.  They still need to be converted to QAPI.
      
      * do_memory_dump(), do_physical_memory_dump(), do_ioport_read(),
        do_ioport_write() renamed do hmp_* instead of hmp_x(), hmp_xp(),
        hmp_i(), hmp_o(), because those names are too cryptic for my taste.
      
      * do_info_help() renamed to hmp_info_help() instead of hmp_info(),
        because it only covers help.
      
      Signed-off-by: default avatarMarkus Armbruster <armbru@redhat.com>
      3e5a50d6
Loading