Code Monkey home page Code Monkey logo

archived-jvpp's People

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

Forkers

pan2za blocky2019

archived-jvpp's Issues

jvpp use binary api error

Hi, now i use jvpp for vpp version 2101 binary api and there has a question

now jvpp cannot disconnect from vpp and when long time the code run, svm_queue message will full and vpp will deadlock

vl_client_disconnect function in vpp

int
vl_client_disconnect (void)
{
vl_api_memclnt_delete_reply_t *rp;
svm_queue_t *vl_input_queue;
api_main_t *am = vlibapi_get_main ();
time_t begin;

vl_input_queue = am->vl_input_queue;
vl_client_send_disconnect (0 /* wait for reply */ );

/*

  • Have to be careful here, in case the client is disconnecting

  • because e.g. the vlib process died, or is unresponsive.
    */
    begin = time (0);
    while (1)
    {
    time_t now;

    now = time (0);

    if (now >= (begin + 2))
    {
    clib_warning ("peer unresponsive, give up");
    am->my_client_index = ~0;
    am->my_registration = 0;
    am->shmem_hdr = 0;
    return -1;
    }

    /* this is error that vl_input_queue->curszie == 0 */
    if (svm_queue_sub (vl_input_queue, (u8 *) & rp, SVM_Q_NOWAIT, 0) < 0)
    continue;

    VL_MSG_API_UNPOISON (rp);

    /* drain the queue */
    if (ntohs (rp->_vl_msg_id) != VL_API_MEMCLNT_DELETE_REPLY)
    {
    clib_warning ("queue drain: %d", ntohs (rp->_vl_msg_id));
    vl_msg_api_handler ((void *) rp);
    continue;
    }
    vl_msg_api_handler ((void *) rp);
    break;
    }

vl_api_name_and_crc_free ();
return 0;
}

when jvpp use close function for connection, svm_queue_sub will always return -2 because that svm_queue_t vl_input_queue's value is not correct

so i think jvpp has a bug about svm_queue use, anyone can resolve this ?

Thanks!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.