> From: dev [mailto:dev-boun...@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? > > Signed-off-by: Mattias Rönnblom <mattias.ronnb...@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? > #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