Hello,
I am using memif in our applications. In my case, I have to use memif in 
secondary process. I can use memif ( as a server ) in secondary process. 
Running primary process "./primaryProc --proc-type=primary --file-prefix=pmd1 
--vdev=net_memif,role=server,socket=/tmp/memif.sock, socket-abstract=no" like 
that and then running secondary process "./secondaryProc --proc-type=auto 
--file-prefix=pmd1" like that. Also, I configure memif eth device and start at 
secondary process. With that way I can run memif as a server in secondary 
process, but I have to implement it as a client. By doing the same steps, as I 
did the for the server memif, I cannot be able to run client memif in secondary 
process. These are the configurations that I am doing for memif eth device at 
secondary process. ( In my implementations, I always give full arguments to 
primary process then configure / initialize and start the memif eth devices in 
secondary process)

       if(!rte_eth_dev_get_port_by_name(m_name.c_str(),&m_portId))
            std::cout << "Get net_memif eth device successfully port id : " << 
m_portId << "\n";
        else
        {
            std::cout << "rte_eth_dev_get_port_by_name ERROR \n";
            return false;
        }

        auto eth_count = rte_eth_dev_count_avail();

        if(eth_count < 0)
            return false;


        if(!rte_eth_dev_info_get(m_portId,&ethInfo)) {

            std::cout << "Get eth dev info successfully\n";
            std::cout << " port id : " << m_portId <<"ethInfo : " << 
ethInfo.driver_name << "\n";
        }
        else
        {
            std::cout << "Get eth dev info ERROR\n";
            return false;
        }


        if(!rte_eth_dev_configure(m_portId, m_config.queue_rx_count, 
m_config.queue_tx_count, &ethConfig)) {

            std::cout << "Configure eth dev successfully\n";
        }
        else
        {
            std::cout << "Configure eth dev ERROR\n";
            return false;
        }

        if(!rte_eth_dev_adjust_nb_rx_tx_desc(m_portId, &m_config.queue_rx_desc, 
&m_config.queue_tx_desc))
            std::cout << "Adjust eth dev rx tx desc successfully\n";
        else
        {
            std::cout << "Adjust eth dev rx tx desc ERROR\n";
            return false;
        }

        for (int i = 0; i < m_config.queue_rx_count; i++) {
            if(!rte_eth_rx_queue_setup(m_portId, i, m_config.queue_rx_desc, 
rte_eth_dev_socket_id(m_portId), &ethInfo.default_rxconf, mempool))
                std::cout << "Setup rx queue successfully socket id : " << 
rte_eth_dev_socket_id(m_portId) << std::endl;
            else
            {
                std::cout << "Setup rx queue ERROR\n";
                return false;
            }
        }


        for (int i = 0; i < m_config.queue_tx_count; i++) {
            if(!rte_eth_tx_queue_setup(m_portId, i, m_config.queue_tx_desc, 
rte_eth_dev_socket_id(m_portId), &ethInfo.default_txconf))
                std::cout << "Setup tx queue successfully socket id : " << 
rte_eth_dev_socket_id(m_portId) << "\n";
            else
            {
                std::cout << "Setup tx queue ERROR\n";
                return false;
            }
        }

Then I am starting memif eth device with these;

        if( rte_eth_promiscuous_enable(m_portId) != 0) {
            std::cout << "rte_eth_promiscuous_enable error\n";
            return false;
        }
        else
            std::cout << "rte_eth_promiscuous_enable success \n";


        if(!rte_eth_dev_start(m_portId)) {
            std::cout << "Eth dev is started \n";
        }
        else {
            std::cout << "Eth dev is start ERROR \n";
            return false;
        }

I am running client memif after I run memif server (third independent process). 
When I check the client memif link status with rte_eth_link_get, memif client 
link status is down and DPDK giving debug output something like "Resource 
temporarly unavailable" but server memif link up . Which I did not face with 
server memif implementation.

Could you give me clue or the reason, why I cannot run client memif, as I run 
server memif ?
If it is possible, how can I achieve that.

Thank you,
Best Regards

Bu elektronik posta ve onunla iletilen bütün dosyalar sadece göndericisi 
tarafindan almasi amaçlanan yetkili, gerçek ya da tüzel kisinin kullanimi 
içindir. Eger söz konusu yetkili alici degilseniz, bu elektronik postanin 
içerigini açiklamaniz, kopyalamaniz, yönlendirmeniz ve kullanmaniz kesinlikle 
yasaktir ve bu elektronik postayi derhal silmeniz gerekmektedir. Sirketimiz bu 
mesajin içerdigi bilgilerin dogrulugu veya eksiksiz oldugu konusunda herhangi 
bir garanti vermemektedir. Bu nedenle, bu bilgilerin ne sekilde olursa olsun 
içeriginden, iletilmesinden, alinmasindan ve saklanmasindan sorumlu degildir. 
Bu mesajdaki görüsler yalnizca gönderen kisiye aittir ve Sirketimizin 
görüslerini yansitmayabilir. Tarafiniz ile paylasilan kisisel verilerin, 6698 
sayili Kisisel Verilerin Korunmasi Kanununa uygun olarak islenmesi geregini 
bilginize sunariz.

________________________________

This e-mail and all files sent with it are intended for authorized natural or 
legal persons, who should be the only persons to open and read them. If you are 
not an authorized recipient, you are strictly prohibited from disclosing, 
copying, forwarding, and using the contents of this e-mail, and you must 
immediately delete it. Our company does not guarantee the accuracy or 
thoroughness of the information contained in this message. It is therefore in 
no way responsible for the content, sending, retrieval and storage of this 
information. The opinions contained in this message are the views of the sender 
only and do not necessarily reflect the views of the company. We would like to 
inform you that any personal data shared with you should be processed in 
accordance with the Law on Protection of Personal Data numbered 6698.

Reply via email to