<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<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);">
<a id="OWAAM539479" class="J9Y1oNF3ZpoR5LC3M2PHm mention ms-bgc-nlr ms-fcl-b" href="mailto:stephen@networkplumber.org">@Stephen Hemminger</a> This is process private as the tap fds are maintained in per process data structures. In existing scheme, the fds are
opened by the primary during queue setup and exchanged to during secondary probe where the send_msg using SOL_SOCKET and SCM_RIGHTS would remap the corresponding fds to the secondary process. If the secondary process is coming up once the primary is initialised
things would work fine, but it's a problem during hotplug of the tap device. </div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Thanks,</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Param. </div>
<div id="appendonsend"></div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> Stephen Hemminger <stephen@networkplumber.org><br>
<b>Sent:</b> 18 January 2022 03:46<br>
<b>To:</b> Kumara Parameshwaran <kumaraparamesh92@gmail.com><br>
<b>Cc:</b> keith.wiles@intel.com <keith.wiles@intel.com>; dev@dpdk.org <dev@dpdk.org>; Kumara Parameshwaran <kparameshwar@vmware.com><br>
<b>Subject:</b> Re: [PATCH] net/tap: Bug fix to populate fds in secondary process</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt;">
<div class="PlainText">On Fri, 26 Nov 2021 09:45:15 +0530<br>
Kumara Parameshwaran <kumaraparamesh92@gmail.com> wrote:<br>
<br>
> + ret = rte_eth_dev_get_port_by_name(request_param->port_name, &port_id);<br>
> + if (ret) {<br>
> + TAP_LOG(ERR, "Failed to get port id for %s",<br>
> + request_param->port_name);<br>
> + return -1;<br>
> + }<br>
> + dev = &rte_eth_devices[port_id];<br>
> + process_private = dev->process_private;<br>
> + dev->data->nb_rx_queues = request_param->rxq_count;<br>
> + dev->data->nb_tx_queues = request_param->txq_count;<br>
<br>
Why is this necessary? dev->data is already in memory shared between primary<br>
and secondary process.<br>
</div>
</span></font></div>
</body>
</html>