DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [RFC] net/mlx5: new device parameter to configure hairpin queue data size
@ 2020-03-17 15:45 Bing Zhao
  2020-03-24 12:59 ` [dpdk-dev] [PATCH] net/mlx5: introduce dev parameter for hairpin Bing Zhao
  0 siblings, 1 reply; 4+ messages in thread
From: Bing Zhao @ 2020-03-17 15:45 UTC (permalink / raw)
  To: Ori Kam, Matan Azrad; +Cc: dev, Raslan Darawsheh, Slava Ovsiienko

When configuring hairpin queues, there is an input parameter to set
the number of descriptors both for TX and RX interfaces. But it is not
used for mlx5 devices because of the firmware mechanism.
Currently, the stride buffer is being used for every ingress packet in
the firmware. PMD driver could only set the total data buffer size and
the maximal number of packets. Their relationship is as below (for a
single queue):
  total_data_size = stride_size * maximal_packet_number

And small stride size is recommended (e.g. 64B) to save the
memory for small packets and get better performance. To
configure the hairpin queue, either the total data buffer size or the
maximal packet number could be used.
When using "maximal packet number", it is not quite straightforward:
  1. It doesn't mean the packets number that could be held in the same
     time. Because for a larger packet, more than one stride will be
     consumed.
  2. It is not quite clear that what is the maximal length supported
     for a single packet.

A new device parameter will be introduced for mlx5 devices to set the
data buffer length - "hp_buf_log_sz".
  1. It is a logarithm value, so the actual buffer length will be
    2 ^^ hp_buf_log_sz.
  2. If not set when probing the device, a default value will be used.
  3. If jumbo frames need to be supported for the hairpin, then a
     larger value could be set. Or else, some smaller value will help
     to save the memory and fewer cache misses.
  4. There is no need to care about the hairpin queue depth since no
     SW is involved. And firmware will be in charge of the packet
     descriptors number and make sure it is full enough.

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

end of thread, other threads:[~2020-03-31 14:01 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-17 15:45 [dpdk-dev] [RFC] net/mlx5: new device parameter to configure hairpin queue data size Bing Zhao
2020-03-24 12:59 ` [dpdk-dev] [PATCH] net/mlx5: introduce dev parameter for hairpin Bing Zhao
2020-03-31  8:20   ` Slava Ovsiienko
2020-03-31 14:01   ` Raslan Darawsheh

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).