All of lore.kernel.org
 help / color / mirror / Atom feed
* UDP with IB verbs lib
@ 2020-03-18 23:07 Dimitris Dimitropoulos
  2020-03-19  1:49 ` Zhu Yanjun
  2020-03-19 13:52 ` Jason Gunthorpe
  0 siblings, 2 replies; 4+ messages in thread
From: Dimitris Dimitropoulos @ 2020-03-18 23:07 UTC (permalink / raw)
  To: linux-rdma

Hi,

I'm looking at UDP using the IB verbs library. If I send UDP packets
that are intercepted by the IB verbs layer, what happens with the
completion notifications ?

For example, say I create a list of 10 ibv_recv_wr objects and each
has num_sge = 30, with each SGE having a 4K size. And I setup for
reception with ibv_post_recv(). If I transmit 30 UDP packets each 4K
in size will I receive one CQ event ? Or 30 ?

Will the UDP packets be written in consecutive SGEs of the first
ibv_recv_wr object ? Or will they be written in consecutive
ibv_recv_wr objects (in their first SGE) ?

Thank you.

Dimitris

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: UDP with IB verbs lib
  2020-03-18 23:07 UDP with IB verbs lib Dimitris Dimitropoulos
@ 2020-03-19  1:49 ` Zhu Yanjun
  2020-03-19 13:52 ` Jason Gunthorpe
  1 sibling, 0 replies; 4+ messages in thread
From: Zhu Yanjun @ 2020-03-19  1:49 UTC (permalink / raw)
  To: Dimitris Dimitropoulos, linux-rdma

Please refer to SoftRoCE. The source code is here 
./drivers/infiniband/sw/rxe/

On 3/19/2020 7:07 AM, Dimitris Dimitropoulos wrote:
> Hi,
>
> I'm looking at UDP using the IB verbs library. If I send UDP packets
> that are intercepted by the IB verbs layer, what happens with the
> completion notifications ?
>
> For example, say I create a list of 10 ibv_recv_wr objects and each
> has num_sge = 30, with each SGE having a 4K size. And I setup for
> reception with ibv_post_recv(). If I transmit 30 UDP packets each 4K
> in size will I receive one CQ event ? Or 30 ?
>
> Will the UDP packets be written in consecutive SGEs of the first
> ibv_recv_wr object ? Or will they be written in consecutive
> ibv_recv_wr objects (in their first SGE) ?
>
> Thank you.
>
> Dimitris



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: UDP with IB verbs lib
  2020-03-18 23:07 UDP with IB verbs lib Dimitris Dimitropoulos
  2020-03-19  1:49 ` Zhu Yanjun
@ 2020-03-19 13:52 ` Jason Gunthorpe
  2020-03-19 16:48   ` Dimitris Dimitropoulos
  1 sibling, 1 reply; 4+ messages in thread
From: Jason Gunthorpe @ 2020-03-19 13:52 UTC (permalink / raw)
  To: Dimitris Dimitropoulos; +Cc: linux-rdma

On Wed, Mar 18, 2020 at 04:07:37PM -0700, Dimitris Dimitropoulos wrote:
> Hi,
> 
> I'm looking at UDP using the IB verbs library. If I send UDP packets
> that are intercepted by the IB verbs layer, what happens with the
> completion notifications ?

Each recv that requests a completion gets a completion.

> For example, say I create a list of 10 ibv_recv_wr objects and each
> has num_sge = 30, with each SGE having a 4K size. And I setup for
> reception with ibv_post_recv(). If I transmit 30 UDP packets each 4K
> in size will I receive one CQ event ? Or 30 ?

One per ibv_recv_wr requesting completion

> Will the UDP packets be written in consecutive SGEs of the first
> ibv_recv_wr object ? Or will they be written in consecutive
> ibv_recv_wr objects (in their first SGE) ?

Only the first. Each recv handles a single incoming packet.

DPDK has a hyper-optimized version of processing IP/UDP packets via
mlx5dv

Jason

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: UDP with IB verbs lib
  2020-03-19 13:52 ` Jason Gunthorpe
@ 2020-03-19 16:48   ` Dimitris Dimitropoulos
  0 siblings, 0 replies; 4+ messages in thread
From: Dimitris Dimitropoulos @ 2020-03-19 16:48 UTC (permalink / raw)
  To: Jason Gunthorpe; +Cc: linux-rdma

That's pretty clear. Thank you.

Dimitris

On Thu, Mar 19, 2020 at 6:52 AM Jason Gunthorpe <jgg@ziepe.ca> wrote:
>
> On Wed, Mar 18, 2020 at 04:07:37PM -0700, Dimitris Dimitropoulos wrote:
> > Hi,
> >
> > I'm looking at UDP using the IB verbs library. If I send UDP packets
> > that are intercepted by the IB verbs layer, what happens with the
> > completion notifications ?
>
> Each recv that requests a completion gets a completion.
>
> > For example, say I create a list of 10 ibv_recv_wr objects and each
> > has num_sge = 30, with each SGE having a 4K size. And I setup for
> > reception with ibv_post_recv(). If I transmit 30 UDP packets each 4K
> > in size will I receive one CQ event ? Or 30 ?
>
> One per ibv_recv_wr requesting completion
>
> > Will the UDP packets be written in consecutive SGEs of the first
> > ibv_recv_wr object ? Or will they be written in consecutive
> > ibv_recv_wr objects (in their first SGE) ?
>
> Only the first. Each recv handles a single incoming packet.
>
> DPDK has a hyper-optimized version of processing IP/UDP packets via
> mlx5dv
>
> Jason

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-03-19 16:49 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-18 23:07 UDP with IB verbs lib Dimitris Dimitropoulos
2020-03-19  1:49 ` Zhu Yanjun
2020-03-19 13:52 ` Jason Gunthorpe
2020-03-19 16:48   ` Dimitris Dimitropoulos

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.