rdma_cm UD sendto without connect (2024)

Discussion:

rdma_cm UD sendto without connect

Kelly Burkhart

2011-11-03 15:20:08 UTC

Permalink

Is it possible to send/recv datagrams with no previous connection
similar to UDP sendto/recvfrom? UD examples I've seen are connection
oriented and listen/connect/accept, establishing a connection prior to
conversing.

It appears that in order to do what I want, I need an ibv_ah to put in
the send wr. But how do I create one of these from an IP address/port
without doing an rdma_connect and waiting for
RDMA_CM_EVENT_ESTABLISHED?

From the receiving side, it looks like I can construct an ah from the

wc. Is that a low-cost operation?

Thanks,

-Kelly
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-***@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html

Hefty, Sean

2011-11-03 15:44:23 UTC

Permalink

Post by Kelly Burkhart
Is it possible to send/recv datagrams with no previous connection
similar to UDP sendto/recvfrom? UD examples I've seen are connection
oriented and listen/connect/accept, establishing a connection prior to
conversing.

To send a datagram, you need the QP number, qkey, and addressing information of the remote side. The UD examples that use listen/connect are still connectionless, but require the use of those calls mainly to resolve the remote QP number.

We may be able to add a sendto operation to the rdma_cm, but it would need to resolve the QPN and ibv_ah under the API for the first send to each destination.

Post by Kelly Burkhart
It appears that in order to do what I want, I need an ibv_ah to put in
the send wr. But how do I create one of these from an IP address/port
without doing an rdma_connect and waiting for
RDMA_CM_EVENT_ESTABLISHED?

You still need to convert the IP address into an RDMA address (i.e. LID) and discover the QPN.

Post by Kelly Burkhart
From the receiving side, it looks like I can construct an ah from the
wc. Is that a low-cost operation?

This probably depends on the implementation, but in general I wouldn't consider it a fast path operation. Someone from Mellanox should know the real cost.

- Sean
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-***@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html

Kelly Burkhart

2011-11-03 19:41:26 UTC

Permalink

Post by Kelly Burkhart
Is it possible to send/recv datagrams with no previous connection
similar to UDP sendto/recvfrom? =A0UD examples I've seen are connect=

ion

Post by Kelly Burkhart
oriented and listen/connect/accept, establishing a connection prior =

to

Post by Kelly Burkhart
conversing.

To send a datagram, you need the QP number, qkey, and addressing info=

rmation of the remote side. =A0The UD examples that use listen/connect =
are still connectionless, but require the use of those calls mainly to =
resolve the remote QP number.

We may be able to add a sendto operation to the rdma_cm, but it would=

need to resolve the QPN and ibv_ah under the API for the first send to=
each destination.

Post by Kelly Burkhart
It appears that in order to do what I want, I need an ibv_ah to put =

in

Post by Kelly Burkhart
the send wr. =A0But how do I create one of these from an IP address/=

port

Post by Kelly Burkhart
without doing an rdma_connect and waiting for
RDMA_CM_EVENT_ESTABLISHED?

You still need to convert the IP address into an RDMA address (i.e. L=

ID) and discover the QPN.

Are there calls in rdma_cm that allow me to do this? For the life of
me I can't figure out how, for instance, I would write an app that has
a single QP that recieves UD datagrams from anyone. How do potential
clients find the QP number, qkey and ah without using listen/accept
which will create a brand new QP every time?

-K
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" i=
n
the body of a message to majordomo-***@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html

Hefty, Sean

2011-11-03 21:05:53 UTC

Permalink

Post by Kelly Burkhart
Are there calls in rdma_cm that allow me to do this? For the life of
me I can't figure out how, for instance, I would write an app that has
a single QP that recieves UD datagrams from anyone. How do potential
clients find the QP number, qkey and ah without using listen/accept
which will create a brand new QP every time?

Yeah, the UD sample was based on an RC sample and isn't all that instructive... When you call rdma_accept(), you can specify the qp_num as part of the conn_param. So, once you call rdma_create_qp(), you can just reference that QPN for other lookup requests. The code could look something like this in the thread that listens:

/* create QP */
rdma_create_id(&qp_id)
rdma_bind_addr()
rdma_create_qp()

