Quoting wangchuan...@163.com (2018-09-19 10:03:40)
>    I find the feature of the absent vapi.
>    There exists VALs in ***.api.

What is `VAL`?

>    I copy the
>    master's [1]src/vpp-api/vapi/vapi_c_gen.py and 
> [2]src/vpp-api/vapi/vapi_json_parser.py to
>    stable/1804, 
>    but compile failed!
>    -----------------------------------------------
>    configure: creating ./config.status
>    config.status: creating Makefile
>    config.status: creating plugins/Makefile
>    config.status: creating vpp-api/python/Makefile
>    config.status: creating vpp-api/java/Makefile
>    config.status: error: cannot find input file: `vpp-api/vapi/Makefile.in'

This looks like a different kind of issue. Are vapi_c_gen and
vapi_json_parser the only modified files?

>    make[1]: *** [vpp-configure] Error 1
>    make[1]: Leaving directory `/hctel/vpp/build-root'
>    make: *** [build] Error 2
>    ------------------------------------------------
>    What should I do?
>    I don't want to upgrade my vpp to master!
> 
>    --------------------------------------------------------------------------
> 
>    wangchuan...@163.com
> 
>       
>      From: [3]wangchuan...@163.com
>      Date: 2018-09-19 11:46
>      To: [4]Klement Sekera -X (ksekera - PANTHEON TECHNOLOGIES at Cisco);
>      [5]Ole Troan
>      CC: [6]Dave Barach (dbarach); [7]vpp-dev
>      Subject: Re: Re: [vpp-dev] VPP's C-type-api example
>      Hi Klement,
>          There have "autoreply define classify_add_del_session"  in
>      classify.api .
>      And /usr/include/vnet/classify/classify.api.h  have the
>      "vl_api_classify_add_del_session".
>      And the java jar have the "classify_add_del_session" class  too!
>      But the classify.api.vapi.h don't have !!!
>      Regards,
>      Simon 
> 
>    --------------------------------------------------------------------------
> 
>      wangchuan...@163.com
> 
>         
>        From: [8]Klement Sekera
>        Date: 2018-09-19 03:18
>        To: [9]wangchuan...@163.com; [10]Ole Troan
>        CC: [11]Dave Barach (dbarach); [12]vpp-dev
>        Subject: Re: [vpp-dev] VPP's C-type-api example
>        Hi,
>         
>        VAPI is autogenerated from .json files, which are generated from .api
>        files. The API you are asking about is in
>        src/vnet/classify/classify.api. See that file's history on when it
>        appeared. As for your second question - I don't see any `obscure-mask`
>        nor `clear-param` parameters. If you are asking about semantics of the
>        API call, that is a question for the author of said API, since VAPI is
>        generated code.
>         
>        Regards,
>        Klement
>         
>        Quoting wangchuan...@163.com (2018-09-18 10:03:10)
>        >    Hi Klement,
>        >        I'm sorry to trouble you again.
>        >    First,Have The classify_add_del_session vapi  not exist yet
>        @18.04?
>        >    Second,How can I get the vapi_classify_add_del_table
>        's obscure-mask from
>        >    clear-param ”l2|l3|l4 +  ip4|ip6 + protocol + dst|src  + tcp|udp
>         + ... ”
>        >    ? 
>        >     (Like CLI_COMMAND-clear-param to mask-value)
>        >    What api can do this?
>        >
>        >   
>        
> --------------------------------------------------------------------------
>        >
>        >    wangchuan...@163.com
>        >
>        >       
>        >      From: [1]Klement Sekera
>        >      Date: 2018-09-17 20:23
>        >      To: [2]wangchuan...@163.com; [3]Ole Troan
>        >      CC: [4]Dave Barach (dbarach); [5]vpp-dev
>        >      Subject: Re: [vpp-dev] VPP's C-type-api example
>        >      If you do not consume a message (in this case most probably the
>        reply to
>        >      vapi_tap_deelte), then on disconnect, the client library does
>        that
>        >      internally
>        >      and prints a warning about it...
>        >       
>        >      Quoting wangchuan...@163.com (2018-09-17 12:00:27)
>        >      >    Hi Klement,
>        >      >        Please accept my heartfelt thanks.
>        >      >    Everything is fine, but one: Calling 'vapi_tap_delete'
>        without any
>        >      other
>        >      >    calling would cause some warining or error printed at my
>        terminal: 
>        >      >    my vpp is 18.04 stable.
>        >      >    "tapDelete begin 
>        >      >    tapDelete end
>        >      >    vl_client_disconnect:313: queue drain: 79
>        >      >    msg_handler_internal:432: no handler for msg id 79
>        >      >    The end"
>        >      >    Thanks again!
>        >      >
>        >      >   
>        >     
>        
> --------------------------------------------------------------------------
>        >      >
>        >      >    wangchuan...@163.com
>        >      >
>        >      >       
>        >      >      From: [1]Klement Sekera
>        >      >      Date: 2018-09-17 15:53
>        >      >      To: [2]wangchuan...@163.com; [3]Ole Troan
>        >      >      CC: [4]Dave Barach (dbarach); [5]vpp-dev
>        >      >      Subject: Re: [vpp-dev] VPP's C-type-api example
>        >      >      There is no such parameter called `chroot_prefix`. I
>        will assume
>        >      you are
>        >      >      asking about `api_prefix`.
>        >      >       
>        >      >      Running VPP creates shared memory segments under
>        /dev/shm. By
>        >      default
>        >      >      (no prefix provided), these files are called global_vm
>        and
>        >      vpe-api.
>        >      >      Multiple VPP instances' names would collide and to be
>        able to run
>        >      more
>        >      >      than one VPP, you need to supply unique prefix to 2nd,
>        3rd,
>        >      >      etc. VPP instance. This turns shared memory file names
>        for those
>        >      >      instances to <prefix>-global_vm and <prefix>-vpe-api.
>        >      >       
>        >      >      When API bindings are connecting to VPP, they are using
>        these
>        >      files
>        >      >      under /dev/shm. Thus, to connect, the same prefix needs
>        to be
>        >      >      supplied to VPP and client.
>        >      >       
>        >      >      It's called api-segment in the startup config.
>        >      >       
>        >      >     
>        >     
>        
> https://wiki.fd.io/view/VPP/Command-line_Arguments#.22api-segment.22_parameters
>        >      >       
>        >      >      Quoting wangchuan...@163.com (2018-09-15 11:46:54)
>        >      >      >    Hi Klement,
>        >      >      >        I change the vapi_c_test.c and let the 3rd
>        >      param[chroot_prefix
>        >      >      ==
>        >      >      >    NULL] of  'vapi_connect',    and all pass!
>        >      >      >    I have not quite understand this parameter
>        "chroot_prefix"
>        >      >       by reading the
>        >      >      >    code.
>        >      >      >    Explain briefly ,please?
>        >      >      >    Thanks a lot!
>        >      >      >
>        >      >      >   
>        >      >     
>        >     
>        
> --------------------------------------------------------------------------
>        >      >      >
>        >      >      >    wangchuan...@163.com
>        >      >      >
>        >      >      >       
>        >      >      >      From: [1]wangchuan...@163.com
>        >      >      >      Date: 2018-09-15 09:23
>        >      >      >      To: [2]Klement Sekera -X (ksekera - PANTHEON
>        TECHNOLOGIES
>        >      at
>        >      >      Cisco);
>        >      >      >      [3]Ole Troan
>        >      >      >      CC: [4]Dave Barach (dbarach); [5]vpp-dev
>        >      >      >      Subject: Re: Re: [vpp-dev] VPP's C-type-api
>        example
>        >      >      >      Hi Klement,
>        >      >      >          I do not understande your mean.    VPP
>        cmdline?
>        >      >      >      I want to make my ext-program who can initialize
>        the
>        >      running
>        >      >      vpp-service
>        >      >      >      not by vppctl-shell
>        >      >      >      "systemctl start VPP"    without any change for
>        vpp-code
>        >      and
>        >      >      >      startup.conf.
>        >      >      >      Can you describe their relationship?
>        >      >      >       My executable program name is "test", and how
>        can i
>        >       connect to
>        >      >      vpp?
>        >      >      >
>        >      >      >   
>        >      >     
>        >     
>        
> --------------------------------------------------------------------------
>        >      >      >
>        >      >      >      wangchuan...@163.com
>        >      >      >
>        >      >      >         
>        >      >      >        From: [6]Klement Sekera
>        >      >      >        Date: 2018-09-14 19:55
>        >      >      >        To: [7]wangchuan...@163.com; [8]Ole Troan
>        >      >      >        CC: [9]Dave Barach (dbarach); [10]vpp-dev
>        >      >      >        Subject: Re: [vpp-dev] VPP's C-type-api example
>        >      >      >        And what is your vpp cmdline? is vpp running
>        with
>        >      "my-api-test"
>        >      >      api
>        >      >      >        prefix?
>        >      >      >         
>        >      >      >        Quoting wangchuan...@163.com (2018-09-14
>        07:25:06)
>        >      >      >        >    sorry,
>        >      >      >        >        That my carelessness.  Whole cmd as
>        root  is :
>        >       
>        >      >      #./test
>        >      >      >        "/my-api"
>        >      >      >        >    "my-api-test"
>        >      >      >        >    And vpp_api_test can connect to vpp.
>        >      >      >        >
>        >      >      >        >   
>        >      >      >       
>        >      >     
>        >     
>        
> --------------------------------------------------------------------------
>        >      >      >        >
>        >      >      >        >    wangchuan...@163.com
>        >      >      >        >
>        >      >      >        >       
>        >      >      >        >      From: [1]Ole Troan
>        >      >      >        >      Date: 2018-09-14 00:35
>        >      >      >        >      To: [2]wangchuanguo
>        >      >      >        >      CC: [3]Klement Sekera -X (ksekera -
>        PANTHEON
>        >      >      TECHNOLOGIES at
>        >      >      >        Cisco);
>        >      >      >        >      [4]Dave Barach (dbarach); [5]vpp-dev
>        >      >      >        >      Subject: Re: [vpp-dev] VPP's C-type-api
>        example
>        >      >      >        >      > 1、as root, install the
>        rpm(vpp-selinux,
>        >      vpp-lib,
>        >      >      vpp-18.04,
>        >      >      >        >      vpp-plugins),  start service vpp and I
>        come into
>        >      vppctl.
>        >      >      >        >      > 2、I copy test/ext/vapi_c_test.c to
>        main.c(a
>        >      new file,
>        >      >      a new
>        >      >      >        dir).
>        >      >      >        >      >            compile using: gcc
>        -std=gnu99 -g
>        >      -Wall
>        >      >      -pthread 
>        >      >      >        >      -I/usr/include/ -lvppinfra
>        -lvlibmemoryclient
>        >      -lsvm
>        >      >      -lpthread
>        >      >      >        -lcheck
>        >      >      >        >      -lrt -lm -lvapiclient -lsubunit main.c
>        -o test
>        >      >      >        >      > 3、then,    #./test        
>        >      >      >        >      >            But it shows
>        vl_map_shmem:639:
>        >      region init
>        >      >      fail
>        >      >      >        >       
>        >      >      >        >      That’s an indication that it cannot
>        connect to
>        >      VPP.
>        >      >      >        >      Can vpp_api_test connect?
>        >      >      >        >       
>        >      >      >        >      Cheers,
>        >      >      >        >      Ole
>        >      >      >        >       
>        >      >      >        >       
>        >      >      >        >      >
>        >      >      >        >      > wangchuan...@163.com
>        >      >      >        >      > 
>        >      >      >        >      > From: Ole Troan
>        >      >      >        >      > Date: 2018-09-13 21:44
>        >      >      >        >      > To: wangchuan...@163.com
>        >      >      >        >      > CC: Klement Sekera -X (ksekera -
>        PANTHEON
>        >      TECHNOLOGIES
>        >      >      at
>        >      >      >        Cisco); Dave
>        >      >      >        >      Barach (dbarach); vpp-dev
>        >      >      >        >      > Subject: Re: [vpp-dev] VPP's
>        C-type-api example
>        >      >      >        >      > > i am be root
>        >      >      >        >      > 
>        >      >      >        >      > Then you must provide more details.
>        >      >      >        >      > 
>        >      >      >        >      > Cheers,
>        >      >      >        >      > Ole
>        >      >      >        >      > 
>        >      >      >        >      > 
>        >      >      >        >      > >
>        >      >      >        >      > > wangchuan...@163.com
>        >      >      >        >      > >
>        >      >      >        >      > > From: Ole Troan
>        >      >      >        >      > > Date: 2018-09-13 21:26
>        >      >      >        >      > > To: wangchuan...@163.com
>        >      >      >        >      > > CC: Klement Sekera -X (ksekera -
>        PANTHEON
>        >      >      TECHNOLOGIES at
>        >      >      >        Cisco);
>        >      >      >        >      Dave Barach (dbarach); vpp-dev
>        >      >      >        >      > > Subject: Re: [vpp-dev] VPP's
>        C-type-api
>        >      example
>        >      >      >        >      > > > But I got some error when using
>        vapi -
>        >      >      vapi_connect as "
>        >      >      >        >      vl_map_shmem:639: region init fail “.
>        >      >      >        >      > >
>        >      >      >        >      > > Permission error?
>        >      >      >        >      > > Run client as root, or configure VPP
>        to set
>        >      >      permissions on
>        >      >      >        API
>        >      >      >        >      shared memory.
>        >      >      >        >      > >
>        >      >      >        >      > > In VPP startup:
>        >      >      >        >      > > api-segment { uid <foo> gid <foo> }
>        >      >      >        >      > >
>        >      >      >        >      > > Cheers,
>        >      >      >        >      > > Ole
>        >      >      >        >      > >
>        >      >      >        >      > > > And my mem : MemFree:         
>        220036
>        >      kB     
>        >      >      |          
>        >      >      >        >      HugePages_Total:     679       |      
>        >      >      HugePages_Free:      627
>        >      >      >        >      > > > Help please!
>        >      >      >        >      > > >
>        >      >      >        >      > > > My code:
>        >      >      >        >      > > >     int main()
>        >      >      >        >      > > > {
>        >      >      >        >      > > >   vapi_ctx_t ctx;
>        >      >      >        >      > > >   vapi_error_e rv = vapi_ctx_alloc
>        (&ctx);
>        >      >      >        >      > > >   vapi_msg_show_version *sv =
>        >      >      vapi_alloc_show_version
>        >      >      >        (ctx);
>        >      >      >        >      > > >   rv = vapi_connect (ctx,
>        app_name,
>        >      api_prefix,
>        >      >      >        >      max_outstanding_requests,
>        >      >      >        >      > > >                     
>        response_queue_size,
>        >      >      >        VAPI_MODE_BLOCKING);
>        >      >      >        >      > > >   rv = vapi_send (ctx, sv);
>        >      >      >        >      > > >   vapi_msg_show_version_reply
>        *reply;
>        >      >      >        >      > > >   rv = vapi_recv (ctx, (void **)
>        &reply,
>        >      NULL, 0,
>        >      >      0);
>        >      >      >        >      > > >   if(reply != NULL)
>        >      >      >        >      > > >       printf("ret[%d] program[%s]
>        >      version[%s] \n
>        >      >      >        build_date[%s]
>        >      >      >        >      build_directory[%s]\n",
>        reply->payload.retval,
>        >      >      >        reply->payload.program,
>        >      >      >        >      reply->payload.version,
>        >      reply->payload.build_date,
>        >      >      >        >      reply->payload.build_directory);
>        >      >      >        >      > > >   else
>        >      >      >        >      > > >     printf("show version return
>        none\n");
>        >      >      >        >      > > >   rv = vapi_disconnect (ctx);
>        >      >      >        >      > > >   vapi_ctx_free (ctx);
>        >      >      >        >      > > >  printf("end\n");
>        >      >      >        >      > > > return 0;
>        >      >      >        >      > > > }
>        >      >      >        >      > > >
>        >      >      >        >      > > > wangchuan...@163.com
>        >      >      >        >      > > >
>        >      >      >        >      > > > From: Klement Sekera
>        >      >      >        >      > > > Date: 2018-09-13 17:02
>        >      >      >        >      > > > To: Ole Troan; wangchuanguo
>        >      >      >        >      > > > CC: Dave Barach (dbarach); vpp-dev
>        >      >      >        >      > > > Subject: Re: [vpp-dev] VPP's
>        C-type-api
>        >      example
>        >      >      >        >      > > > You can also check out the
>        test/ext
>        >      directory for
>        >      >      >        vapi_c_test.c
>        >      >      >        >      and
>        >      >      >        >      > > > vapi_cpp_test.cpp, which are
>        unittests for
>        >      these
>        >      >      bindings
>        >      >      >        and
>        >      >      >        >      there is
>        >      >      >        >      > > > also an example of _dump API call.
>        >      >      >        >      > > >
>        >      >      >        >      > > > Regards,
>        >      >      >        >      > > > Klement
>        >      >      >        >      > > >
>        >      >      >        >      > > > Quoting Ole Troan (2018-09-13
>        09:33:14)
>        >      >      >        >      > > > > Hi again,
>        >      >      >        >      > > > >
>        >      >      >        >      > > > > >     I am in the beginning of
>        >      using-c-api. 
>        >      >      Should I
>        >      >      >        not
>        >      >      >        >      follow  (src/vpp-api/client)  ?
>        >      >      >        >      > > > > > Can you please show me a
>        fun-name and a
>        >      >      example of
>        >      >      >        the higher
>        >      >      >        >      level C API?
>        >      >      >        >      > > > >
>        >      >      >        >      > > > > That’s right, I wouldn’t
>        recommend using
>        >      the
>        >      >      >        src/vpp-aoi/client
>        >      >      >        >      API unless you are building a new
>        language
>        >      binding.
>        >      >      >        >      > > > >
>        >      >      >        >      > > > > If you need a C interface you
>        should use
>        >      VAPI.
>        >      >      >        >      > > > >
>        >      >      >        >      > > > > See interface.api.vapi.h
>        (auto-generated)
>        >      for
>        >      >      >        >      sw_interface_dump()
>        >      >      >        >      > > > >
>        >      >      >        >      > > > > static inline vapi_error_e
>        >      >      >        vapi_sw_interface_dump(struct
>        >      >      >        >      vapi_ctx_s *ctx,
>        >      >      >        >      > > > >   vapi_msg_sw_interface_dump
>        *msg,
>        >      >      >        >      > > > >   vapi_error_e
>        (*callback)(struct
>        >      vapi_ctx_s
>        >      >      *ctx,
>        >      >      >        >      > > > >                            void
>        >      *callback_ctx,
>        >      >      >        >      > > > >                           
>        vapi_error_e
>        >      rv,
>        >      >      >        >      > > > >                            bool
>        is_last,
>        >      >      >        >      > > > >                           
>        >      >      >        vapi_payload_sw_interface_details
>        >      >      >        >      *reply),
>        >      >      >        >      > > > >   void *callback_ctx)
>        >      >      >        >      > > > >
>        >      >      >        >      > > > >
>        >      >      >        >      > > > > src/vpp-api/vapi/vapi_doc.md for
>        >      documentation.
>        >      >      >        >      > > > >
>        >      >      >        >      > > > > To get a feel of how the API
>        works, at
>        >      even
>        >      >      higher
>        >      >      >        level you can
>        >      >      >        >      play with the Python language binding.
>        >      >      >        >      > > > >
>        >      >      >        >      > > > > Best regards,
>        >      >      >        >      > > > > Ole
>        >      >      >        >      > > > >
>        >      >      >        >      > > > >
>        >      >      >        >      > > > >
>        >      >      >        >      > > > > -=-=-=-=-=-=-=-=-=-=-=-
>        >      >      >        >      > > > > Links: You receive all messages
>        sent to
>        >      this
>        >      >      group.
>        >      >      >        >      > > > >
>        >      >      >        >      > > > > View/Reply Online (#10481):
>        >      >      >        >     
>        https://lists.fd.io/g/vpp-dev/message/10481
>        >      >      >        >      > > > > Mute This Topic:
>        >      >      https://lists.fd.io/mt/25510961/675704
>        >      >      >        >      > > > > Group Owner:
>        vpp-dev+ow...@lists.fd.io
>        >      >      >        >      > > > > Unsubscribe:
>        >      >      https://lists.fd.io/g/vpp-dev/unsub 
>        >      >      >        >      [ksek...@cisco.com]
>        >      >      >        >      > > > > -=-=-=-=-=-=-=-=-=-=-=-
>        >      >      >        >
>        >      >      >        > References
>        >      >      >        >
>        >      >      >        >    Visible links
>        >      >      >        >    1. mailto:otr...@employees.org
>        >      >      >        >    2. mailto:wangchuan...@163.com
>        >      >      >        >    3. mailto:ksek...@cisco.com
>        >      >      >        >    4. mailto:dbar...@cisco.com
>        >      >      >        >    5. mailto:vpp-dev@lists.fd.io
>        >      >      >
>        >      >      > References
>        >      >      >
>        >      >      >    Visible links
>        >      >      >    1. mailto:wangchuan...@163.com
>        >      >      >    2. mailto:ksek...@cisco.com
>        >      >      >    3. mailto:otr...@employees.org
>        >      >      >    4. mailto:dbar...@cisco.com
>        >      >      >    5. mailto:vpp-dev@lists.fd.io
>        >      >      >    6. mailto:ksek...@cisco.com
>        >      >      >    7. mailto:wangchuan...@163.com
>        >      >      >    8. mailto:otr...@employees.org
>        >      >      >    9. mailto:dbar...@cisco.com
>        >      >      >   10. mailto:vpp-dev@lists.fd.io
>        >      >
>        >      > References
>        >      >
>        >      >    Visible links
>        >      >    1. mailto:ksek...@cisco.com
>        >      >    2. mailto:wangchuan...@163.com
>        >      >    3. mailto:otr...@employees.org
>        >      >    4. mailto:dbar...@cisco.com
>        >      >    5. mailto:vpp-dev@lists.fd.io
>        >
>        > References
>        >
>        >    Visible links
>        >    1. mailto:ksek...@cisco.com
>        >    2. mailto:wangchuan...@163.com
>        >    3. mailto:otr...@employees.org
>        >    4. mailto:dbar...@cisco.com
>        >    5. mailto:vpp-dev@lists.fd.io
> 
> References
> 
>    Visible links
>    1. src/vpp-api/vapi/vapi_c_gen.py
>         
> https://github.com/FDio/vpp/commit/34a962b728158f3596efaec6b45d89d8ea9ab218#diff-e099e201eab1734fd76218e431ae1544
>    2. src/vpp-api/vapi/vapi_json_parser.py
>         
> https://github.com/FDio/vpp/commit/34a962b728158f3596efaec6b45d89d8ea9ab218#diff-4833059a8683ac12066007ad4bec97b4
>    3. mailto:wangchuan...@163.com
>    4. mailto:ksek...@cisco.com
>    5. mailto:otr...@employees.org
>    6. mailto:dbar...@cisco.com
>    7. mailto:vpp-dev@lists.fd.io
>    8. mailto:ksek...@cisco.com
>    9. mailto:wangchuan...@163.com
>   10. mailto:otr...@employees.org
>   11. mailto:dbar...@cisco.com
>   12. mailto:vpp-dev@lists.fd.io
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#10571): https://lists.fd.io/g/vpp-dev/message/10571
Mute This Topic: https://lists.fd.io/mt/25510961/21656
Group Owner: vpp-dev+ow...@lists.fd.io
Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to