Uploaded image for project: 'vpp'
  1. vpp
  2. VPP-1993

Add ip_table_allocate api to vpp

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Medium Medium
    • None
    • None
    • IP
    • None

      Currently in ip.api we define a ip_table_add_del which requires the api user to specify the vl_api_ip_table_t.

       

      This minimally produces a burden on the api user to track table ids not just for local use, but to avoid collision by allocation.  The problem becomes worse when multiple api users are involved, as coordination among them becomes even more problematic.

      To solve this problem, introduce a new API:

      /** \brief Allocate an unused table
        A table can be added multiple times, but need be deleted only once.
        @param client_index - opaque cookie to identify the sender
        @param context - sender context, to match reply w/ request
        @param table - if table.table_id == ~0, vpp allocates an unused table_id and proceeds as in vpp_table_add_del
                                   if table.table_id != ~0, vpp uses the table.table_id and proceeds as in vpp_table_add_del
      */

      define ip_table_allocate
      {
          u32 client_index;
          u32 context;
          vl_api_ip_table_t table;
      };

      /**
        @param table - table information for the table allocated}}
      */

      define ip_table_allocate_reply
      {
        u32 client_index;
      u32 context;
      vl_api_ip_table_t table;
      };}}

       

            aloys Aloys Augustin
            hagbard Ed Warnicke
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: