DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Mattias Rönnblom" <mattias.ronnblom@ericsson.com>
To: "Morten Brørup" <mb@smartsharesystems.com>,
	"jerinj@marvell.com" <jerinj@marvell.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>,
	"honnappa.nagarahalli@arm.com" <honnappa.nagarahalli@arm.com>
Subject: Re: [dpdk-dev] [PATCH] event/dsw: use custom element size ring forcontrol
Date: Tue, 21 Jan 2020 13:54:00 +0000	[thread overview]
Message-ID: <d87718b3-f069-945d-d303-32452fd450c1@ericsson.com> (raw)
In-Reply-To: <98CBD80474FA8B44BF855DF32C47DC35C60D1A@smartserver.smartshare.dk>

On 2020-01-21 13:04, Morten Brørup wrote:
>> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Mattias Rönnblom
>> Sent: Monday, January 20, 2020 4:03 PM
>>
>> Replace DSW's use of regular DPDK rings (and code for
>> packing/unpacking control messages into void pointers) with custom
>> size rings.
>>
>> In addition to cleaner code, this change allows DSW to support up to
>> the eventdev API's maximum of 255 ports by tweaking DSW_MAX_PORTS.
> Considering that the mbuf port_id was increased from 8 to 16 bit a long time ago... does it make sense increasing this and perhaps the eventdev API's type from 8 to 16 bit too?

Moving from uint8_t to uint16_t in the Eventdev API seems like a good 
idea to me. The need for eventdev ports typically grows with growing 
lcore count, and some systems aren't too far from 255 (or is it 256)?


I don't think it makes sense to use uint16_t internally in DSW before 
this happen, though.

>> Signed-off-by: Mattias Rönnblom <mattias.ronnblom@ericsson.com>
>> ---
>>   drivers/event/dsw/Makefile    |  3 +++
>>   drivers/event/dsw/dsw_evdev.c |  9 ++++++---
>>   drivers/event/dsw/dsw_evdev.h | 10 +++-------
>>   drivers/event/dsw/dsw_event.c | 16 ++--------------
>>   drivers/event/dsw/meson.build |  3 +++
>>   5 files changed, 17 insertions(+), 24 deletions(-)
>>
> [snip]
>
>> diff --git a/drivers/event/dsw/dsw_evdev.h
>> b/drivers/event/dsw/dsw_evdev.h
>> index dc28ab125..5c7b6108d 100644
>> --- a/drivers/event/dsw/dsw_evdev.h
>> +++ b/drivers/event/dsw/dsw_evdev.h
>> @@ -10,7 +10,6 @@
>>
>>   #define DSW_PMD_NAME RTE_STR(event_dsw)
>>
>> -/* Code changes are required to allow more ports. */
>>   #define DSW_MAX_PORTS (64)
> 64 or 256?

64 to save some memory, in the common case.

>>   #define DSW_MAX_PORT_DEQUEUE_DEPTH (128)
>>   #define DSW_MAX_PORT_ENQUEUE_DEPTH (128)
>> @@ -226,15 +225,12 @@ struct dsw_evdev {
>>   #define DSW_CTL_UNPAUS_REQ (1)
>>   #define DSW_CTL_CFM (2)
>>
>> -/* sizeof(struct dsw_ctl_msg) must be equal or less than
>> - * sizeof(void *), to fit on the control ring.
>> - */
>>   struct dsw_ctl_msg {
>> -	uint8_t type:2;
>> -	uint8_t originating_port_id:6;
>> +	uint8_t type;
>> +	uint8_t originating_port_id;
>>   	uint8_t queue_id;
>>   	uint16_t flow_hash;
>> -} __rte_packed;
>> +} __rte_aligned(4);
> [snip]
>
>
> Med venlig hilsen / kind regards
> - Morten Brørup
>


  reply	other threads:[~2020-01-21 13:54 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-20 15:03 [dpdk-dev] [PATCH] event/dsw: use custom element size ring for control Mattias Rönnblom
2020-01-21 12:04 ` [dpdk-dev] [PATCH] event/dsw: use custom element size ring forcontrol Morten Brørup
2020-01-21 13:54   ` Mattias Rönnblom [this message]
2020-01-22  5:06 ` [dpdk-dev] [PATCH] event/dsw: use custom element size ring for control Honnappa Nagarahalli
2020-01-28  6:00   ` Jerin Jacob

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=d87718b3-f069-945d-d303-32452fd450c1@ericsson.com \
    --to=mattias.ronnblom@ericsson.com \
    --cc=dev@dpdk.org \
    --cc=honnappa.nagarahalli@arm.com \
    --cc=jerinj@marvell.com \
    --cc=mb@smartsharesystems.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).