/* listen for QPN lookup */
rdma_getaddrinfo(... use RAI_PASSIVE flag)
rdma_create_ep(&listen_id) /* or rdma_create_id + rdma_bind_addr */
rdma_listen()

/* get lookup requests, reply, then discard */
conn_param.qp_num = qp_id->qp->qp_num;
while (1) {
rdma_get_request(listen_id, new_id)
rdma_accept(new_id)
rdma_destroy_id(new_id)
}

If you use async operation, it requires a little more work to retrieve the events from the kernel, but this is the basic idea. You can also create the QP on the first request that you receive, as long as you don't destroy that id until you're done with the QP. I think you can even call rdma_create_qp() on the listen_id as long as it's been bound to a device first.

- Sean
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-***@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html

3 Replies
3 Views
Permalink to this page
Disable enhanced parsing

Thread Navigation

Kelly Burkhart2011-11-03 15:20:08 UTC
Hefty, Sean2011-11-03 15:44:23 UTC
Kelly Burkhart2011-11-03 19:41:26 UTC
Hefty, Sean2011-11-03 21:05:53 UTC
rdma_cm UD sendto without connect (2024)

References

Top Articles
Post Crescent Obituary
HONEYWELL T4 BEDIENUNGSANLEITUNG Pdf-Herunterladen
Ups Customer Center Locations
neither of the twins was arrested,传说中的800句记7000词
Katie Boyle Dancer Biography
Ap Chem Unit 8 Progress Check Mcq
United Dual Complete Providers
Gwdonate Org
Diesel Mechanic Jobs Near Me Hiring
Jackson Stevens Global
SXSW Film & TV Alumni Releases – July & August 2024
Q Management Inc
Skyward Login Jennings County
Decosmo Industrial Auctions
The Blind Showtimes Near Amc Merchants Crossing 16
Popular Chinese Restaurant in Rome Closing After 37 Years
The Largest Banks - ​​How to Transfer Money With Only Card Number and CVV (2024)
Greyson Alexander Thorn
Low Tide In Twilight Ch 52
Bolsa Feels Bad For Sancho's Loss.
What Sells at Flea Markets: 20 Profitable Items
Unity Webgl Car Tag
Fuse Box Diagram Honda Accord (2013-2017)
Black Lion Backpack And Glider Voucher
Ultra Ball Pixelmon
24 Hour Drive Thru Car Wash Near Me
Star News Mugshots
Where Can I Cash A Huntington National Bank Check
The Pretty Kitty Tanglewood
Goodwill Thrift Store & Donation Center Marietta Photos
Vip Lounge Odu
Linabelfiore Of
Back to the Future Part III | Rotten Tomatoes
Directions To 401 East Chestnut Street Louisville Kentucky
Craigslist Boats Eugene Oregon
Midsouthshooters Supply
Cdcs Rochester
Stanley Steemer Johnson City Tn
Wo ein Pfand ist, ist auch Einweg
Fifty Shades Of Gray 123Movies
The Angel Next Door Spoils Me Rotten Gogoanime
Newsweek Wordle
The Attleboro Sun Chronicle Obituaries
Fool's Paradise Showtimes Near Roxy Stadium 14
Chase Bank Zip Code
Login
Zipformsonline Plus Login
Unblocked Games 6X Snow Rider
Dmv Kiosk Bakersfield
How To Win The Race In Sneaky Sasquatch
Buildapc Deals
Latest Posts
Article information

Author: Zonia Mosciski DO

Last Updated:

Views: 6258

Rating: 4 / 5 (51 voted)

Reviews: 90% of readers found this page helpful

Author information

Name: Zonia Mosciski DO

Birthday: 1996-05-16

Address: Suite 228 919 Deana Ford, Lake Meridithberg, NE 60017-4257

Phone: +2613987384138

Job: Chief Retail Officer

Hobby: Tai chi, Dowsing, Poi, Letterboxing, Watching movies, Video gaming, Singing

Introduction: My name is Zonia Mosciski DO, I am a enchanting, joyous, lovely, successful, hilarious, tender, outstanding person who loves writing and wants to share my knowledge and understanding with you.