<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Times New Roman",serif;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:#0563C1;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:#954F72;
text-decoration:underline;}
span.EmailStyle17
{mso-style-type:personal-reply;
font-family:"Calibri",sans-serif;
color:#1F497D;}
.MsoChpDefault
{mso-style-type:export-only;
font-family:"Calibri",sans-serif;}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="#0563C1" vlink="#954F72">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D">The verbs provider doesn’t support FI_SOURCE for the FI_EP_DGRAM endpoint type today but it can be added. Btw, you’re using the verbs interface of hfi1. Is there
a reason to use verbs instead of psm2? What’s the use case here?<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D">Thanks,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D">Arun.<o:p></o:p></span></p>
<p class="MsoNormal"><a name="_MailEndCompose"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D"><o:p> </o:p></span></a></p>
<div style="border:none;border-left:solid blue 1.5pt;padding:0in 0in 0in 4.0pt">
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><a name="_____replyseparator"></a><b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">From:</span></b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif"> Libfabric-users [mailto:libfabric-users-bounces@lists.openfabrics.org]
<b>On Behalf Of </b>Yilong Li<br>
<b>Sent:</b> Friday, August 16, 2019 12:08 AM<br>
<b>To:</b> libfabric-users@lists.openfabrics.org<br>
<b>Subject:</b> [libfabric-users] How to retrieve the source address of an incoming datagram with prov/verbs?<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal">Hi,<o:p></o:p></p>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">I notice that the verbs provider doesn't advertise the FI_SOURCE capability. So how can I retrieve the source address of an incoming datagram? My application has a client-server architecture: the server cannot know the address of a client
until the client tries to contact the server.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">I am pasting the output of `fi_info -t FI_EP_DGRAM -p verbs -v` on my machine below.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">Thanks,<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">Yilong<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">---------------------------------------------------------------------<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">fi_info:<br>
caps: [ FI_MSG, FI_RECV, FI_SEND, FI_LOCAL_COMM, FI_REMOTE_COMM ]<br>
mode: [ FI_MSG_PREFIX, FI_RX_CQ_DATA ]<br>
addr_format: FI_ADDR_IB_UD<br>
src_addrlen: 32<br>
dest_addrlen: 0<br>
src_addr: fi_addr_ib_ud://:::0/0/0/0<br>
dest_addr: (null)<br>
handle: (nil)<br>
fi_tx_attr:<br>
caps: [ FI_MSG, FI_RECV, FI_SEND, FI_LOCAL_COMM, FI_REMOTE_COMM ]<br>
mode: [ ]<br>
op_flags: [ ]<br>
msg_order: [ FI_ORDER_RAR, FI_ORDER_RAW, FI_ORDER_RAS, FI_ORDER_WAW, FI_ORDER_WAS, FI_ORDER_SAW, FI_ORDER_SAS, FI_ORDER_RMA_RAR, FI_ORDER_RMA_RAW, FI_ORDER_RMA_WAW, FI_ORDER_ATOMIC_RAR, FI_ORDER_ATOMIC_RAW, FI_ORDER_ATOMIC_WAW ]<br>
comp_order: [ FI_ORDER_STRICT ]<br>
inject_size: 0<br>
size: 384<br>
iov_limit: 4<br>
rma_iov_limit: 1<br>
fi_rx_attr:<br>
caps: [ FI_MSG, FI_RECV, FI_SEND, FI_LOCAL_COMM, FI_REMOTE_COMM ]<br>
mode: [ FI_MSG_PREFIX, FI_RX_CQ_DATA ]<br>
op_flags: [ ]<br>
msg_order: [ FI_ORDER_RAR, FI_ORDER_RAW, FI_ORDER_RAS, FI_ORDER_WAW, FI_ORDER_WAS, FI_ORDER_SAW, FI_ORDER_SAS, FI_ORDER_RMA_RAR, FI_ORDER_RMA_RAW, FI_ORDER_RMA_WAW, FI_ORDER_ATOMIC_RAR, FI_ORDER_ATOMIC_RAW, FI_ORDER_ATOMIC_WAW ]<br>
comp_order: [ FI_ORDER_STRICT, FI_ORDER_DATA ]<br>
total_buffered_recv: 0<br>
size: 384<br>
iov_limit: 4<br>
fi_ep_attr:<br>
type: FI_EP_DGRAM<br>
protocol: FI_PROTO_IB_UD<br>
protocol_version: 1<br>
max_msg_size: 4096<br>
msg_prefix_size: 40<br>
max_order_raw_size: 4096<br>
max_order_war_size: 0<br>
max_order_waw_size: 4096<br>
mem_tag_format: 0x0000000000000000<br>
tx_ctx_cnt: 1<br>
rx_ctx_cnt: 1<br>
auth_key_size: 0<br>
fi_domain_attr:<br>
domain: 0x0<br>
name: hfi1_0-dgram<br>
threading: FI_THREAD_SAFE<br>
control_progress: FI_PROGRESS_AUTO<br>
data_progress: FI_PROGRESS_AUTO<br>
resource_mgmt: FI_RM_ENABLED<br>
av_type: FI_AV_UNSPEC<br>
mr_mode: [ FI_MR_LOCAL, FI_MR_ALLOCATED ]<br>
mr_key_size: 4<br>
cq_data_size: 4<br>
cq_cnt: 131071<br>
ep_cnt: 32768<br>
tx_ctx_cnt: 1024<br>
rx_ctx_cnt: 1024<br>
max_ep_tx_ctx: 1024<br>
max_ep_rx_ctx: 1024<br>
max_ep_stx_ctx: 0<br>
max_ep_srx_ctx: 1024<br>
cntr_cnt: 0<br>
mr_iov_limit: 1<br>
caps: [ FI_LOCAL_COMM, FI_REMOTE_COMM ]<br>
mode: [ ]<br>
auth_key_size: 0<br>
max_err_data: 255<br>
mr_cnt: 0<br>
fi_fabric_attr:<br>
name: IB-0xfe80000000000000<br>
prov_name: verbs<br>
prov_version: 1.0<br>
api_version: 1.8<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"> fid_nic:<br>
fi_device_attr:<br>
name: hfi1_0<br>
device_id: 9456<br>
device_version: 17<br>
vendor_id: 4469<br>
driver: (null)<br>
firmware: 1.26.1<br>
fi_bus_attr:<br>
fi_bus_type: FI_BUS_UNKNOWN<br>
fi_link_attr:<br>
address: (null)<br>
mtu: 4096<br>
speed: 104857600<br>
state: FI_LINK_UP<br>
network_type: InfiniBand<o:p></o:p></p>
</div>
</div>
</div>
</div>
</body>
</html>