<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
Hello,</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
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 "<i><b>./primaryProc --proc-type=primary --file-prefix=pmd1 --vdev=net_memif,role=server,socket=/tmp/memif.sock,
socket-abstract=no</b></i>" like that and then running secondary process "<i><b>./secondaryProc --proc-type=auto --file-prefix=pmd1</b></i>" 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)<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
<br>
<span style="font-size: 10pt;"><i><b> if(!rte_eth_dev_get_port_by_name(m_name.c_str(),&m_portId))</b></i></span>
<div><span style="font-size: 10pt;"><i><b> std::cout << "Get net_memif eth device successfully port id : " << m_portId << "\n";</b></i></span></div>
<div><span style="font-size: 10pt;"><i><b> else</b></i></span></div>
<div><span style="font-size: 10pt;"><i><b> {</b></i></span></div>
<div><span style="font-size: 10pt;"><i><b> std::cout << "rte_eth_dev_get_port_by_name ERROR \n";</b></i></span></div>
<div><span style="font-size: 10pt;"><i><b> return false;</b></i></span></div>
<div><span style="font-size: 10pt;"><i><b> }</b></i></span></div>
<div><i><b><br>
</b></i></div>
<div><span style="font-size: 10pt;"><i><b> auto eth_count = rte_eth_dev_count_avail();</b></i></span></div>
<div><i><b><br>
</b></i></div>
<div><span style="font-size: 10pt;"><i><b> if(eth_count < 0)</b></i></span></div>
<div><span style="font-size: 10pt;"><i><b> return false;</b></i></span></div>
<div><i><b><br>
</b></i></div>
<div><i><b><br>
</b></i></div>
<div><span style="font-size: 10pt;"><i><b> if(!rte_eth_dev_info_get(m_portId,ðInfo)) {</b></i></span></div>
<div><i><b><br>
</b></i></div>
<div><span style="font-size: 10pt;"><i><b> std::cout << "Get eth dev info successfully\n";</b></i></span></div>
<div><span style="font-size: 10pt;"><i><b> std::cout << " port id : " << m_portId <<"ethInfo : " << ethInfo.driver_name << "\n";</b></i></span></div>
<div><span style="font-size: 10pt;"><i><b> }</b></i></span></div>
<div><span style="font-size: 10pt;"><i><b> else</b></i></span></div>
<div><span style="font-size: 10pt;"><i><b> {</b></i></span></div>
<div><span style="font-size: 10pt;"><i><b> std::cout << "Get eth dev info ERROR\n";</b></i></span></div>
<div><span style="font-size: 10pt;"><i><b> return false;</b></i></span></div>
<div><span style="font-size: 10pt;"><i><b> }</b></i></span></div>
<div><i><b><br>
</b></i></div>
<div><i><b><br>
</b></i></div>
<div><span style="font-size: 10pt;"><i><b> if(!rte_eth_dev_configure(m_portId, m_config.queue_rx_count, m_config.queue_tx_count, ðConfig)) {</b></i></span></div>
<div><i><b><br>
</b></i></div>
<div><span style="font-size: 10pt;"><i><b> std::cout << "Configure eth dev successfully\n";</b></i></span></div>
<div><span style="font-size: 10pt;"><i><b> }</b></i></span></div>
<div><span style="font-size: 10pt;"><i><b> else</b></i></span></div>
<div><span style="font-size: 10pt;"><i><b> {</b></i></span></div>
<div><span style="font-size: 10pt;"><i><b> std::cout << "Configure eth dev ERROR\n";</b></i></span></div>
<div><span style="font-size: 10pt;"><i><b> return false;</b></i></span></div>
<div><span style="font-size: 10pt;"><i><b> }</b></i></span></div>
<div><i><b><br>
</b></i></div>
<div><span style="font-size: 10pt;"><i><b> if(!rte_eth_dev_adjust_nb_rx_tx_desc(m_portId, &m_config.queue_rx_desc, &m_config.queue_tx_desc))</b></i></span></div>
<div><span style="font-size: 10pt;"><i><b> std::cout << "Adjust eth dev rx tx desc successfully\n";</b></i></span></div>
<div><span style="font-size: 10pt;"><i><b> else</b></i></span></div>
<div><span style="font-size: 10pt;"><i><b> {</b></i></span></div>
<div><span style="font-size: 10pt;"><i><b> std::cout << "Adjust eth dev rx tx desc ERROR\n";</b></i></span></div>
<div><span style="font-size: 10pt;"><i><b> return false;</b></i></span></div>
<div><span style="font-size: 10pt;"><i><b> }</b></i></span></div>
<div><i><b><br>
</b></i></div>
<div><span style="font-size: 10pt;"><i><b> for (int i = 0; i < m_config.queue_rx_count; i++) {</b></i></span></div>
<div><span style="font-size: 10pt;"><i><b> if(!rte_eth_rx_queue_setup(m_portId, i, m_config.queue_rx_desc, rte_eth_dev_socket_id(m_portId), ðInfo.default_rxconf, mempool))</b></i></span></div>
<div><span style="font-size: 10pt;"><i><b> std::cout << "Setup rx queue successfully socket id : " << rte_eth_dev_socket_id(m_portId) << std::endl;</b></i></span></div>
<div><span style="font-size: 10pt;"><i><b> else</b></i></span></div>
<div><span style="font-size: 10pt;"><i><b> {</b></i></span></div>
<div><span style="font-size: 10pt;"><i><b> std::cout << "Setup rx queue ERROR\n";</b></i></span></div>
<div><span style="font-size: 10pt;"><i><b> return false;</b></i></span></div>
<div><span style="font-size: 10pt;"><i><b> }</b></i></span></div>
<div><span style="font-size: 10pt;"><i><b> }</b></i></span></div>
<div><i><b><br>
</b></i></div>
<div><i><b><br>
</b></i></div>
<div><span style="font-size: 10pt;"><i><b> for (int i = 0; i < m_config.queue_tx_count; i++) {</b></i></span></div>
<div><span style="font-size: 10pt;"><i><b> if(!rte_eth_tx_queue_setup(m_portId, i, m_config.queue_tx_desc, rte_eth_dev_socket_id(m_portId), ðInfo.default_txconf))</b></i></span></div>
<div><span style="font-size: 10pt;"><i><b> std::cout << "Setup tx queue successfully socket id : " << rte_eth_dev_socket_id(m_portId) << "\n";</b></i></span></div>
<div><span style="font-size: 10pt;"><i><b> else</b></i></span></div>
<div><span style="font-size: 10pt;"><i><b> {</b></i></span></div>
<div><span style="font-size: 10pt;"><i><b> std::cout << "Setup tx queue ERROR\n";</b></i></span></div>
<div><span style="font-size: 10pt;"><i><b> return false;</b></i></span></div>
<div><span style="font-size: 10pt;"><i><b> }</b></i></span></div>
<span style="font-size: 10pt;"><i><b> }</b></i></span></div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
Then I am starting memif eth device with these;</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
<span style="font-size: 10pt;"><i> </i></span><span style="font-size: 10pt;"><i><b>if( rte_eth_promiscuous_enable(m_portId) != 0) {</b></i></span>
<div><span style="font-size: 10pt;"><i><b> std::cout << "rte_eth_promiscuous_enable error\n";</b></i></span></div>
<div><span style="font-size: 10pt;"><i><b> return false;</b></i></span></div>
<div><span style="font-size: 10pt;"><i><b> }</b></i></span></div>
<div><span style="font-size: 10pt;"><i><b> else</b></i></span></div>
<div><span style="font-size: 10pt;"><i><b> std::cout << "rte_eth_promiscuous_enable success \n";</b></i></span></div>
<div><i><b><br>
</b></i></div>
<div><i><b><br>
</b></i></div>
<div><span style="font-size: 10pt;"><i><b> if(!rte_eth_dev_start(m_portId)) {</b></i></span></div>
<div><span style="font-size: 10pt;"><i><b> std::cout << "Eth dev is started \n";</b></i></span></div>
<div><span style="font-size: 10pt;"><i><b> }</b></i></span></div>
<div><span style="font-size: 10pt;"><i><b> else {</b></i></span></div>
<div><span style="font-size: 10pt;"><i><b> std::cout << "Eth dev is start ERROR \n";</b></i></span></div>
<div><span style="font-size: 10pt;"><i><b> return false;</b></i></span></div>
<span style="font-size: 10pt;"><i><b> }</b></i></span><br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
I am running client memif after I run memif server (third independent process). When I check the client memif link status with
<i><b>rte_eth_link_get, </b></i>memif client link status is down and DPDK giving debug output something like "<i><b>Resource temporarly
</b><b>unavailable</b></i>" but server memif link up . Which I did not face with server memif implementation.</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
Could you give me clue or the reason, why I cannot run client memif, as I run server memif ?</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
If it is possible, how can I achieve that.</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
Thank you,</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
Best Regards<br>
</div>
<!DOCTYPE html>
<p>Bu elektronik posta ve onunla iletilen bütün dosyalar sadece göndericisi tarafından alması amaçlanan yetkili, gerçek ya da tüzel kişinin kullanımı içindir. Eğer söz konusu yetkili alıcı değilseniz, bu elektronik postanın içeriğini açıklamanız, kopyalamanız,
yönlendirmeniz ve kullanmanız kesinlikle yasaktır ve bu elektronik postayı derhal silmeniz gerekmektedir. Şirketimiz bu mesajın içerdiği bilgilerin doğruluğu veya eksiksiz olduğu konusunda herhangi bir garanti vermemektedir. Bu nedenle, bu bilgilerin ne şekilde
olursa olsun içeriğinden, iletilmesinden, alınmasından ve saklanmasından sorumlu değildir. Bu mesajdaki görüşler yalnızca gönderen kişiye aittir ve Şirketimizin görüşlerini yansıtmayabilir. Tarafınız ile paylaşılan kişisel verilerin, 6698 sayılı Kişisel Verilerin
Korunması Kanununa uygun olarak işlenmesi gereğini bilginize sunarız. </p>
<hr style:?border-top:="" 1px="" solid="" black?="">
<p>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. </p>
</body>
</html>