* RE: [PATCH v3] sched: enable CMAN at runtime
2022-06-08 11:59 0% ` Dumitrescu, Cristian
@ 2022-06-08 15:29 0% ` Danilewicz, MarcinX
0 siblings, 0 replies; 200+ results
From: Danilewicz, MarcinX @ 2022-06-08 15:29 UTC (permalink / raw)
To: Dumitrescu, Cristian, dev, Singh, Jasvinder; +Cc: Ajmera, Megha, Liu, Yu Y
Hi Cristian,
Ok, let me check.
BR,
/Marcin
> -----Original Message-----
> From: Dumitrescu, Cristian <cristian.dumitrescu@intel.com>
> Sent: Wednesday, June 8, 2022 1:59 PM
> To: Danilewicz, MarcinX <marcinx.danilewicz@intel.com>; dev@dpdk.org;
> Singh, Jasvinder <jasvinder.singh@intel.com>
> Cc: Ajmera, Megha <megha.ajmera@intel.com>; Liu, Yu Y
> <yu.y.liu@intel.com>
> Subject: RE: [PATCH v3] sched: enable CMAN at runtime
>
>
>
> > -----Original Message-----
> > From: Danilewicz, MarcinX <marcinx.danilewicz@intel.com>
> > Sent: Wednesday, June 8, 2022 10:42 AM
> > To: dev@dpdk.org; Singh, Jasvinder <jasvinder.singh@intel.com>;
> > Dumitrescu, Cristian <cristian.dumitrescu@intel.com>
> > Cc: Ajmera, Megha <megha.ajmera@intel.com>
> > Subject: [PATCH v3] sched: enable CMAN at runtime
> >
> > Added changes to enable CMAN (RED or PIE) at init from profile
> > configuration file.
> >
> > By default CMAN code is enable but not in use, when there is no RED or
> > PIE profile configured.
> >
> > Signed-off-by: Marcin Danilewicz <marcinx.danilewicz@intel.com>
> > ---
> > Log: v2 change in rte_sched.h to avoid ABI breakage.
> > v3 changes from comments
> > ---
>
> Marcin,
>
> Your patch does not apply cleanly on top of DPDK main latest, can you please
> fix.
>
> Regards,
> Cristian
^ permalink raw reply [relevance 0%]
* [PATCH v2 0/6] Vhost checksum offload improvements
@ 2022-06-08 12:49 3% Maxime Coquelin
0 siblings, 0 replies; 200+ results
From: Maxime Coquelin @ 2022-06-08 12:49 UTC (permalink / raw)
To: dev, jasowang, chenbo.xia, david.marchand, olivier.matz,
wenwux.ma, yuying.zhang, aman.deep.singh
Cc: Maxime Coquelin
This series aims at improving Vhost checksum offloading
support.
The first patch reverts overwritting MAC address in
testpmd CSUM forward mode. This is required to be able to
test checksum offloading with real traffic. MAC forwarding
mode should be used if the MAC addresses need to be
changed.
Second patch is a Vhost library fix to be compliant with
the Virtio specification, which requires that the
pseudo-header checksum is being set by the device when
offloading the checksum to the guest.
Third patch enables the compliant offloading mode of Vhost
library in Vhost PMD by default, since the legacy mode
violates the mbuf API by setting Tx flags in the receive
path. A new devarg is introduced for application willing
to use the legacy mode.
Fourth patch is just a small cleanup to represent a boolean
value as a boolean.
The two last patches introduces compatibility layers
that performs checksum in SW when the ethdev and Virtio
features are not aligned.
Note that the two last patches are not tagged as fixes
because they rely on the new compliant offload mode of
Vhost library, and so would casue an ABI breakage if
backported.
With this series, it is now possible to perform IO
forwarding between a vhost-user port and a Vitio-user
with kernel backend port even if the guest has negotiated
VIRTIO_NET_F_CSUM.
With csum forward mode, it now works whathever the
offloading configuration set either on Virtio or Ethdev
sides.
Changes in v2:
==============
- Add the new devarg to validation array (Wenwu)
- Fix typos in commit messages (Chenbo, checkpatch, Yuying)
Maxime Coquelin (6):
Revert "app/testpmd: modify mac in csum forwarding"
vhost: fix missing enqueue pseudo-header calculation
net/vhost: enable compliant offloading mode
net/vhost: make VLAN stripping flag a boolean
net/vhost: perform SW checksum in Rx path
net/vhost: perform SW checksum in Tx path
app/test-pmd/csumonly.c | 4 -
doc/guides/nics/features/vhost.ini | 1 +
doc/guides/nics/vhost.rst | 6 ++
drivers/net/vhost/rte_eth_vhost.c | 167 ++++++++++++++++++++++++++++-
lib/vhost/virtio_net.c | 10 ++
5 files changed, 180 insertions(+), 8 deletions(-)
--
2.35.3
^ permalink raw reply [relevance 3%]
* RE: [PATCH v3] sched: enable CMAN at runtime
2022-06-08 9:42 1% ` [PATCH v3] " Marcin Danilewicz
@ 2022-06-08 11:59 0% ` Dumitrescu, Cristian
2022-06-08 15:29 0% ` Danilewicz, MarcinX
0 siblings, 1 reply; 200+ results
From: Dumitrescu, Cristian @ 2022-06-08 11:59 UTC (permalink / raw)
To: Danilewicz, MarcinX, dev, Singh, Jasvinder; +Cc: Ajmera, Megha, Liu, Yu Y
> -----Original Message-----
> From: Danilewicz, MarcinX <marcinx.danilewicz@intel.com>
> Sent: Wednesday, June 8, 2022 10:42 AM
> To: dev@dpdk.org; Singh, Jasvinder <jasvinder.singh@intel.com>;
> Dumitrescu, Cristian <cristian.dumitrescu@intel.com>
> Cc: Ajmera, Megha <megha.ajmera@intel.com>
> Subject: [PATCH v3] sched: enable CMAN at runtime
>
> Added changes to enable CMAN (RED or PIE) at init
> from profile configuration file.
>
> By default CMAN code is enable but not in use, when
> there is no RED or PIE profile configured.
>
> Signed-off-by: Marcin Danilewicz <marcinx.danilewicz@intel.com>
> ---
> Log: v2 change in rte_sched.h to avoid ABI breakage.
> v3 changes from comments
> ---
Marcin,
Your patch does not apply cleanly on top of DPDK main latest, can you please fix.
Regards,
Cristian
^ permalink raw reply [relevance 0%]
* [PATCH v3] sched: enable CMAN at runtime
2022-05-12 13:10 4% ` [PATCH v2] " Marcin Danilewicz
2022-05-30 11:19 3% ` Dumitrescu, Cristian
2022-05-30 11:35 0% ` Dumitrescu, Cristian
@ 2022-06-08 9:42 1% ` Marcin Danilewicz
2022-06-08 11:59 0% ` Dumitrescu, Cristian
2 siblings, 1 reply; 200+ results
From: Marcin Danilewicz @ 2022-06-08 9:42 UTC (permalink / raw)
To: dev, jasvinder.singh, cristian.dumitrescu; +Cc: megha.ajmera
Added changes to enable CMAN (RED or PIE) at init
from profile configuration file.
By default CMAN code is enable but not in use, when
there is no RED or PIE profile configured.
Signed-off-by: Marcin Danilewicz <marcinx.danilewicz@intel.com>
---
Log: v2 change in rte_sched.h to avoid ABI breakage.
v3 changes from comments
---
config/rte_config.h | 3 -
drivers/net/softnic/rte_eth_softnic_tm.c | 12 --
examples/ip_pipeline/tmgr.c | 4 -
examples/qos_sched/cfg_file.c | 11 +-
examples/qos_sched/cfg_file.h | 2 -
examples/qos_sched/init.c | 4 -
examples/qos_sched/main.h | 2 -
examples/qos_sched/profile.cfg | 130 ++++++++++-----------
examples/qos_sched/profile_pie.cfg | 142 ++++++++++++++++++++++
examples/qos_sched/profile_red.cfg | 143 +++++++++++++++++++++++
lib/sched/rte_sched.c | 47 +-------
11 files changed, 359 insertions(+), 141 deletions(-)
create mode 100644 examples/qos_sched/profile_pie.cfg
create mode 100644 examples/qos_sched/profile_red.cfg
diff --git a/config/rte_config.h b/config/rte_config.h
index 8eb29c1525..1740a1d053 100644
--- a/config/rte_config.h
+++ b/config/rte_config.h
@@ -88,9 +88,6 @@
/* rte_power defines */
#define RTE_MAX_LCORE_FREQS 64
-/* rte_sched defines */
-#undef RTE_SCHED_CMAN
-
/* rte_graph defines */
#define RTE_GRAPH_BURST_SIZE 256
#define RTE_LIBRTE_GRAPH_STATS 1
diff --git a/drivers/net/softnic/rte_eth_softnic_tm.c b/drivers/net/softnic/rte_eth_softnic_tm.c
index 6a7766ba1c..3a5fd676e9 100644
--- a/drivers/net/softnic/rte_eth_softnic_tm.c
+++ b/drivers/net/softnic/rte_eth_softnic_tm.c
@@ -420,11 +420,7 @@ pmd_tm_node_type_get(struct rte_eth_dev *dev,
return 0;
}
-#ifdef RTE_SCHED_CMAN
#define WRED_SUPPORTED 1
-#else
-#define WRED_SUPPORTED 0
-#endif
#define STATS_MASK_DEFAULT \
(RTE_TM_STATS_N_PKTS | \
@@ -2300,8 +2296,6 @@ tm_tc_wred_profile_get(struct rte_eth_dev *dev, uint32_t tc_id)
return NULL;
}
-#ifdef RTE_SCHED_CMAN
-
static void
wred_profiles_set(struct rte_eth_dev *dev, uint32_t subport_id)
{
@@ -2325,12 +2319,6 @@ wred_profiles_set(struct rte_eth_dev *dev, uint32_t subport_id)
}
}
-#else
-
-#define wred_profiles_set(dev, subport_id)
-
-#endif
-
static struct tm_shared_shaper *
tm_tc_shared_shaper_get(struct rte_eth_dev *dev, struct tm_node *tc_node)
{
diff --git a/examples/ip_pipeline/tmgr.c b/examples/ip_pipeline/tmgr.c
index b138e885cf..e68e9961be 100644
--- a/examples/ip_pipeline/tmgr.c
+++ b/examples/ip_pipeline/tmgr.c
@@ -17,7 +17,6 @@ static uint32_t n_subport_profiles;
static struct rte_sched_pipe_params
pipe_profile[TMGR_PIPE_PROFILE_MAX];
-#ifdef RTE_SCHED_CMAN
static struct rte_sched_cman_params cman_params = {
.red_params = {
/* Traffic Class 0 Colors Green / Yellow / Red */
@@ -86,7 +85,6 @@ static struct rte_sched_cman_params cman_params = {
[12][2] = {.min_th = 32, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9},
},
};
-#endif /* RTE_SCHED_CMAN */
static uint32_t n_pipe_profiles;
@@ -96,9 +94,7 @@ static const struct rte_sched_subport_params subport_params_default = {
.pipe_profiles = pipe_profile,
.n_pipe_profiles = 0, /* filled at run time */
.n_max_pipe_profiles = RTE_DIM(pipe_profile),
-#ifdef RTE_SCHED_CMAN
.cman_params = &cman_params,
-#endif /* RTE_SCHED_CMAN */
};
static struct tmgr_port_list tmgr_port_list;
diff --git a/examples/qos_sched/cfg_file.c b/examples/qos_sched/cfg_file.c
index 450482f07d..3284b4d252 100644
--- a/examples/qos_sched/cfg_file.c
+++ b/examples/qos_sched/cfg_file.c
@@ -229,11 +229,14 @@ cfg_load_subport_profile(struct rte_cfgfile *cfg,
return 0;
}
-#ifdef RTE_SCHED_CMAN
void set_subport_cman_params(struct rte_sched_subport_params *subport_p,
struct rte_sched_cman_params cman_p)
{
int j, k;
+
+ if (subport_p->cman_params != NULL)
+ return;
+
subport_p->cman_params->cman_mode = cman_p.cman_mode;
for (j = 0; j < RTE_SCHED_TRAFFIC_CLASSES_PER_PIPE; j++) {
@@ -261,7 +264,6 @@ void set_subport_cman_params(struct rte_sched_subport_params *subport_p,
}
}
}
-#endif
int
cfg_load_subport(struct rte_cfgfile *cfg, struct rte_sched_subport_params *subport_params)
@@ -276,9 +278,7 @@ cfg_load_subport(struct rte_cfgfile *cfg, struct rte_sched_subport_params *subpo
memset(active_queues, 0, sizeof(active_queues));
n_active_queues = 0;
-#ifdef RTE_SCHED_CMAN
struct rte_sched_cman_params cman_params = {
- .cman_mode = RTE_SCHED_CMAN_RED,
.red_params = { },
};
@@ -387,7 +387,6 @@ cfg_load_subport(struct rte_cfgfile *cfg, struct rte_sched_subport_params *subpo
}
}
-#endif /* RTE_SCHED_CMAN */
for (i = 0; i < MAX_SCHED_SUBPORTS; i++) {
char sec_name[CFG_NAME_LEN];
@@ -465,9 +464,7 @@ cfg_load_subport(struct rte_cfgfile *cfg, struct rte_sched_subport_params *subpo
}
}
}
-#ifdef RTE_SCHED_CMAN
set_subport_cman_params(subport_params+i, cman_params);
-#endif
}
}
diff --git a/examples/qos_sched/cfg_file.h b/examples/qos_sched/cfg_file.h
index 1a9dce9db5..19df91e7ba 100644
--- a/examples/qos_sched/cfg_file.h
+++ b/examples/qos_sched/cfg_file.h
@@ -12,10 +12,8 @@ int cfg_load_port(struct rte_cfgfile *cfg, struct rte_sched_port_params *port);
int cfg_load_pipe(struct rte_cfgfile *cfg, struct rte_sched_pipe_params *pipe);
-#ifdef RTE_SCHED_CMAN
void set_subport_cman_params(struct rte_sched_subport_params *subport_p,
struct rte_sched_cman_params cman_p);
-#endif
int cfg_load_subport(struct rte_cfgfile *cfg, struct rte_sched_subport_params *subport);
diff --git a/examples/qos_sched/init.c b/examples/qos_sched/init.c
index 8a0fb8a374..0afd553283 100644
--- a/examples/qos_sched/init.c
+++ b/examples/qos_sched/init.c
@@ -201,7 +201,6 @@ static struct rte_sched_subport_profile_params
},
};
-#ifdef RTE_SCHED_CMAN
struct rte_sched_cman_params cman_params = {
.cman_mode = RTE_SCHED_CMAN_RED,
.red_params = {
@@ -271,7 +270,6 @@ struct rte_sched_cman_params cman_params = {
[12][2] = {.min_th = 32, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9},
},
};
-#endif /* RTE_SCHED_CMAN */
struct rte_sched_subport_params subport_params[MAX_SCHED_SUBPORTS] = {
{
@@ -281,9 +279,7 @@ struct rte_sched_subport_params subport_params[MAX_SCHED_SUBPORTS] = {
.n_pipe_profiles = sizeof(pipe_profiles) /
sizeof(struct rte_sched_pipe_params),
.n_max_pipe_profiles = MAX_SCHED_PIPE_PROFILES,
-#ifdef RTE_SCHED_CMAN
.cman_params = &cman_params,
-#endif /* RTE_SCHED_CMAN */
},
};
diff --git a/examples/qos_sched/main.h b/examples/qos_sched/main.h
index 915311bac8..76a68f585f 100644
--- a/examples/qos_sched/main.h
+++ b/examples/qos_sched/main.h
@@ -153,9 +153,7 @@ extern uint32_t active_queues[RTE_SCHED_QUEUES_PER_PIPE];
extern uint32_t n_active_queues;
extern struct rte_sched_port_params port_params;
-#ifdef RTE_SCHED_CMAN
extern struct rte_sched_cman_params cman_params;
-#endif
extern struct rte_sched_subport_params subport_params[MAX_SCHED_SUBPORTS];
int app_parse_args(int argc, char **argv);
diff --git a/examples/qos_sched/profile.cfg b/examples/qos_sched/profile.cfg
index d4b21c0170..db65b0ed01 100644
--- a/examples/qos_sched/profile.cfg
+++ b/examples/qos_sched/profile.cfg
@@ -142,68 +142,68 @@ tc 12 wrr weights = 1 1 1 1
;tc 12 wred inv prob = 10 10 10
;tc 12 wred weight = 9 9 9
-[pie]
-tc 0 qdelay ref = 15
-tc 0 max burst = 150
-tc 0 update interval = 15
-tc 0 tailq th = 64
-
-tc 1 qdelay ref = 15
-tc 1 max burst = 150
-tc 1 update interval = 15
-tc 1 tailq th = 64
-
-tc 2 qdelay ref = 15
-tc 2 max burst = 150
-tc 2 update interval = 15
-tc 2 tailq th = 64
-
-tc 3 qdelay ref = 15
-tc 3 max burst = 150
-tc 3 update interval = 15
-tc 3 tailq th = 64
-
-tc 4 qdelay ref = 15
-tc 4 max burst = 150
-tc 4 update interval = 15
-tc 4 tailq th = 64
-
-tc 5 qdelay ref = 15
-tc 5 max burst = 150
-tc 5 update interval = 15
-tc 5 tailq th = 64
-
-tc 6 qdelay ref = 15
-tc 6 max burst = 150
-tc 6 update interval = 15
-tc 6 tailq th = 64
-
-tc 7 qdelay ref = 15
-tc 7 max burst = 150
-tc 7 update interval = 15
-tc 7 tailq th = 64
-
-tc 8 qdelay ref = 15
-tc 8 max burst = 150
-tc 8 update interval = 15
-tc 8 tailq th = 64
-
-tc 9 qdelay ref = 15
-tc 9 max burst = 150
-tc 9 update interval = 15
-tc 9 tailq th = 64
-
-tc 10 qdelay ref = 15
-tc 10 max burst = 150
-tc 10 update interval = 15
-tc 10 tailq th = 64
-
-tc 11 qdelay ref = 15
-tc 11 max burst = 150
-tc 11 update interval = 15
-tc 11 tailq th = 64
-
-tc 12 qdelay ref = 15
-tc 12 max burst = 150
-tc 12 update interval = 15
-tc 12 tailq th = 64
+;[pie]
+;tc 0 qdelay ref = 15
+;tc 0 max burst = 150
+;tc 0 update interval = 15
+;tc 0 tailq th = 64
+
+;tc 1 qdelay ref = 15
+;tc 1 max burst = 150
+;tc 1 update interval = 15
+;tc 1 tailq th = 64
+
+;tc 2 qdelay ref = 15
+;tc 2 max burst = 150
+;tc 2 update interval = 15
+;tc 2 tailq th = 64
+
+;tc 3 qdelay ref = 15
+;tc 3 max burst = 150
+;tc 3 update interval = 15
+;tc 3 tailq th = 64
+
+;tc 4 qdelay ref = 15
+;tc 4 max burst = 150
+;tc 4 update interval = 15
+;tc 4 tailq th = 64
+
+;tc 5 qdelay ref = 15
+;tc 5 max burst = 150
+;tc 5 update interval = 15
+;tc 5 tailq th = 64
+
+;tc 6 qdelay ref = 15
+;tc 6 max burst = 150
+;tc 6 update interval = 15
+;tc 6 tailq th = 64
+
+;tc 7 qdelay ref = 15
+;tc 7 max burst = 150
+;tc 7 update interval = 15
+;tc 7 tailq th = 64
+
+;tc 8 qdelay ref = 15
+;tc 8 max burst = 150
+;tc 8 update interval = 15
+;tc 8 tailq th = 64
+
+;tc 9 qdelay ref = 15
+;tc 9 max burst = 150
+;tc 9 update interval = 15
+;tc 9 tailq th = 64
+
+;tc 10 qdelay ref = 15
+;tc 10 max burst = 150
+;tc 10 update interval = 15
+;tc 10 tailq th = 64
+
+;tc 11 qdelay ref = 15
+;tc 11 max burst = 150
+;tc 11 update interval = 15
+;tc 11 tailq th = 64
+
+;tc 12 qdelay ref = 15
+;tc 12 max burst = 150
+;tc 12 update interval = 15
+;tc 12 tailq th = 64
diff --git a/examples/qos_sched/profile_pie.cfg b/examples/qos_sched/profile_pie.cfg
new file mode 100644
index 0000000000..241f748b33
--- /dev/null
+++ b/examples/qos_sched/profile_pie.cfg
@@ -0,0 +1,142 @@
+; SPDX-License-Identifier: BSD-3-Clause
+; Copyright(c) 2010-2019 Intel Corporation.
+
+; This file enables the following hierarchical scheduler configuration for each
+; 10GbE output port:
+; * Single subport (subport 0):
+; - Subport rate set to 100% of port rate
+; - Each of the 13 traffic classes has rate set to 100% of port rate
+; * 4K pipes per subport 0 (pipes 0 .. 4095) with identical configuration:
+; - Pipe rate set to 1/4K of port rate
+; - Each of the 13 traffic classes has rate set to 100% of pipe rate
+; - Within lowest priority traffic class (best-effort), the byte-level
+; WRR weights for the 4 queues of best effort traffic class are set
+; to 1:1:1:1
+;
+; For more details, please refer to chapter "Quality of Service (QoS) Framework"
+; of Data Plane Development Kit (DPDK) Programmer's Guide.
+
+; Port configuration
+[port]
+frame overhead = 24
+number of subports per port = 1
+
+; Subport configuration
+[subport 0]
+number of pipes per subport = 4096
+queue sizes = 64 64 64 64 64 64 64 64 64 64 64 64 64
+
+subport 0-8 = 0 ; These subports are configured with subport profile 0
+
+[subport profile 0]
+tb rate = 1250000000 ; Bytes per second
+tb size = 1000000 ; Bytes
+
+tc 0 rate = 1250000000 ; Bytes per second
+tc 1 rate = 1250000000 ; Bytes per second
+tc 2 rate = 1250000000 ; Bytes per second
+tc 3 rate = 1250000000 ; Bytes per second
+tc 4 rate = 1250000000 ; Bytes per second
+tc 5 rate = 1250000000 ; Bytes per second
+tc 6 rate = 1250000000 ; Bytes per second
+tc 7 rate = 1250000000 ; Bytes per second
+tc 8 rate = 1250000000 ; Bytes per second
+tc 9 rate = 1250000000 ; Bytes per second
+tc 10 rate = 1250000000 ; Bytes per second
+tc 11 rate = 1250000000 ; Bytes per second
+tc 12 rate = 1250000000 ; Bytes per second
+
+tc period = 10 ; Milliseconds
+
+pipe 0-4095 = 0 ; These pipes are configured with pipe profile 0
+
+; Pipe configuration
+[pipe profile 0]
+tb rate = 305175 ; Bytes per second
+tb size = 1000000 ; Bytes
+
+tc 0 rate = 305175 ; Bytes per second
+tc 1 rate = 305175 ; Bytes per second
+tc 2 rate = 305175 ; Bytes per second
+tc 3 rate = 305175 ; Bytes per second
+tc 4 rate = 305175 ; Bytes per second
+tc 5 rate = 305175 ; Bytes per second
+tc 6 rate = 305175 ; Bytes per second
+tc 7 rate = 305175 ; Bytes per second
+tc 8 rate = 305175 ; Bytes per second
+tc 9 rate = 305175 ; Bytes per second
+tc 10 rate = 305175 ; Bytes per second
+tc 11 rate = 305175 ; Bytes per second
+tc 12 rate = 305175 ; Bytes per second
+
+tc period = 40 ; Milliseconds
+
+tc 12 oversubscription weight = 1
+
+tc 12 wrr weights = 1 1 1 1
+
+[pie]
+tc 0 qdelay ref = 15
+tc 0 max burst = 150
+tc 0 update interval = 15
+tc 0 tailq th = 64
+
+tc 1 qdelay ref = 15
+tc 1 max burst = 150
+tc 1 update interval = 15
+tc 1 tailq th = 64
+
+tc 2 qdelay ref = 15
+tc 2 max burst = 150
+tc 2 update interval = 15
+tc 2 tailq th = 64
+
+tc 3 qdelay ref = 15
+tc 3 max burst = 150
+tc 3 update interval = 15
+tc 3 tailq th = 64
+
+tc 4 qdelay ref = 15
+tc 4 max burst = 150
+tc 4 update interval = 15
+tc 4 tailq th = 64
+
+tc 5 qdelay ref = 15
+tc 5 max burst = 150
+tc 5 update interval = 15
+tc 5 tailq th = 64
+
+tc 6 qdelay ref = 15
+tc 6 max burst = 150
+tc 6 update interval = 15
+tc 6 tailq th = 64
+
+tc 7 qdelay ref = 15
+tc 7 max burst = 150
+tc 7 update interval = 15
+tc 7 tailq th = 64
+
+tc 8 qdelay ref = 15
+tc 8 max burst = 150
+tc 8 update interval = 15
+tc 8 tailq th = 64
+
+tc 9 qdelay ref = 15
+tc 9 max burst = 150
+tc 9 update interval = 15
+tc 9 tailq th = 64
+
+tc 10 qdelay ref = 15
+tc 10 max burst = 150
+tc 10 update interval = 15
+tc 10 tailq th = 64
+
+tc 11 qdelay ref = 15
+tc 11 max burst = 150
+tc 11 update interval = 15
+tc 11 tailq th = 64
+
+tc 12 qdelay ref = 15
+tc 12 max burst = 150
+tc 12 update interval = 15
+tc 12 tailq th = 64
diff --git a/examples/qos_sched/profile_red.cfg b/examples/qos_sched/profile_red.cfg
new file mode 100644
index 0000000000..4486d2799e
--- /dev/null
+++ b/examples/qos_sched/profile_red.cfg
@@ -0,0 +1,143 @@
+; SPDX-License-Identifier: BSD-3-Clause
+; Copyright(c) 2010-2019 Intel Corporation.
+
+; This file enables the following hierarchical scheduler configuration for each
+; 10GbE output port:
+; * Single subport (subport 0):
+; - Subport rate set to 100% of port rate
+; - Each of the 13 traffic classes has rate set to 100% of port rate
+; * 4K pipes per subport 0 (pipes 0 .. 4095) with identical configuration:
+; - Pipe rate set to 1/4K of port rate
+; - Each of the 13 traffic classes has rate set to 100% of pipe rate
+; - Within lowest priority traffic class (best-effort), the byte-level
+; WRR weights for the 4 queues of best effort traffic class are set
+; to 1:1:1:1
+;
+; For more details, please refer to chapter "Quality of Service (QoS) Framework"
+; of Data Plane Development Kit (DPDK) Programmer's Guide.
+
+; Port configuration
+[port]
+frame overhead = 24
+number of subports per port = 1
+
+; Subport configuration
+[subport 0]
+number of pipes per subport = 4096
+queue sizes = 64 64 64 64 64 64 64 64 64 64 64 64 64
+
+subport 0-8 = 0 ; These subports are configured with subport profile 0
+
+[subport profile 0]
+tb rate = 1250000000 ; Bytes per second
+tb size = 1000000 ; Bytes
+
+tc 0 rate = 1250000000 ; Bytes per second
+tc 1 rate = 1250000000 ; Bytes per second
+tc 2 rate = 1250000000 ; Bytes per second
+tc 3 rate = 1250000000 ; Bytes per second
+tc 4 rate = 1250000000 ; Bytes per second
+tc 5 rate = 1250000000 ; Bytes per second
+tc 6 rate = 1250000000 ; Bytes per second
+tc 7 rate = 1250000000 ; Bytes per second
+tc 8 rate = 1250000000 ; Bytes per second
+tc 9 rate = 1250000000 ; Bytes per second
+tc 10 rate = 1250000000 ; Bytes per second
+tc 11 rate = 1250000000 ; Bytes per second
+tc 12 rate = 1250000000 ; Bytes per second
+
+tc period = 10 ; Milliseconds
+
+pipe 0-4095 = 0 ; These pipes are configured with pipe profile 0
+
+; Pipe configuration
+[pipe profile 0]
+tb rate = 305175 ; Bytes per second
+tb size = 1000000 ; Bytes
+
+tc 0 rate = 305175 ; Bytes per second
+tc 1 rate = 305175 ; Bytes per second
+tc 2 rate = 305175 ; Bytes per second
+tc 3 rate = 305175 ; Bytes per second
+tc 4 rate = 305175 ; Bytes per second
+tc 5 rate = 305175 ; Bytes per second
+tc 6 rate = 305175 ; Bytes per second
+tc 7 rate = 305175 ; Bytes per second
+tc 8 rate = 305175 ; Bytes per second
+tc 9 rate = 305175 ; Bytes per second
+tc 10 rate = 305175 ; Bytes per second
+tc 11 rate = 305175 ; Bytes per second
+tc 12 rate = 305175 ; Bytes per second
+
+tc period = 40 ; Milliseconds
+
+tc 12 oversubscription weight = 1
+
+tc 12 wrr weights = 1 1 1 1
+
+; RED params per traffic class and color (Green / Yellow / Red)
+[red]
+tc 0 wred min = 48 40 32
+tc 0 wred max = 64 64 64
+tc 0 wred inv prob = 10 10 10
+tc 0 wred weight = 9 9 9
+
+tc 1 wred min = 48 40 32
+tc 1 wred max = 64 64 64
+tc 1 wred inv prob = 10 10 10
+tc 1 wred weight = 9 9 9
+
+tc 2 wred min = 48 40 32
+tc 2 wred max = 64 64 64
+tc 2 wred inv prob = 10 10 10
+tc 2 wred weight = 9 9 9
+
+tc 3 wred min = 48 40 32
+tc 3 wred max = 64 64 64
+tc 3 wred inv prob = 10 10 10
+tc 3 wred weight = 9 9 9
+
+tc 4 wred min = 48 40 32
+tc 4 wred max = 64 64 64
+tc 4 wred inv prob = 10 10 10
+tc 4 wred weight = 9 9 9
+
+tc 5 wred min = 48 40 32
+tc 5 wred max = 64 64 64
+tc 5 wred inv prob = 10 10 10
+tc 5 wred weight = 9 9 9
+
+tc 6 wred min = 48 40 32
+tc 6 wred max = 64 64 64
+tc 6 wred inv prob = 10 10 10
+tc 6 wred weight = 9 9 9
+
+tc 7 wred min = 48 40 32
+tc 7 wred max = 64 64 64
+tc 7 wred inv prob = 10 10 10
+tc 7 wred weight = 9 9 9
+
+tc 8 wred min = 48 40 32
+tc 8 wred max = 64 64 64
+tc 8 wred inv prob = 10 10 10
+tc 8 wred weight = 9 9 9
+
+tc 9 wred min = 48 40 32
+tc 9 wred max = 64 64 64
+tc 9 wred inv prob = 10 10 10
+tc 9 wred weight = 9 9 9
+
+tc 10 wred min = 48 40 32
+tc 10 wred max = 64 64 64
+tc 10 wred inv prob = 10 10 10
+tc 10 wred weight = 9 9 9
+
+tc 11 wred min = 48 40 32
+tc 11 wred max = 64 64 64
+tc 11 wred inv prob = 10 10 10
+tc 11 wred weight = 9 9 9
+
+tc 12 wred min = 48 40 32
+tc 12 wred max = 64 64 64
+tc 12 wred inv prob = 10 10 10
+tc 12 wred weight = 9 9 9
diff --git a/lib/sched/rte_sched.c b/lib/sched/rte_sched.c
index ec74bee939..84c5e315c3 100644
--- a/lib/sched/rte_sched.c
+++ b/lib/sched/rte_sched.c
@@ -81,13 +81,11 @@ struct rte_sched_queue {
struct rte_sched_queue_extra {
struct rte_sched_queue_stats stats;
-#ifdef RTE_SCHED_CMAN
RTE_STD_C11
union {
struct rte_red red;
struct rte_pie pie;
};
-#endif
};
enum grinder_state {
@@ -179,7 +177,6 @@ struct rte_sched_subport {
/* Pipe queues size */
uint16_t qsize[RTE_SCHED_TRAFFIC_CLASSES_PER_PIPE];
-#ifdef RTE_SCHED_CMAN
bool cman_enabled;
enum rte_sched_cman_mode cman;
@@ -188,7 +185,6 @@ struct rte_sched_subport {
struct rte_red_config red_config[RTE_SCHED_TRAFFIC_CLASSES_PER_PIPE][RTE_COLORS];
struct rte_pie_config pie_config[RTE_SCHED_TRAFFIC_CLASSES_PER_PIPE];
};
-#endif
/* Scheduling loop detection */
uint32_t pipe_loop;
@@ -1081,7 +1077,6 @@ rte_sched_free_memory(struct rte_sched_port *port, uint32_t n_subports)
rte_free(port);
}
-#ifdef RTE_SCHED_CMAN
static int
rte_sched_red_config(struct rte_sched_port *port,
struct rte_sched_subport *s,
@@ -1163,7 +1158,6 @@ rte_sched_cman_config(struct rte_sched_port *port,
return -EINVAL;
}
-#endif
int
rte_sched_subport_config(struct rte_sched_port *port,
@@ -1254,7 +1248,6 @@ rte_sched_subport_config(struct rte_sched_port *port,
s->n_pipe_profiles = params->n_pipe_profiles;
s->n_max_pipe_profiles = params->n_max_pipe_profiles;
-#ifdef RTE_SCHED_CMAN
if (params->cman_params != NULL) {
s->cman_enabled = true;
status = rte_sched_cman_config(port, s, params, n_subports);
@@ -1266,7 +1259,6 @@ rte_sched_subport_config(struct rte_sched_port *port,
} else {
s->cman_enabled = false;
}
-#endif
/* Scheduling loop detection */
s->pipe_loop = RTE_SCHED_PIPE_INVALID;
@@ -1792,7 +1784,7 @@ rte_sched_port_update_subport_stats_on_drop(struct rte_sched_port *port,
struct rte_sched_subport *subport,
uint32_t qindex,
struct rte_mbuf *pkt,
- __rte_unused uint32_t n_pkts_cman_dropped)
+ uint32_t n_pkts_cman_dropped)
{
uint32_t tc_index = rte_sched_port_pipe_tc(port, qindex);
uint32_t pkt_len = pkt->pkt_len;
@@ -1818,21 +1810,17 @@ static inline void
rte_sched_port_update_queue_stats_on_drop(struct rte_sched_subport *subport,
uint32_t qindex,
struct rte_mbuf *pkt,
- __rte_unused uint32_t n_pkts_cman_dropped)
+ uint32_t n_pkts_cman_dropped)
{
struct rte_sched_queue_extra *qe = subport->queue_extra + qindex;
uint32_t pkt_len = pkt->pkt_len;
qe->stats.n_pkts_dropped += 1;
qe->stats.n_bytes_dropped += pkt_len;
-#ifdef RTE_SCHED_CMAN
if (subport->cman_enabled)
qe->stats.n_pkts_cman_dropped += n_pkts_cman_dropped;
-#endif
}
-#ifdef RTE_SCHED_CMAN
-
static inline int
rte_sched_port_cman_drop(struct rte_sched_port *port,
struct rte_sched_subport *subport,
@@ -1877,13 +1865,11 @@ static inline void
rte_sched_port_red_set_queue_empty_timestamp(struct rte_sched_port *port,
struct rte_sched_subport *subport, uint32_t qindex)
{
- if (subport->cman_enabled) {
+ if (subport->cman_enabled && subport->cman == RTE_SCHED_CMAN_RED) {
struct rte_sched_queue_extra *qe = subport->queue_extra + qindex;
- if (subport->cman == RTE_SCHED_CMAN_RED) {
- struct rte_red *red = &qe->red;
+ struct rte_red *red = &qe->red;
- rte_red_mark_queue_empty(red, port->time);
- }
+ rte_red_mark_queue_empty(red, port->time);
}
}
@@ -1902,29 +1888,6 @@ uint32_t qindex, uint32_t pkt_len, uint64_t time) {
}
}
-#else
-
-static inline int rte_sched_port_cman_drop(struct rte_sched_port *port __rte_unused,
- struct rte_sched_subport *subport __rte_unused,
- struct rte_mbuf *pkt __rte_unused,
- uint32_t qindex __rte_unused,
- uint16_t qlen __rte_unused)
-{
- return 0;
-}
-
-#define rte_sched_port_red_set_queue_empty_timestamp(port, subport, qindex)
-
-static inline void
-rte_sched_port_pie_dequeue(struct rte_sched_subport *subport __rte_unused,
- uint32_t qindex __rte_unused,
- uint32_t pkt_len __rte_unused,
- uint64_t time __rte_unused) {
- /* do-nothing when RTE_SCHED_CMAN not defined */
-}
-
-#endif /* RTE_SCHED_CMAN */
-
#ifdef RTE_SCHED_DEBUG
static inline void
--
2.25.1
^ permalink raw reply [relevance 1%]
* Re: [PATCH v1] bbdev: add device status info
2022-06-07 16:20 0% ` Maxime Coquelin
@ 2022-06-07 16:42 0% ` Stephen Hemminger
0 siblings, 0 replies; 200+ results
From: Stephen Hemminger @ 2022-06-07 16:42 UTC (permalink / raw)
To: Maxime Coquelin
Cc: Chautru, Nicolas, dev, gakhil, trix, hemant.agrawal, Vargas, Hernan
On Tue, 7 Jun 2022 18:20:38 +0200
Maxime Coquelin <maxime.coquelin@redhat.com> wrote:
> Hi Nicolas,
>
> On 6/7/22 17:44, Chautru, Nicolas wrote:
> > Hi Maxime,
> >
> >> -----Original Message-----
> >> From: Maxime Coquelin <maxime.coquelin@redhat.com>
> >> Sent: Tuesday, June 7, 2022 5:43 AM
> >> To: Stephen Hemminger <stephen@networkplumber.org>; Chautru, Nicolas
> >> <nicolas.chautru@intel.com>
> >> Cc: dev@dpdk.org; gakhil@marvell.com; trix@redhat.com;
> >> hemant.agrawal@nxp.com; Vargas, Hernan <hernan.vargas@intel.com>
> >> Subject: Re: [PATCH v1] bbdev: add device status info
> >>
> >> Hi Stephen,
> >>
> >> On 6/7/22 02:09, Stephen Hemminger wrote:
> >>> On Mon, 6 Jun 2022 15:50:08 -0700
> >>> Nicolas Chautru <nicolas.chautru@intel.com> wrote:
> >>>
> >>>> @@ -298,6 +313,8 @@ struct rte_bbdev_driver_info {
> >>>> const struct rte_bbdev_op_cap *capabilities;
> >>>> /** Device cpu_flag requirements */
> >>>> const enum rte_cpu_flag_t *cpu_flag_reqs;
> >>>> + /** Device Status */
> >>>> + enum rte_bbdev_device_status device_status;
> >>>> };
> >>>>
> >>>
> >>> This ends up being an ABI breakage, can't change a struct like that
> >>> until 22.11 release.
> >>>
> >>
> >> Indeed, but Nicolas mentioned in the cover-letter that the patch targets
> >> v22.11; not this release.
> >>
> >> However, a deprecation notice should be sent for v22.07 if it hasn't been
> >> done yet.
> >
> > I have sent this deprecation Maxime:
> > https://patches.dpdk.org/project/dpdk/patch/1647542252-35727-2-git-send-email-nicolas.chautru@intel.com/
> > Do you believe this needs to be extended to cover more details the change and including this device status info explicitly? I can update the verbiage in more details if required
>
> Thanks for the pointer, I missed it.
> Reading the deprecation notice, it is not clear to me it is about the
> device status info enum.
>
> Maybe rewording it a bit to be more specific would help.
You might want to use one the existing empty padding slots (holes) in
that structure. It appears to have been laid out haphazardly.
^ permalink raw reply [relevance 0%]
* Re: [PATCH v1] bbdev: add device status info
2022-06-07 15:44 0% ` Chautru, Nicolas
@ 2022-06-07 16:20 0% ` Maxime Coquelin
2022-06-07 16:42 0% ` Stephen Hemminger
0 siblings, 1 reply; 200+ results
From: Maxime Coquelin @ 2022-06-07 16:20 UTC (permalink / raw)
To: Chautru, Nicolas, Stephen Hemminger
Cc: dev, gakhil, trix, hemant.agrawal, Vargas, Hernan
Hi Nicolas,
On 6/7/22 17:44, Chautru, Nicolas wrote:
> Hi Maxime,
>
>> -----Original Message-----
>> From: Maxime Coquelin <maxime.coquelin@redhat.com>
>> Sent: Tuesday, June 7, 2022 5:43 AM
>> To: Stephen Hemminger <stephen@networkplumber.org>; Chautru, Nicolas
>> <nicolas.chautru@intel.com>
>> Cc: dev@dpdk.org; gakhil@marvell.com; trix@redhat.com;
>> hemant.agrawal@nxp.com; Vargas, Hernan <hernan.vargas@intel.com>
>> Subject: Re: [PATCH v1] bbdev: add device status info
>>
>> Hi Stephen,
>>
>> On 6/7/22 02:09, Stephen Hemminger wrote:
>>> On Mon, 6 Jun 2022 15:50:08 -0700
>>> Nicolas Chautru <nicolas.chautru@intel.com> wrote:
>>>
>>>> @@ -298,6 +313,8 @@ struct rte_bbdev_driver_info {
>>>> const struct rte_bbdev_op_cap *capabilities;
>>>> /** Device cpu_flag requirements */
>>>> const enum rte_cpu_flag_t *cpu_flag_reqs;
>>>> + /** Device Status */
>>>> + enum rte_bbdev_device_status device_status;
>>>> };
>>>>
>>>
>>> This ends up being an ABI breakage, can't change a struct like that
>>> until 22.11 release.
>>>
>>
>> Indeed, but Nicolas mentioned in the cover-letter that the patch targets
>> v22.11; not this release.
>>
>> However, a deprecation notice should be sent for v22.07 if it hasn't been
>> done yet.
>
> I have sent this deprecation Maxime:
> https://patches.dpdk.org/project/dpdk/patch/1647542252-35727-2-git-send-email-nicolas.chautru@intel.com/
> Do you believe this needs to be extended to cover more details the change and including this device status info explicitly? I can update the verbiage in more details if required
Thanks for the pointer, I missed it.
Reading the deprecation notice, it is not clear to me it is about the
device status info enum.
Maybe rewording it a bit to be more specific would help.
Thanks,
Maxime
>
>>
>> Maxime
>
^ permalink raw reply [relevance 0%]
* RE: [PATCH v1] bbdev: add device status info
2022-06-07 12:42 0% ` Maxime Coquelin
@ 2022-06-07 15:44 0% ` Chautru, Nicolas
2022-06-07 16:20 0% ` Maxime Coquelin
0 siblings, 1 reply; 200+ results
From: Chautru, Nicolas @ 2022-06-07 15:44 UTC (permalink / raw)
To: Maxime Coquelin, Stephen Hemminger
Cc: dev, gakhil, trix, hemant.agrawal, Vargas, Hernan
Hi Maxime,
> -----Original Message-----
> From: Maxime Coquelin <maxime.coquelin@redhat.com>
> Sent: Tuesday, June 7, 2022 5:43 AM
> To: Stephen Hemminger <stephen@networkplumber.org>; Chautru, Nicolas
> <nicolas.chautru@intel.com>
> Cc: dev@dpdk.org; gakhil@marvell.com; trix@redhat.com;
> hemant.agrawal@nxp.com; Vargas, Hernan <hernan.vargas@intel.com>
> Subject: Re: [PATCH v1] bbdev: add device status info
>
> Hi Stephen,
>
> On 6/7/22 02:09, Stephen Hemminger wrote:
> > On Mon, 6 Jun 2022 15:50:08 -0700
> > Nicolas Chautru <nicolas.chautru@intel.com> wrote:
> >
> >> @@ -298,6 +313,8 @@ struct rte_bbdev_driver_info {
> >> const struct rte_bbdev_op_cap *capabilities;
> >> /** Device cpu_flag requirements */
> >> const enum rte_cpu_flag_t *cpu_flag_reqs;
> >> + /** Device Status */
> >> + enum rte_bbdev_device_status device_status;
> >> };
> >>
> >
> > This ends up being an ABI breakage, can't change a struct like that
> > until 22.11 release.
> >
>
> Indeed, but Nicolas mentioned in the cover-letter that the patch targets
> v22.11; not this release.
>
> However, a deprecation notice should be sent for v22.07 if it hasn't been
> done yet.
I have sent this deprecation Maxime:
https://patches.dpdk.org/project/dpdk/patch/1647542252-35727-2-git-send-email-nicolas.chautru@intel.com/
Do you believe this needs to be extended to cover more details the change and including this device status info explicitly? I can update the verbiage in more details if required
>
> Maxime
^ permalink raw reply [relevance 0%]
* Re: [PATCH v7] eal: add bus cleanup to eal cleanup
@ 2022-06-07 15:12 3% ` David Marchand
0 siblings, 0 replies; 200+ results
From: David Marchand @ 2022-06-07 15:12 UTC (permalink / raw)
To: Thomas Monjalon, Kevin Laatz
Cc: dev, Morten Brørup, Bruce Richardson, Li Zhang, Matan Azrad,
Stephen Hemminger, lihuisong
On Tue, Jun 7, 2022 at 1:09 PM Thomas Monjalon <thomas@monjalon.net> wrote:
>
> 03/06/2022 16:36, Kevin Laatz:
> > During EAL init, all buses are probed and the devices found are
> > initialized. On eal_cleanup(), the inverse does not happen, meaning any
> > allocated memory and other configuration will not be cleaned up
> > appropriately on exit.
> [...]
> > --- a/devtools/libabigail.abignore
> > +++ b/devtools/libabigail.abignore
> > @@ -56,3 +56,12 @@
> > ; Ignore libabigail false-positive in clang builds, after moving code.
> > [suppress_function]
> > name = rte_eal_remote_launch
> > +
> > +; Ignore field inserted to rte_bus, adding cleanup function
> > +[suppress_type]
> > + name = rte_bus
> > + has_data_member_inserted_at = end
> > +
> > +; Ignore changes to internally used structs containing rte_bus
> > +[suppress_type]
> > + name = rte_pci_bus, rte_vmbus_bus, rte_vdev_bus
(This change is strange as there is no rte_vdev_bus type, but I won't
investigate the relevance of this rule for now).
>
> I'm not sure we can safely consider these structs as internal.
> The right process is to send a deprecation notice,
> and then remove them from the public API.
Same for me, I don't think we can safely ignore.
A rte_bus struct is embedded in rte_pci_bus (resp. rte_vmbus_bus).
If we make it grow, any inlined access (like walk in device_list or
driver_list) after the rte_bus object is broken for code accessing it
out of DPDK.
Such code might exist out there, since we expose
FOREACH_DEVICE_ON_PCIBUS, for example.
>
> For info, Li has sent a patch for the bus cleanup
> which is not updating the bus code:
> https://patches.dpdk.org/project/dpdk/patch/20220606114650.209612-3-lizh@nvidia.com/
> It may be a temporary solution before the deprecation.
On the principle, that's probably the best, there is no question about
unclear frontier of the ABI.
(In practice though, the mentionned patch is triggering segfaults in
two CI, for pdump).
Hiding rte_bus object should be straightforward in v22.11, I had some
patches, but never finished the work.
It would be great too, to look into rte_driver and rte_device which
are exposed important types, but that's another story.
--
David Marchand
^ permalink raw reply [relevance 3%]
* Minutes of Technical Board Meeting, 2022-06-01
@ 2022-06-07 13:48 4% Olivier Matz
0 siblings, 0 replies; 200+ results
From: Olivier Matz @ 2022-06-07 13:48 UTC (permalink / raw)
To: dev
Members Attending
=================
9/11
- Aaron
- Bruce
- Hemant
- Jerin
- Kevin
- Maxime
- Olivier (chair)
- Stephen
- Thomas
NOTE: The technical board meetings are on every second Wednesday at
https://meet.jit.si/DPDK at 3 pm UTC. Meetings are public, and DPDK
community members are welcome to attend.
NOTE: Next meeting will be on Wednesday 2021-June-15 @3pm UTC, and will
be chaired by Stephen.
Agenda items
============
1) Update on the tech writer hire
---------------------------------
We are in the process of recruiting a tech writer to enhance DPDK
documentation.
The work group is composed of Nathan, Bruce, Stephen, Thomas.
- 5 reasonnable candidates among 17 applicants
- the list of tasks is defined, it has been estimated to ~250h
- the work should be spread over ~6 months to give enough time
to the community for feedback
- after some time, if the community is satisfied, the writer can
suggest new enhancements, reworks, or estimation updates
- in case the community is not satisfied, the contract could end
before the end of the tasks
2) Discussions about alternatives to bug bounty to find bugs
------------------------------------------------------------
These three ideas were mentionned:
- static analysis tools
- fuzz testing
- adding more tests to CI
Projects from Google Project Zero were also mentionned:
https://github.com/orgs/googleprojectzero/repositories
3) Reminder about API/ABI stability
-----------------------------------
Recently, the vector keyword was removed from rte_altivec.h:
http://git.dpdk.org/dpdk/commit/?id=64fcadeac0f
Since it is a minor (accepted) API breakage, it is the opportunity
to do a reminder about the ABI/API process:
- API breakages are announced and can happen in minor versions
- ABI breakages are announced and can only happen in LTS releases
4) Removal of KNI
-----------------
There is no more maintainer for KNI.
A progressive removal proposal was made:
- add a message at runtime and/or compilation to announce deprecation
- remove KNI example after 22.11
- remove lib + kmod from main repo for 23.11
Bruce recently submitted a doc patchset to explain how to replace
it by virtio-user:
https://patchwork.dpdk.org/project/dpdk/list/?series=23218
The status of pending patches is not obvious. Until now, it was not
announced that new patches won't be integrated. Thomas will open the
discussion.
^ permalink raw reply [relevance 4%]
* Re: [PATCH v1] bbdev: add device status info
2022-06-07 0:09 3% ` Stephen Hemminger
@ 2022-06-07 12:42 0% ` Maxime Coquelin
2022-06-07 15:44 0% ` Chautru, Nicolas
0 siblings, 1 reply; 200+ results
From: Maxime Coquelin @ 2022-06-07 12:42 UTC (permalink / raw)
To: Stephen Hemminger, Nicolas Chautru
Cc: dev, gakhil, trix, hemant.agrawal, hernan.vargas
Hi Stephen,
On 6/7/22 02:09, Stephen Hemminger wrote:
> On Mon, 6 Jun 2022 15:50:08 -0700
> Nicolas Chautru <nicolas.chautru@intel.com> wrote:
>
>> @@ -298,6 +313,8 @@ struct rte_bbdev_driver_info {
>> const struct rte_bbdev_op_cap *capabilities;
>> /** Device cpu_flag requirements */
>> const enum rte_cpu_flag_t *cpu_flag_reqs;
>> + /** Device Status */
>> + enum rte_bbdev_device_status device_status;
>> };
>>
>
> This ends up being an ABI breakage, can't change a struct like that
> until 22.11 release.
>
Indeed, but Nicolas mentioned in the cover-letter that the patch targets
v22.11; not this release.
However, a deprecation notice should be sent for v22.07 if it hasn't
been done yet.
Maxime
^ permalink raw reply [relevance 0%]
* Re: [PATCH v1] bbdev: add new operation for FFT processing
@ 2022-06-07 11:29 3% ` David Marchand
0 siblings, 0 replies; 200+ results
From: David Marchand @ 2022-06-07 11:29 UTC (permalink / raw)
To: Hemant Agrawal, Chautru, Nicolas
Cc: thomas, Zhang, Mingshan, dev, gakhil, Vargas, Hernan,
Maxime Coquelin, trix
Hi guys,
On Thu, May 26, 2022 at 8:05 AM Hemant Agrawal
<hemant.agrawal@oss.nxp.com> wrote:
> On 5/26/2022 3:37 AM, Chautru, Nicolas wrote:
> > Hi Hernant,
> > Gentle reminder in case you can find the time. Could please have a look this patch for bbdev api extension. This is targeting 22.11.
> > New operation type for FFT processing (On top of 4 existing operations types). There is no impact to the la12xx PMD but would be good to get review/feedback.
> > This can be used for vanilla FFT and/or chained FFT/iFFT + point-wise multiplication making it applicable for SRS processing.
> > Thanks,
> > Nic
>
> Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
>
> HI Nicolas,
>
> Yes, I had a look into it. I see no issue in it. This is fairly
> independent feature addition to BBDEV.
>
Hemant,
For this v22.11 change, we will need some acks on the ABI breakage
announce in v22.07:
https://patchwork.dpdk.org/project/dpdk/patch/1647542252-35727-2-git-send-email-nicolas.chautru@intel.com/
Could you review it?
Thanks.
--
David Marchand
^ permalink raw reply [relevance 3%]
* [PATCH RESEND v4 7/8] devtools: add RISC-V to test-meson-builds.sh
@ 2022-06-07 10:46 9% ` Stanislaw Kardach
0 siblings, 0 replies; 200+ results
From: Stanislaw Kardach @ 2022-06-07 10:46 UTC (permalink / raw)
To: Bruce Richardson
Cc: Stanislaw Kardach, dev, Frank Zhao, Sam Grove, mw, upstream
Validate RISC-V compilation when test-meson-builds.sh is called. The
check will be only performed if appropriate toolchain is present on the
system (same as with other architectures).
Sponsored-by: Frank Zhao <Frank.Zhao@starfivetech.com>
Sponsored-by: Sam Grove <sam.grove@sifive.com>
Signed-off-by: Stanislaw Kardach <kda@semihalf.com>
---
devtools/test-meson-builds.sh | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/devtools/test-meson-builds.sh b/devtools/test-meson-builds.sh
index a653b253cb..f732dccf6c 100755
--- a/devtools/test-meson-builds.sh
+++ b/devtools/test-meson-builds.sh
@@ -275,6 +275,10 @@ for f in $srcdir/config/ppc/ppc* ; do
build $targetdir $f ABI $use_shared
done
+# RISC-V configuration
+build build-riscv64-linux-gcc $srcdir/config/riscv/riscv64_linux_gcc ABI \
+ $use_shared
+
# Test installation of the x86-generic target, to be used for checking
# the sample apps build using the pkg-config file for cflags and libs
load_env cc
--
2.30.2
^ permalink raw reply [relevance 9%]
* RE: [PATCH v2] sched: enable CMAN at runtime
2022-05-30 11:35 0% ` Dumitrescu, Cristian
@ 2022-06-07 10:40 0% ` Danilewicz, MarcinX
0 siblings, 0 replies; 200+ results
From: Danilewicz, MarcinX @ 2022-06-07 10:40 UTC (permalink / raw)
To: Dumitrescu, Cristian, dev, Singh, Jasvinder; +Cc: Ajmera, Megha, Liu, Yu Y
Hi Cristian,
Please find answers inline.
<snip>
> > Log: v2 change in rte_sched.h to avoid ABI breakage.
<snip>
Lessons learned, so I have fixed also positioning of this above.
<snip>
> > diff --git a/lib/sched/rte_sched.c b/lib/sched/rte_sched.c index
> > ec74bee939..db14934832 100644
> > --- a/lib/sched/rte_sched.c
> > +++ b/lib/sched/rte_sched.c
>
<snip>
> Same comment here: yes, remove the #ifdef ... #endif, but no need to
> change this code fragment, as it sets correctly the s->cman_enabled flag,
> which is then the only flag used by the rest of the code. Again, no need to
> have a CMAN_NONE in the enumeration, as the same is achieved by setting
> params->cman_params to NULL.
Yes, with that approach this is better.
<snip>
> > qe->stats.n_pkts_dropped += 1;
> > qe->stats.n_bytes_dropped += pkt_len; -#ifdef RTE_SCHED_CMAN
> > if (subport->cman_enabled)
> > qe->stats.n_pkts_cman_dropped += n_pkts_cman_dropped;
> -#endif }
>
> Please don't forget to remove the __rte_unused attribute for the
> n_pkts_cman_dropped in the function parameters, right?
Nice spot. Looks like this was there for some time.
Regards,
Marcin
^ permalink raw reply [relevance 0%]
* [PATCH v5] pcap: support MTU set for linux interafces
2022-05-30 10:36 3% ` [PATCH v3] pcap: " Ido Goshen
2022-06-06 16:21 3% ` [PATCH v4] " Ido Goshen
@ 2022-06-07 6:27 3% ` Ido Goshen
2 siblings, 0 replies; 200+ results
From: Ido Goshen @ 2022-06-07 6:27 UTC (permalink / raw)
To: ferruh.yigit, stephen; +Cc: dev, Ido Goshen
Support rte_eth_dev_set_mtu for pcap ifaces vdevs by
setting the underlying OS network interface's MTU.
Support is for pcap ifaces only and not for pcap files.
Support is for Linux only.
Bugzilla ID: 961
Signed-off-by: Ido Goshen <ido@cgstowernetworks.com>
---
v5:
Alternative approach
Instead of checking MTU in the pmd set it on the OS interface and
let it do the enforcment.
v4:
1. Add release notes comment
2. Access pmd internals via queue struct
3. eth_mtu_set code convention fixes
v3:
Preserve pcap behavior to support max size packets by default
alternative to v2 in order to limit the code change to pcap only and
avoid abi change.
Enforce mtu only in case rte_eth_dev_set_mtu was explicitly called.
v2:
Preserve pcap behavior to support max size packets by default.
---
doc/guides/rel_notes/release_22_07.rst | 3 ++
drivers/net/pcap/pcap_ethdev.c | 43 ++++++++++++++++++++++++++
drivers/net/pcap/pcap_osdep.h | 1 +
drivers/net/pcap/pcap_osdep_freebsd.c | 7 +++++
drivers/net/pcap/pcap_osdep_linux.c | 21 +++++++++++++
drivers/net/pcap/pcap_osdep_windows.c | 7 +++++
6 files changed, 82 insertions(+)
diff --git a/doc/guides/rel_notes/release_22_07.rst b/doc/guides/rel_notes/release_22_07.rst
index 0ed4f92820..b90cfefc55 100644
--- a/doc/guides/rel_notes/release_22_07.rst
+++ b/doc/guides/rel_notes/release_22_07.rst
@@ -95,6 +95,9 @@ New Features
* Added AH mode support in lookaside protocol (IPsec) for CN9K & CN10K.
* Added AES-GMAC support in lookaside protocol (IPsec) for CN9K & CN10K.
+* **Updated pcap driver.**
+
+ * Added support for MTU on Linux network interfaces
Removed Items
-------------
diff --git a/drivers/net/pcap/pcap_ethdev.c b/drivers/net/pcap/pcap_ethdev.c
index ec29fd6bc5..3d76d50ef1 100644
--- a/drivers/net/pcap/pcap_ethdev.c
+++ b/drivers/net/pcap/pcap_ethdev.c
@@ -807,6 +807,48 @@ eth_stats_reset(struct rte_eth_dev *dev)
return 0;
}
+static int
+eth_mtu_set(struct rte_eth_dev *dev, uint16_t mtu)
+{
+ unsigned int i;
+ struct pmd_internals *internals = dev->data->dev_private;
+ int is_supported = 0;
+ int is_err = 0;
+
+
+ for (i = 0; i < dev->data->nb_rx_queues; i++) {
+ struct pcap_rx_queue* queue = &internals->rx_queue[i];
+
+ if ((strcmp(queue->type, ETH_PCAP_IFACE_ARG) == 0) ||
+ (strcmp(queue->type, ETH_PCAP_RX_IFACE_ARG) == 0) ||
+ (strcmp(queue->type, ETH_PCAP_RX_IFACE_IN_ARG) == 0)) {
+ is_supported = 1;
+ if (osdep_iface_mtu_set(queue->name, mtu) < 0)
+ is_err = 1;
+ }
+ }
+
+ for (i = 0; i < dev->data->nb_tx_queues; i++) {
+ struct pcap_tx_queue* queue = &internals->tx_queue[i];
+
+ if ((strcmp(queue->type, ETH_PCAP_IFACE_ARG) == 0) ||
+ (strcmp(queue->type, ETH_PCAP_TX_IFACE_ARG) == 0)) {
+ is_supported = 1;
+ if (osdep_iface_mtu_set(queue->name, mtu) < 0)
+ is_err = 1;
+ }
+ }
+
+ if (!is_supported)
+ return -ENOTSUP;
+
+ if (is_err)
+ return -1;
+
+ PMD_LOG(INFO, "MTU set %s %u\n", dev->device->name, mtu);
+ return 0;
+}
+
static inline void
infinite_rx_ring_free(struct rte_ring *pkts)
{
@@ -1004,6 +1046,7 @@ static const struct eth_dev_ops ops = {
.link_update = eth_link_update,
.stats_get = eth_stats_get,
.stats_reset = eth_stats_reset,
+ .mtu_set = eth_mtu_set,
};
static int
diff --git a/drivers/net/pcap/pcap_osdep.h b/drivers/net/pcap/pcap_osdep.h
index bf41cba982..ef8be7543c 100644
--- a/drivers/net/pcap/pcap_osdep.h
+++ b/drivers/net/pcap/pcap_osdep.h
@@ -14,5 +14,6 @@ extern int eth_pcap_logtype;
int osdep_iface_index_get(const char *name);
int osdep_iface_mac_get(const char *name, struct rte_ether_addr *mac);
+int osdep_iface_mtu_set(const char *if_name, uint16_t mtu);
#endif
diff --git a/drivers/net/pcap/pcap_osdep_freebsd.c b/drivers/net/pcap/pcap_osdep_freebsd.c
index 20556b3e92..52d4a0e6db 100644
--- a/drivers/net/pcap/pcap_osdep_freebsd.c
+++ b/drivers/net/pcap/pcap_osdep_freebsd.c
@@ -57,3 +57,10 @@ osdep_iface_mac_get(const char *if_name, struct rte_ether_addr *mac)
rte_free(buf);
return 0;
}
+
+int
+osdep_iface_mtu_set(const char *if_name, uint16_t mtu)
+{
+ PMD_LOG(WARN, "mtu set not supported on freebsd\n");
+ return -ENOTSUP;
+}
diff --git a/drivers/net/pcap/pcap_osdep_linux.c b/drivers/net/pcap/pcap_osdep_linux.c
index 97033f57c5..b0b4a716fe 100644
--- a/drivers/net/pcap/pcap_osdep_linux.c
+++ b/drivers/net/pcap/pcap_osdep_linux.c
@@ -40,3 +40,24 @@ osdep_iface_mac_get(const char *if_name, struct rte_ether_addr *mac)
close(if_fd);
return 0;
}
+
+int
+osdep_iface_mtu_set(const char *if_name, uint16_t mtu)
+{
+ struct ifreq ifr;
+ int if_fd = socket(AF_INET, SOCK_DGRAM, 0);
+
+ if (if_fd == -1)
+ return -1;
+
+ rte_strscpy(ifr.ifr_name, if_name, sizeof(ifr.ifr_name));
+ ifr.ifr_mtu = mtu;
+ if (ioctl(if_fd, SIOCSIFMTU, &ifr)) {
+ PMD_LOG(ERR, "%s mtu set to %d failed\n", if_name, mtu);
+ close(if_fd);
+ return -1;
+ }
+
+ close(if_fd);
+ return 0;
+}
diff --git a/drivers/net/pcap/pcap_osdep_windows.c b/drivers/net/pcap/pcap_osdep_windows.c
index 1d398dc7ed..15205a521e 100644
--- a/drivers/net/pcap/pcap_osdep_windows.c
+++ b/drivers/net/pcap/pcap_osdep_windows.c
@@ -116,3 +116,10 @@ osdep_iface_mac_get(const char *device_name, struct rte_ether_addr *mac)
free(info);
return ret;
}
+
+int
+osdep_iface_mtu_set(const char *if_name, uint16_t mtu)
+{
+ PMD_LOG(WARN, "mtu set not supported on Windows\n", sys_ret);
+ return -ENOTSUP;
+}
--
2.17.1
^ permalink raw reply [relevance 3%]
* Re: [PATCH v1] bbdev: add device status info
@ 2022-06-07 0:09 3% ` Stephen Hemminger
2022-06-07 12:42 0% ` Maxime Coquelin
0 siblings, 1 reply; 200+ results
From: Stephen Hemminger @ 2022-06-07 0:09 UTC (permalink / raw)
To: Nicolas Chautru
Cc: dev, gakhil, trix, maxime.coquelin, hemant.agrawal, hernan.vargas
On Mon, 6 Jun 2022 15:50:08 -0700
Nicolas Chautru <nicolas.chautru@intel.com> wrote:
> @@ -298,6 +313,8 @@ struct rte_bbdev_driver_info {
> const struct rte_bbdev_op_cap *capabilities;
> /** Device cpu_flag requirements */
> const enum rte_cpu_flag_t *cpu_flag_reqs;
> + /** Device Status */
> + enum rte_bbdev_device_status device_status;
> };
>
This ends up being an ABI breakage, can't change a struct like that
until 22.11 release.
^ permalink raw reply [relevance 3%]
* RE: [PATCH v4] pcap: support MTU set
2022-06-06 17:10 0% ` Stephen Hemminger
@ 2022-06-06 19:07 3% ` Ido Goshen
0 siblings, 0 replies; 200+ results
From: Ido Goshen @ 2022-06-06 19:07 UTC (permalink / raw)
To: Stephen Hemminger; +Cc: ferruh.yigit, dev
> -----Original Message-----
> From: Stephen Hemminger <stephen@networkplumber.org>
> Sent: Monday, 6 June 2022 20:10
> To: Ido Goshen <Ido@cgstowernetworks.com>
> Cc: ferruh.yigit@xilinx.com; dev@dpdk.org
> Subject: Re: [PATCH v4] pcap: support MTU set
>
> On Mon, 6 Jun 2022 19:21:47 +0300
> Ido Goshen <ido@cgstowernetworks.com> wrote:
>
> > Support rte_eth_dev_set_mtu by pcap vdevs Enforce mtu on rx/tx
> >
> > Bugzilla ID: 961
>
> This is not really a bug, it is an enhancement specific to your test setup. It should
> not be backported to stable.
>
> Since it is change in behavior it might be better to add a vdev argument for this
> rather than overloading meaning of MTU.
[idog] The default behavior stays the same and long packets will continue to pass as used to,
Only if 'rte_eth_dev_set_mtu' is explicitly used it will take effect.
I doubt it'll break anything cause no one could use it so far as it returns -ENOTSUP,
and I assume that would be the expected behavior for anyone who will set it.
Adding it as an argument to vdev (e.g. vdev='net_pcap0,iface=eth0,mtu=9400') seems to me
like a duplication to an existing API.
> Also, this does not behave the same[idog] as virtio or hardware drivers.
[idog] The idea of this patch is to make pcap behave more like HW NICs.
Couple of HW NICs (ixgbe, i40e) I've checked do respect MTU
Please see test outputs in https://bugs.dpdk.org/show_bug.cgi?id=961
Though probably it's done by the HW and not by the driver
Alternative might be to set the network interfaces MTU and not do it in pmd, so
It'll be like the "HW" is doing it, but this will work only for ifaces and not for pcap files.
>
> The mtu is already in dev->data->mtu, why copy it?
>
[idog] That's what I was using so far, but I got a request from ferruh.yigit@xilinx.com
not to use 'dev' but access 'internals' via the 'pcap_rx/tx_queue' struct.
> > + if (unlikely(header.caplen > internals->mtu)) {
> > + pcap_q->rx_stat.err_pkts++;
> > + rte_pktmbuf_free(mbuf);
> > + break;
> > + }
>
> This doesn't account for VLAN header.
[idog] Good point, I'm never sure what overhead should be considered?
Please advice what should I add
e.g. '(RTE_ETHER_HDR_LEN + RTE_ETHER_CRC_LEN + RTE_VLAN_HLEN * 2)'
however caller can always set it a bit higher if needed
> > +
> > + if (unlikely(len > internals->mtu)) {
> > + rte_pktmbuf_free(mbuf);
> > + continue;
> > + }
>
> There needs to be a per queue counter any and all drops.
[idog] It will be counted few lines below by
'dumper_q->tx_stat.err_pkts += nb_pkts - num_tx;'
as this case doesn't increment the 'num_tx'
> >
> > +static int
> > +eth_mtu_set(struct rte_eth_dev *dev, uint16_t mtu) {
> > + struct pmd_internals *internals = dev->data->dev_private;
> > +
> > + PMD_LOG(INFO, "MTU set %s %u\n", dev->device->name, mtu);
> > + internals->mtu = mtu;
> > + return 0;
> > +}
>
> If you drop internals->mtu (redundant) then this just becomes stub (ie return 0)
>
[idog] Again I'm not sure if it's right to use 'dev->data->mtu' directly where later needed.
ferruh.yigit@xilinx.com ?
Anyway this function is needed even if it does nothing (or just logs) in order for the
eth_dev_ops.mtu_set to be supported
> >
> > static int
> > @@ -1233,6 +1270,7 @@ pmd_init_internals(struct rte_vdev_device *vdev,
> > .addr_bytes = { 0x02, 0x70, 0x63, 0x61, 0x70, iface_idx++ }
> > };
> > (*internals)->phy_mac = 0;
> > + (*internals)->mtu = RTE_ETH_PCAP_SNAPLEN;
>
>
> Use dev->data->mtu not internal value.
>
[idog] This runs early when the probe creates the device
Later 'dev->data->mtu' will be overwritten later in 'rte_eth_dev_configure'
To hard-coded 1500
if (dev_conf->rxmode.mtu == 0)
dev->data->dev_conf.rxmode.mtu = RTE_ETHER_MTU;
ret = eth_dev_validate_mtu(port_id, &dev_info,
dev->data->dev_conf.rxmode.mtu);
if (ret != 0)
goto rollback;
dev->data->mtu = dev->data->dev_conf.rxmode.mtu;
I tried to overcome it by [PATCH v2] http://mails.dpdk.org/archives/dev/2022-May/241974.html
But this code change spills out of the pcap pmd and changes rte_ethdev abi which I rather avoid
^ permalink raw reply [relevance 3%]
* Re: [PATCH v4] pcap: support MTU set
2022-06-06 16:21 3% ` [PATCH v4] " Ido Goshen
@ 2022-06-06 17:10 0% ` Stephen Hemminger
2022-06-06 19:07 3% ` Ido Goshen
0 siblings, 1 reply; 200+ results
From: Stephen Hemminger @ 2022-06-06 17:10 UTC (permalink / raw)
To: Ido Goshen; +Cc: ferruh.yigit, dev
On Mon, 6 Jun 2022 19:21:47 +0300
Ido Goshen <ido@cgstowernetworks.com> wrote:
> Support rte_eth_dev_set_mtu by pcap vdevs
> Enforce mtu on rx/tx
>
> Bugzilla ID: 961
This is not really a bug, it is an enhancement specific to your
test setup. It should not be backported to stable.
Since it is change in behavior it might be better to add a vdev argument
for this rather than overloading meaning of MTU. Also, this does not behave
the same as virtio or hardware drivers.
> Signed-off-by: Ido Goshen <ido@cgstowernetworks.com>
>
> ---
> v4:
> 1. Add release notes comment
> 2. Access pmd internals via queue struct
> 3. eth_mtu_set code convention fixes
>
> v3:
> Preserve pcap behavior to support max size packets by default
> alternative to v2 in order to limit the code change to pcap only and
> avoid abi change.
> Enforce mtu only in case rte_eth_dev_set_mtu was explicitly called.
>
> v2:
> Preserve pcap behavior to support max size packets by default.
> ---
> doc/guides/rel_notes/release_22_07.rst | 3 ++
> drivers/net/pcap/pcap_ethdev.c | 38 ++++++++++++++++++++++++++
> 2 files changed, 41 insertions(+)
>
> diff --git a/doc/guides/rel_notes/release_22_07.rst b/doc/guides/rel_notes/release_22_07.rst
> index 0ed4f92820..717191d498 100644
> --- a/doc/guides/rel_notes/release_22_07.rst
> +++ b/doc/guides/rel_notes/release_22_07.rst
> @@ -95,6 +95,9 @@ New Features
> * Added AH mode support in lookaside protocol (IPsec) for CN9K & CN10K.
> * Added AES-GMAC support in lookaside protocol (IPsec) for CN9K & CN10K.
>
> +* **Updated pcap driver.**
> +
> + * Added support for MTU via ``rte_eth_dev_set_mtu``
>
> Removed Items
> -------------
> diff --git a/drivers/net/pcap/pcap_ethdev.c b/drivers/net/pcap/pcap_ethdev.c
> index ec29fd6bc5..db1958f20f 100644
> --- a/drivers/net/pcap/pcap_ethdev.c
> +++ b/drivers/net/pcap/pcap_ethdev.c
> @@ -74,6 +74,7 @@ struct pcap_rx_queue {
>
> /* Contains pre-generated packets to be looped through */
> struct rte_ring *pkts;
> + struct pmd_internals *internals;
> };
>
> struct pcap_tx_queue {
> @@ -82,6 +83,7 @@ struct pcap_tx_queue {
> struct queue_stat tx_stat;
> char name[PATH_MAX];
> char type[ETH_PCAP_ARG_MAXLEN];
> + struct pmd_internals *internals;
> };
>
> struct pmd_internals {
> @@ -93,6 +95,7 @@ struct pmd_internals {
> int single_iface;
> int phy_mac;
> unsigned int infinite_rx;
> + uint16_t mtu;
> };
The mtu is already in dev->data->mtu, why copy it?
> struct pmd_process_private {
> @@ -278,6 +281,7 @@ eth_pcap_rx(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
> const u_char *packet;
> struct rte_mbuf *mbuf;
> struct pcap_rx_queue *pcap_q = queue;
> + struct pmd_internals *internals = pcap_q->internals;
> uint16_t num_rx = 0;
> uint32_t rx_bytes = 0;
> pcap_t *pcap;
> @@ -303,6 +307,12 @@ eth_pcap_rx(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
> break;
> }
>
> + if (unlikely(header.caplen > internals->mtu)) {
> + pcap_q->rx_stat.err_pkts++;
> + rte_pktmbuf_free(mbuf);
> + break;
> + }
This doesn't account for VLAN header.
> if (header.caplen <= rte_pktmbuf_tailroom(mbuf)) {
> /* pcap packet will fit in the mbuf, can copy it */
> rte_memcpy(rte_pktmbuf_mtod(mbuf, void *), packet,
> @@ -378,6 +388,7 @@ eth_pcap_tx_dumper(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
> struct rte_mbuf *mbuf;
> struct pmd_process_private *pp;
> struct pcap_tx_queue *dumper_q = queue;
> + struct pmd_internals *internals = dumper_q->internals;
> uint16_t num_tx = 0;
> uint32_t tx_bytes = 0;
> struct pcap_pkthdr header;
> @@ -396,6 +407,12 @@ eth_pcap_tx_dumper(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
> for (i = 0; i < nb_pkts; i++) {
> mbuf = bufs[i];
> len = caplen = rte_pktmbuf_pkt_len(mbuf);
> +
> + if (unlikely(len > internals->mtu)) {
> + rte_pktmbuf_free(mbuf);
> + continue;
> + }
There needs to be a per queue counter any and all drops.
<
> +
> if (unlikely(!rte_pktmbuf_is_contiguous(mbuf) &&
> len > sizeof(temp_data))) {
> caplen = sizeof(temp_data);
> @@ -464,6 +481,7 @@ eth_pcap_tx(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
> struct rte_mbuf *mbuf;
> struct pmd_process_private *pp;
> struct pcap_tx_queue *tx_queue = queue;
> + struct pmd_internals *internals = tx_queue->internals;
> uint16_t num_tx = 0;
> uint32_t tx_bytes = 0;
> pcap_t *pcap;
> @@ -479,6 +497,12 @@ eth_pcap_tx(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
> for (i = 0; i < nb_pkts; i++) {
> mbuf = bufs[i];
> len = rte_pktmbuf_pkt_len(mbuf);
> +
> + if (unlikely(len > internals->mtu)) {
> + rte_pktmbuf_free(mbuf);
> + continue;
> + }
> +
> if (unlikely(!rte_pktmbuf_is_contiguous(mbuf) &&
> len > sizeof(temp_data))) {
> PMD_LOG(ERR,
> @@ -807,6 +831,16 @@ eth_stats_reset(struct rte_eth_dev *dev)
> return 0;
> }
>
> +static int
> +eth_mtu_set(struct rte_eth_dev *dev, uint16_t mtu)
> +{
> + struct pmd_internals *internals = dev->data->dev_private;
> +
> + PMD_LOG(INFO, "MTU set %s %u\n", dev->device->name, mtu);
> + internals->mtu = mtu;
> + return 0;
> +}
If you drop internals->mtu (redundant) then this just becomes stub (ie return 0)
> +
> static inline void
> infinite_rx_ring_free(struct rte_ring *pkts)
> {
> @@ -878,6 +912,7 @@ eth_rx_queue_setup(struct rte_eth_dev *dev,
> pcap_q->mb_pool = mb_pool;
> pcap_q->port_id = dev->data->port_id;
> pcap_q->queue_id = rx_queue_id;
> + pcap_q->internals = internals;
> dev->data->rx_queues[rx_queue_id] = pcap_q;
>
> if (internals->infinite_rx) {
> @@ -952,6 +987,7 @@ eth_tx_queue_setup(struct rte_eth_dev *dev,
>
> pcap_q->port_id = dev->data->port_id;
> pcap_q->queue_id = tx_queue_id;
> + pcap_q->internals = internals;
> dev->data->tx_queues[tx_queue_id] = pcap_q;
>
> return 0;
> @@ -1004,6 +1040,7 @@ static const struct eth_dev_ops ops = {
> .link_update = eth_link_update,
> .stats_get = eth_stats_get,
> .stats_reset = eth_stats_reset,
> + .mtu_set = eth_mtu_set,
> };
>
> static int
> @@ -1233,6 +1270,7 @@ pmd_init_internals(struct rte_vdev_device *vdev,
> .addr_bytes = { 0x02, 0x70, 0x63, 0x61, 0x70, iface_idx++ }
> };
> (*internals)->phy_mac = 0;
> + (*internals)->mtu = RTE_ETH_PCAP_SNAPLEN;
Use dev->data->mtu not internal value.
> data = (*eth_dev)->data;
> data->nb_rx_queues = (uint16_t)nb_rx_queues;
> data->nb_tx_queues = (uint16_t)nb_tx_queues;
^ permalink raw reply [relevance 0%]
* [PATCH v4] pcap: support MTU set
2022-05-30 10:36 3% ` [PATCH v3] pcap: " Ido Goshen
@ 2022-06-06 16:21 3% ` Ido Goshen
2022-06-06 17:10 0% ` Stephen Hemminger
2022-06-07 6:27 3% ` [PATCH v5] pcap: support MTU set for linux interafces Ido Goshen
2 siblings, 1 reply; 200+ results
From: Ido Goshen @ 2022-06-06 16:21 UTC (permalink / raw)
To: ferruh.yigit, stephen; +Cc: dev, Ido Goshen
Support rte_eth_dev_set_mtu by pcap vdevs
Enforce mtu on rx/tx
Bugzilla ID: 961
Signed-off-by: Ido Goshen <ido@cgstowernetworks.com>
---
v4:
1. Add release notes comment
2. Access pmd internals via queue struct
3. eth_mtu_set code convention fixes
v3:
Preserve pcap behavior to support max size packets by default
alternative to v2 in order to limit the code change to pcap only and
avoid abi change.
Enforce mtu only in case rte_eth_dev_set_mtu was explicitly called.
v2:
Preserve pcap behavior to support max size packets by default.
---
doc/guides/rel_notes/release_22_07.rst | 3 ++
drivers/net/pcap/pcap_ethdev.c | 38 ++++++++++++++++++++++++++
2 files changed, 41 insertions(+)
diff --git a/doc/guides/rel_notes/release_22_07.rst b/doc/guides/rel_notes/release_22_07.rst
index 0ed4f92820..717191d498 100644
--- a/doc/guides/rel_notes/release_22_07.rst
+++ b/doc/guides/rel_notes/release_22_07.rst
@@ -95,6 +95,9 @@ New Features
* Added AH mode support in lookaside protocol (IPsec) for CN9K & CN10K.
* Added AES-GMAC support in lookaside protocol (IPsec) for CN9K & CN10K.
+* **Updated pcap driver.**
+
+ * Added support for MTU via ``rte_eth_dev_set_mtu``
Removed Items
-------------
diff --git a/drivers/net/pcap/pcap_ethdev.c b/drivers/net/pcap/pcap_ethdev.c
index ec29fd6bc5..db1958f20f 100644
--- a/drivers/net/pcap/pcap_ethdev.c
+++ b/drivers/net/pcap/pcap_ethdev.c
@@ -74,6 +74,7 @@ struct pcap_rx_queue {
/* Contains pre-generated packets to be looped through */
struct rte_ring *pkts;
+ struct pmd_internals *internals;
};
struct pcap_tx_queue {
@@ -82,6 +83,7 @@ struct pcap_tx_queue {
struct queue_stat tx_stat;
char name[PATH_MAX];
char type[ETH_PCAP_ARG_MAXLEN];
+ struct pmd_internals *internals;
};
struct pmd_internals {
@@ -93,6 +95,7 @@ struct pmd_internals {
int single_iface;
int phy_mac;
unsigned int infinite_rx;
+ uint16_t mtu;
};
struct pmd_process_private {
@@ -278,6 +281,7 @@ eth_pcap_rx(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
const u_char *packet;
struct rte_mbuf *mbuf;
struct pcap_rx_queue *pcap_q = queue;
+ struct pmd_internals *internals = pcap_q->internals;
uint16_t num_rx = 0;
uint32_t rx_bytes = 0;
pcap_t *pcap;
@@ -303,6 +307,12 @@ eth_pcap_rx(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
break;
}
+ if (unlikely(header.caplen > internals->mtu)) {
+ pcap_q->rx_stat.err_pkts++;
+ rte_pktmbuf_free(mbuf);
+ break;
+ }
+
if (header.caplen <= rte_pktmbuf_tailroom(mbuf)) {
/* pcap packet will fit in the mbuf, can copy it */
rte_memcpy(rte_pktmbuf_mtod(mbuf, void *), packet,
@@ -378,6 +388,7 @@ eth_pcap_tx_dumper(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
struct rte_mbuf *mbuf;
struct pmd_process_private *pp;
struct pcap_tx_queue *dumper_q = queue;
+ struct pmd_internals *internals = dumper_q->internals;
uint16_t num_tx = 0;
uint32_t tx_bytes = 0;
struct pcap_pkthdr header;
@@ -396,6 +407,12 @@ eth_pcap_tx_dumper(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
for (i = 0; i < nb_pkts; i++) {
mbuf = bufs[i];
len = caplen = rte_pktmbuf_pkt_len(mbuf);
+
+ if (unlikely(len > internals->mtu)) {
+ rte_pktmbuf_free(mbuf);
+ continue;
+ }
+
if (unlikely(!rte_pktmbuf_is_contiguous(mbuf) &&
len > sizeof(temp_data))) {
caplen = sizeof(temp_data);
@@ -464,6 +481,7 @@ eth_pcap_tx(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
struct rte_mbuf *mbuf;
struct pmd_process_private *pp;
struct pcap_tx_queue *tx_queue = queue;
+ struct pmd_internals *internals = tx_queue->internals;
uint16_t num_tx = 0;
uint32_t tx_bytes = 0;
pcap_t *pcap;
@@ -479,6 +497,12 @@ eth_pcap_tx(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
for (i = 0; i < nb_pkts; i++) {
mbuf = bufs[i];
len = rte_pktmbuf_pkt_len(mbuf);
+
+ if (unlikely(len > internals->mtu)) {
+ rte_pktmbuf_free(mbuf);
+ continue;
+ }
+
if (unlikely(!rte_pktmbuf_is_contiguous(mbuf) &&
len > sizeof(temp_data))) {
PMD_LOG(ERR,
@@ -807,6 +831,16 @@ eth_stats_reset(struct rte_eth_dev *dev)
return 0;
}
+static int
+eth_mtu_set(struct rte_eth_dev *dev, uint16_t mtu)
+{
+ struct pmd_internals *internals = dev->data->dev_private;
+
+ PMD_LOG(INFO, "MTU set %s %u\n", dev->device->name, mtu);
+ internals->mtu = mtu;
+ return 0;
+}
+
static inline void
infinite_rx_ring_free(struct rte_ring *pkts)
{
@@ -878,6 +912,7 @@ eth_rx_queue_setup(struct rte_eth_dev *dev,
pcap_q->mb_pool = mb_pool;
pcap_q->port_id = dev->data->port_id;
pcap_q->queue_id = rx_queue_id;
+ pcap_q->internals = internals;
dev->data->rx_queues[rx_queue_id] = pcap_q;
if (internals->infinite_rx) {
@@ -952,6 +987,7 @@ eth_tx_queue_setup(struct rte_eth_dev *dev,
pcap_q->port_id = dev->data->port_id;
pcap_q->queue_id = tx_queue_id;
+ pcap_q->internals = internals;
dev->data->tx_queues[tx_queue_id] = pcap_q;
return 0;
@@ -1004,6 +1040,7 @@ static const struct eth_dev_ops ops = {
.link_update = eth_link_update,
.stats_get = eth_stats_get,
.stats_reset = eth_stats_reset,
+ .mtu_set = eth_mtu_set,
};
static int
@@ -1233,6 +1270,7 @@ pmd_init_internals(struct rte_vdev_device *vdev,
.addr_bytes = { 0x02, 0x70, 0x63, 0x61, 0x70, iface_idx++ }
};
(*internals)->phy_mac = 0;
+ (*internals)->mtu = RTE_ETH_PCAP_SNAPLEN;
data = (*eth_dev)->data;
data->nb_rx_queues = (uint16_t)nb_rx_queues;
data->nb_tx_queues = (uint16_t)nb_tx_queues;
--
2.17.1
^ permalink raw reply [relevance 3%]
* Re: Optimizations are not features
2022-06-04 12:51 0% ` Andrew Rybchenko
2022-06-05 8:15 0% ` Morten Brørup
2022-06-05 16:05 0% ` Stephen Hemminger
@ 2022-06-06 9:35 0% ` Konstantin Ananyev
2 siblings, 0 replies; 200+ results
From: Konstantin Ananyev @ 2022-06-06 9:35 UTC (permalink / raw)
To: Andrew Rybchenko, Morten Brørup, Jerin Jacob; +Cc: dpdk-dev, techboard
04/06/2022 13:51, Andrew Rybchenko пишет:
> On 6/4/22 15:19, Morten Brørup wrote:
>>> From: Jerin Jacob [mailto:jerinjacobk@gmail.com]
>>> Sent: Saturday, 4 June 2022 13.10
>>>
>>> On Sat, Jun 4, 2022 at 3:30 PM Andrew Rybchenko
>>> <andrew.rybchenko@oktetlabs.ru> wrote:
>>>>
>>>> On 6/4/22 12:33, Jerin Jacob wrote:
>>>>> On Sat, Jun 4, 2022 at 2:39 PM Morten Brørup
>>> <mb@smartsharesystems.com> wrote:
>>>>>>
>>>>>> I would like the DPDK community to change its view on compile time
>>> options. Here is why:
>>>>>>
>>>>>>
>>>>>>
>>>>>> Application specific performance micro-optimizations like “fast
>>> mbuf free” and “mbuf direct re-arm” are being added to DPDK and
>>> presented as features.
>>>>>>
>>>>>>
>>>>>>
>>>>>> They are not features, but optimizations, and I don’t understand
>>> the need for them to be available at run-time!
>>>>>>
>>>>>>
>>>>>>
>>>>>> Instead of adding a bunch of exotic exceptions to the fast path of
>>> the PMDs, they should be compile time options. This will improve
>>> performance by avoiding branches in the fast path, both for the
>>> applications using them, and for generic applications (where the exotic
>>> code is omitted).
>>>>>
>>>>> Agree. I think, keeping the best of both worlds would be
>>>>>
>>>>> -Enable the feature/optimization as runtime
>>>>> -Have a compile-time option to disable the feature/optimization as
>>> an override.
>>>>
>>>> It is hard to find the right balance, but in general compile
>>>> time options are a nightmare for maintenance. Number of
>>>> required builds will grow as an exponent.
>>
>> Test combinations are exponential for N features, regardless if N are
>> runtime or compile time options.
>
> But since I'm talking about build checks I don't care about exponential
> grows in run time. Yes, testing should care, but it is a separate story.
>
>>
>>>> Of course, we can
>>>> limit number of checked combinations, but it will result in
>>>> flow of patches to fix build in other cases.
>>>
>>> The build breakage can be fixed if we use (2) vs (1)
>>>
>>> 1)
>>> #ifdef ...
>>> My feature
>>> #endif
>>>
>>> 2)
>>> static __rte_always_inline int
>>> rte_has_xyz_feature(void)
>>> {
>>> #ifdef RTE_LIBRTE_XYZ_FEATURE
>>> return RTE_LIBRTE_XYZ_FEATURE;
>>> #else
>>> return 0;
>>> #endif
>>> }
>>>
>>> if(rte_has_xyz_feature())) {
>>> My feature code
>>>
>>> }
>>>
>
> Jerin, thanks, very good example.
>
>> I'm not sure all the features can be covered by that, e.g. added
>> fields in structures.
>
> +1
>
>>
>> Also, I would consider such features "opt in" at compile time only. As
>> such, they could be allowed to break the ABI/API.
>>
>>>
>>>
>>>> Also compile time options tend to make code less readable
>>>> which makes all aspects of the development harder.
>>>>
>>>> Yes, compile time is nice for micro optimizations, but
>>>> I have great concerns that it is a right way to go.
>>>>
>>>>>> Please note that I am only talking about the performance
>>> optimizations that are limited to application specific use cases. I
>>> think it makes sense to require that performance optimizing an
>>> application also requires recompiling the performance critical
>>> libraries used by it.
>>>>>>abandon some of existing functionality to create a 'short-cut'
>>>>>>
>>>>>>
>>>>>> Allowing compile time options for application specific performance
>>> optimizations in DPDK would also open a path for other optimizations,
>>> which can only be achieved at compile time, such as “no fragmented
>>> packets”, “no attached mbufs” and “single mbuf pool”. And even more
>>> exotic optimizations, such as the “indexed mempool cache”, which was
>>> rejected due to ABI violations – they could be marked as “risky and
>>> untested” or similar, but still be part of the DPDK main repository.
>>>>>>
Thanks Morten for bringing it up, it is an interesting topic.
Though I look at it from different angle.
All optimizations you mentioned above introduce new limitations:
MBUF_FAST_FREE - no indirect mbufs and multiple mempools,
mempool object indexes - mempool size is limited to 4GB,
direct rearm - drop ability to stop/reconfigure TX queue,
while RX queue is still running,
etc.
Note that all these limitations are not forced by HW.
All of them are pure SW limitations that developers forced in
(or tried to) to get few extra performance.
That's concerning tendency.
As more and more such 'optimization via limitation' will come in:
- DPDK feature list will become more and more fragmented.
- Would cause more and more confusion for the users.
- Unmet expectations - difference in performance between 'default'
and 'optimized' version of DPDK will become bigger and bigger.
- As Andrew already mentioned, maintaining all these 'sub-flavours'
of DPDK will become more and more difficult.
So, probably instead of making such changes easier,
we need somehow to persuade developers to think more about
optimizations that would be generic and transparent to the user.
I do realize that it is not always possible due to various reasons
(HW limitations, external dependencies, etc.)
but that's another story.
Let's take for example MBUF_FAST_FREE.
In fact, I am not sure that we need it as tx offload flag at all.
PMD TX-path has all necessary information to decide at run-time
can it do fast_free() for not:
At tx_burst() PMD can check are all mbufs satisfy these conditions
(same mempool, refcnt==1) and update some fields and/or counters
inside TXQ to reflect it.
Then, at tx_free() we can use this info to decide
between fast_free() and normal_free().
As at tx_burst() we read mbuf fields anyway, impact for this
extra step I guess would be minimal.
Yes, most likely, it wouldn't be as fast as with current
TX offload flag, or conditional compilation approach.
But it might be still significantly faster then normal_free(),
plus such approach will be generic and transparent to the user.
Konstantin
^ permalink raw reply [relevance 0%]
* Re: Optimizations are not features
2022-06-04 12:51 0% ` Andrew Rybchenko
2022-06-05 8:15 0% ` Morten Brørup
@ 2022-06-05 16:05 0% ` Stephen Hemminger
2022-06-06 9:35 0% ` Konstantin Ananyev
2 siblings, 0 replies; 200+ results
From: Stephen Hemminger @ 2022-06-05 16:05 UTC (permalink / raw)
To: Andrew Rybchenko; +Cc: Morten Brørup, Jerin Jacob, dpdk-dev, techboard
On Sat, 4 Jun 2022 15:51:58 +0300
Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru> wrote:
> On 6/4/22 15:19, Morten Brørup wrote:
> >> From: Jerin Jacob [mailto:jerinjacobk@gmail.com]
> >> Sent: Saturday, 4 June 2022 13.10
> >>
> >> On Sat, Jun 4, 2022 at 3:30 PM Andrew Rybchenko
> >> <andrew.rybchenko@oktetlabs.ru> wrote:
> >>>
> >>> On 6/4/22 12:33, Jerin Jacob wrote:
> >>>> On Sat, Jun 4, 2022 at 2:39 PM Morten Brørup
> >> <mb@smartsharesystems.com> wrote:
> >>>>>
> >>>>> I would like the DPDK community to change its view on compile time
> >> options. Here is why:
> >>>>>
> >>>>>
> >>>>>
> >>>>> Application specific performance micro-optimizations like “fast
> >> mbuf free” and “mbuf direct re-arm” are being added to DPDK and
> >> presented as features.
> >>>>>
> >>>>>
> >>>>>
> >>>>> They are not features, but optimizations, and I don’t understand
> >> the need for them to be available at run-time!
> >>>>>
> >>>>>
> >>>>>
> >>>>> Instead of adding a bunch of exotic exceptions to the fast path of
> >> the PMDs, they should be compile time options. This will improve
> >> performance by avoiding branches in the fast path, both for the
> >> applications using them, and for generic applications (where the exotic
> >> code is omitted).
> >>>>
> >>>> Agree. I think, keeping the best of both worlds would be
> >>>>
> >>>> -Enable the feature/optimization as runtime
> >>>> -Have a compile-time option to disable the feature/optimization as
> >> an override.
> >>>
> >>> It is hard to find the right balance, but in general compile
> >>> time options are a nightmare for maintenance. Number of
> >>> required builds will grow as an exponent.
> >
> > Test combinations are exponential for N features, regardless if N are runtime or compile time options.
>
> But since I'm talking about build checks I don't care about exponential
> grows in run time. Yes, testing should care, but it is a separate story.
>
> >
> >>> Of course, we can
> >>> limit number of checked combinations, but it will result in
> >>> flow of patches to fix build in other cases.
> >>
> >> The build breakage can be fixed if we use (2) vs (1)
> >>
> >> 1)
> >> #ifdef ...
> >> My feature
> >> #endif
> >>
> >> 2)
> >> static __rte_always_inline int
> >> rte_has_xyz_feature(void)
> >> {
> >> #ifdef RTE_LIBRTE_XYZ_FEATURE
> >> return RTE_LIBRTE_XYZ_FEATURE;
> >> #else
> >> return 0;
> >> #endif
> >> }
> >>
> >> if(rte_has_xyz_feature())) {
> >> My feature code
> >>
> >> }
> >>
>
> Jerin, thanks, very good example.
>
> > I'm not sure all the features can be covered by that, e.g. added fields in structures.
>
> +1
>
> >
> > Also, I would consider such features "opt in" at compile time only. As such, they could be allowed to break the ABI/API.
> >
> >>
> >>
> >>> Also compile time options tend to make code less readable
> >>> which makes all aspects of the development harder.
> >>>
> >>> Yes, compile time is nice for micro optimizations, but
> >>> I have great concerns that it is a right way to go.
> >>>
> >>>>> Please note that I am only talking about the performance
> >> optimizations that are limited to application specific use cases. I
> >> think it makes sense to require that performance optimizing an
> >> application also requires recompiling the performance critical
> >> libraries used by it.
> >>>>>
> >>>>>
> >>>>>
> >>>>> Allowing compile time options for application specific performance
> >> optimizations in DPDK would also open a path for other optimizations,
> >> which can only be achieved at compile time, such as “no fragmented
> >> packets”, “no attached mbufs” and “single mbuf pool”. And even more
> >> exotic optimizations, such as the “indexed mempool cache”, which was
> >> rejected due to ABI violations – they could be marked as “risky and
> >> untested” or similar, but still be part of the DPDK main repository.
There is a tradeoff that DPDK has had for several years.
1. For ease of use the DPDK should be available in Linux distributions in
pre-built binary format. In that case any changes in behavior need to be
done at runtime.
2. For performance and size, the DPDK should limit conditional branches
and not include dead code. This is what embedded appliance developers want.
3. For flexibilty, the DPDK should allow every option at the smallest granularity
(often per-packet or per-queue). This allows application to use feature if
available but not be limited to only hardware that supports it.
All of these do conflict. The big problem that I see is that when a feature
that changes the semantic of mbuf is used (no-attach, single pool etc).
It is opening other code to bugs. Therefore I am reluctant to use them;
in real life production 1% performance gain is totally offset by the cost
of .1% more bugs in code run by customers.
It would make my life easier if DPDK supported one set of semantics and
they worked everywhere. This is what every OS does (Linux, FreeBSD, Windows).
That would mean either all drivers support the feature in all cases or
the feature is never introduced. What would help this would be a set
of functions that help code do the right thing. Examples in Linux
are skb_linearize(), skb_maypull(), etc.
^ permalink raw reply [relevance 0%]
* RE: Optimizations are not features
2022-06-04 12:51 0% ` Andrew Rybchenko
@ 2022-06-05 8:15 0% ` Morten Brørup
2022-06-05 16:05 0% ` Stephen Hemminger
2022-06-06 9:35 0% ` Konstantin Ananyev
2 siblings, 0 replies; 200+ results
From: Morten Brørup @ 2022-06-05 8:15 UTC (permalink / raw)
To: Andrew Rybchenko, Jerin Jacob; +Cc: dpdk-dev, techboard
> From: Andrew Rybchenko [mailto:andrew.rybchenko@oktetlabs.ru]
> Sent: Saturday, 4 June 2022 14.52
>
> On 6/4/22 15:19, Morten Brørup wrote:
> >> From: Jerin Jacob [mailto:jerinjacobk@gmail.com]
> >> Sent: Saturday, 4 June 2022 13.10
> >>
> >> On Sat, Jun 4, 2022 at 3:30 PM Andrew Rybchenko
> >> <andrew.rybchenko@oktetlabs.ru> wrote:
> >>>
> >>> On 6/4/22 12:33, Jerin Jacob wrote:
> >>>> On Sat, Jun 4, 2022 at 2:39 PM Morten Brørup
> >> <mb@smartsharesystems.com> wrote:
> >>>>>
> >>>>> I would like the DPDK community to change its view on compile
> time
> >> options. Here is why:
> >>>>>
> >>>>>
> >>>>>
> >>>>> Application specific performance micro-optimizations like “fast
> >> mbuf free” and “mbuf direct re-arm” are being added to DPDK and
> >> presented as features.
> >>>>>
> >>>>>
> >>>>>
> >>>>> They are not features, but optimizations, and I don’t understand
> >> the need for them to be available at run-time!
> >>>>>
> >>>>>
> >>>>>
> >>>>> Instead of adding a bunch of exotic exceptions to the fast path
> of
> >> the PMDs, they should be compile time options. This will improve
> >> performance by avoiding branches in the fast path, both for the
> >> applications using them, and for generic applications (where the
> exotic
> >> code is omitted).
> >>>>
> >>>> Agree. I think, keeping the best of both worlds would be
> >>>>
> >>>> -Enable the feature/optimization as runtime
> >>>> -Have a compile-time option to disable the feature/optimization as
> >> an override.
> >>>
> >>> It is hard to find the right balance, but in general compile
> >>> time options are a nightmare for maintenance. Number of
> >>> required builds will grow as an exponent.
> >
> > Test combinations are exponential for N features, regardless if N are
> runtime or compile time options.
>
> But since I'm talking about build checks I don't care about exponential
> grows in run time. Yes, testing should care, but it is a separate
> story.
Build checks is just one of many test methods. A very low cost and efficient test method, though.
I acknowledge that build checks will be more complicated with additional compile time options. And build checks are important for code quality, so we should find a solution for that challenge.
The primary scope of my suggestion is application specific performance optimization features only, so let's call them "exotic features". Also, they should be "opt in". Keep in mind: They are not really features, since they don't add anything new, they are only performance optimizations beneficial for specific application use cases.
With this in mind, we could continue ordinary testing with these options disabled. I.e. no additional testing.
Regardless how exotic the features may be, we certainly want some testing of them, so we could do some things to avoid exponential testing:
1. With each ordinary build check (with all options disabled), another build check could be run with a random set of options enabled. Or additional tests could be run on a weekly basis with random combinations of options.
2. Any patch related to one or more of these exotic features could include some magic keywords to indicate which combinations of options must be enabled during build checking and testing.
>
> >
> >>> Of course, we can
> >>> limit number of checked combinations, but it will result in
> >>> flow of patches to fix build in other cases.
> >>
> >> The build breakage can be fixed if we use (2) vs (1)
> >>
> >> 1)
> >> #ifdef ...
> >> My feature
> >> #endif
> >>
> >> 2)
> >> static __rte_always_inline int
> >> rte_has_xyz_feature(void)
> >> {
> >> #ifdef RTE_LIBRTE_XYZ_FEATURE
> >> return RTE_LIBRTE_XYZ_FEATURE;
> >> #else
> >> return 0;
> >> #endif
> >> }
> >>
> >> if(rte_has_xyz_feature())) {
> >> My feature code
> >>
> >> }
> >>
>
> Jerin, thanks, very good example.
>
> > I'm not sure all the features can be covered by that, e.g. added
> fields in structures.
>
> +1
>
> >
> > Also, I would consider such features "opt in" at compile time only.
> As such, they could be allowed to break the ABI/API.
> >
> >>
> >>
> >>> Also compile time options tend to make code less readable
> >>> which makes all aspects of the development harder.
> >>>
> >>> Yes, compile time is nice for micro optimizations, but
> >>> I have great concerns that it is a right way to go.
> >>>
> >>>>> Please note that I am only talking about the performance
> >> optimizations that are limited to application specific use cases. I
> >> think it makes sense to require that performance optimizing an
> >> application also requires recompiling the performance critical
> >> libraries used by it.
> >>>>>
> >>>>>
> >>>>>
> >>>>> Allowing compile time options for application specific
> performance
> >> optimizations in DPDK would also open a path for other
> optimizations,
> >> which can only be achieved at compile time, such as “no fragmented
> >> packets”, “no attached mbufs” and “single mbuf pool”. And even more
> >> exotic optimizations, such as the “indexed mempool cache”, which was
> >> rejected due to ABI violations – they could be marked as “risky and
> >> untested” or similar, but still be part of the DPDK main repository.
> >>>>>
> >>>>>
> >>>>>
> >>>>>
> >>>>>
> >>>>> Med venlig hilsen / Kind regards,
> >>>>>
> >>>>> -Morten Brørup
> >>>>>
> >>>>>
> >>>
> >
>
^ permalink raw reply [relevance 0%]
* Re: Optimizations are not features
2022-06-04 12:19 3% ` Morten Brørup
@ 2022-06-04 12:51 0% ` Andrew Rybchenko
2022-06-05 8:15 0% ` Morten Brørup
` (2 more replies)
0 siblings, 3 replies; 200+ results
From: Andrew Rybchenko @ 2022-06-04 12:51 UTC (permalink / raw)
To: Morten Brørup, Jerin Jacob; +Cc: dpdk-dev, techboard
On 6/4/22 15:19, Morten Brørup wrote:
>> From: Jerin Jacob [mailto:jerinjacobk@gmail.com]
>> Sent: Saturday, 4 June 2022 13.10
>>
>> On Sat, Jun 4, 2022 at 3:30 PM Andrew Rybchenko
>> <andrew.rybchenko@oktetlabs.ru> wrote:
>>>
>>> On 6/4/22 12:33, Jerin Jacob wrote:
>>>> On Sat, Jun 4, 2022 at 2:39 PM Morten Brørup
>> <mb@smartsharesystems.com> wrote:
>>>>>
>>>>> I would like the DPDK community to change its view on compile time
>> options. Here is why:
>>>>>
>>>>>
>>>>>
>>>>> Application specific performance micro-optimizations like “fast
>> mbuf free” and “mbuf direct re-arm” are being added to DPDK and
>> presented as features.
>>>>>
>>>>>
>>>>>
>>>>> They are not features, but optimizations, and I don’t understand
>> the need for them to be available at run-time!
>>>>>
>>>>>
>>>>>
>>>>> Instead of adding a bunch of exotic exceptions to the fast path of
>> the PMDs, they should be compile time options. This will improve
>> performance by avoiding branches in the fast path, both for the
>> applications using them, and for generic applications (where the exotic
>> code is omitted).
>>>>
>>>> Agree. I think, keeping the best of both worlds would be
>>>>
>>>> -Enable the feature/optimization as runtime
>>>> -Have a compile-time option to disable the feature/optimization as
>> an override.
>>>
>>> It is hard to find the right balance, but in general compile
>>> time options are a nightmare for maintenance. Number of
>>> required builds will grow as an exponent.
>
> Test combinations are exponential for N features, regardless if N are runtime or compile time options.
But since I'm talking about build checks I don't care about exponential
grows in run time. Yes, testing should care, but it is a separate story.
>
>>> Of course, we can
>>> limit number of checked combinations, but it will result in
>>> flow of patches to fix build in other cases.
>>
>> The build breakage can be fixed if we use (2) vs (1)
>>
>> 1)
>> #ifdef ...
>> My feature
>> #endif
>>
>> 2)
>> static __rte_always_inline int
>> rte_has_xyz_feature(void)
>> {
>> #ifdef RTE_LIBRTE_XYZ_FEATURE
>> return RTE_LIBRTE_XYZ_FEATURE;
>> #else
>> return 0;
>> #endif
>> }
>>
>> if(rte_has_xyz_feature())) {
>> My feature code
>>
>> }
>>
Jerin, thanks, very good example.
> I'm not sure all the features can be covered by that, e.g. added fields in structures.
+1
>
> Also, I would consider such features "opt in" at compile time only. As such, they could be allowed to break the ABI/API.
>
>>
>>
>>> Also compile time options tend to make code less readable
>>> which makes all aspects of the development harder.
>>>
>>> Yes, compile time is nice for micro optimizations, but
>>> I have great concerns that it is a right way to go.
>>>
>>>>> Please note that I am only talking about the performance
>> optimizations that are limited to application specific use cases. I
>> think it makes sense to require that performance optimizing an
>> application also requires recompiling the performance critical
>> libraries used by it.
>>>>>
>>>>>
>>>>>
>>>>> Allowing compile time options for application specific performance
>> optimizations in DPDK would also open a path for other optimizations,
>> which can only be achieved at compile time, such as “no fragmented
>> packets”, “no attached mbufs” and “single mbuf pool”. And even more
>> exotic optimizations, such as the “indexed mempool cache”, which was
>> rejected due to ABI violations – they could be marked as “risky and
>> untested” or similar, but still be part of the DPDK main repository.
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> Med venlig hilsen / Kind regards,
>>>>>
>>>>> -Morten Brørup
>>>>>
>>>>>
>>>
>
^ permalink raw reply [relevance 0%]
* RE: Optimizations are not features
2022-06-04 11:10 0% ` Jerin Jacob
@ 2022-06-04 12:19 3% ` Morten Brørup
2022-06-04 12:51 0% ` Andrew Rybchenko
0 siblings, 1 reply; 200+ results
From: Morten Brørup @ 2022-06-04 12:19 UTC (permalink / raw)
To: Jerin Jacob, Andrew Rybchenko; +Cc: dpdk-dev, techboard
> From: Jerin Jacob [mailto:jerinjacobk@gmail.com]
> Sent: Saturday, 4 June 2022 13.10
>
> On Sat, Jun 4, 2022 at 3:30 PM Andrew Rybchenko
> <andrew.rybchenko@oktetlabs.ru> wrote:
> >
> > On 6/4/22 12:33, Jerin Jacob wrote:
> > > On Sat, Jun 4, 2022 at 2:39 PM Morten Brørup
> <mb@smartsharesystems.com> wrote:
> > >>
> > >> I would like the DPDK community to change its view on compile time
> options. Here is why:
> > >>
> > >>
> > >>
> > >> Application specific performance micro-optimizations like “fast
> mbuf free” and “mbuf direct re-arm” are being added to DPDK and
> presented as features.
> > >>
> > >>
> > >>
> > >> They are not features, but optimizations, and I don’t understand
> the need for them to be available at run-time!
> > >>
> > >>
> > >>
> > >> Instead of adding a bunch of exotic exceptions to the fast path of
> the PMDs, they should be compile time options. This will improve
> performance by avoiding branches in the fast path, both for the
> applications using them, and for generic applications (where the exotic
> code is omitted).
> > >
> > > Agree. I think, keeping the best of both worlds would be
> > >
> > > -Enable the feature/optimization as runtime
> > > -Have a compile-time option to disable the feature/optimization as
> an override.
> >
> > It is hard to find the right balance, but in general compile
> > time options are a nightmare for maintenance. Number of
> > required builds will grow as an exponent.
Test combinations are exponential for N features, regardless if N are runtime or compile time options.
> > Of course, we can
> > limit number of checked combinations, but it will result in
> > flow of patches to fix build in other cases.
>
> The build breakage can be fixed if we use (2) vs (1)
>
> 1)
> #ifdef ...
> My feature
> #endif
>
> 2)
> static __rte_always_inline int
> rte_has_xyz_feature(void)
> {
> #ifdef RTE_LIBRTE_XYZ_FEATURE
> return RTE_LIBRTE_XYZ_FEATURE;
> #else
> return 0;
> #endif
> }
>
> if(rte_has_xyz_feature())) {
> My feature code
>
> }
>
I'm not sure all the features can be covered by that, e.g. added fields in structures.
Also, I would consider such features "opt in" at compile time only. As such, they could be allowed to break the ABI/API.
>
>
> > Also compile time options tend to make code less readable
> > which makes all aspects of the development harder.
> >
> > Yes, compile time is nice for micro optimizations, but
> > I have great concerns that it is a right way to go.
> >
> > >> Please note that I am only talking about the performance
> optimizations that are limited to application specific use cases. I
> think it makes sense to require that performance optimizing an
> application also requires recompiling the performance critical
> libraries used by it.
> > >>
> > >>
> > >>
> > >> Allowing compile time options for application specific performance
> optimizations in DPDK would also open a path for other optimizations,
> which can only be achieved at compile time, such as “no fragmented
> packets”, “no attached mbufs” and “single mbuf pool”. And even more
> exotic optimizations, such as the “indexed mempool cache”, which was
> rejected due to ABI violations – they could be marked as “risky and
> untested” or similar, but still be part of the DPDK main repository.
> > >>
> > >>
> > >>
> > >>
> > >>
> > >> Med venlig hilsen / Kind regards,
> > >>
> > >> -Morten Brørup
> > >>
> > >>
> >
^ permalink raw reply [relevance 3%]
* Re: Optimizations are not features
2022-06-04 10:00 0% ` Andrew Rybchenko
@ 2022-06-04 11:10 0% ` Jerin Jacob
2022-06-04 12:19 3% ` Morten Brørup
0 siblings, 1 reply; 200+ results
From: Jerin Jacob @ 2022-06-04 11:10 UTC (permalink / raw)
To: Andrew Rybchenko; +Cc: Morten Brørup, dpdk-dev, techboard
On Sat, Jun 4, 2022 at 3:30 PM Andrew Rybchenko
<andrew.rybchenko@oktetlabs.ru> wrote:
>
> On 6/4/22 12:33, Jerin Jacob wrote:
> > On Sat, Jun 4, 2022 at 2:39 PM Morten Brørup <mb@smartsharesystems.com> wrote:
> >>
> >> I would like the DPDK community to change its view on compile time options. Here is why:
> >>
> >>
> >>
> >> Application specific performance micro-optimizations like “fast mbuf free” and “mbuf direct re-arm” are being added to DPDK and presented as features.
> >>
> >>
> >>
> >> They are not features, but optimizations, and I don’t understand the need for them to be available at run-time!
> >>
> >>
> >>
> >> Instead of adding a bunch of exotic exceptions to the fast path of the PMDs, they should be compile time options. This will improve performance by avoiding branches in the fast path, both for the applications using them, and for generic applications (where the exotic code is omitted).
> >
> > Agree. I think, keeping the best of both worlds would be
> >
> > -Enable the feature/optimization as runtime
> > -Have a compile-time option to disable the feature/optimization as an override.
>
> It is hard to find the right balance, but in general compile
> time options are a nightmare for maintenance. Number of
> required builds will grow as an exponent. Of course, we can
> limit number of checked combinations, but it will result in
> flow of patches to fix build in other cases.
The build breakage can be fixed if we use (2) vs (1)
1)
#ifdef ...
My feature
#endif
2)
static __rte_always_inline int
rte_has_xyz_feature(void)
{
#ifdef RTE_LIBRTE_XYZ_FEATURE
return RTE_LIBRTE_XYZ_FEATURE;
#else
return 0;
#endif
}
if(rte_has_xyz_feature())) {
My feature code
}
> Also compile time options tend to make code less readable
> which makes all aspects of the development harder.
>
> Yes, compile time is nice for micro optimizations, but
> I have great concerns that it is a right way to go.
>
> >> Please note that I am only talking about the performance optimizations that are limited to application specific use cases. I think it makes sense to require that performance optimizing an application also requires recompiling the performance critical libraries used by it.
> >>
> >>
> >>
> >> Allowing compile time options for application specific performance optimizations in DPDK would also open a path for other optimizations, which can only be achieved at compile time, such as “no fragmented packets”, “no attached mbufs” and “single mbuf pool”. And even more exotic optimizations, such as the “indexed mempool cache”, which was rejected due to ABI violations – they could be marked as “risky and untested” or similar, but still be part of the DPDK main repository.
> >>
> >>
> >>
> >>
> >>
> >> Med venlig hilsen / Kind regards,
> >>
> >> -Morten Brørup
> >>
> >>
>
^ permalink raw reply [relevance 0%]
* Re: Optimizations are not features
2022-06-04 9:33 0% ` Jerin Jacob
@ 2022-06-04 10:00 0% ` Andrew Rybchenko
2022-06-04 11:10 0% ` Jerin Jacob
0 siblings, 1 reply; 200+ results
From: Andrew Rybchenko @ 2022-06-04 10:00 UTC (permalink / raw)
To: Jerin Jacob, Morten Brørup; +Cc: dpdk-dev, techboard
On 6/4/22 12:33, Jerin Jacob wrote:
> On Sat, Jun 4, 2022 at 2:39 PM Morten Brørup <mb@smartsharesystems.com> wrote:
>>
>> I would like the DPDK community to change its view on compile time options. Here is why:
>>
>>
>>
>> Application specific performance micro-optimizations like “fast mbuf free” and “mbuf direct re-arm” are being added to DPDK and presented as features.
>>
>>
>>
>> They are not features, but optimizations, and I don’t understand the need for them to be available at run-time!
>>
>>
>>
>> Instead of adding a bunch of exotic exceptions to the fast path of the PMDs, they should be compile time options. This will improve performance by avoiding branches in the fast path, both for the applications using them, and for generic applications (where the exotic code is omitted).
>
> Agree. I think, keeping the best of both worlds would be
>
> -Enable the feature/optimization as runtime
> -Have a compile-time option to disable the feature/optimization as an override.
It is hard to find the right balance, but in general compile
time options are a nightmare for maintenance. Number of
required builds will grow as an exponent. Of course, we can
limit number of checked combinations, but it will result in
flow of patches to fix build in other cases.
Also compile time options tend to make code less readable
which makes all aspects of the development harder.
Yes, compile time is nice for micro optimizations, but
I have great concerns that it is a right way to go.
>> Please note that I am only talking about the performance optimizations that are limited to application specific use cases. I think it makes sense to require that performance optimizing an application also requires recompiling the performance critical libraries used by it.
>>
>>
>>
>> Allowing compile time options for application specific performance optimizations in DPDK would also open a path for other optimizations, which can only be achieved at compile time, such as “no fragmented packets”, “no attached mbufs” and “single mbuf pool”. And even more exotic optimizations, such as the “indexed mempool cache”, which was rejected due to ABI violations – they could be marked as “risky and untested” or similar, but still be part of the DPDK main repository.
>>
>>
>>
>>
>>
>> Med venlig hilsen / Kind regards,
>>
>> -Morten Brørup
>>
>>
^ permalink raw reply [relevance 0%]
* Re: Optimizations are not features
2022-06-04 9:09 3% Optimizations are not features Morten Brørup
@ 2022-06-04 9:33 0% ` Jerin Jacob
2022-06-04 10:00 0% ` Andrew Rybchenko
0 siblings, 1 reply; 200+ results
From: Jerin Jacob @ 2022-06-04 9:33 UTC (permalink / raw)
To: Morten Brørup; +Cc: dpdk-dev, techboard
On Sat, Jun 4, 2022 at 2:39 PM Morten Brørup <mb@smartsharesystems.com> wrote:
>
> I would like the DPDK community to change its view on compile time options. Here is why:
>
>
>
> Application specific performance micro-optimizations like “fast mbuf free” and “mbuf direct re-arm” are being added to DPDK and presented as features.
>
>
>
> They are not features, but optimizations, and I don’t understand the need for them to be available at run-time!
>
>
>
> Instead of adding a bunch of exotic exceptions to the fast path of the PMDs, they should be compile time options. This will improve performance by avoiding branches in the fast path, both for the applications using them, and for generic applications (where the exotic code is omitted).
Agree. I think, keeping the best of both worlds would be
-Enable the feature/optimization as runtime
-Have a compile-time option to disable the feature/optimization as an override.
>
>
>
> Please note that I am only talking about the performance optimizations that are limited to application specific use cases. I think it makes sense to require that performance optimizing an application also requires recompiling the performance critical libraries used by it.
>
>
>
> Allowing compile time options for application specific performance optimizations in DPDK would also open a path for other optimizations, which can only be achieved at compile time, such as “no fragmented packets”, “no attached mbufs” and “single mbuf pool”. And even more exotic optimizations, such as the “indexed mempool cache”, which was rejected due to ABI violations – they could be marked as “risky and untested” or similar, but still be part of the DPDK main repository.
>
>
>
>
>
> Med venlig hilsen / Kind regards,
>
> -Morten Brørup
>
>
^ permalink raw reply [relevance 0%]
* Optimizations are not features
@ 2022-06-04 9:09 3% Morten Brørup
2022-06-04 9:33 0% ` Jerin Jacob
0 siblings, 1 reply; 200+ results
From: Morten Brørup @ 2022-06-04 9:09 UTC (permalink / raw)
To: dev; +Cc: techboard
[-- Attachment #1: Type: text/plain, Size: 1502 bytes --]
I would like the DPDK community to change its view on compile time options. Here is why:
Application specific performance micro-optimizations like "fast mbuf free" and "mbuf direct re-arm" are being added to DPDK and presented as features.
They are not features, but optimizations, and I don't understand the need for them to be available at run-time!
Instead of adding a bunch of exotic exceptions to the fast path of the PMDs, they should be compile time options. This will improve performance by avoiding branches in the fast path, both for the applications using them, and for generic applications (where the exotic code is omitted).
Please note that I am only talking about the performance optimizations that are limited to application specific use cases. I think it makes sense to require that performance optimizing an application also requires recompiling the performance critical libraries used by it.
Allowing compile time options for application specific performance optimizations in DPDK would also open a path for other optimizations, which can only be achieved at compile time, such as "no fragmented packets", "no attached mbufs" and "single mbuf pool". And even more exotic optimizations, such as the "indexed mempool cache", which was rejected due to ABI violations - they could be marked as "risky and untested" or similar, but still be part of the DPDK main repository.
Med venlig hilsen / Kind regards,
-Morten Brørup
[-- Attachment #2: Type: text/html, Size: 3730 bytes --]
^ permalink raw reply [relevance 3%]
* Re: [EXT] [PATCH v5 06/12] cryptodev: add elliptic curve diffie hellman
2022-06-02 14:46 4% ` Kusztal, ArkadiuszX
@ 2022-06-03 13:26 4% ` Ray Kinsella
0 siblings, 0 replies; 200+ results
From: Ray Kinsella @ 2022-06-03 13:26 UTC (permalink / raw)
To: Kusztal, ArkadiuszX; +Cc: Akhil Goyal, dev, Zhang, Roy Fan
"Kusztal, ArkadiuszX" <arkadiuszx.kusztal@intel.com> writes:
>> -----Original Message-----
>> From: Akhil Goyal <gakhil@marvell.com>
>> Sent: Thursday, June 2, 2022 4:25 PM
>> To: Ray Kinsella <mdr@ashroe.eu>
>> Cc: Kusztal, ArkadiuszX <arkadiuszx.kusztal@intel.com>; dev@dpdk.org; Zhang,
>> Roy Fan <roy.fan.zhang@intel.com>
>> Subject: RE: [EXT] [PATCH v5 06/12] cryptodev: add elliptic curve diffie hellman
>>
>> >
>> > Akhil Goyal <gakhil@marvell.com> writes:
>> >
>> > >> - Added elliptic curve Diffie-Hellman parameters.
>> > >> Point multiplication allows the user to process every phase of
>> > >> ECDH, but for phase 1, user should not really care about the generator.
>> > >> The user does not even need to know what the generator looks like,
>> > >> therefore setting ec xform would make this work.
>> > >>
>> > >> Signed-off-by: Arek Kusztal <arkadiuszx.kusztal@intel.com>
>> > >> ---
>> > >> devtools/libabigail.abignore | 3 +++
>> > >> doc/guides/cryptodevs/features/default.ini | 1 +
>> > >> doc/guides/prog_guide/cryptodev_lib.rst | 7 +++---
>> > >> doc/guides/rel_notes/release_22_07.rst | 2 ++
>> > >> lib/cryptodev/rte_crypto_asym.h | 38
>> > >> ++++++++++++++++++++++++++++++
>> > >> 5 files changed, 48 insertions(+), 3 deletions(-)
>> > >>
>> > >> diff --git a/devtools/libabigail.abignore
>> > >> b/devtools/libabigail.abignore index 79ff15dc4e..6d174b291f 100644
>> > >> --- a/devtools/libabigail.abignore
>> > >> +++ b/devtools/libabigail.abignore
>> > >> @@ -27,6 +27,9 @@
>> > >> ; Ignore changes to rte_crypto_asym_op, asymmetric crypto API is
>> > >> experimental [suppress_type]
>> > >> name = rte_crypto_asym_op
>> > >> +; Ignore changes to rte_crypto_asym_xform_type, asymmetric crypto
>> > >> +API is
>> > >> experimental
>> > >> +[suppress_type]
>> > >> + name = rte_crypto_asym_xform_type
>> > >>
>> > > This exception does not seem to work.
>> > > Thomas and I are getting ABI issues even with this suppress rule.
>> > >
>> > > [C] 'function void rte_cryptodev_info_get(uint8_t,
>> > > rte_cryptodev_info*)' at
>> > rte_cryptodev.c:1582:1 has some indirect sub-type changes:
>> > > parameter 2 of type 'rte_cryptodev_info*' has sub-type changes:
>> > > in pointed to type 'struct rte_cryptodev_info' at rte_cryptodev.h:503:1:
>> > > type size hasn't changed
>> > > 1 data member change:
>> > > type of 'const rte_cryptodev_capabilities* capabilities' changed:
>> > > in pointed to type 'const rte_cryptodev_capabilities':
>> > > in unqualified underlying type 'struct
>> > > rte_cryptodev_capabilities' at
>> > rte_cryptodev.h:198:1:
>> > > type size hasn't changed
>> > > 1 data member change:
>> > > type of 'anonymous data member union
>> > {rte_cryptodev_symmetric_capability sym;
>> > rte_cryptodev_asymmetric_capability asym;}' changed:
>> > > type size hasn't changed
>> > > 1 data member change:
>> > > type of 'rte_cryptodev_asymmetric_capability asym' changed:
>> > > type size hasn't changed
>> > > 1 data member change:
>> > > type of
>> > > 'rte_cryptodev_asymmetric_xform_capability
>> > xform_capa' changed:
>> > > type size hasn't changed
>> > > 1 data member change:
>> > > type of 'rte_crypto_asym_xform_type xform_type' changed:
>> > > type size hasn't changed
>> > > 1 enumerator insertion:
>> > >
>> > 'rte_crypto_asym_xform_type::RTE_CRYPTO_ASYM_XFORM_ECDH' value '8'
>> > > 2 enumerator changes:
>> > >
>> > 'rte_crypto_asym_xform_type::RTE_CRYPTO_ASYM_XFORM_ECPM' from
>> value
>> > '8' to '9' at rte_crypto_asym.h:80:1
>> > >
>> > 'rte_crypto_asym_xform_type::RTE_CRYPTO_ASYM_XFORM_TYPE_LIST_END'
>> > from value '9' to '10' at rte_crypto_asym.h:80:1
>> >
>> > Ok - will take a look see.
>> Thomas has fixed the suppress rule while pulling on main.
>
> For some unknown reason both:
> [suppress_type]
> type_kind = enum
> changed_enumerators = RTE_CRYPTO_ASYM_XFORM_ECPM, RTE_CRYPTO_ASYM_XFORM_TYPE_LIST_END
> and
> [suppress_type]
> name = rte_crypto_asym_xform_type
>
> works fine for me with check-abi tool:
> {DPDK_NEW}/devtools/check-abi.sh ${DPDK_REF}/build/ref ${DPDK_NEW}/build/new
>
> Otherwise I get:
>
> 1 function with some indirect sub-type change:
>
> [C]'function void rte_cryptodev_info_get(uint8_t, rte_cryptodev_info*)' at rte_cryptodev.c:1582:1 has some indirect sub-type changes:
> parameter 2 of type 'rte_cryptodev_info*' has sub-type changes:
>
> abidiff: 1.2.0 version
So like you with 1.2.0 I didn't see the error, with 2.0.0 I see the
following, so I recommend that you update to 2.0.0 or later. I had
inadvertently reverted versions after a system rebuild.
ninja: Entering directory `./build-gcc-static'
ninja: no work to do.
ninja: Entering directory `./build-gcc-shared'
ninja: no work to do.
Error: ABI issue reported for 'abidiff --suppr /root/src/dpdk/devtools/../devtools/libabigail.abignore --no-added-syms --headers-dir1 /root/src/dpdk/build_ref/v21.11/build-gcc-shared/usr/local/include --headers-dir2 /root/src/dpdk/build-gcc-shared/install/usr/local/include /root/src/dpdk/build_ref/v21.11/build-gcc-shared/dump/librte_cryptodev.dump /root/src/dpdk/build-gcc-shared/install/dump/librte_cryptodev.dump'
ABIDIFF_ABI_CHANGE, this change requires a review (abidiff flagged this as a potential issue).
Error: ABI issue reported for 'abidiff --suppr /root/src/dpdk/devtools/../devtools/libabigail.abignore --no-added-syms --headers-dir1 /root/src/dpdk/build_ref/v21.11/build-gcc-shared/usr/local/include --headers-dir2 /root/src/dpdk/build-gcc-shared/install/usr/local/include /root/src/dpdk/build_ref/v21.11/build-gcc-shared/dump/librte_security.dump /root/src/dpdk/build-gcc-shared/install/dump/librte_security.dump'
ABIDIFF_ABI_CHANGE, this change requires a review (abidiff flagged this as a potential issue).
Me thinks, we need to add a check for libabigail version to the build
scripts.
That all said, Thomas's supression rule has better percision than the
original proposed.
> @Akhil - additionally RTE_CRYPTO_ASYM_XFORM_ECDH was supposed to be placed at the end of the enum. My mistake, I have placed it incorrectly.
> Would a fix that swaps these enums be accepted? This could potentially remove changed_enumerators = RTE_CRYPTO_ASYM_XFORM_ECPM.
--
Regards, Ray K
^ permalink raw reply [relevance 4%]
* Re: [PATCH v4 1/2] lpm: add const to lpm arg of rte_lpm_lookup
2022-06-03 7:29 0% ` Bruce Richardson
@ 2022-06-03 7:43 0% ` Thomas Monjalon
0 siblings, 0 replies; 200+ results
From: Thomas Monjalon @ 2022-06-03 7:43 UTC (permalink / raw)
To: Bruce Richardson
Cc: Stanislaw Kardach, Stephen Hemminger, Vladimir Medvedkin, dev,
Frank Zhao, Sam Grove, upstream
03/06/2022 09:29, Bruce Richardson:
> On Thu, Jun 02, 2022 at 10:52:25PM +0200, Thomas Monjalon wrote:
> > 01/06/2022 13:15, Stanislaw Kardach:
> > > All other rte_lpm_lookup* functions take lpm argument as a const. As the
> > > basic rte_lpm_lookup() performs the same function, it should also do
> > > that.
> > >
> > > As this function is inline, no API/ABI change happens.
> >
> > It is an API change and should be noted in the release notes.
> >
> > > static inline int
> > > -rte_lpm_lookup(struct rte_lpm *lpm, uint32_t ip, uint32_t *next_hop)
> > > +rte_lpm_lookup(const struct rte_lpm *lpm, uint32_t ip, uint32_t *next_hop)
> >
> While I've no particular objection to it appearing in the RN doc, I wonder
> whether it really counts as an API change. I can't see any practical
> difference that this change would make to the end user - no source code
> needs updating for example.
Yes you're right, we can skip the release notes here.
^ permalink raw reply [relevance 0%]
* Re: [PATCH v4 1/2] lpm: add const to lpm arg of rte_lpm_lookup
2022-06-02 20:52 0% ` Thomas Monjalon
@ 2022-06-03 7:29 0% ` Bruce Richardson
2022-06-03 7:43 0% ` Thomas Monjalon
0 siblings, 1 reply; 200+ results
From: Bruce Richardson @ 2022-06-03 7:29 UTC (permalink / raw)
To: Thomas Monjalon
Cc: Stanislaw Kardach, Stephen Hemminger, Vladimir Medvedkin, dev,
Frank Zhao, Sam Grove, upstream
On Thu, Jun 02, 2022 at 10:52:25PM +0200, Thomas Monjalon wrote:
> 01/06/2022 13:15, Stanislaw Kardach:
> > All other rte_lpm_lookup* functions take lpm argument as a const. As the
> > basic rte_lpm_lookup() performs the same function, it should also do
> > that.
> >
> > As this function is inline, no API/ABI change happens.
>
> It is an API change and should be noted in the release notes.
>
> > static inline int
> > -rte_lpm_lookup(struct rte_lpm *lpm, uint32_t ip, uint32_t *next_hop)
> > +rte_lpm_lookup(const struct rte_lpm *lpm, uint32_t ip, uint32_t *next_hop)
>
While I've no particular objection to it appearing in the RN doc, I wonder
whether it really counts as an API change. I can't see any practical
difference that this change would make to the end user - no source code
needs updating for example.
/Bruce
^ permalink raw reply [relevance 0%]
* Re: [PATCH 07/14] net/nfp: support NFDK firmware
2022-06-02 1:52 6% ` [PATCH 07/14] net/nfp: support NFDK firmware Jin Liu
@ 2022-06-02 22:53 0% ` Ferruh Yigit
0 siblings, 0 replies; 200+ results
From: Ferruh Yigit @ 2022-06-02 22:53 UTC (permalink / raw)
To: Jin Liu, dev; +Cc: niklas.soderlund, Diana Wang, Peng Zhang, Chaoyong He
On 6/2/2022 2:52 AM, Jin Liu wrote:
> Modify nfp driver logic, add firmware version (NFD3 or NFDK) judgment, will
> according to the firmware version, mount different driver functions.
>
Creating a new set of dev_ops for new FW is a way and it works, but it
looks like it creates some duplication of the code, and maintaining
multiple dev_ops can be difficult (driver already has different ones for
PF & VF).
Another option can be keeping ethdev interface same, but manage
different FWs closer to FW, where directly interacted with FW.
Like keeping dev_ops as 'nfp_net_tx_queue_release()' and managing
different FW within this function, instead of having two dev_ops,
'nfp_net_nfdk_tx_queue_release()' & 'nfp_net_nfd3_tx_queue_release()'.
If difference is small, this can be better to reduce duplication.
What is the difference between two FWs, as far as I can see Tx
descriptor is different and queue setup is affected, is it only diff?
> Signed-off-by: Jin Liu <jin.liu@corigine.com>
> Signed-off-by: Diana Wang <na.wang@corigine.com>
> Signed-off-by: Peng Zhang <peng.zhang@corigine.com>
> Signed-off-by: Chaoyong He <chaoyong.he@corigine.com>
> Signed-off-by: Niklas Söderlund <niklas.soderlund@corigine.com>
<...>
> @@ -296,6 +296,32 @@ nfp_netvf_init(struct rte_eth_dev *eth_dev)
> eth_dev->rx_pkt_burst = &nfp_net_recv_pkts;
> eth_dev->tx_pkt_burst = &nfp_net_nfd3_xmit_pkts;
>
> + hw->ctrl_bar = (uint8_t *)pci_dev->mem_resource[0].addr;
> + if (hw->ctrl_bar == NULL) {
> + PMD_DRV_LOG(ERR,
> + "hw->ctrl_bar is NULL. BAR0 not configured");
> + return -ENODEV;
> + }
> +
> + PMD_INIT_LOG(DEBUG, "ctrl bar: %p", hw->ctrl_bar);
> +
> + hw->ver = nn_cfg_readl(hw, NFP_NET_CFG_VERSION);
> +
> + switch (NFD_CFG_CLASS_VER_of(hw->ver)) {
> + case NFP_NET_CFG_VERSION_DP_NFD3:
> + break;
> + case NFP_NET_CFG_VERSION_DP_NFDK:
> + if (NFD_CFG_MAJOR_VERSION_of(hw->ver) < 5) {
> + PMD_DRV_LOG(ERR, "NFDK must use ABI 5 or newer,found: %d",
> + NFD_CFG_MAJOR_VERSION_of(hw->ver));
> + return -EINVAL;
> + }
> + break;
> + default:
> + PMD_DRV_LOG(ERR, "The version of firmware is not correct.");
> + return -EINVAL;
> + }
> +
This part seems extracted to its own function for PF
('nfp_net_ethdev_ops_mount()'), why not do the same for VF, to have same
logic between them.
^ permalink raw reply [relevance 0%]
* Re: [PATCH v4 1/2] lpm: add const to lpm arg of rte_lpm_lookup
2022-06-01 11:15 3% [PATCH v4 1/2] lpm: add const to lpm arg of rte_lpm_lookup Stanislaw Kardach
@ 2022-06-02 20:52 0% ` Thomas Monjalon
2022-06-03 7:29 0% ` Bruce Richardson
0 siblings, 1 reply; 200+ results
From: Thomas Monjalon @ 2022-06-02 20:52 UTC (permalink / raw)
To: Stanislaw Kardach, Stephen Hemminger
Cc: Vladimir Medvedkin, dev, dev, Frank Zhao, Sam Grove, upstream
01/06/2022 13:15, Stanislaw Kardach:
> All other rte_lpm_lookup* functions take lpm argument as a const. As the
> basic rte_lpm_lookup() performs the same function, it should also do
> that.
>
> As this function is inline, no API/ABI change happens.
It is an API change and should be noted in the release notes.
> static inline int
> -rte_lpm_lookup(struct rte_lpm *lpm, uint32_t ip, uint32_t *next_hop)
> +rte_lpm_lookup(const struct rte_lpm *lpm, uint32_t ip, uint32_t *next_hop)
^ permalink raw reply [relevance 0%]
* RE: [EXT] [PATCH v5 06/12] cryptodev: add elliptic curve diffie hellman
2022-06-02 14:25 0% ` Akhil Goyal
@ 2022-06-02 14:46 4% ` Kusztal, ArkadiuszX
2022-06-03 13:26 4% ` Ray Kinsella
0 siblings, 1 reply; 200+ results
From: Kusztal, ArkadiuszX @ 2022-06-02 14:46 UTC (permalink / raw)
To: Akhil Goyal, Ray Kinsella; +Cc: dev, Zhang, Roy Fan
> -----Original Message-----
> From: Akhil Goyal <gakhil@marvell.com>
> Sent: Thursday, June 2, 2022 4:25 PM
> To: Ray Kinsella <mdr@ashroe.eu>
> Cc: Kusztal, ArkadiuszX <arkadiuszx.kusztal@intel.com>; dev@dpdk.org; Zhang,
> Roy Fan <roy.fan.zhang@intel.com>
> Subject: RE: [EXT] [PATCH v5 06/12] cryptodev: add elliptic curve diffie hellman
>
> >
> > Akhil Goyal <gakhil@marvell.com> writes:
> >
> > >> - Added elliptic curve Diffie-Hellman parameters.
> > >> Point multiplication allows the user to process every phase of
> > >> ECDH, but for phase 1, user should not really care about the generator.
> > >> The user does not even need to know what the generator looks like,
> > >> therefore setting ec xform would make this work.
> > >>
> > >> Signed-off-by: Arek Kusztal <arkadiuszx.kusztal@intel.com>
> > >> ---
> > >> devtools/libabigail.abignore | 3 +++
> > >> doc/guides/cryptodevs/features/default.ini | 1 +
> > >> doc/guides/prog_guide/cryptodev_lib.rst | 7 +++---
> > >> doc/guides/rel_notes/release_22_07.rst | 2 ++
> > >> lib/cryptodev/rte_crypto_asym.h | 38
> > >> ++++++++++++++++++++++++++++++
> > >> 5 files changed, 48 insertions(+), 3 deletions(-)
> > >>
> > >> diff --git a/devtools/libabigail.abignore
> > >> b/devtools/libabigail.abignore index 79ff15dc4e..6d174b291f 100644
> > >> --- a/devtools/libabigail.abignore
> > >> +++ b/devtools/libabigail.abignore
> > >> @@ -27,6 +27,9 @@
> > >> ; Ignore changes to rte_crypto_asym_op, asymmetric crypto API is
> > >> experimental [suppress_type]
> > >> name = rte_crypto_asym_op
> > >> +; Ignore changes to rte_crypto_asym_xform_type, asymmetric crypto
> > >> +API is
> > >> experimental
> > >> +[suppress_type]
> > >> + name = rte_crypto_asym_xform_type
> > >>
> > > This exception does not seem to work.
> > > Thomas and I are getting ABI issues even with this suppress rule.
> > >
> > > [C] 'function void rte_cryptodev_info_get(uint8_t,
> > > rte_cryptodev_info*)' at
> > rte_cryptodev.c:1582:1 has some indirect sub-type changes:
> > > parameter 2 of type 'rte_cryptodev_info*' has sub-type changes:
> > > in pointed to type 'struct rte_cryptodev_info' at rte_cryptodev.h:503:1:
> > > type size hasn't changed
> > > 1 data member change:
> > > type of 'const rte_cryptodev_capabilities* capabilities' changed:
> > > in pointed to type 'const rte_cryptodev_capabilities':
> > > in unqualified underlying type 'struct
> > > rte_cryptodev_capabilities' at
> > rte_cryptodev.h:198:1:
> > > type size hasn't changed
> > > 1 data member change:
> > > type of 'anonymous data member union
> > {rte_cryptodev_symmetric_capability sym;
> > rte_cryptodev_asymmetric_capability asym;}' changed:
> > > type size hasn't changed
> > > 1 data member change:
> > > type of 'rte_cryptodev_asymmetric_capability asym' changed:
> > > type size hasn't changed
> > > 1 data member change:
> > > type of
> > > 'rte_cryptodev_asymmetric_xform_capability
> > xform_capa' changed:
> > > type size hasn't changed
> > > 1 data member change:
> > > type of 'rte_crypto_asym_xform_type xform_type' changed:
> > > type size hasn't changed
> > > 1 enumerator insertion:
> > >
> > 'rte_crypto_asym_xform_type::RTE_CRYPTO_ASYM_XFORM_ECDH' value '8'
> > > 2 enumerator changes:
> > >
> > 'rte_crypto_asym_xform_type::RTE_CRYPTO_ASYM_XFORM_ECPM' from
> value
> > '8' to '9' at rte_crypto_asym.h:80:1
> > >
> > 'rte_crypto_asym_xform_type::RTE_CRYPTO_ASYM_XFORM_TYPE_LIST_END'
> > from value '9' to '10' at rte_crypto_asym.h:80:1
> >
> > Ok - will take a look see.
> Thomas has fixed the suppress rule while pulling on main.
For some unknown reason both:
[suppress_type]
type_kind = enum
changed_enumerators = RTE_CRYPTO_ASYM_XFORM_ECPM, RTE_CRYPTO_ASYM_XFORM_TYPE_LIST_END
and
[suppress_type]
name = rte_crypto_asym_xform_type
works fine for me with check-abi tool:
{DPDK_NEW}/devtools/check-abi.sh ${DPDK_REF}/build/ref ${DPDK_NEW}/build/new
Otherwise I get:
1 function with some indirect sub-type change:
[C]'function void rte_cryptodev_info_get(uint8_t, rte_cryptodev_info*)' at rte_cryptodev.c:1582:1 has some indirect sub-type changes:
parameter 2 of type 'rte_cryptodev_info*' has sub-type changes:
abidiff: 1.2.0 version
@Akhil - additionally RTE_CRYPTO_ASYM_XFORM_ECDH was supposed to be placed at the end of the enum. My mistake, I have placed it incorrectly.
Would a fix that swaps these enums be accepted? This could potentially remove changed_enumerators = RTE_CRYPTO_ASYM_XFORM_ECPM.
^ permalink raw reply [relevance 4%]
* RE: [EXT] [PATCH v5 06/12] cryptodev: add elliptic curve diffie hellman
2022-06-02 14:21 0% ` Ray Kinsella
@ 2022-06-02 14:25 0% ` Akhil Goyal
2022-06-02 14:46 4% ` Kusztal, ArkadiuszX
0 siblings, 1 reply; 200+ results
From: Akhil Goyal @ 2022-06-02 14:25 UTC (permalink / raw)
To: Ray Kinsella; +Cc: Arek Kusztal, dev, roy.fan.zhang
>
> Akhil Goyal <gakhil@marvell.com> writes:
>
> >> - Added elliptic curve Diffie-Hellman parameters.
> >> Point multiplication allows the user to process every phase of
> >> ECDH, but for phase 1, user should not really care about the generator.
> >> The user does not even need to know what the generator looks like,
> >> therefore setting ec xform would make this work.
> >>
> >> Signed-off-by: Arek Kusztal <arkadiuszx.kusztal@intel.com>
> >> ---
> >> devtools/libabigail.abignore | 3 +++
> >> doc/guides/cryptodevs/features/default.ini | 1 +
> >> doc/guides/prog_guide/cryptodev_lib.rst | 7 +++---
> >> doc/guides/rel_notes/release_22_07.rst | 2 ++
> >> lib/cryptodev/rte_crypto_asym.h | 38
> >> ++++++++++++++++++++++++++++++
> >> 5 files changed, 48 insertions(+), 3 deletions(-)
> >>
> >> diff --git a/devtools/libabigail.abignore b/devtools/libabigail.abignore
> >> index 79ff15dc4e..6d174b291f 100644
> >> --- a/devtools/libabigail.abignore
> >> +++ b/devtools/libabigail.abignore
> >> @@ -27,6 +27,9 @@
> >> ; Ignore changes to rte_crypto_asym_op, asymmetric crypto API is
> >> experimental
> >> [suppress_type]
> >> name = rte_crypto_asym_op
> >> +; Ignore changes to rte_crypto_asym_xform_type, asymmetric crypto API is
> >> experimental
> >> +[suppress_type]
> >> + name = rte_crypto_asym_xform_type
> >>
> > This exception does not seem to work.
> > Thomas and I are getting ABI issues even with this suppress rule.
> >
> > [C] 'function void rte_cryptodev_info_get(uint8_t, rte_cryptodev_info*)' at
> rte_cryptodev.c:1582:1 has some indirect sub-type changes:
> > parameter 2 of type 'rte_cryptodev_info*' has sub-type changes:
> > in pointed to type 'struct rte_cryptodev_info' at rte_cryptodev.h:503:1:
> > type size hasn't changed
> > 1 data member change:
> > type of 'const rte_cryptodev_capabilities* capabilities' changed:
> > in pointed to type 'const rte_cryptodev_capabilities':
> > in unqualified underlying type 'struct rte_cryptodev_capabilities' at
> rte_cryptodev.h:198:1:
> > type size hasn't changed
> > 1 data member change:
> > type of 'anonymous data member union
> {rte_cryptodev_symmetric_capability sym;
> rte_cryptodev_asymmetric_capability asym;}' changed:
> > type size hasn't changed
> > 1 data member change:
> > type of 'rte_cryptodev_asymmetric_capability asym' changed:
> > type size hasn't changed
> > 1 data member change:
> > type of 'rte_cryptodev_asymmetric_xform_capability
> xform_capa' changed:
> > type size hasn't changed
> > 1 data member change:
> > type of 'rte_crypto_asym_xform_type xform_type' changed:
> > type size hasn't changed
> > 1 enumerator insertion:
> >
> 'rte_crypto_asym_xform_type::RTE_CRYPTO_ASYM_XFORM_ECDH' value '8'
> > 2 enumerator changes:
> >
> 'rte_crypto_asym_xform_type::RTE_CRYPTO_ASYM_XFORM_ECPM' from value
> '8' to '9' at rte_crypto_asym.h:80:1
> >
> 'rte_crypto_asym_xform_type::RTE_CRYPTO_ASYM_XFORM_TYPE_LIST_END'
> from value '9' to '10' at rte_crypto_asym.h:80:1
>
> Ok - will take a look see.
Thomas has fixed the suppress rule while pulling on main.
^ permalink raw reply [relevance 0%]
* Re: [EXT] [PATCH v5 06/12] cryptodev: add elliptic curve diffie hellman
2022-06-02 13:33 3% ` [EXT] " Akhil Goyal
@ 2022-06-02 14:21 0% ` Ray Kinsella
2022-06-02 14:25 0% ` Akhil Goyal
0 siblings, 1 reply; 200+ results
From: Ray Kinsella @ 2022-06-02 14:21 UTC (permalink / raw)
To: Akhil Goyal; +Cc: Arek Kusztal, dev, roy.fan.zhang
Akhil Goyal <gakhil@marvell.com> writes:
>> - Added elliptic curve Diffie-Hellman parameters.
>> Point multiplication allows the user to process every phase of
>> ECDH, but for phase 1, user should not really care about the generator.
>> The user does not even need to know what the generator looks like,
>> therefore setting ec xform would make this work.
>>
>> Signed-off-by: Arek Kusztal <arkadiuszx.kusztal@intel.com>
>> ---
>> devtools/libabigail.abignore | 3 +++
>> doc/guides/cryptodevs/features/default.ini | 1 +
>> doc/guides/prog_guide/cryptodev_lib.rst | 7 +++---
>> doc/guides/rel_notes/release_22_07.rst | 2 ++
>> lib/cryptodev/rte_crypto_asym.h | 38
>> ++++++++++++++++++++++++++++++
>> 5 files changed, 48 insertions(+), 3 deletions(-)
>>
>> diff --git a/devtools/libabigail.abignore b/devtools/libabigail.abignore
>> index 79ff15dc4e..6d174b291f 100644
>> --- a/devtools/libabigail.abignore
>> +++ b/devtools/libabigail.abignore
>> @@ -27,6 +27,9 @@
>> ; Ignore changes to rte_crypto_asym_op, asymmetric crypto API is
>> experimental
>> [suppress_type]
>> name = rte_crypto_asym_op
>> +; Ignore changes to rte_crypto_asym_xform_type, asymmetric crypto API is
>> experimental
>> +[suppress_type]
>> + name = rte_crypto_asym_xform_type
>>
> This exception does not seem to work.
> Thomas and I are getting ABI issues even with this suppress rule.
>
> [C] 'function void rte_cryptodev_info_get(uint8_t, rte_cryptodev_info*)' at rte_cryptodev.c:1582:1 has some indirect sub-type changes:
> parameter 2 of type 'rte_cryptodev_info*' has sub-type changes:
> in pointed to type 'struct rte_cryptodev_info' at rte_cryptodev.h:503:1:
> type size hasn't changed
> 1 data member change:
> type of 'const rte_cryptodev_capabilities* capabilities' changed:
> in pointed to type 'const rte_cryptodev_capabilities':
> in unqualified underlying type 'struct rte_cryptodev_capabilities' at rte_cryptodev.h:198:1:
> type size hasn't changed
> 1 data member change:
> type of 'anonymous data member union {rte_cryptodev_symmetric_capability sym; rte_cryptodev_asymmetric_capability asym;}' changed:
> type size hasn't changed
> 1 data member change:
> type of 'rte_cryptodev_asymmetric_capability asym' changed:
> type size hasn't changed
> 1 data member change:
> type of 'rte_cryptodev_asymmetric_xform_capability xform_capa' changed:
> type size hasn't changed
> 1 data member change:
> type of 'rte_crypto_asym_xform_type xform_type' changed:
> type size hasn't changed
> 1 enumerator insertion:
> 'rte_crypto_asym_xform_type::RTE_CRYPTO_ASYM_XFORM_ECDH' value '8'
> 2 enumerator changes:
> 'rte_crypto_asym_xform_type::RTE_CRYPTO_ASYM_XFORM_ECPM' from value '8' to '9' at rte_crypto_asym.h:80:1
> 'rte_crypto_asym_xform_type::RTE_CRYPTO_ASYM_XFORM_TYPE_LIST_END' from value '9' to '10' at rte_crypto_asym.h:80:1
Ok - will take a look see.
--
Regards, Ray K
^ permalink raw reply [relevance 0%]
* RE: [EXT] [PATCH v5 06/12] cryptodev: add elliptic curve diffie hellman
2022-06-01 9:02 4% ` [PATCH v5 06/12] cryptodev: add elliptic curve diffie hellman Arek Kusztal
2022-06-01 10:14 0% ` Kusztal, ArkadiuszX
@ 2022-06-02 13:33 3% ` Akhil Goyal
2022-06-02 14:21 0% ` Ray Kinsella
1 sibling, 1 reply; 200+ results
From: Akhil Goyal @ 2022-06-02 13:33 UTC (permalink / raw)
To: Arek Kusztal, dev, Ray Kinsella; +Cc: roy.fan.zhang
> - Added elliptic curve Diffie-Hellman parameters.
> Point multiplication allows the user to process every phase of
> ECDH, but for phase 1, user should not really care about the generator.
> The user does not even need to know what the generator looks like,
> therefore setting ec xform would make this work.
>
> Signed-off-by: Arek Kusztal <arkadiuszx.kusztal@intel.com>
> ---
> devtools/libabigail.abignore | 3 +++
> doc/guides/cryptodevs/features/default.ini | 1 +
> doc/guides/prog_guide/cryptodev_lib.rst | 7 +++---
> doc/guides/rel_notes/release_22_07.rst | 2 ++
> lib/cryptodev/rte_crypto_asym.h | 38
> ++++++++++++++++++++++++++++++
> 5 files changed, 48 insertions(+), 3 deletions(-)
>
> diff --git a/devtools/libabigail.abignore b/devtools/libabigail.abignore
> index 79ff15dc4e..6d174b291f 100644
> --- a/devtools/libabigail.abignore
> +++ b/devtools/libabigail.abignore
> @@ -27,6 +27,9 @@
> ; Ignore changes to rte_crypto_asym_op, asymmetric crypto API is
> experimental
> [suppress_type]
> name = rte_crypto_asym_op
> +; Ignore changes to rte_crypto_asym_xform_type, asymmetric crypto API is
> experimental
> +[suppress_type]
> + name = rte_crypto_asym_xform_type
>
This exception does not seem to work.
Thomas and I are getting ABI issues even with this suppress rule.
[C] 'function void rte_cryptodev_info_get(uint8_t, rte_cryptodev_info*)' at rte_cryptodev.c:1582:1 has some indirect sub-type changes:
parameter 2 of type 'rte_cryptodev_info*' has sub-type changes:
in pointed to type 'struct rte_cryptodev_info' at rte_cryptodev.h:503:1:
type size hasn't changed
1 data member change:
type of 'const rte_cryptodev_capabilities* capabilities' changed:
in pointed to type 'const rte_cryptodev_capabilities':
in unqualified underlying type 'struct rte_cryptodev_capabilities' at rte_cryptodev.h:198:1:
type size hasn't changed
1 data member change:
type of 'anonymous data member union {rte_cryptodev_symmetric_capability sym; rte_cryptodev_asymmetric_capability asym;}' changed:
type size hasn't changed
1 data member change:
type of 'rte_cryptodev_asymmetric_capability asym' changed:
type size hasn't changed
1 data member change:
type of 'rte_cryptodev_asymmetric_xform_capability xform_capa' changed:
type size hasn't changed
1 data member change:
type of 'rte_crypto_asym_xform_type xform_type' changed:
type size hasn't changed
1 enumerator insertion:
'rte_crypto_asym_xform_type::RTE_CRYPTO_ASYM_XFORM_ECDH' value '8'
2 enumerator changes:
'rte_crypto_asym_xform_type::RTE_CRYPTO_ASYM_XFORM_ECPM' from value '8' to '9' at rte_crypto_asym.h:80:1
'rte_crypto_asym_xform_type::RTE_CRYPTO_ASYM_XFORM_TYPE_LIST_END' from value '9' to '10' at rte_crypto_asym.h:80:1
^ permalink raw reply [relevance 3%]
* RE: [PATCH v2] sched: enable CMAN at runtime
2022-05-30 11:19 3% ` Dumitrescu, Cristian
2022-05-30 14:03 4% ` Danilewicz, MarcinX
@ 2022-06-02 9:57 3% ` Danilewicz, MarcinX
1 sibling, 0 replies; 200+ results
From: Danilewicz, MarcinX @ 2022-06-02 9:57 UTC (permalink / raw)
To: Dumitrescu, Cristian, dev, Singh, Jasvinder; +Cc: Ajmera, Megha
+this time to dpdk.org , to test removal of automatic footer
Hi Cristian,
< snip >
> > +++ b/lib/sched/rte_sched.h
> > @@ -128,6 +128,8 @@ extern "C" {
> > enum rte_sched_cman_mode {
> > RTE_SCHED_CMAN_RED, /**< Random Early Detection (RED) */
> > RTE_SCHED_CMAN_PIE, /**< Proportional Integral Controller
< snip >
> Can you please explain why you need to add the new
> RTE_SCHED_CMAN_NONE value to this enumeration and what is the ABI
> breakage that you are trying to avoid?
>
well, it was third value for cases when no RED or PIE is configured from config file
Initially I have found this error:
1 data member change:
type of 'rte_sched_cman_params* rte_sched_subport_params::cman_params' changed:
in pointed to type 'struct rte_sched_cman_params' at rte_sched.h:166:1:
type size hasn't changed
1 data member change:
type of 'rte_sched_cman_mode rte_sched_cman_params::cman_mode' changed:
type size hasn't changed
1 enumerator insertion:
'rte_sched_cman_mode::RTE_SCHED_CMAN_NONE' value '0'
2 enumerator changes:
'rte_sched_cman_mode::RTE_SCHED_CMAN_RED' from value '0' to '1' at rte_sched.h:128:1
'rte_sched_cman_mode::RTE_SCHED_CMAN_PIE' from value '1' to '2' at rte_sched.h:128:1
Error: ABI issue reported for 'abidiff --suppr devtools/libabigail.abignore --no-added-syms
--headers-dir1 reference/usr/local/include --headers-dir2 install/usr/local/include reference
/dump/librte_sched.dump install/dump/librte_sched.dump'
ABIDIFF_ABI_CHANGE, this change requires a review (abidiff flagged this as a potential issue).
Then I moved RTE_SCHED_CMAN_NONE to the end of existing enum, as advices. That removed error above.
In that moment, I needed quick fix for discussion about change for showing approach. Not final fix.
< snip >
> The library expects the struct rte_sched_subport_params:: cman_params to
> be NULL when the CMAN is disabled, why is this not enough to detect that
> CMAN is disabled? I suggest to keep the current approach.
Ok, I'll try to use NULL instead.
Kind Regards,
/Marcin
^ permalink raw reply [relevance 3%]
* [PATCH 07/14] net/nfp: support NFDK firmware
@ 2022-06-02 1:52 6% ` Jin Liu
2022-06-02 22:53 0% ` Ferruh Yigit
0 siblings, 1 reply; 200+ results
From: Jin Liu @ 2022-06-02 1:52 UTC (permalink / raw)
To: dev; +Cc: niklas.soderlund, Jin Liu, Diana Wang, Peng Zhang, Chaoyong He
Modify nfp driver logic, add firmware version (NFD3 or NFDK) judgment, will
according to the firmware version, mount different driver functions.
Signed-off-by: Jin Liu <jin.liu@corigine.com>
Signed-off-by: Diana Wang <na.wang@corigine.com>
Signed-off-by: Peng Zhang <peng.zhang@corigine.com>
Signed-off-by: Chaoyong He <chaoyong.he@corigine.com>
Signed-off-by: Niklas Söderlund <niklas.soderlund@corigine.com>
---
drivers/net/nfp/nfp_ctrl.h | 2 ++
drivers/net/nfp/nfp_ethdev.c | 51 ++++++++++++++++++++++++++-------
drivers/net/nfp/nfp_ethdev_vf.c | 37 +++++++++++++++++-------
3 files changed, 69 insertions(+), 21 deletions(-)
diff --git a/drivers/net/nfp/nfp_ctrl.h b/drivers/net/nfp/nfp_ctrl.h
index 4dd62ef194..e73715e2aa 100644
--- a/drivers/net/nfp/nfp_ctrl.h
+++ b/drivers/net/nfp/nfp_ctrl.h
@@ -135,6 +135,8 @@
* - define more STS bits
*/
#define NFP_NET_CFG_VERSION 0x0030
+#define NFP_NET_CFG_VERSION_DP_NFD3 0
+#define NFP_NET_CFG_VERSION_DP_NFDK 1
#define NFP_NET_CFG_VERSION_RESERVED_MASK (0xff << 24)
#define NFP_NET_CFG_VERSION_CLASS_MASK (0xff << 16)
#define NFP_NET_CFG_VERSION_CLASS(x) (((x) & 0xff) << 16)
diff --git a/drivers/net/nfp/nfp_ethdev.c b/drivers/net/nfp/nfp_ethdev.c
index 4d2cd9b0b3..c09a035323 100644
--- a/drivers/net/nfp/nfp_ethdev.c
+++ b/drivers/net/nfp/nfp_ethdev.c
@@ -358,6 +358,32 @@ static const struct eth_dev_ops nfp_net_nfd3_eth_dev_ops = {
.rx_queue_intr_disable = nfp_rx_queue_intr_disable,
};
+static inline int
+nfp_net_ethdev_ops_mount(struct nfp_net_hw *hw, struct rte_eth_dev *eth_dev)
+{
+ switch (NFD_CFG_CLASS_VER_of(hw->ver)) {
+ case NFP_NET_CFG_VERSION_DP_NFD3:
+ break;
+ case NFP_NET_CFG_VERSION_DP_NFDK:
+ if (NFD_CFG_MAJOR_VERSION_of(hw->ver) < 5) {
+ PMD_DRV_LOG(ERR, "NFDK must use ABI 5 or newer, found: %d",
+ NFD_CFG_MAJOR_VERSION_of(hw->ver));
+ return -EINVAL;
+ }
+ break;
+ default:
+ PMD_DRV_LOG(ERR, "The version of firmware is not correct.");
+ return -EINVAL;
+ }
+
+ eth_dev->dev_ops = &nfp_net_nfd3_eth_dev_ops;
+ eth_dev->rx_queue_count = nfp_net_rx_queue_count;
+ eth_dev->rx_pkt_burst = &nfp_net_recv_pkts;
+ eth_dev->tx_pkt_burst = &nfp_net_nfd3_xmit_pkts;
+
+ return 0;
+}
+
static int
nfp_net_init(struct rte_eth_dev *eth_dev)
{
@@ -384,7 +410,7 @@ nfp_net_init(struct rte_eth_dev *eth_dev)
RTE_LOG(ERR, PMD, "device %s can not be used: restricted dma "
"mask to 40 bits!\n", pci_dev->device.name);
return -ENODEV;
- };
+ }
port = ((struct nfp_net_hw *)eth_dev->data->dev_private)->idx;
if (port < 0 || port > 7) {
@@ -401,11 +427,6 @@ nfp_net_init(struct rte_eth_dev *eth_dev)
PMD_INIT_LOG(DEBUG, "Working with physical port number: %d, "
"NFP internal port number: %d", port, hw->nfp_idx);
- eth_dev->dev_ops = &nfp_net_nfd3_eth_dev_ops;
- eth_dev->rx_queue_count = nfp_net_rx_queue_count;
- eth_dev->rx_pkt_burst = &nfp_net_recv_pkts;
- eth_dev->tx_pkt_burst = &nfp_net_nfd3_xmit_pkts;
-
/* For secondary processes, the primary has done all the work */
if (rte_eal_process_type() != RTE_PROC_PRIMARY)
return 0;
@@ -440,6 +461,11 @@ nfp_net_init(struct rte_eth_dev *eth_dev)
PMD_INIT_LOG(DEBUG, "ctrl bar: %p", hw->ctrl_bar);
+ hw->ver = nn_cfg_readl(hw, NFP_NET_CFG_VERSION);
+
+ if (nfp_net_ethdev_ops_mount(hw, eth_dev))
+ return -EINVAL;
+
hw->max_rx_queues = nn_cfg_readl(hw, NFP_NET_CFG_MAX_RXRINGS);
hw->max_tx_queues = nn_cfg_readl(hw, NFP_NET_CFG_MAX_TXRINGS);
@@ -472,7 +498,6 @@ nfp_net_init(struct rte_eth_dev *eth_dev)
nfp_net_cfg_queue_setup(hw);
/* Get some of the read-only fields from the config BAR */
- hw->ver = nn_cfg_readl(hw, NFP_NET_CFG_VERSION);
hw->cap = nn_cfg_readl(hw, NFP_NET_CFG_CAP);
hw->max_mtu = nn_cfg_readl(hw, NFP_NET_CFG_MAX_MTU);
hw->mtu = RTE_ETHER_MTU;
@@ -938,6 +963,7 @@ nfp_pf_secondary_init(struct rte_pci_device *pci_dev)
int err;
int total_ports;
struct nfp_cpp *cpp;
+ struct nfp_net_hw *hw;
struct nfp_rtsym_table *sym_tbl;
if (pci_dev == NULL)
@@ -987,11 +1013,14 @@ nfp_pf_secondary_init(struct rte_pci_device *pci_dev)
"ethdev doesn't exist");
return -ENODEV;
}
+
+ hw = NFP_NET_DEV_PRIVATE_TO_HW(eth_dev->data->dev_private);
+
+ if (nfp_net_ethdev_ops_mount(hw, eth_dev))
+ return -EINVAL;
+
eth_dev->process_private = cpp;
- eth_dev->dev_ops = &nfp_net_nfd3_eth_dev_ops;
- eth_dev->rx_queue_count = nfp_net_rx_queue_count;
- eth_dev->rx_pkt_burst = &nfp_net_recv_pkts;
- eth_dev->tx_pkt_burst = &nfp_net_nfd3_xmit_pkts;
+
rte_eth_dev_probing_finish(eth_dev);
}
diff --git a/drivers/net/nfp/nfp_ethdev_vf.c b/drivers/net/nfp/nfp_ethdev_vf.c
index f5a0406e7d..e83c9dbcaf 100644
--- a/drivers/net/nfp/nfp_ethdev_vf.c
+++ b/drivers/net/nfp/nfp_ethdev_vf.c
@@ -287,7 +287,7 @@ nfp_netvf_init(struct rte_eth_dev *eth_dev)
RTE_LOG(ERR, PMD, "device %s can not be used: restricted dma "
"mask to 40 bits!\n", pci_dev->device.name);
return -ENODEV;
- };
+ }
hw = NFP_NET_DEV_PRIVATE_TO_HW(eth_dev->data->dev_private);
@@ -296,6 +296,32 @@ nfp_netvf_init(struct rte_eth_dev *eth_dev)
eth_dev->rx_pkt_burst = &nfp_net_recv_pkts;
eth_dev->tx_pkt_burst = &nfp_net_nfd3_xmit_pkts;
+ hw->ctrl_bar = (uint8_t *)pci_dev->mem_resource[0].addr;
+ if (hw->ctrl_bar == NULL) {
+ PMD_DRV_LOG(ERR,
+ "hw->ctrl_bar is NULL. BAR0 not configured");
+ return -ENODEV;
+ }
+
+ PMD_INIT_LOG(DEBUG, "ctrl bar: %p", hw->ctrl_bar);
+
+ hw->ver = nn_cfg_readl(hw, NFP_NET_CFG_VERSION);
+
+ switch (NFD_CFG_CLASS_VER_of(hw->ver)) {
+ case NFP_NET_CFG_VERSION_DP_NFD3:
+ break;
+ case NFP_NET_CFG_VERSION_DP_NFDK:
+ if (NFD_CFG_MAJOR_VERSION_of(hw->ver) < 5) {
+ PMD_DRV_LOG(ERR, "NFDK must use ABI 5 or newer,found: %d",
+ NFD_CFG_MAJOR_VERSION_of(hw->ver));
+ return -EINVAL;
+ }
+ break;
+ default:
+ PMD_DRV_LOG(ERR, "The version of firmware is not correct.");
+ return -EINVAL;
+ }
+
/* For secondary processes, the primary has done all the work */
if (rte_eal_process_type() != RTE_PROC_PRIMARY)
return 0;
@@ -312,15 +338,6 @@ nfp_netvf_init(struct rte_eth_dev *eth_dev)
pci_dev->addr.domain, pci_dev->addr.bus,
pci_dev->addr.devid, pci_dev->addr.function);
- hw->ctrl_bar = (uint8_t *)pci_dev->mem_resource[0].addr;
- if (hw->ctrl_bar == NULL) {
- PMD_DRV_LOG(ERR,
- "hw->ctrl_bar is NULL. BAR0 not configured");
- return -ENODEV;
- }
-
- PMD_INIT_LOG(DEBUG, "ctrl bar: %p", hw->ctrl_bar);
-
hw->max_rx_queues = nn_cfg_readl(hw, NFP_NET_CFG_MAX_RXRINGS);
hw->max_tx_queues = nn_cfg_readl(hw, NFP_NET_CFG_MAX_TXRINGS);
--
2.27.0
^ permalink raw reply [relevance 6%]
* Re: [PATCH] eal/ppc: undefine AltiVec keyword vector
2022-05-26 11:02 0% ` Ray Kinsella
@ 2022-06-01 15:04 0% ` Thomas Monjalon
0 siblings, 0 replies; 200+ results
From: Thomas Monjalon @ 2022-06-01 15:04 UTC (permalink / raw)
To: dev
Cc: Tyler Retzlaff, david.marchand, techboard, David Christensen,
Ray Kinsella
26/05/2022 13:02, Ray Kinsella:
> Thomas Monjalon <thomas@monjalon.net> writes:
> > 25/05/2022 20:34, Tyler Retzlaff:
> >> On Wed, May 25, 2022 at 07:02:52PM +0100, Ray Kinsella wrote:
> >> > Thomas Monjalon <thomas@monjalon.net> writes:
> >> > > 25/05/2022 13:48, Ray Kinsella:
> >> > >> Thomas Monjalon <thomas@monjalon.net> writes:
> >> > >>
> >> > >> > The AltiVec header file is defining "vector", except in C++ build.
> >> > >> > The keyword "vector" may conflict easily.
> >> > >> > As a rule, it is better to use the alternative keyword "__vector".
> >> > >> >
> >> > >> > The DPDK header file rte_altivec.h takes care of undefining "vector",
> >> > >> > so the applications and dependencies are free to define the name "vector".
> >> > >> >
> >> > >> > This is a compatibility breakage for applications which were using
> >> > >> > the keyword "vector" for its AltiVec meaning.
> >> > >> >
> >> > >> > Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
> >> > >> > ---
> >> > >> > doc/guides/rel_notes/release_22_07.rst | 5 +++++
> >> > >> > lib/eal/ppc/include/rte_altivec.h | 7 +++++++
> >> > >> > 2 files changed, 12 insertions(+)
> >> > >> >
> >> > >>
> >> > >> Acked-by: Ray Kinsella <mdr@ashroe.eu>
> >> > >
> >> > > Just to make sure, we are all OK to break compatibility of rte_altivec.h?
> >> > > It means the keyword vector is not available anymore with this #include.
> >> > > Please confirm it is OK to merge in DPDK 22.07.
> >> >
> >> > I did think about it yes ;-).
> >> > I can't see how it would break the ABI in the short term.
> >> > And it makes sense to preclude this keyword in the long term.
> >> >
> >> > So I ack'ed - did I miss something?
> >>
> >> Acked-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
> >>
> >> double ack, impact of break is understood as follows.
> >>
> >> * this is not an issue with abi it is an issue with api.
> >> * the break will cause a compile failure, the action to resolve is to
> >> replace vector with __vector.
> >
> > Exactly
> >
> > I'll wait few days or acks from the techboard, and will apply.
>
> +1
Applied
^ permalink raw reply [relevance 0%]
* [PATCH v4 1/2] lpm: add const to lpm arg of rte_lpm_lookup
@ 2022-06-01 11:15 3% Stanislaw Kardach
2022-06-02 20:52 0% ` Thomas Monjalon
0 siblings, 1 reply; 200+ results
From: Stanislaw Kardach @ 2022-06-01 11:15 UTC (permalink / raw)
To: Vladimir Medvedkin
Cc: Stanislaw Kardach, dev, Frank Zhao, Sam Grove, upstream,
Stephen Hemminger
All other rte_lpm_lookup* functions take lpm argument as a const. As the
basic rte_lpm_lookup() performs the same function, it should also do
that.
As this function is inline, no API/ABI change happens.
Signed-off-by: Stanislaw Kardach <kda@semihalf.com>
Acked-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
---
lib/lpm/rte_lpm.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/lpm/rte_lpm.h b/lib/lpm/rte_lpm.h
index eb91960e81..1cf863a146 100644
--- a/lib/lpm/rte_lpm.h
+++ b/lib/lpm/rte_lpm.h
@@ -279,7 +279,7 @@ rte_lpm_delete_all(struct rte_lpm *lpm);
* -EINVAL for incorrect arguments, -ENOENT on lookup miss, 0 on lookup hit
*/
static inline int
-rte_lpm_lookup(struct rte_lpm *lpm, uint32_t ip, uint32_t *next_hop)
+rte_lpm_lookup(const struct rte_lpm *lpm, uint32_t ip, uint32_t *next_hop)
{
unsigned tbl24_index = (ip >> 8);
uint32_t tbl_entry;
--
2.30.2
^ permalink raw reply [relevance 3%]
* RE: [PATCH v5 06/12] cryptodev: add elliptic curve diffie hellman
2022-06-01 9:02 4% ` [PATCH v5 06/12] cryptodev: add elliptic curve diffie hellman Arek Kusztal
@ 2022-06-01 10:14 0% ` Kusztal, ArkadiuszX
2022-06-02 13:33 3% ` [EXT] " Akhil Goyal
1 sibling, 0 replies; 200+ results
From: Kusztal, ArkadiuszX @ 2022-06-01 10:14 UTC (permalink / raw)
To: dev; +Cc: gakhil, Zhang, Roy Fan
Hi Akhil,
I did not put much effort into documentation part. I believe it needs bit more attention in asym area (one bigger patch) + backported fixes about ECDSA and ECPM.
> -----Original Message-----
> From: Kusztal, ArkadiuszX <arkadiuszx.kusztal@intel.com>
> Sent: Wednesday, June 1, 2022 11:03 AM
> To: dev@dpdk.org
> Cc: gakhil@marvell.com; Zhang, Roy Fan <roy.fan.zhang@intel.com>; Kusztal,
> ArkadiuszX <arkadiuszx.kusztal@intel.com>
> Subject: [PATCH v5 06/12] cryptodev: add elliptic curve diffie hellman
>
> - Added elliptic curve Diffie-Hellman parameters.
> Point multiplication allows the user to process every phase of ECDH, but for
> phase 1, user should not really care about the generator.
> The user does not even need to know what the generator looks like, therefore
> setting ec xform would make this work.
>
> Signed-off-by: Arek Kusztal <arkadiuszx.kusztal@intel.com>
> ---
> devtools/libabigail.abignore | 3 +++
> doc/guides/cryptodevs/features/default.ini | 1 +
> doc/guides/prog_guide/cryptodev_lib.rst | 7 +++---
> doc/guides/rel_notes/release_22_07.rst | 2 ++
> lib/cryptodev/rte_crypto_asym.h | 38
> ++++++++++++++++++++++++++++++
> 5 files changed, 48 insertions(+), 3 deletions(-)
>
> diff --git a/devtools/libabigail.abignore b/devtools/libabigail.abignore index
> 79ff15dc4e..6d174b291f 100644
> --- a/devtools/libabigail.abignore
> +++ b/devtools/libabigail.abignore
> @@ -27,6 +27,9 @@
> ; Ignore changes to rte_crypto_asym_op, asymmetric crypto API is
> experimental [suppress_type]
> name = rte_crypto_asym_op
> +; Ignore changes to rte_crypto_asym_xform_type, asymmetric crypto API
> +is experimental [suppress_type]
> + name = rte_crypto_asym_xform_type
>
> ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
> ; Temporary exceptions till next major ABI version ; diff --git
> a/doc/guides/cryptodevs/features/default.ini
> b/doc/guides/cryptodevs/features/default.ini
> index 018fe0221e..7371ca6644 100644
> --- a/doc/guides/cryptodevs/features/default.ini
> +++ b/doc/guides/cryptodevs/features/default.ini
> @@ -118,6 +118,7 @@ Modular Inversion =
> Diffie-hellman =
> ECDSA =
> ECPM =
> +ECDH =
>
> ;
> ; Supported Operating systems of a default crypto driver.
> diff --git a/doc/guides/prog_guide/cryptodev_lib.rst
> b/doc/guides/prog_guide/cryptodev_lib.rst
> index edd11059bc..9e54683aa1 100644
> --- a/doc/guides/prog_guide/cryptodev_lib.rst
> +++ b/doc/guides/prog_guide/cryptodev_lib.rst
> @@ -1018,9 +1018,9 @@ Asymmetric Cryptography
> -----------------------
>
> The cryptodev library currently provides support for the following asymmetric -
> Crypto operations; RSA, Modular exponentiation and inversion, Diffie-Hellman -
> public and/or private key generation and shared secret compute, DSA Signature -
> generation and verification.
> +Crypto operations; RSA, Modular exponentiation and inversion,
> +Diffie-Hellman and Elliptic Curve Diffie-Hellman public and/or private
> +key generation and shared secret compute, DSA Signature generation and
> verification.
>
> Session and Session Management
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> @@ -1088,6 +1088,7 @@ Each xform defines specific asymmetric crypto algo.
> Currently supported are:
> * Modular operations (Exponentiation and Inverse)
> * Diffie-Hellman
> * DSA
> +* Elliptic Curve Diffie-Hellman
> * None - special case where PMD may support a passthrough mode. More for
> diagnostic purpose
>
> See *DPDK API Reference* for details on each rte_crypto_xxx_xform struct diff
> --git a/doc/guides/rel_notes/release_22_07.rst
> b/doc/guides/rel_notes/release_22_07.rst
> index 73a2434f86..ef6eaf0ad2 100644
> --- a/doc/guides/rel_notes/release_22_07.rst
> +++ b/doc/guides/rel_notes/release_22_07.rst
> @@ -130,6 +130,8 @@ Removed Items
> API Changes
> -----------
>
> +* cryptodev: Added Elliptic Curve Diffie-Hellman (ECDH) algorithm.
> +
> .. This section should contain API changes. Sample format:
>
> * sample: Add a short 1-2 sentence description of the API change diff --git
> a/lib/cryptodev/rte_crypto_asym.h b/lib/cryptodev/rte_crypto_asym.h index
> 88bc34dc8c..f61a2ddce8 100644
> --- a/lib/cryptodev/rte_crypto_asym.h
> +++ b/lib/cryptodev/rte_crypto_asym.h
> @@ -99,6 +99,8 @@ enum rte_crypto_asym_xform_type {
> /**< Elliptic Curve Digital Signature Algorithm
> * Perform Signature Generation and Verification.
> */
> + RTE_CRYPTO_ASYM_XFORM_ECDH,
> + /**< Elliptic Curve Diffie Hellman */
> RTE_CRYPTO_ASYM_XFORM_ECPM,
> /**< Elliptic Curve Point Multiplication */
> RTE_CRYPTO_ASYM_XFORM_TYPE_LIST_END
> @@ -429,6 +431,41 @@ struct rte_crypto_dh_op_param { };
>
> /**
> + * Elliptic Curve Diffie-Hellman Operations params.
> + */
> +struct rte_crypto_ecdh_op_param {
> + enum rte_crypto_asym_ke_type ke_type;
> + /**< Key exchange operation type */
> + rte_crypto_uint priv_key;
> + /**<
> + * Output - generated private key when ke_type is
> + * RTE_CRYPTO_ASYM_KE_PRIVATE_KEY_GENERATE.
> + *
> + * Input - private key when ke_type is one of:
> + * RTE_CRYPTO_ASYM_KE_PUBLIC_KEY_GENERATE,
> + * RTE_CRYPTO_ASYM_KE_SHARED_SECRET_COMPUTE.
> + *
> + * In case priv_key.length is 0 and ke_type is set with
> + * RTE_CRYPTO_ASYM_KE_PUBLIC_KEY_GENERATE, CSRNG capable
> + * device will generate private key and use it for public
> + * key generation.
> + */
> + struct rte_crypto_ec_point pub_key;
> + /**<
> + * Output - generated public key when ke_type is
> + * RTE_CRYPTO_ASYM_KE_PUBLIC_KEY_GENERATE.
> + *
> + * Input - peer's public key when ke_type is
> + * RTE_CRYPTO_ASYM_KE_SHARED_SECRET_COMPUTE.
> + */
> + struct rte_crypto_ec_point shared_secret;
> + /**<
> + * Output - calculated shared secret when ke_type is
> + * RTE_CRYPTO_ASYM_KE_SHARED_SECRET_COMPUTE.
> + */
> +};
> +
> +/**
> * DSA Operations params
> *
> */
> @@ -566,6 +603,7 @@ struct rte_crypto_asym_op {
> struct rte_crypto_mod_op_param modex;
> struct rte_crypto_mod_op_param modinv;
> struct rte_crypto_dh_op_param dh;
> + struct rte_crypto_ecdh_op_param ecdh;
> struct rte_crypto_dsa_op_param dsa;
> struct rte_crypto_ecdsa_op_param ecdsa;
> struct rte_crypto_ecpm_op_param ecpm;
> --
> 2.13.6
^ permalink raw reply [relevance 0%]
* [PATCH v5 06/12] cryptodev: add elliptic curve diffie hellman
@ 2022-06-01 9:02 4% ` Arek Kusztal
2022-06-01 10:14 0% ` Kusztal, ArkadiuszX
2022-06-02 13:33 3% ` [EXT] " Akhil Goyal
0 siblings, 2 replies; 200+ results
From: Arek Kusztal @ 2022-06-01 9:02 UTC (permalink / raw)
To: dev; +Cc: gakhil, roy.fan.zhang, Arek Kusztal
- Added elliptic curve Diffie-Hellman parameters.
Point multiplication allows the user to process every phase of
ECDH, but for phase 1, user should not really care about the generator.
The user does not even need to know what the generator looks like,
therefore setting ec xform would make this work.
Signed-off-by: Arek Kusztal <arkadiuszx.kusztal@intel.com>
---
devtools/libabigail.abignore | 3 +++
doc/guides/cryptodevs/features/default.ini | 1 +
doc/guides/prog_guide/cryptodev_lib.rst | 7 +++---
doc/guides/rel_notes/release_22_07.rst | 2 ++
lib/cryptodev/rte_crypto_asym.h | 38 ++++++++++++++++++++++++++++++
5 files changed, 48 insertions(+), 3 deletions(-)
diff --git a/devtools/libabigail.abignore b/devtools/libabigail.abignore
index 79ff15dc4e..6d174b291f 100644
--- a/devtools/libabigail.abignore
+++ b/devtools/libabigail.abignore
@@ -27,6 +27,9 @@
; Ignore changes to rte_crypto_asym_op, asymmetric crypto API is experimental
[suppress_type]
name = rte_crypto_asym_op
+; Ignore changes to rte_crypto_asym_xform_type, asymmetric crypto API is experimental
+[suppress_type]
+ name = rte_crypto_asym_xform_type
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Temporary exceptions till next major ABI version ;
diff --git a/doc/guides/cryptodevs/features/default.ini b/doc/guides/cryptodevs/features/default.ini
index 018fe0221e..7371ca6644 100644
--- a/doc/guides/cryptodevs/features/default.ini
+++ b/doc/guides/cryptodevs/features/default.ini
@@ -118,6 +118,7 @@ Modular Inversion =
Diffie-hellman =
ECDSA =
ECPM =
+ECDH =
;
; Supported Operating systems of a default crypto driver.
diff --git a/doc/guides/prog_guide/cryptodev_lib.rst b/doc/guides/prog_guide/cryptodev_lib.rst
index edd11059bc..9e54683aa1 100644
--- a/doc/guides/prog_guide/cryptodev_lib.rst
+++ b/doc/guides/prog_guide/cryptodev_lib.rst
@@ -1018,9 +1018,9 @@ Asymmetric Cryptography
-----------------------
The cryptodev library currently provides support for the following asymmetric
-Crypto operations; RSA, Modular exponentiation and inversion, Diffie-Hellman
-public and/or private key generation and shared secret compute, DSA Signature
-generation and verification.
+Crypto operations; RSA, Modular exponentiation and inversion, Diffie-Hellman and
+Elliptic Curve Diffie-Hellman public and/or private key generation and shared
+secret compute, DSA Signature generation and verification.
Session and Session Management
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -1088,6 +1088,7 @@ Each xform defines specific asymmetric crypto algo. Currently supported are:
* Modular operations (Exponentiation and Inverse)
* Diffie-Hellman
* DSA
+* Elliptic Curve Diffie-Hellman
* None - special case where PMD may support a passthrough mode. More for diagnostic purpose
See *DPDK API Reference* for details on each rte_crypto_xxx_xform struct
diff --git a/doc/guides/rel_notes/release_22_07.rst b/doc/guides/rel_notes/release_22_07.rst
index 73a2434f86..ef6eaf0ad2 100644
--- a/doc/guides/rel_notes/release_22_07.rst
+++ b/doc/guides/rel_notes/release_22_07.rst
@@ -130,6 +130,8 @@ Removed Items
API Changes
-----------
+* cryptodev: Added Elliptic Curve Diffie-Hellman (ECDH) algorithm.
+
.. This section should contain API changes. Sample format:
* sample: Add a short 1-2 sentence description of the API change
diff --git a/lib/cryptodev/rte_crypto_asym.h b/lib/cryptodev/rte_crypto_asym.h
index 88bc34dc8c..f61a2ddce8 100644
--- a/lib/cryptodev/rte_crypto_asym.h
+++ b/lib/cryptodev/rte_crypto_asym.h
@@ -99,6 +99,8 @@ enum rte_crypto_asym_xform_type {
/**< Elliptic Curve Digital Signature Algorithm
* Perform Signature Generation and Verification.
*/
+ RTE_CRYPTO_ASYM_XFORM_ECDH,
+ /**< Elliptic Curve Diffie Hellman */
RTE_CRYPTO_ASYM_XFORM_ECPM,
/**< Elliptic Curve Point Multiplication */
RTE_CRYPTO_ASYM_XFORM_TYPE_LIST_END
@@ -429,6 +431,41 @@ struct rte_crypto_dh_op_param {
};
/**
+ * Elliptic Curve Diffie-Hellman Operations params.
+ */
+struct rte_crypto_ecdh_op_param {
+ enum rte_crypto_asym_ke_type ke_type;
+ /**< Key exchange operation type */
+ rte_crypto_uint priv_key;
+ /**<
+ * Output - generated private key when ke_type is
+ * RTE_CRYPTO_ASYM_KE_PRIVATE_KEY_GENERATE.
+ *
+ * Input - private key when ke_type is one of:
+ * RTE_CRYPTO_ASYM_KE_PUBLIC_KEY_GENERATE,
+ * RTE_CRYPTO_ASYM_KE_SHARED_SECRET_COMPUTE.
+ *
+ * In case priv_key.length is 0 and ke_type is set with
+ * RTE_CRYPTO_ASYM_KE_PUBLIC_KEY_GENERATE, CSRNG capable
+ * device will generate private key and use it for public
+ * key generation.
+ */
+ struct rte_crypto_ec_point pub_key;
+ /**<
+ * Output - generated public key when ke_type is
+ * RTE_CRYPTO_ASYM_KE_PUBLIC_KEY_GENERATE.
+ *
+ * Input - peer's public key when ke_type is
+ * RTE_CRYPTO_ASYM_KE_SHARED_SECRET_COMPUTE.
+ */
+ struct rte_crypto_ec_point shared_secret;
+ /**<
+ * Output - calculated shared secret when ke_type is
+ * RTE_CRYPTO_ASYM_KE_SHARED_SECRET_COMPUTE.
+ */
+};
+
+/**
* DSA Operations params
*
*/
@@ -566,6 +603,7 @@ struct rte_crypto_asym_op {
struct rte_crypto_mod_op_param modex;
struct rte_crypto_mod_op_param modinv;
struct rte_crypto_dh_op_param dh;
+ struct rte_crypto_ecdh_op_param ecdh;
struct rte_crypto_dsa_op_param dsa;
struct rte_crypto_ecdsa_op_param ecdsa;
struct rte_crypto_ecpm_op_param ecpm;
--
2.13.6
^ permalink raw reply [relevance 4%]
* Re: [PATCH v3 1/2] lpm: add const to lpm arg of rte_lpm_lookup
2022-05-30 18:24 3% ` [PATCH v3 " Stanislaw Kardach
2022-05-30 20:38 0% ` Stephen Hemminger
@ 2022-06-01 9:35 0% ` Medvedkin, Vladimir
1 sibling, 0 replies; 200+ results
From: Medvedkin, Vladimir @ 2022-06-01 9:35 UTC (permalink / raw)
To: Stanislaw Kardach; +Cc: dev, Frank Zhao, Sam Grove, mw, upstream
On 30/05/2022 19:24, Stanislaw Kardach wrote:
> All other rte_lpm_lookup* functions take lpm argument as a const. As the
> basic rte_lpm_lookup() performs the same function, it should also do
> that.
>
> As this function is inline, no API/ABI change happens.
>
> Signed-off-by: Stanislaw Kardach <kda@semihalf.com>
> ---
> lib/lpm/rte_lpm.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/lib/lpm/rte_lpm.h b/lib/lpm/rte_lpm.h
> index eb91960e81..1cf863a146 100644
> --- a/lib/lpm/rte_lpm.h
> +++ b/lib/lpm/rte_lpm.h
> @@ -279,7 +279,7 @@ rte_lpm_delete_all(struct rte_lpm *lpm);
> * -EINVAL for incorrect arguments, -ENOENT on lookup miss, 0 on lookup hit
> */
> static inline int
> -rte_lpm_lookup(struct rte_lpm *lpm, uint32_t ip, uint32_t *next_hop)
> +rte_lpm_lookup(const struct rte_lpm *lpm, uint32_t ip, uint32_t *next_hop)
> {
> unsigned tbl24_index = (ip >> 8);
> uint32_t tbl_entry;
Acked-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
--
Regards,
Vladimir
^ permalink raw reply [relevance 0%]
* Re: [dpdk-dev] [RFC PATCH] ethdev: support congestion management
2022-05-30 13:15 2% [dpdk-dev] [RFC PATCH] ethdev: support congestion management jerinj
2022-05-30 19:43 0% ` Ajit Khaparde
2022-05-31 1:09 0% ` Min Hu (Connor)
@ 2022-05-31 16:09 0% ` Stephen Hemminger
2 siblings, 0 replies; 200+ results
From: Stephen Hemminger @ 2022-05-31 16:09 UTC (permalink / raw)
To: jerinj
Cc: dev, Ferruh Yigit, Thomas Monjalon, Andrew Rybchenko,
ajit.khaparde, aboyer, beilei.xing, bruce.richardson, chas3,
chenbo.xia, ciara.loftus, dsinghrawat, ed.czeck, evgenys, grive,
g.singh, zhouguoyang, haiyue.wang, hkalra, heinrich.kuhn,
hemant.agrawal, hyonkim, igorch, irusskikh, jgrajcia,
jasvinder.singh, jianwang, jiawenwu, jingjing.wu, johndale,
john.miller, linville, keith.wiles, kirankumark, oulijun, lironh,
longli, mw, spinler, matan, matt.peters, maxime.coquelin, mk,
humin29, pnalla, ndabilpuram, qiming.yang, qi.z.zhang, radhac,
rahul.lakkireddy, rmody, rosen.xu, sachin.saxena, skoteshwar,
shshaikh, shaibran, shepard.siegel, asomalap, somnath.kotur,
sthemmin, steven.webster, skori, mtetsuyah, vburru, viacheslavo,
xiao.w.wang, cloud.wangxiaoyun, yisen.zhuang, yongwang,
xuanziyang2, cristian.dumitrescu
On Mon, 30 May 2022 18:45:26 +0530
<jerinj@marvell.com> wrote:
> From: Jerin Jacob <jerinj@marvell.com>
>
> NIC HW controllers often come with congestion management support on
> various HW objects such as Rx queue depth or mempool queue depth.
>
> Also, it can support various modes of operation such as RED
> (Random early discard), WRED etc on those HW objects.
>
> This patch adds a framework to express such modes(enum rte_cman_mode)
> and introduce (enum rte_eth_cman_obj) to enumerate the different
> objects where the modes can operate on.
>
> This patch adds RTE_CMAN_RED mode of operation and
> RTE_ETH_CMAN_OBJ_RX_QUEUE, RTE_ETH_CMAN_OBJ_RX_QUEUE_MEMPOOL object.
>
> Introduced reserved fields in configuration structure
> backed by rte_eth_cman_config_init() to add new configuration
> parameters without ABI breakage.
>
> Added rte_eth_cman_info_get() API to get the information such as
> supported modes and objects.
>
> Added rte_eth_cman_config_init(), rte_eth_cman_config_set() APIs
> to configure congestion management on those object with associated mode.
>
> Finally, Added rte_eth_cman_config_get() API to retrieve the
> applied configuration.
>
> Signed-off-by: Jerin Jacob <jerinj@marvell.com>
The concept of supporting hardware queue management is good, but would like
to make some suggestions:
The hardware support of QOS should ideally be part of the existing DPDK
traffic management. For example, in Linux there are devices that can offload
traffic control (TC) to hardware and this is done via flags to existing
software infrastructure.
Your implementation makes HW and SW QoS diverge. This will require each application
to get even more dependent on a particular hardware device.
Which brings up the bigger picture problem. Don't want to repeat the problems
with rte_flow here. Any hardware support needs to have a matching set of software
implementation, and test cases. The problem with rte_flow is the semantics are
poorly defined and each vendor does it differently; and the SW flow classifier
is incomplete and does not match what the HW does.
In an ideal world, there would be:
- an abstract API for defining ingress and egress queue management
- a software implementation of that API
- multiple hardware implementations
- ability to transparently use both SW and HW queue management from application
- complete test suite for that API.
Yes, that is asking a lot. But as trailblazer in this area, you have to do the
hard work.
^ permalink raw reply [relevance 0%]
* Re: [PATCH v3 0/6] move DPAA2 QDMA driver freom raw to dma
@ 2022-05-31 15:29 3% ` Thomas Monjalon
0 siblings, 0 replies; 200+ results
From: Thomas Monjalon @ 2022-05-31 15:29 UTC (permalink / raw)
To: nipun.gupta, hemant.agrawal; +Cc: dev, G.Singh, gakhil
26/05/2022 08:00, Hemant Agrawal:
> Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
>
> On 5/5/2022 2:35 PM, nipun.gupta@nxp.com wrote:
> > From: Nipun Gupta <nipun.gupta@nxp.com>
> >
> > This change removes the DPAA2 QDMA raw driver and adds the
> > QDMA driver in dma set of drivers. The underlying I/O
> > framework remains intact, whereas the configuration part
> > is done as per the DMA API support.
> >
> > Changes in v2:
> > - Fix checkpath errors
> > - Fix documentation compilation
> >
> > Changes in v3:
> > - Add the missing doc/dmadevs/dpaa2.rst file
> >
> > Nipun Gupta (6):
> > raw/dpaa2_qdma: remove dpaa2 QDMA driver from raw
> > dma/dpaa2: introduce DPAA2 DMA driver skeleton
> > dma/dpaa2: support basic operations
> > dma/dpaa2: add PMD apis for additional configuration
> > dma/dpaa2: support DMA operations
> > dma/dpaa2: support statistics
Fixed some mistakes in the file MAINTAINERS,
and added an exception in devtools/check-abi.sh to skip old driver.
Applied, thanks.
^ permalink raw reply [relevance 3%]
* [PATCH v4 7/8] devtools: add RISC-V to test-meson-builds.sh
@ 2022-05-31 14:13 9% ` Stanislaw Kardach
0 siblings, 0 replies; 200+ results
From: Stanislaw Kardach @ 2022-05-31 14:13 UTC (permalink / raw)
To: Bruce Richardson
Cc: Stanislaw Kardach, dev, Frank Zhao, Sam Grove, mw, upstream
Validate RISC-V compilation when test-meson-builds.sh is called. The
check will be only performed if appropriate toolchain is present on the
system (same as with other architectures).
Sponsored-by: Frank Zhao <Frank.Zhao@starfivetech.com>
Sponsored-by: Sam Grove <sam.grove@sifive.com>
Signed-off-by: Stanislaw Kardach <kda@semihalf.com>
---
devtools/test-meson-builds.sh | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/devtools/test-meson-builds.sh b/devtools/test-meson-builds.sh
index a653b253cb..f732dccf6c 100755
--- a/devtools/test-meson-builds.sh
+++ b/devtools/test-meson-builds.sh
@@ -275,6 +275,10 @@ for f in $srcdir/config/ppc/ppc* ; do
build $targetdir $f ABI $use_shared
done
+# RISC-V configuration
+build build-riscv64-linux-gcc $srcdir/config/riscv/riscv64_linux_gcc ABI \
+ $use_shared
+
# Test installation of the x86-generic target, to be used for checking
# the sample apps build using the pkg-config file for cflags and libs
load_env cc
--
2.30.2
^ permalink raw reply [relevance 9%]
* RE: [PATCH v3] pcap: support MTU set
2022-05-30 18:05 0% ` Ferruh Yigit
@ 2022-05-31 13:12 0% ` Ido Goshen
0 siblings, 0 replies; 200+ results
From: Ido Goshen @ 2022-05-31 13:12 UTC (permalink / raw)
To: Ferruh Yigit, stephen; +Cc: dev, Tianli Lai
> -----Original Message-----
> From: Ferruh Yigit <ferruh.yigit@xilinx.com>
> Sent: Monday, 30 May 2022 21:06
> To: Ido Goshen <Ido@cgstowernetworks.com>; ferruh.yigit@xilinx.com;
> stephen@networkplumber.org
> Cc: dev@dpdk.org; Tianli Lai <laitianli@tom.com>
> Subject: Re: [PATCH v3] pcap: support MTU set
>
> On 5/30/2022 11:36 AM, Ido Goshen wrote:
> > Support rte_eth_dev_set_mtu by pcap vdevs Enforce mtu on rx/tx
> >
>
> Still not sure about enforcing MTU on pcap, but please find comments on
> mechanical issues
[idog] Trying to detail more about use cases:
1. CI tests which are HW independent and works with --vdevs=net_pcap
For testing that mtu feature(s) work correctly in our app a pcap that contains
mix sized packets should be used. Using pcap that has only small size packets
will miss the all point.
2. Customer support - it's much simpler to debug on a workstation and not
real HW setup. We often get the customer's configuration and a pcap in order
to reproduce an issue. It will be a pain and error-prone to manipulate the pcap
before using it.
I will address the mechanical issues and post v4 patch
> > Bugzilla ID: 961
> > Signed-off-by: Ido Goshen <ido@cgstowernetworks.com>
> >
> > ---
> > v3:
> > Preserve pcap behavior to support max size packets by default
> > alternative to v2 in order to limit the code change to pcap only and
> > avoid abi change.
> > Enforce mtu only in case rte_eth_dev_set_mtu was explicitly called.
> >
> > v2:
> > Preserve pcap behavior to support max size packets by default.
> > ---
> > drivers/net/pcap/pcap_ethdev.c | 44
> +++++++++++++++++++++++++++++++---
> > 1 file changed, 41 insertions(+), 3 deletions(-)
> >
>
> Is documentation needs to be updated as well?
[idog] I don't think so
It's using the standard rte_eth_dev_set_mtu() which is already documented in
features.rst https://doc.dpdk.org/guides/nics/features.html#mtu-update
I don't see other PMDs mention explicitly they support it (it's the normal behaviour)
> And what do you think to update release notes for this update?
[idog] ok
> > +388,8 @@ eth_pcap_tx_dumper(void *queue, struct rte_mbuf **bufs,
> uint16_t nb_pkts)
> > + if (unlikely(len > dev->data->mtu) &&
> > + internals->is_mtu_set) {
>
> It is possible to save only some part of the packet to the pcap file, please
> check snaplen patch [1], how MTU config should work with this feature?
>
> [1]
> https://patchwork.dpdk.org/project/dpdk/patch/20220313112638.3945-1-
> laitianli@tom.com/
>
[idog] interesting to know this is being work on.
(To your method, why is it needed? there are tools like editpcap that can be
applied on the dpdk output file and snap the packets ;-)
I think integration of the 2 features is trivial, mtu controls if the packet is
written to file or not, and snaplan controls what part of it needs to be written.
i.e. mtu is checked before snaplen.
Using snaplen > mtu will become meaningless (maybe block/warn on such configuration)
Alternative is to apply mtu only on pcap iface (assuming snaplen is applied only
on tx_pcap file)
If supporting mtu only for pcap live ifaces and not for pcap files then
the all thing can be implemented differently by setting the OS netdevice
mtu (e.g. in linux SIOCSIFMTU) instead of enforcing it by the pcap pmd
but this will require osdep use and I admit I have no idea how to do it for windows
Would this be a better approach?
^ permalink raw reply [relevance 0%]
* RE: [EXT] [PATCH v4 00/12] cryptodev: rsa, dh, ecdh changes
2022-05-31 4:04 3% [PATCH v4 00/12] cryptodev: rsa, dh, ecdh changes Arek Kusztal
2022-05-31 4:04 4% ` [PATCH v4 06/12] cryptodev: add elliptic curve diffie hellman Arek Kusztal
2022-05-31 7:49 0% ` [PATCH v4 00/12] cryptodev: rsa, dh, ecdh changes Zhang, Roy Fan
@ 2022-05-31 11:52 0% ` Akhil Goyal
2 siblings, 0 replies; 200+ results
From: Akhil Goyal @ 2022-05-31 11:52 UTC (permalink / raw)
To: Arek Kusztal, dev; +Cc: roy.fan.zhang
> This patchset introduces some of changes discussed on mailing list for 22.07
> release in cryptodev asym.
>
> Key changes:
>
> - It fixes API for RSA (expescially signature paddings)
> - Adds Elliptic-Curve Diffie-Hellman
> - Adds Eliiptic-Curve point verification
> - Adds RSA missing padding fields
> - Adds asym op flags
> - Fixes many API comments (like EC curves)
>
> v4:
> - fixed shared build problem
> - added ABI ignore entry for xform
The Documentation is still not updated for these changes.
Please update doc/guides/prog_guide/cryptodev_lib.rst
And doc/guides/cryptodevs/features/default.ini (for ECDH)
Also update release notes (ECDH).
>
> Arek Kusztal (12):
> cryptodev: redefine ec group enum
> cryptodev: separate key exchange operation enum
> cryptodev: remove comment about using ephemeral key in dsa
> cryptodev: clarify usage of private key in dh
> cryptodev: move dh type from xform to dh op
> cryptodev: add elliptic curve diffie hellman
> cryptodev: add public key verify option
> cryptodev: add asym op flags
> cryptodev: clarify usage of rsa padding hash
> cryptodev: move RSA padding into separate struct
> cryptodev: clarify rsa verify with none padding
> cryptodev: add salt length and optional label
>
> app/test/test_cryptodev_asym.c | 63 ++++----
> devtools/libabigail.abignore | 3 +
> drivers/common/cpt/cpt_ucode_asym.h | 4 +-
> drivers/crypto/cnxk/cnxk_ae.h | 8 +-
> drivers/crypto/octeontx/otx_cryptodev_ops.c | 4 +-
> drivers/crypto/openssl/rte_openssl_pmd.c | 17 +--
> drivers/crypto/openssl/rte_openssl_pmd_ops.c | 33 +---
> drivers/crypto/qat/qat_asym.c | 12 +-
> lib/cryptodev/rte_crypto_asym.h | 217 ++++++++++++++++++++-------
> lib/cryptodev/rte_cryptodev.c | 15 +-
> lib/cryptodev/rte_cryptodev.h | 4 +-
> lib/cryptodev/version.map | 1 +
> 12 files changed, 237 insertions(+), 144 deletions(-)
>
> --
> 2.13.6
^ permalink raw reply [relevance 0%]
* RE: [PATCH v4 00/12] cryptodev: rsa, dh, ecdh changes
2022-05-31 4:04 3% [PATCH v4 00/12] cryptodev: rsa, dh, ecdh changes Arek Kusztal
2022-05-31 4:04 4% ` [PATCH v4 06/12] cryptodev: add elliptic curve diffie hellman Arek Kusztal
@ 2022-05-31 7:49 0% ` Zhang, Roy Fan
2022-05-31 11:52 0% ` [EXT] " Akhil Goyal
2 siblings, 0 replies; 200+ results
From: Zhang, Roy Fan @ 2022-05-31 7:49 UTC (permalink / raw)
To: Kusztal, ArkadiuszX, dev; +Cc: gakhil
> -----Original Message-----
> From: Kusztal, ArkadiuszX <arkadiuszx.kusztal@intel.com>
> Sent: Tuesday, May 31, 2022 5:04 AM
> To: dev@dpdk.org
> Cc: gakhil@marvell.com; Zhang, Roy Fan <roy.fan.zhang@intel.com>; Kusztal,
> ArkadiuszX <arkadiuszx.kusztal@intel.com>
> Subject: [PATCH v4 00/12] cryptodev: rsa, dh, ecdh changes
>
> This patchset introduces some of changes discussed on mailing list for 22.07
> release in cryptodev asym.
>
> Key changes:
>
> - It fixes API for RSA (expescially signature paddings)
> - Adds Elliptic-Curve Diffie-Hellman
> - Adds Eliiptic-Curve point verification
> - Adds RSA missing padding fields
> - Adds asym op flags
> - Fixes many API comments (like EC curves)
>
> v4:
> - fixed shared build problem
> - added ABI ignore entry for xform
>
> Arek Kusztal (12):
> cryptodev: redefine ec group enum
> cryptodev: separate key exchange operation enum
> cryptodev: remove comment about using ephemeral key in dsa
> cryptodev: clarify usage of private key in dh
> cryptodev: move dh type from xform to dh op
> cryptodev: add elliptic curve diffie hellman
> cryptodev: add public key verify option
> cryptodev: add asym op flags
> cryptodev: clarify usage of rsa padding hash
> cryptodev: move RSA padding into separate struct
> cryptodev: clarify rsa verify with none padding
> cryptodev: add salt length and optional label
>
> app/test/test_cryptodev_asym.c | 63 ++++----
> devtools/libabigail.abignore | 3 +
> drivers/common/cpt/cpt_ucode_asym.h | 4 +-
> drivers/crypto/cnxk/cnxk_ae.h | 8 +-
> drivers/crypto/octeontx/otx_cryptodev_ops.c | 4 +-
> drivers/crypto/openssl/rte_openssl_pmd.c | 17 +--
> drivers/crypto/openssl/rte_openssl_pmd_ops.c | 33 +---
> drivers/crypto/qat/qat_asym.c | 12 +-
> lib/cryptodev/rte_crypto_asym.h | 217 ++++++++++++++++++++-----
> --
> lib/cryptodev/rte_cryptodev.c | 15 +-
> lib/cryptodev/rte_cryptodev.h | 4 +-
> lib/cryptodev/version.map | 1 +
> 12 files changed, 237 insertions(+), 144 deletions(-)
>
> --
> 2.13.6
Series-acked-by: Fan Zhang <roy.fan.zhang@intel.com>
^ permalink raw reply [relevance 0%]
* [PATCH v4 06/12] cryptodev: add elliptic curve diffie hellman
2022-05-31 4:04 3% [PATCH v4 00/12] cryptodev: rsa, dh, ecdh changes Arek Kusztal
@ 2022-05-31 4:04 4% ` Arek Kusztal
2022-05-31 7:49 0% ` [PATCH v4 00/12] cryptodev: rsa, dh, ecdh changes Zhang, Roy Fan
2022-05-31 11:52 0% ` [EXT] " Akhil Goyal
2 siblings, 0 replies; 200+ results
From: Arek Kusztal @ 2022-05-31 4:04 UTC (permalink / raw)
To: dev; +Cc: gakhil, roy.fan.zhang, Arek Kusztal, mdr
- Added elliptic curve Diffie-Hellman parameters.
Point multiplication allows the user to process every phase of
ECDH, but for phase 1, user should not really care about the generator.
The user does not even need to know what the generator looks like,
therefore setting ec xform would make this work.
Cc: mdr@ashroe.eu
Signed-off-by: Arek Kusztal <arkadiuszx.kusztal@intel.com>
---
devtools/libabigail.abignore | 3 +++
lib/cryptodev/rte_crypto_asym.h | 38 ++++++++++++++++++++++++++++++++++++++
2 files changed, 41 insertions(+)
diff --git a/devtools/libabigail.abignore b/devtools/libabigail.abignore
index 79ff15dc4e..6d174b291f 100644
--- a/devtools/libabigail.abignore
+++ b/devtools/libabigail.abignore
@@ -27,6 +27,9 @@
; Ignore changes to rte_crypto_asym_op, asymmetric crypto API is experimental
[suppress_type]
name = rte_crypto_asym_op
+; Ignore changes to rte_crypto_asym_xform_type, asymmetric crypto API is experimental
+[suppress_type]
+ name = rte_crypto_asym_xform_type
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Temporary exceptions till next major ABI version ;
diff --git a/lib/cryptodev/rte_crypto_asym.h b/lib/cryptodev/rte_crypto_asym.h
index 88bc34dc8c..f61a2ddce8 100644
--- a/lib/cryptodev/rte_crypto_asym.h
+++ b/lib/cryptodev/rte_crypto_asym.h
@@ -99,6 +99,8 @@ enum rte_crypto_asym_xform_type {
/**< Elliptic Curve Digital Signature Algorithm
* Perform Signature Generation and Verification.
*/
+ RTE_CRYPTO_ASYM_XFORM_ECDH,
+ /**< Elliptic Curve Diffie Hellman */
RTE_CRYPTO_ASYM_XFORM_ECPM,
/**< Elliptic Curve Point Multiplication */
RTE_CRYPTO_ASYM_XFORM_TYPE_LIST_END
@@ -429,6 +431,41 @@ struct rte_crypto_dh_op_param {
};
/**
+ * Elliptic Curve Diffie-Hellman Operations params.
+ */
+struct rte_crypto_ecdh_op_param {
+ enum rte_crypto_asym_ke_type ke_type;
+ /**< Key exchange operation type */
+ rte_crypto_uint priv_key;
+ /**<
+ * Output - generated private key when ke_type is
+ * RTE_CRYPTO_ASYM_KE_PRIVATE_KEY_GENERATE.
+ *
+ * Input - private key when ke_type is one of:
+ * RTE_CRYPTO_ASYM_KE_PUBLIC_KEY_GENERATE,
+ * RTE_CRYPTO_ASYM_KE_SHARED_SECRET_COMPUTE.
+ *
+ * In case priv_key.length is 0 and ke_type is set with
+ * RTE_CRYPTO_ASYM_KE_PUBLIC_KEY_GENERATE, CSRNG capable
+ * device will generate private key and use it for public
+ * key generation.
+ */
+ struct rte_crypto_ec_point pub_key;
+ /**<
+ * Output - generated public key when ke_type is
+ * RTE_CRYPTO_ASYM_KE_PUBLIC_KEY_GENERATE.
+ *
+ * Input - peer's public key when ke_type is
+ * RTE_CRYPTO_ASYM_KE_SHARED_SECRET_COMPUTE.
+ */
+ struct rte_crypto_ec_point shared_secret;
+ /**<
+ * Output - calculated shared secret when ke_type is
+ * RTE_CRYPTO_ASYM_KE_SHARED_SECRET_COMPUTE.
+ */
+};
+
+/**
* DSA Operations params
*
*/
@@ -566,6 +603,7 @@ struct rte_crypto_asym_op {
struct rte_crypto_mod_op_param modex;
struct rte_crypto_mod_op_param modinv;
struct rte_crypto_dh_op_param dh;
+ struct rte_crypto_ecdh_op_param ecdh;
struct rte_crypto_dsa_op_param dsa;
struct rte_crypto_ecdsa_op_param ecdsa;
struct rte_crypto_ecpm_op_param ecpm;
--
2.13.6
^ permalink raw reply [relevance 4%]
* [PATCH v4 00/12] cryptodev: rsa, dh, ecdh changes
@ 2022-05-31 4:04 3% Arek Kusztal
2022-05-31 4:04 4% ` [PATCH v4 06/12] cryptodev: add elliptic curve diffie hellman Arek Kusztal
` (2 more replies)
0 siblings, 3 replies; 200+ results
From: Arek Kusztal @ 2022-05-31 4:04 UTC (permalink / raw)
To: dev; +Cc: gakhil, roy.fan.zhang, Arek Kusztal
This patchset introduces some of changes discussed on mailing list for 22.07 release in cryptodev asym.
Key changes:
- It fixes API for RSA (expescially signature paddings)
- Adds Elliptic-Curve Diffie-Hellman
- Adds Eliiptic-Curve point verification
- Adds RSA missing padding fields
- Adds asym op flags
- Fixes many API comments (like EC curves)
v4:
- fixed shared build problem
- added ABI ignore entry for xform
Arek Kusztal (12):
cryptodev: redefine ec group enum
cryptodev: separate key exchange operation enum
cryptodev: remove comment about using ephemeral key in dsa
cryptodev: clarify usage of private key in dh
cryptodev: move dh type from xform to dh op
cryptodev: add elliptic curve diffie hellman
cryptodev: add public key verify option
cryptodev: add asym op flags
cryptodev: clarify usage of rsa padding hash
cryptodev: move RSA padding into separate struct
cryptodev: clarify rsa verify with none padding
cryptodev: add salt length and optional label
app/test/test_cryptodev_asym.c | 63 ++++----
devtools/libabigail.abignore | 3 +
drivers/common/cpt/cpt_ucode_asym.h | 4 +-
drivers/crypto/cnxk/cnxk_ae.h | 8 +-
drivers/crypto/octeontx/otx_cryptodev_ops.c | 4 +-
drivers/crypto/openssl/rte_openssl_pmd.c | 17 +--
drivers/crypto/openssl/rte_openssl_pmd_ops.c | 33 +---
drivers/crypto/qat/qat_asym.c | 12 +-
lib/cryptodev/rte_crypto_asym.h | 217 ++++++++++++++++++++-------
lib/cryptodev/rte_cryptodev.c | 15 +-
lib/cryptodev/rte_cryptodev.h | 4 +-
lib/cryptodev/version.map | 1 +
12 files changed, 237 insertions(+), 144 deletions(-)
--
2.13.6
^ permalink raw reply [relevance 3%]
* Re: [dpdk-dev] [RFC PATCH] ethdev: support congestion management
2022-05-30 13:15 2% [dpdk-dev] [RFC PATCH] ethdev: support congestion management jerinj
2022-05-30 19:43 0% ` Ajit Khaparde
@ 2022-05-31 1:09 0% ` Min Hu (Connor)
2022-05-31 16:09 0% ` Stephen Hemminger
2 siblings, 0 replies; 200+ results
From: Min Hu (Connor) @ 2022-05-31 1:09 UTC (permalink / raw)
To: jerinj, dev, Ferruh Yigit, Thomas Monjalon, Andrew Rybchenko
Cc: ajit.khaparde, aboyer, beilei.xing, bruce.richardson, chas3,
chenbo.xia, ciara.loftus, dsinghrawat, ed.czeck, evgenys, grive,
g.singh, zhouguoyang, haiyue.wang, hkalra, heinrich.kuhn,
hemant.agrawal, hyonkim, igorch, irusskikh, jgrajcia,
jasvinder.singh, jianwang, jiawenwu, jingjing.wu, johndale,
john.miller, linville, keith.wiles, kirankumark, oulijun, lironh,
longli, mw, spinler, matan, matt.peters, maxime.coquelin, mk,
pnalla, ndabilpuram, qiming.yang, qi.z.zhang, radhac,
rahul.lakkireddy, rmody, rosen.xu, sachin.saxena, skoteshwar,
shshaikh, shaibran, shepard.siegel, asomalap, somnath.kotur,
sthemmin, steven.webster, skori, mtetsuyah, vburru, viacheslavo,
xiao.w.wang, cloud.wangxiaoyun, yisen.zhuang, yongwang,
xuanziyang2, cristian.dumitrescu
Hi, jerinj,
在 2022/5/30 21:15, jerinj@marvell.com 写道:
> From: Jerin Jacob <jerinj@marvell.com>
>
> NIC HW controllers often come with congestion management support on
> various HW objects such as Rx queue depth or mempool queue depth.
>
> Also, it can support various modes of operation such as RED
> (Random early discard), WRED etc on those HW objects.
>
> This patch adds a framework to express such modes(enum rte_cman_mode)
> and introduce (enum rte_eth_cman_obj) to enumerate the different
> objects where the modes can operate on.
>
> This patch adds RTE_CMAN_RED mode of operation and
> RTE_ETH_CMAN_OBJ_RX_QUEUE, RTE_ETH_CMAN_OBJ_RX_QUEUE_MEMPOOL object.
>
> Introduced reserved fields in configuration structure
> backed by rte_eth_cman_config_init() to add new configuration
> parameters without ABI breakage.
>
> Added rte_eth_cman_info_get() API to get the information such as
> supported modes and objects.
>
> Added rte_eth_cman_config_init(), rte_eth_cman_config_set() APIs
> to configure congestion management on those object with associated mode.
>
> Finally, Added rte_eth_cman_config_get() API to retrieve the
> applied configuration.
>
> Signed-off-by: Jerin Jacob <jerinj@marvell.com>
> ---
> doc/guides/nics/features.rst | 12 +++
> doc/guides/nics/features/default.ini | 1 +
> lib/eal/include/meson.build | 1 +
> lib/eal/include/rte_cman.h | 51 ++++++++++
> lib/ethdev/rte_ethdev.h | 145 +++++++++++++++++++++++++++
> 5 files changed, 210 insertions(+)
> create mode 100644 lib/eal/include/rte_cman.h
>
> diff --git a/doc/guides/nics/features.rst b/doc/guides/nics/features.rst
> index 21bedb743f..ffcc2bcc92 100644
> --- a/doc/guides/nics/features.rst
> +++ b/doc/guides/nics/features.rst
> @@ -727,6 +727,18 @@ Supports configuring per-queue stat counter mapping.
> ``rte_eth_dev_set_tx_queue_stats_mapping()``.
>
>
> +.. _nic_features_congestion_management
> +
> +Congestion management
> +---------------------
> +
> +Supports congestion management.
> +
> +* **[implements] eth_dev_ops**: ``cman_info_get``, ``cman_config_set``, ``cman_config_get``.
> +* **[related] API**: ``rte_eth_cman_info_get()``, ``rte_eth_cman_config_init()``,
> + ``rte_eth_cman_config_set()``, ``rte_eth_cman_config_get()``.
> +
> +
> .. _nic_features_fw_version:
>
> FW version
> diff --git a/doc/guides/nics/features/default.ini b/doc/guides/nics/features/default.ini
> index b1d18ac62c..060497e41f 100644
> --- a/doc/guides/nics/features/default.ini
> +++ b/doc/guides/nics/features/default.ini
> @@ -60,6 +60,7 @@ Tx descriptor status =
> Basic stats =
> Extended stats =
> Stats per queue =
> +Congestion management =
> FW version =
> EEPROM dump =
> Module EEPROM dump =
> diff --git a/lib/eal/include/meson.build b/lib/eal/include/meson.build
> index 9700494816..40e31e0e6d 100644
> --- a/lib/eal/include/meson.build
> +++ b/lib/eal/include/meson.build
> @@ -10,6 +10,7 @@ headers += files(
> 'rte_branch_prediction.h',
> 'rte_bus.h',
> 'rte_class.h',
> + 'rte_cman.h',
> 'rte_common.h',
> 'rte_compat.h',
> 'rte_debug.h',
> diff --git a/lib/eal/include/rte_cman.h b/lib/eal/include/rte_cman.h
> new file mode 100644
> index 0000000000..e6dad2ebf7
> --- /dev/null
> +++ b/lib/eal/include/rte_cman.h
> @@ -0,0 +1,51 @@
> +/* SPDX-License-Identifier: BSD-3-Clause
> + * Copyright(C) 2022 Marvell International Ltd.
> + */
> +
> +#ifndef RTE_CMAN_H
> +#define RTE_CMAN_H
> +
> +#ifdef __cplusplus
> +extern "C" {
> +#endif
> +
> +#include <rte_bitops.h>
> +
> +/**
> + * @file
> + * Congestion management related parameters for DPDK.
> + */
> +
> +/** Congestion management modes */
> +enum rte_cman_mode {
> + /** Congestion based on Random Early Detection.
> + *
> + * https://en.wikipedia.org/wiki/Random_early_detection
> + * @see struct rte_cman_red_params
> + */
> + RTE_CMAN_RED = RTE_BIT64(0),
> +};
> +
> +/**
> + * RED based congestion management configuration parameters.
> + */
> +struct rte_cman_red_params {
> + /**< Minimum threshold (min_th) value
> + *
> + * Value expressed as percentage. Value must be in 0 to 100(inclusive).
> + */
> + uint8_t min_th;
> + /**< Maximum threshold (max_th) value
> + *
> + * Value expressed as percentage. Value must be in 0 to 100(inclusive).
> + */
> + uint8_t max_th;
> + /** Inverse of packet marking probability maximum value (maxp = 1 / maxp_inv) */
> + uint16_t maxp_inv;
> +};
> +
> +#ifdef __cplusplus
> +}
> +#endif
> +
> +#endif /* RTE_CMAN_H */
> diff --git a/lib/ethdev/rte_ethdev.h b/lib/ethdev/rte_ethdev.h
> index 04cff8ee10..7c8718bb2e 100644
> --- a/lib/ethdev/rte_ethdev.h
> +++ b/lib/ethdev/rte_ethdev.h
> @@ -160,6 +160,7 @@ extern "C" {
> #define RTE_ETHDEV_DEBUG_TX
> #endif
>
> +#include <rte_cman.h>
> #include <rte_compat.h>
> #include <rte_log.h>
> #include <rte_interrupts.h>
> @@ -5452,6 +5453,150 @@ typedef struct {
> __rte_experimental
> int rte_eth_dev_priv_dump(uint16_t port_id, FILE *file);
>
> +/* Congestion management */
> +
> +/** Enumerate list of ethdev congestion management objects */
> +enum rte_eth_cman_obj {
> + /** Congestion management based on Rx queue depth */
> + RTE_ETH_CMAN_OBJ_RX_QUEUE = RTE_BIT64(0),
> + /** Congestion management based on mempool depth associated with Rx queue
> + * @see rte_eth_rx_queue_setup()
> + */
> + RTE_ETH_CMAN_OBJ_RX_QUEUE_MEMPOOL = RTE_BIT64(1),
> +};
> +
> +/**
> + * @warning
> + * @b EXPERIMENTAL: this API may change, or be removed, without prior notice
'API' --> 'structure'
> + *
> + * A structure used to retrieve information of ethdev congestion management.
> + */
> +struct rte_eth_cman_info {
> + /** Set of supported congestion management modes
> + * @see enum rte_cman_mode
> + */
> + uint64_t modes_supported;
> + /** Set of supported congestion management objects
> + * @see enum rte_eth_cman_obj
> + */
> + uint64_t objs_supported;
> + /** Reserved for future fields */
> + uint8_t rsvd[64];
> +};
> +
> +/**
> + * @warning
> + * @b EXPERIMENTAL: this API may change, or be removed, without prior notice
'API' --> 'structure'
> + *
> + * A structure used to configure the ethdev congestion management.
> + */
> +struct rte_eth_cman_config {
> + /** Congestion management object */
> + enum rte_eth_cman_obj obj;
> + /** Congestion management mode */
> + enum rte_cman_mode mode;
> + union {
> + /** Rx queue to configure congestion management.
> + *
> + * Valid when object is RTE_ETH_CMAN_OBJ_RX_QUEUE or
> + * RTE_ETH_CMAN_OBJ_RX_QUEUE_MEMPOOL.
> + */
> + uint16_t rx_queue;
> + /** Reserved for future fields */
> + uint8_t rsvd_obj_params[16];
> + } obj_param;
> + union {
> + /** RED configuration parameters.
> + *
> + * Valid when mode is RTE_CMAN_RED.
> + */
> + struct rte_cman_red_params red;
> + /** Reserved for future fields */
> + uint8_t rsvd_mode_params[64];
> + } mode_param;
> +};
> +
> +/**
> + * @warning
> + * @b EXPERIMENTAL: this API may change, or be removed, without prior notice
> + *
> + * Retrieve the information for ethdev congestion management
> + *
> + * @param port_id
> + * The port identifier of the Ethernet device.
> + * @param info
> + * A pointer to a structure of type *rte_eth_cman_info* to be filled with
> + * the information about congestion management.
> + * @return
> + * - (0) if successful.
> + * - (-ENOTSUP) if support for cman_info_get does not exist.
> + * - (-ENODEV) if *port_id* invalid.
> + * - (-EINVAL) if bad parameter.
> + */
> +__rte_experimental
> +int rte_eth_cman_info_get(uint16_t port_id, struct rte_eth_cman_info *info);
> +
> +/**
> + * @warning
> + * @b EXPERIMENTAL: this API may change, or be removed, without prior notice
> + *
> + * Initialize the ethdev congestion management configuration structure with default values.
> + *
> + * @param port_id
> + * The port identifier of the Ethernet device.
> + * @param config
> + * A pointer to a structure of type *rte_eth_cman_config* to be initialized
> + * with default value.
> + * @return
> + * - (0) if successful.
> + * - (-ENODEV) if *port_id* invalid.
> + * - (-EINVAL) if bad parameter.
> + */
> +__rte_experimental
> +int rte_eth_cman_config_init(uint16_t port_id, struct rte_eth_cman_config *config);
> +
> +/**
> + * @warning
> + * @b EXPERIMENTAL: this API may change, or be removed, without prior notice
> + *
> + * Configure ethdev congestion management
> + *
> + * @param port_id
> + * The port identifier of the Ethernet device.
> + * @param config
> + * A pointer to a structure of type *rte_eth_cman_config* to be configured.
> + * @return
> + * - (0) if successful.
> + * - (-ENOTSUP) if support for cman_config_set does not exist.
> + * - (-ENODEV) if *port_id* invalid.
> + * - (-EINVAL) if bad parameter.
> + */
> +__rte_experimental
> +int rte_eth_cman_config_set(uint16_t port_id, struct rte_eth_cman_config *config);
> +
> +/**
> + * @warning
> + * @b EXPERIMENTAL: this API may change, or be removed, without prior notice
> + *
> + * Retrieve the applied ethdev congestion management parameters for the given port.
> + *
> + * @param port_id
> + * The port identifier of the Ethernet device.
> + * @param config
> + * A pointer to a structure of type *rte_eth_cman_config* to retrieve
> + * congestion management parameters for the given object.
> + * Application must fill all parameters except mode_param parameter in
> + * struct rte_eth_cman_config.
> + *
> + * @return
> + * - (0) if successful.
> + * - (-ENOTSUP) if support for cman_config_get does not exist.
> + * - (-ENODEV) if *port_id* invalid.
> + * - (-EINVAL) if bad parameter.
> + */
> +__rte_experimental
> +int rte_eth_cman_config_get(uint16_t port_id, struct rte_eth_cman_config *config);
> +
> #include <rte_ethdev_core.h>
>
> /**
>
^ permalink raw reply [relevance 0%]
* Re: [PATCH v3 1/2] lpm: add const to lpm arg of rte_lpm_lookup
2022-05-30 18:24 3% ` [PATCH v3 " Stanislaw Kardach
@ 2022-05-30 20:38 0% ` Stephen Hemminger
2022-06-01 9:35 0% ` Medvedkin, Vladimir
1 sibling, 0 replies; 200+ results
From: Stephen Hemminger @ 2022-05-30 20:38 UTC (permalink / raw)
To: Stanislaw Kardach
Cc: Vladimir Medvedkin, dev, Frank Zhao, Sam Grove, mw, upstream
On Mon, 30 May 2022 20:24:36 +0200
Stanislaw Kardach <kda@semihalf.com> wrote:
> All other rte_lpm_lookup* functions take lpm argument as a const. As the
> basic rte_lpm_lookup() performs the same function, it should also do
> that.
>
> As this function is inline, no API/ABI change happens.
>
> Signed-off-by: Stanislaw Kardach <kda@semihalf.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
^ permalink raw reply [relevance 0%]
* Re: [dpdk-dev] [RFC PATCH] ethdev: support congestion management
2022-05-30 13:15 2% [dpdk-dev] [RFC PATCH] ethdev: support congestion management jerinj
@ 2022-05-30 19:43 0% ` Ajit Khaparde
2022-05-31 1:09 0% ` Min Hu (Connor)
2022-05-31 16:09 0% ` Stephen Hemminger
2 siblings, 0 replies; 200+ results
From: Ajit Khaparde @ 2022-05-30 19:43 UTC (permalink / raw)
To: Jerin Jacob Kollanukkaran
Cc: dpdk-dev, Ferruh Yigit, Thomas Monjalon, Andrew Rybchenko,
Andrew Boyer, Beilei Xing, Bruce Richardson, Chas Williams, Xia,
Chenbo, Ciara Loftus, Devendra Singh Rawat, Ed Czeck,
Evgeny Schemeilin, Gaetan Rivet, Gagandeep Singh, Guoyang Zhou,
Haiyue Wang, Harman Kalra, Heinrich Kuhn, Hemant Agrawal,
Hyong Youb Kim, Igor Chauskin, Igor Russkikh, Jakub Grajciar,
Singh, Jasvinder, Jian Wang, Jiawen Wu, Jingjing Wu, John Daley,
John Miller, John W. Linville, Wiles, Keith, Kiran Kumar K,
oulijun, Liron Himi, Long Li, Marcin Wojtas, Martin Spinler,
Matan Azrad, Matt Peters, Maxime Coquelin, Michal Krawczyk,
Min Hu (Connor),
Nalla Pradeep, Nithin Dabilpuram, Qiming Yang, Qi Zhang,
Radha Mohan Chintakuntla, Rahul Lakkireddy, Rasesh Mody,
Rosen Xu, Sachin Saxena (OSS),
Satha Rao, Shahed Shaikh, Shai Brandes, Shepard Siegel,
Somalapuram Amaranath, Somnath Kotur, Stephen Hemminger,
Steven Webster, Sunil Kumar Kori, Tetsuya Mukawa,
Veerasenareddy Burru, Slava Ovsiienko, Xiao Wang, Xiaoyun Wang,
Yisen Zhuang, Yong Wang, Ziyang Xuan, Dumitrescu, Cristian
[-- Attachment #1: Type: text/plain, Size: 10369 bytes --]
On Mon, May 30, 2022 at 6:16 AM <jerinj@marvell.com> wrote:
>
> From: Jerin Jacob <jerinj@marvell.com>
>
> NIC HW controllers often come with congestion management support on
> various HW objects such as Rx queue depth or mempool queue depth.
>
> Also, it can support various modes of operation such as RED
> (Random early discard), WRED etc on those HW objects.
>
> This patch adds a framework to express such modes(enum rte_cman_mode)
> and introduce (enum rte_eth_cman_obj) to enumerate the different
> objects where the modes can operate on.
>
> This patch adds RTE_CMAN_RED mode of operation and
> RTE_ETH_CMAN_OBJ_RX_QUEUE, RTE_ETH_CMAN_OBJ_RX_QUEUE_MEMPOOL object.
>
> Introduced reserved fields in configuration structure
> backed by rte_eth_cman_config_init() to add new configuration
> parameters without ABI breakage.
>
> Added rte_eth_cman_info_get() API to get the information such as
> supported modes and objects.
>
> Added rte_eth_cman_config_init(), rte_eth_cman_config_set() APIs
> to configure congestion management on those object with associated mode.
>
> Finally, Added rte_eth_cman_config_get() API to retrieve the
> applied configuration.
Can you also add How all this helps an application? Thanks
>
>
> Signed-off-by: Jerin Jacob <jerinj@marvell.com>
> ---
> doc/guides/nics/features.rst | 12 +++
> doc/guides/nics/features/default.ini | 1 +
> lib/eal/include/meson.build | 1 +
> lib/eal/include/rte_cman.h | 51 ++++++++++
> lib/ethdev/rte_ethdev.h | 145 +++++++++++++++++++++++++++
> 5 files changed, 210 insertions(+)
> create mode 100644 lib/eal/include/rte_cman.h
>
> diff --git a/doc/guides/nics/features.rst b/doc/guides/nics/features.rst
> index 21bedb743f..ffcc2bcc92 100644
> --- a/doc/guides/nics/features.rst
> +++ b/doc/guides/nics/features.rst
> @@ -727,6 +727,18 @@ Supports configuring per-queue stat counter mapping.
> ``rte_eth_dev_set_tx_queue_stats_mapping()``.
>
>
> +.. _nic_features_congestion_management
> +
> +Congestion management
> +---------------------
> +
> +Supports congestion management.
> +
> +* **[implements] eth_dev_ops**: ``cman_info_get``, ``cman_config_set``, ``cman_config_get``.
> +* **[related] API**: ``rte_eth_cman_info_get()``, ``rte_eth_cman_config_init()``,
> + ``rte_eth_cman_config_set()``, ``rte_eth_cman_config_get()``.
> +
> +
> .. _nic_features_fw_version:
>
> FW version
> diff --git a/doc/guides/nics/features/default.ini b/doc/guides/nics/features/default.ini
> index b1d18ac62c..060497e41f 100644
> --- a/doc/guides/nics/features/default.ini
> +++ b/doc/guides/nics/features/default.ini
> @@ -60,6 +60,7 @@ Tx descriptor status =
> Basic stats =
> Extended stats =
> Stats per queue =
> +Congestion management =
> FW version =
> EEPROM dump =
> Module EEPROM dump =
> diff --git a/lib/eal/include/meson.build b/lib/eal/include/meson.build
> index 9700494816..40e31e0e6d 100644
> --- a/lib/eal/include/meson.build
> +++ b/lib/eal/include/meson.build
> @@ -10,6 +10,7 @@ headers += files(
> 'rte_branch_prediction.h',
> 'rte_bus.h',
> 'rte_class.h',
> + 'rte_cman.h',
> 'rte_common.h',
> 'rte_compat.h',
> 'rte_debug.h',
> diff --git a/lib/eal/include/rte_cman.h b/lib/eal/include/rte_cman.h
> new file mode 100644
> index 0000000000..e6dad2ebf7
> --- /dev/null
> +++ b/lib/eal/include/rte_cman.h
> @@ -0,0 +1,51 @@
> +/* SPDX-License-Identifier: BSD-3-Clause
> + * Copyright(C) 2022 Marvell International Ltd.
> + */
> +
> +#ifndef RTE_CMAN_H
> +#define RTE_CMAN_H
> +
> +#ifdef __cplusplus
> +extern "C" {
> +#endif
> +
> +#include <rte_bitops.h>
> +
> +/**
> + * @file
> + * Congestion management related parameters for DPDK.
> + */
> +
> +/** Congestion management modes */
> +enum rte_cman_mode {
> + /** Congestion based on Random Early Detection.
> + *
> + * https://en.wikipedia.org/wiki/Random_early_detection
> + * @see struct rte_cman_red_params
> + */
> + RTE_CMAN_RED = RTE_BIT64(0),
> +};
> +
> +/**
> + * RED based congestion management configuration parameters.
> + */
> +struct rte_cman_red_params {
> + /**< Minimum threshold (min_th) value
> + *
> + * Value expressed as percentage. Value must be in 0 to 100(inclusive).
> + */
> + uint8_t min_th;
> + /**< Maximum threshold (max_th) value
> + *
> + * Value expressed as percentage. Value must be in 0 to 100(inclusive).
> + */
> + uint8_t max_th;
> + /** Inverse of packet marking probability maximum value (maxp = 1 / maxp_inv) */
> + uint16_t maxp_inv;
> +};
> +
> +#ifdef __cplusplus
> +}
> +#endif
> +
> +#endif /* RTE_CMAN_H */
> diff --git a/lib/ethdev/rte_ethdev.h b/lib/ethdev/rte_ethdev.h
> index 04cff8ee10..7c8718bb2e 100644
> --- a/lib/ethdev/rte_ethdev.h
> +++ b/lib/ethdev/rte_ethdev.h
> @@ -160,6 +160,7 @@ extern "C" {
> #define RTE_ETHDEV_DEBUG_TX
> #endif
>
> +#include <rte_cman.h>
> #include <rte_compat.h>
> #include <rte_log.h>
> #include <rte_interrupts.h>
> @@ -5452,6 +5453,150 @@ typedef struct {
> __rte_experimental
> int rte_eth_dev_priv_dump(uint16_t port_id, FILE *file);
>
> +/* Congestion management */
> +
> +/** Enumerate list of ethdev congestion management objects */
> +enum rte_eth_cman_obj {
> + /** Congestion management based on Rx queue depth */
> + RTE_ETH_CMAN_OBJ_RX_QUEUE = RTE_BIT64(0),
> + /** Congestion management based on mempool depth associated with Rx queue
> + * @see rte_eth_rx_queue_setup()
> + */
> + RTE_ETH_CMAN_OBJ_RX_QUEUE_MEMPOOL = RTE_BIT64(1),
> +};
> +
> +/**
> + * @warning
> + * @b EXPERIMENTAL: this API may change, or be removed, without prior notice
> + *
> + * A structure used to retrieve information of ethdev congestion management.
> + */
> +struct rte_eth_cman_info {
> + /** Set of supported congestion management modes
> + * @see enum rte_cman_mode
> + */
> + uint64_t modes_supported;
> + /** Set of supported congestion management objects
> + * @see enum rte_eth_cman_obj
> + */
> + uint64_t objs_supported;
> + /** Reserved for future fields */
> + uint8_t rsvd[64];
> +};
> +
> +/**
> + * @warning
> + * @b EXPERIMENTAL: this API may change, or be removed, without prior notice
> + *
> + * A structure used to configure the ethdev congestion management.
> + */
> +struct rte_eth_cman_config {
> + /** Congestion management object */
> + enum rte_eth_cman_obj obj;
> + /** Congestion management mode */
> + enum rte_cman_mode mode;
> + union {
> + /** Rx queue to configure congestion management.
> + *
> + * Valid when object is RTE_ETH_CMAN_OBJ_RX_QUEUE or
> + * RTE_ETH_CMAN_OBJ_RX_QUEUE_MEMPOOL.
> + */
> + uint16_t rx_queue;
> + /** Reserved for future fields */
> + uint8_t rsvd_obj_params[16];
> + } obj_param;
> + union {
> + /** RED configuration parameters.
> + *
> + * Valid when mode is RTE_CMAN_RED.
> + */
> + struct rte_cman_red_params red;
> + /** Reserved for future fields */
> + uint8_t rsvd_mode_params[64];
> + } mode_param;
> +};
> +
> +/**
> + * @warning
> + * @b EXPERIMENTAL: this API may change, or be removed, without prior notice
> + *
> + * Retrieve the information for ethdev congestion management
> + *
> + * @param port_id
> + * The port identifier of the Ethernet device.
> + * @param info
> + * A pointer to a structure of type *rte_eth_cman_info* to be filled with
> + * the information about congestion management.
> + * @return
> + * - (0) if successful.
> + * - (-ENOTSUP) if support for cman_info_get does not exist.
> + * - (-ENODEV) if *port_id* invalid.
> + * - (-EINVAL) if bad parameter.
> + */
> +__rte_experimental
> +int rte_eth_cman_info_get(uint16_t port_id, struct rte_eth_cman_info *info);
> +
> +/**
> + * @warning
> + * @b EXPERIMENTAL: this API may change, or be removed, without prior notice
> + *
> + * Initialize the ethdev congestion management configuration structure with default values.
> + *
> + * @param port_id
> + * The port identifier of the Ethernet device.
> + * @param config
> + * A pointer to a structure of type *rte_eth_cman_config* to be initialized
> + * with default value.
> + * @return
> + * - (0) if successful.
> + * - (-ENODEV) if *port_id* invalid.
> + * - (-EINVAL) if bad parameter.
> + */
> +__rte_experimental
> +int rte_eth_cman_config_init(uint16_t port_id, struct rte_eth_cman_config *config);
> +
> +/**
> + * @warning
> + * @b EXPERIMENTAL: this API may change, or be removed, without prior notice
> + *
> + * Configure ethdev congestion management
> + *
> + * @param port_id
> + * The port identifier of the Ethernet device.
> + * @param config
> + * A pointer to a structure of type *rte_eth_cman_config* to be configured.
> + * @return
> + * - (0) if successful.
> + * - (-ENOTSUP) if support for cman_config_set does not exist.
> + * - (-ENODEV) if *port_id* invalid.
> + * - (-EINVAL) if bad parameter.
> + */
> +__rte_experimental
> +int rte_eth_cman_config_set(uint16_t port_id, struct rte_eth_cman_config *config);
> +
> +/**
> + * @warning
> + * @b EXPERIMENTAL: this API may change, or be removed, without prior notice
> + *
> + * Retrieve the applied ethdev congestion management parameters for the given port.
> + *
> + * @param port_id
> + * The port identifier of the Ethernet device.
> + * @param config
> + * A pointer to a structure of type *rte_eth_cman_config* to retrieve
> + * congestion management parameters for the given object.
> + * Application must fill all parameters except mode_param parameter in
> + * struct rte_eth_cman_config.
> + *
> + * @return
> + * - (0) if successful.
> + * - (-ENOTSUP) if support for cman_config_get does not exist.
> + * - (-ENODEV) if *port_id* invalid.
> + * - (-EINVAL) if bad parameter.
> + */
> +__rte_experimental
> +int rte_eth_cman_config_get(uint16_t port_id, struct rte_eth_cman_config *config);
> +
> #include <rte_ethdev_core.h>
>
> /**
> --
> 2.36.1
>
[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 4218 bytes --]
^ permalink raw reply [relevance 0%]
* [PATCH v3 1/2] lpm: add const to lpm arg of rte_lpm_lookup
2022-05-27 18:18 3% ` [PATCH v2 1/2] lpm: add const to lpm arg of rte_lpm_lookup Stanislaw Kardach
@ 2022-05-30 18:24 3% ` Stanislaw Kardach
2022-05-30 20:38 0% ` Stephen Hemminger
2022-06-01 9:35 0% ` Medvedkin, Vladimir
0 siblings, 2 replies; 200+ results
From: Stanislaw Kardach @ 2022-05-30 18:24 UTC (permalink / raw)
To: Vladimir Medvedkin
Cc: Stanislaw Kardach, dev, Frank Zhao, Sam Grove, mw, upstream
All other rte_lpm_lookup* functions take lpm argument as a const. As the
basic rte_lpm_lookup() performs the same function, it should also do
that.
As this function is inline, no API/ABI change happens.
Signed-off-by: Stanislaw Kardach <kda@semihalf.com>
---
lib/lpm/rte_lpm.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/lpm/rte_lpm.h b/lib/lpm/rte_lpm.h
index eb91960e81..1cf863a146 100644
--- a/lib/lpm/rte_lpm.h
+++ b/lib/lpm/rte_lpm.h
@@ -279,7 +279,7 @@ rte_lpm_delete_all(struct rte_lpm *lpm);
* -EINVAL for incorrect arguments, -ENOENT on lookup miss, 0 on lookup hit
*/
static inline int
-rte_lpm_lookup(struct rte_lpm *lpm, uint32_t ip, uint32_t *next_hop)
+rte_lpm_lookup(const struct rte_lpm *lpm, uint32_t ip, uint32_t *next_hop)
{
unsigned tbl24_index = (ip >> 8);
uint32_t tbl_entry;
--
2.30.2
^ permalink raw reply [relevance 3%]
* Re: [PATCH v3] pcap: support MTU set
2022-05-30 10:36 3% ` [PATCH v3] pcap: " Ido Goshen
@ 2022-05-30 18:05 0% ` Ferruh Yigit
2022-05-31 13:12 0% ` Ido Goshen
0 siblings, 1 reply; 200+ results
From: Ferruh Yigit @ 2022-05-30 18:05 UTC (permalink / raw)
To: Ido Goshen, ferruh.yigit, stephen; +Cc: dev, Tianli Lai
On 5/30/2022 11:36 AM, Ido Goshen wrote:
> Support rte_eth_dev_set_mtu by pcap vdevs
> Enforce mtu on rx/tx
>
Still not sure about enforcing MTU on pcap, but please find comments on
mechanical issues
> Bugzilla ID: 961
> Signed-off-by: Ido Goshen <ido@cgstowernetworks.com>
>
> ---
> v3:
> Preserve pcap behavior to support max size packets by default
> alternative to v2 in order to limit the code change to pcap only and
> avoid abi change.
> Enforce mtu only in case rte_eth_dev_set_mtu was explicitly called.
>
> v2:
> Preserve pcap behavior to support max size packets by default.
> ---
> drivers/net/pcap/pcap_ethdev.c | 44 +++++++++++++++++++++++++++++++---
> 1 file changed, 41 insertions(+), 3 deletions(-)
>
Is documentation needs to be updated as well?
And what do you think to update release notes for this update?
> diff --git a/drivers/net/pcap/pcap_ethdev.c b/drivers/net/pcap/pcap_ethdev.c
> index ec29fd6bc5..2e7fff9579 100644
> --- a/drivers/net/pcap/pcap_ethdev.c
> +++ b/drivers/net/pcap/pcap_ethdev.c
> @@ -93,6 +93,7 @@ struct pmd_internals {
> int single_iface;
> int phy_mac;
> unsigned int infinite_rx;
> + int is_mtu_set;
> };
>
> struct pmd_process_private {
> @@ -278,11 +279,13 @@ eth_pcap_rx(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
> const u_char *packet;
> struct rte_mbuf *mbuf;
> struct pcap_rx_queue *pcap_q = queue;
> + struct rte_eth_dev *dev = &rte_eth_devices[pcap_q->port_id];
> + struct pmd_internals *internals = dev->data->dev_private;
'rte_eth_devices[]' needs to be used for 'process_private' but lets not
tie it to access 'dev_private'.
You can add "struct pmd_internals *" to the "struct pcap_rx_queue" &
"struct pcap_tx_queue" structs for the access. Please check null PMD for
sample.
> uint16_t num_rx = 0;
> uint32_t rx_bytes = 0;
> pcap_t *pcap;
>
> - pp = rte_eth_devices[pcap_q->port_id].process_private;
> + pp = dev->process_private;
> pcap = pp->rx_pcap[pcap_q->queue_id];
>
> if (unlikely(pcap == NULL || nb_pkts == 0))
> @@ -303,6 +306,13 @@ eth_pcap_rx(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
> break;
> }
>
> + if (unlikely(header.caplen > dev->data->mtu) &&
> + internals->is_mtu_set) {
> + pcap_q->rx_stat.err_pkts++;
> + rte_pktmbuf_free(mbuf);
> + break;
> + }
> +
> if (header.caplen <= rte_pktmbuf_tailroom(mbuf)) {
> /* pcap packet will fit in the mbuf, can copy it */
> rte_memcpy(rte_pktmbuf_mtod(mbuf, void *), packet,
> @@ -378,6 +388,8 @@ eth_pcap_tx_dumper(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
> struct rte_mbuf *mbuf;
> struct pmd_process_private *pp;
> struct pcap_tx_queue *dumper_q = queue;
> + struct rte_eth_dev *dev = &rte_eth_devices[dumper_q->port_id];
> + struct pmd_internals *internals = dev->data->dev_private;
> uint16_t num_tx = 0;
> uint32_t tx_bytes = 0;
> struct pcap_pkthdr header;
> @@ -385,7 +397,7 @@ eth_pcap_tx_dumper(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
> unsigned char temp_data[RTE_ETH_PCAP_SNAPLEN];
> size_t len, caplen;
>
> - pp = rte_eth_devices[dumper_q->port_id].process_private;
> + pp = dev->process_private;
> dumper = pp->tx_dumper[dumper_q->queue_id];
>
> if (dumper == NULL || nb_pkts == 0)
> @@ -396,6 +408,13 @@ eth_pcap_tx_dumper(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
> for (i = 0; i < nb_pkts; i++) {
> mbuf = bufs[i];
> len = caplen = rte_pktmbuf_pkt_len(mbuf);
> +
> + if (unlikely(len > dev->data->mtu) &&
> + internals->is_mtu_set) {
It is possible to save only some part of the packet to the pcap file,
please check snaplen patch [1], how MTU config should work with this
feature?
[1]
https://patchwork.dpdk.org/project/dpdk/patch/20220313112638.3945-1-laitianli@tom.com/
> + rte_pktmbuf_free(mbuf);
> + continue;
Normally a PMD should not silently free a packet itself, it should
return error and application will decide to free the packet or not.
> + }
> +
> if (unlikely(!rte_pktmbuf_is_contiguous(mbuf) &&
> len > sizeof(temp_data))) {
> caplen = sizeof(temp_data);
> @@ -464,13 +483,15 @@ eth_pcap_tx(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
> struct rte_mbuf *mbuf;
> struct pmd_process_private *pp;
> struct pcap_tx_queue *tx_queue = queue;
> + struct rte_eth_dev *dev = &rte_eth_devices[tx_queue->port_id];
> + struct pmd_internals *internals = dev->data->dev_private;
> uint16_t num_tx = 0;
> uint32_t tx_bytes = 0;
> pcap_t *pcap;
> unsigned char temp_data[RTE_ETH_PCAP_SNAPLEN];
> size_t len;
>
> - pp = rte_eth_devices[tx_queue->port_id].process_private;
> + pp = dev->process_private;
> pcap = pp->tx_pcap[tx_queue->queue_id];
>
> if (unlikely(nb_pkts == 0 || pcap == NULL))
> @@ -479,6 +500,13 @@ eth_pcap_tx(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
> for (i = 0; i < nb_pkts; i++) {
> mbuf = bufs[i];
> len = rte_pktmbuf_pkt_len(mbuf);
> +
> + if (unlikely(len > dev->data->mtu) &&
> + internals->is_mtu_set) {
> + rte_pktmbuf_free(mbuf);
> + continue;
ditto
> + }
> +
> if (unlikely(!rte_pktmbuf_is_contiguous(mbuf) &&
> len > sizeof(temp_data))) {
> PMD_LOG(ERR,
> @@ -807,6 +835,14 @@ eth_stats_reset(struct rte_eth_dev *dev)
> return 0;
> }
>
> +static int eth_mtu_set(struct rte_eth_dev *dev, uint16_t mtu)
Please follow coding convention to have return type in a separate line:
static int
eth_mtu_set(struct rte_eth_dev *dev, uint16_t mtu)
{
> +{
> + PMD_LOG(INFO, "mtu set %s %u\n", dev->device->name, mtu);
Can you please move the log after variable declerations. And can be good
to capitilise MTU in the log.
> + struct pmd_internals *internals = dev->data->dev_private;
> + internals->is_mtu_set = 1;
> + return 0;
> +}
> +
> static inline void
> infinite_rx_ring_free(struct rte_ring *pkts)
> {
> @@ -1004,6 +1040,7 @@ static const struct eth_dev_ops ops = {
> .link_update = eth_link_update,
> .stats_get = eth_stats_get,
> .stats_reset = eth_stats_reset,
> + .mtu_set = eth_mtu_set,
> };
>
> static int
> @@ -1233,6 +1270,7 @@ pmd_init_internals(struct rte_vdev_device *vdev,
> .addr_bytes = { 0x02, 0x70, 0x63, 0x61, 0x70, iface_idx++ }
> };
> (*internals)->phy_mac = 0;
> + (*internals)->is_mtu_set = 0;
> data = (*eth_dev)->data;
> data->nb_rx_queues = (uint16_t)nb_rx_queues;
> data->nb_tx_queues = (uint16_t)nb_tx_queues;
^ permalink raw reply [relevance 0%]
* RE: [PATCH v2] sched: enable CMAN at runtime
2022-05-30 11:19 3% ` Dumitrescu, Cristian
@ 2022-05-30 14:03 4% ` Danilewicz, MarcinX
2022-06-02 9:57 3% ` Danilewicz, MarcinX
1 sibling, 0 replies; 200+ results
From: Danilewicz, MarcinX @ 2022-05-30 14:03 UTC (permalink / raw)
To: Dumitrescu, Cristian, dev, Singh, Jasvinder; +Cc: Ajmera, Megha
Hi Cristian,
> Can you please explain why you need to add the new
> RTE_SCHED_CMAN_NONE value to this enumeration and what is the ABI
> breakage that you are trying to avoid?
>
> The library expects the struct rte_sched_subport_params:: cman_params to
> be NULL when the CMAN is disabled, why is this not enough to detect that
> CMAN is disabled? I suggest to keep the current approach.
Well, that above was just another approach. I'll have look to follow your advice, because there should be a third case when no RED or PIR config was found in files.
So I used third enum to detect this case, like here:
> + else if (params->cman_params->cman_mode ==
> RTE_SCHED_CMAN_NONE)
> + return 1;
Also I got this advice to move RTE_SCHED_CMAN_NONE to the bottom to remove ABI warnings, because structure in header file has changed without change in map files (?) for that?
Here is some more detailed log with errors:
1 data member change:
type of 'rte_sched_cman_params* rte_sched_subport_params::cman_params' changed:
in pointed to type 'struct rte_sched_cman_params' at rte_sched.h:166:1:
type size hasn't changed
1 data member change:
type of 'rte_sched_cman_mode rte_sched_cman_params::cman_mode' changed:
type size hasn't changed
1 enumerator insertion:
'rte_sched_cman_mode::RTE_SCHED_CMAN_NONE' value '0'
2 enumerator changes:
'rte_sched_cman_mode::RTE_SCHED_CMAN_RED' from value '0' to '1' at rte_sched.h:128:1
'rte_sched_cman_mode::RTE_SCHED_CMAN_PIE' from value '1' to '2' at rte_sched.h:128:1
Error: ABI issue reported for 'abidiff --suppr devtools/libabigail.abignore --no-added-syms --headers-dir1 reference/usr/local/include --headers-dir2 install/usr/local/include reference/dump/librte_sched.dump install/dump/librte_sched.dump'
ABIDIFF_ABI_CHANGE, this change requires a review (abidiff flagged this as a potential issue).
Kind Regards,
/Marcin
--------------------------------------------------------------
Intel Research and Development Ireland Limited
Registered in Ireland
Registered Office: Collinstown Industrial Park, Leixlip, County Kildare
Registered Number: 308263
This e-mail and any attachments may contain confidential material for the sole
use of the intended recipient(s). Any review or distribution by others is
strictly prohibited. If you are not the intended recipient, please contact the
sender and delete all copies.
^ permalink raw reply [relevance 4%]
* [dpdk-dev] [RFC PATCH] ethdev: support congestion management
@ 2022-05-30 13:15 2% jerinj
2022-05-30 19:43 0% ` Ajit Khaparde
` (2 more replies)
0 siblings, 3 replies; 200+ results
From: jerinj @ 2022-05-30 13:15 UTC (permalink / raw)
To: dev, Ferruh Yigit, Thomas Monjalon, Andrew Rybchenko
Cc: ajit.khaparde, aboyer, beilei.xing, bruce.richardson, chas3,
chenbo.xia, ciara.loftus, dsinghrawat, ed.czeck, evgenys, grive,
g.singh, zhouguoyang, haiyue.wang, hkalra, heinrich.kuhn,
hemant.agrawal, hyonkim, igorch, irusskikh, jgrajcia,
jasvinder.singh, jianwang, jiawenwu, jingjing.wu, johndale,
john.miller, linville, keith.wiles, kirankumark, oulijun, lironh,
longli, mw, spinler, matan, matt.peters, maxime.coquelin, mk,
humin29, pnalla, ndabilpuram, qiming.yang, qi.z.zhang, radhac,
rahul.lakkireddy, rmody, rosen.xu, sachin.saxena, skoteshwar,
shshaikh, shaibran, shepard.siegel, asomalap, somnath.kotur,
sthemmin, steven.webster, skori, mtetsuyah, vburru, viacheslavo,
xiao.w.wang, cloud.wangxiaoyun, yisen.zhuang, yongwang,
xuanziyang2, cristian.dumitrescu, Jerin Jacob
From: Jerin Jacob <jerinj@marvell.com>
NIC HW controllers often come with congestion management support on
various HW objects such as Rx queue depth or mempool queue depth.
Also, it can support various modes of operation such as RED
(Random early discard), WRED etc on those HW objects.
This patch adds a framework to express such modes(enum rte_cman_mode)
and introduce (enum rte_eth_cman_obj) to enumerate the different
objects where the modes can operate on.
This patch adds RTE_CMAN_RED mode of operation and
RTE_ETH_CMAN_OBJ_RX_QUEUE, RTE_ETH_CMAN_OBJ_RX_QUEUE_MEMPOOL object.
Introduced reserved fields in configuration structure
backed by rte_eth_cman_config_init() to add new configuration
parameters without ABI breakage.
Added rte_eth_cman_info_get() API to get the information such as
supported modes and objects.
Added rte_eth_cman_config_init(), rte_eth_cman_config_set() APIs
to configure congestion management on those object with associated mode.
Finally, Added rte_eth_cman_config_get() API to retrieve the
applied configuration.
Signed-off-by: Jerin Jacob <jerinj@marvell.com>
---
doc/guides/nics/features.rst | 12 +++
doc/guides/nics/features/default.ini | 1 +
lib/eal/include/meson.build | 1 +
lib/eal/include/rte_cman.h | 51 ++++++++++
lib/ethdev/rte_ethdev.h | 145 +++++++++++++++++++++++++++
5 files changed, 210 insertions(+)
create mode 100644 lib/eal/include/rte_cman.h
diff --git a/doc/guides/nics/features.rst b/doc/guides/nics/features.rst
index 21bedb743f..ffcc2bcc92 100644
--- a/doc/guides/nics/features.rst
+++ b/doc/guides/nics/features.rst
@@ -727,6 +727,18 @@ Supports configuring per-queue stat counter mapping.
``rte_eth_dev_set_tx_queue_stats_mapping()``.
+.. _nic_features_congestion_management
+
+Congestion management
+---------------------
+
+Supports congestion management.
+
+* **[implements] eth_dev_ops**: ``cman_info_get``, ``cman_config_set``, ``cman_config_get``.
+* **[related] API**: ``rte_eth_cman_info_get()``, ``rte_eth_cman_config_init()``,
+ ``rte_eth_cman_config_set()``, ``rte_eth_cman_config_get()``.
+
+
.. _nic_features_fw_version:
FW version
diff --git a/doc/guides/nics/features/default.ini b/doc/guides/nics/features/default.ini
index b1d18ac62c..060497e41f 100644
--- a/doc/guides/nics/features/default.ini
+++ b/doc/guides/nics/features/default.ini
@@ -60,6 +60,7 @@ Tx descriptor status =
Basic stats =
Extended stats =
Stats per queue =
+Congestion management =
FW version =
EEPROM dump =
Module EEPROM dump =
diff --git a/lib/eal/include/meson.build b/lib/eal/include/meson.build
index 9700494816..40e31e0e6d 100644
--- a/lib/eal/include/meson.build
+++ b/lib/eal/include/meson.build
@@ -10,6 +10,7 @@ headers += files(
'rte_branch_prediction.h',
'rte_bus.h',
'rte_class.h',
+ 'rte_cman.h',
'rte_common.h',
'rte_compat.h',
'rte_debug.h',
diff --git a/lib/eal/include/rte_cman.h b/lib/eal/include/rte_cman.h
new file mode 100644
index 0000000000..e6dad2ebf7
--- /dev/null
+++ b/lib/eal/include/rte_cman.h
@@ -0,0 +1,51 @@
+/* SPDX-License-Identifier: BSD-3-Clause
+ * Copyright(C) 2022 Marvell International Ltd.
+ */
+
+#ifndef RTE_CMAN_H
+#define RTE_CMAN_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include <rte_bitops.h>
+
+/**
+ * @file
+ * Congestion management related parameters for DPDK.
+ */
+
+/** Congestion management modes */
+enum rte_cman_mode {
+ /** Congestion based on Random Early Detection.
+ *
+ * https://en.wikipedia.org/wiki/Random_early_detection
+ * @see struct rte_cman_red_params
+ */
+ RTE_CMAN_RED = RTE_BIT64(0),
+};
+
+/**
+ * RED based congestion management configuration parameters.
+ */
+struct rte_cman_red_params {
+ /**< Minimum threshold (min_th) value
+ *
+ * Value expressed as percentage. Value must be in 0 to 100(inclusive).
+ */
+ uint8_t min_th;
+ /**< Maximum threshold (max_th) value
+ *
+ * Value expressed as percentage. Value must be in 0 to 100(inclusive).
+ */
+ uint8_t max_th;
+ /** Inverse of packet marking probability maximum value (maxp = 1 / maxp_inv) */
+ uint16_t maxp_inv;
+};
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* RTE_CMAN_H */
diff --git a/lib/ethdev/rte_ethdev.h b/lib/ethdev/rte_ethdev.h
index 04cff8ee10..7c8718bb2e 100644
--- a/lib/ethdev/rte_ethdev.h
+++ b/lib/ethdev/rte_ethdev.h
@@ -160,6 +160,7 @@ extern "C" {
#define RTE_ETHDEV_DEBUG_TX
#endif
+#include <rte_cman.h>
#include <rte_compat.h>
#include <rte_log.h>
#include <rte_interrupts.h>
@@ -5452,6 +5453,150 @@ typedef struct {
__rte_experimental
int rte_eth_dev_priv_dump(uint16_t port_id, FILE *file);
+/* Congestion management */
+
+/** Enumerate list of ethdev congestion management objects */
+enum rte_eth_cman_obj {
+ /** Congestion management based on Rx queue depth */
+ RTE_ETH_CMAN_OBJ_RX_QUEUE = RTE_BIT64(0),
+ /** Congestion management based on mempool depth associated with Rx queue
+ * @see rte_eth_rx_queue_setup()
+ */
+ RTE_ETH_CMAN_OBJ_RX_QUEUE_MEMPOOL = RTE_BIT64(1),
+};
+
+/**
+ * @warning
+ * @b EXPERIMENTAL: this API may change, or be removed, without prior notice
+ *
+ * A structure used to retrieve information of ethdev congestion management.
+ */
+struct rte_eth_cman_info {
+ /** Set of supported congestion management modes
+ * @see enum rte_cman_mode
+ */
+ uint64_t modes_supported;
+ /** Set of supported congestion management objects
+ * @see enum rte_eth_cman_obj
+ */
+ uint64_t objs_supported;
+ /** Reserved for future fields */
+ uint8_t rsvd[64];
+};
+
+/**
+ * @warning
+ * @b EXPERIMENTAL: this API may change, or be removed, without prior notice
+ *
+ * A structure used to configure the ethdev congestion management.
+ */
+struct rte_eth_cman_config {
+ /** Congestion management object */
+ enum rte_eth_cman_obj obj;
+ /** Congestion management mode */
+ enum rte_cman_mode mode;
+ union {
+ /** Rx queue to configure congestion management.
+ *
+ * Valid when object is RTE_ETH_CMAN_OBJ_RX_QUEUE or
+ * RTE_ETH_CMAN_OBJ_RX_QUEUE_MEMPOOL.
+ */
+ uint16_t rx_queue;
+ /** Reserved for future fields */
+ uint8_t rsvd_obj_params[16];
+ } obj_param;
+ union {
+ /** RED configuration parameters.
+ *
+ * Valid when mode is RTE_CMAN_RED.
+ */
+ struct rte_cman_red_params red;
+ /** Reserved for future fields */
+ uint8_t rsvd_mode_params[64];
+ } mode_param;
+};
+
+/**
+ * @warning
+ * @b EXPERIMENTAL: this API may change, or be removed, without prior notice
+ *
+ * Retrieve the information for ethdev congestion management
+ *
+ * @param port_id
+ * The port identifier of the Ethernet device.
+ * @param info
+ * A pointer to a structure of type *rte_eth_cman_info* to be filled with
+ * the information about congestion management.
+ * @return
+ * - (0) if successful.
+ * - (-ENOTSUP) if support for cman_info_get does not exist.
+ * - (-ENODEV) if *port_id* invalid.
+ * - (-EINVAL) if bad parameter.
+ */
+__rte_experimental
+int rte_eth_cman_info_get(uint16_t port_id, struct rte_eth_cman_info *info);
+
+/**
+ * @warning
+ * @b EXPERIMENTAL: this API may change, or be removed, without prior notice
+ *
+ * Initialize the ethdev congestion management configuration structure with default values.
+ *
+ * @param port_id
+ * The port identifier of the Ethernet device.
+ * @param config
+ * A pointer to a structure of type *rte_eth_cman_config* to be initialized
+ * with default value.
+ * @return
+ * - (0) if successful.
+ * - (-ENODEV) if *port_id* invalid.
+ * - (-EINVAL) if bad parameter.
+ */
+__rte_experimental
+int rte_eth_cman_config_init(uint16_t port_id, struct rte_eth_cman_config *config);
+
+/**
+ * @warning
+ * @b EXPERIMENTAL: this API may change, or be removed, without prior notice
+ *
+ * Configure ethdev congestion management
+ *
+ * @param port_id
+ * The port identifier of the Ethernet device.
+ * @param config
+ * A pointer to a structure of type *rte_eth_cman_config* to be configured.
+ * @return
+ * - (0) if successful.
+ * - (-ENOTSUP) if support for cman_config_set does not exist.
+ * - (-ENODEV) if *port_id* invalid.
+ * - (-EINVAL) if bad parameter.
+ */
+__rte_experimental
+int rte_eth_cman_config_set(uint16_t port_id, struct rte_eth_cman_config *config);
+
+/**
+ * @warning
+ * @b EXPERIMENTAL: this API may change, or be removed, without prior notice
+ *
+ * Retrieve the applied ethdev congestion management parameters for the given port.
+ *
+ * @param port_id
+ * The port identifier of the Ethernet device.
+ * @param config
+ * A pointer to a structure of type *rte_eth_cman_config* to retrieve
+ * congestion management parameters for the given object.
+ * Application must fill all parameters except mode_param parameter in
+ * struct rte_eth_cman_config.
+ *
+ * @return
+ * - (0) if successful.
+ * - (-ENOTSUP) if support for cman_config_get does not exist.
+ * - (-ENODEV) if *port_id* invalid.
+ * - (-EINVAL) if bad parameter.
+ */
+__rte_experimental
+int rte_eth_cman_config_get(uint16_t port_id, struct rte_eth_cman_config *config);
+
#include <rte_ethdev_core.h>
/**
--
2.36.1
^ permalink raw reply [relevance 2%]
* RE: [PATCH v2] sched: enable CMAN at runtime
2022-05-12 13:10 4% ` [PATCH v2] " Marcin Danilewicz
2022-05-30 11:19 3% ` Dumitrescu, Cristian
@ 2022-05-30 11:35 0% ` Dumitrescu, Cristian
2022-06-07 10:40 0% ` Danilewicz, MarcinX
2022-06-08 9:42 1% ` [PATCH v3] " Marcin Danilewicz
2 siblings, 1 reply; 200+ results
From: Dumitrescu, Cristian @ 2022-05-30 11:35 UTC (permalink / raw)
To: Danilewicz, MarcinX, dev, Singh, Jasvinder; +Cc: Ajmera, Megha, Liu, Yu Y
Hi Marcin,
Comments inline below.
> -----Original Message-----
> From: Danilewicz, MarcinX <marcinx.danilewicz@intel.com>
> Sent: Thursday, May 12, 2022 2:11 PM
> To: dev@dpdk.org; Singh, Jasvinder <jasvinder.singh@intel.com>;
> Dumitrescu, Cristian <cristian.dumitrescu@intel.com>
> Cc: Ajmera, Megha <megha.ajmera@intel.com>
> Subject: [PATCH v2] sched: enable CMAN at runtime
>
> Added changes to enable CMAN (RED or PIE) at init
> from profile configuration file.
>
> By default CMAN code is enable but not in use, when
> there is no RED or PIE profile configured.
>
> Log: v2 change in rte_sched.h to avoid ABI breakage.
>
> Signed-off-by: Marcin Danilewicz <marcinx.danilewicz@intel.com>
> ---
> config/rte_config.h | 3 -
> drivers/net/softnic/rte_eth_softnic_tm.c | 12 --
> examples/ip_pipeline/tmgr.c | 4 -
> examples/qos_sched/cfg_file.c | 14 +--
> examples/qos_sched/cfg_file.h | 2 -
> examples/qos_sched/init.c | 4 -
> examples/qos_sched/main.h | 2 -
> examples/qos_sched/profile.cfg | 130 ++++++++++-----------
> examples/qos_sched/profile_pie.cfg | 142 ++++++++++++++++++++++
> examples/qos_sched/profile_red.cfg | 143 +++++++++++++++++++++++
> lib/sched/rte_sched.c | 53 ++-------
> lib/sched/rte_sched.h | 2 +
> 12 files changed, 371 insertions(+), 140 deletions(-)
> create mode 100644 examples/qos_sched/profile_pie.cfg
> create mode 100644 examples/qos_sched/profile_red.cfg
>
<snip>
> diff --git a/lib/sched/rte_sched.c b/lib/sched/rte_sched.c
> index ec74bee939..db14934832 100644
> --- a/lib/sched/rte_sched.c
> +++ b/lib/sched/rte_sched.c
<snip>
> -#ifdef RTE_SCHED_CMAN
> static int
> rte_sched_red_config(struct rte_sched_port *port,
> struct rte_sched_subport *s,
> @@ -1161,9 +1156,11 @@ rte_sched_cman_config(struct rte_sched_port
> *port,
> else if (params->cman_params->cman_mode ==
> RTE_SCHED_CMAN_PIE)
> return rte_sched_pie_config(port, s, params, n_subports);
>
> + else if (params->cman_params->cman_mode ==
> RTE_SCHED_CMAN_NONE)
> + return 1;
> +
> return -EINVAL;
> }
> -#endif
Yes, you do need to remove the #ifdef ... #endif around this function, but no, you don't need to change this function, as it is only called when params->cman_params != NULL, i.e. CMAN is enabled. As mentioned before, there is no need to add the CMAN_NONE to the enumeration, as the CMAN_NONE value is equivalent to params->cman_params being set to NULL.
>
> int
> rte_sched_subport_config(struct rte_sched_port *port,
> @@ -1254,19 +1251,20 @@ rte_sched_subport_config(struct
> rte_sched_port *port,
> s->n_pipe_profiles = params->n_pipe_profiles;
> s->n_max_pipe_profiles = params->n_max_pipe_profiles;
>
> -#ifdef RTE_SCHED_CMAN
> + s->cman_enabled = false;
> +
> if (params->cman_params != NULL) {
> - s->cman_enabled = true;
> status = rte_sched_cman_config(port, s, params,
> n_subports);
> if (status) {
> - RTE_LOG(NOTICE, SCHED,
> - "%s: CMAN configuration fails\n",
> __func__);
> - return status;
> + if (status != 1) {
> + RTE_LOG(NOTICE, SCHED,
> + "%s: CMAN configuration
> fails\n", __func__);
> + return status;
> + }
> + } else {
> + s->cman_enabled = true;
> }
> - } else {
> - s->cman_enabled = false;
> }
> -#endif
>
Same comment here: yes, remove the #ifdef ... #endif, but no need to change this code fragment, as it sets correctly the s->cman_enabled flag, which is then the only flag used by the rest of the code. Again, no need to have a CMAN_NONE in the enumeration, as the same is achieved by setting params->cman_params to NULL.
> /* Scheduling loop detection */
> s->pipe_loop = RTE_SCHED_PIPE_INVALID;
> @@ -1825,14 +1823,10 @@
> rte_sched_port_update_queue_stats_on_drop(struct rte_sched_subport
> *subport,
>
> qe->stats.n_pkts_dropped += 1;
> qe->stats.n_bytes_dropped += pkt_len;
> -#ifdef RTE_SCHED_CMAN
> if (subport->cman_enabled)
> qe->stats.n_pkts_cman_dropped += n_pkts_cman_dropped;
> -#endif
> }
Please don't forget to remove the __rte_unused attribute for the n_pkts_cman_dropped in the function parameters, right?
<snip>
Regards,
Cristian
^ permalink raw reply [relevance 0%]
* RE: [PATCH v2] sched: enable CMAN at runtime
2022-05-12 13:10 4% ` [PATCH v2] " Marcin Danilewicz
@ 2022-05-30 11:19 3% ` Dumitrescu, Cristian
2022-05-30 14:03 4% ` Danilewicz, MarcinX
2022-06-02 9:57 3% ` Danilewicz, MarcinX
2022-05-30 11:35 0% ` Dumitrescu, Cristian
2022-06-08 9:42 1% ` [PATCH v3] " Marcin Danilewicz
2 siblings, 2 replies; 200+ results
From: Dumitrescu, Cristian @ 2022-05-30 11:19 UTC (permalink / raw)
To: Danilewicz, MarcinX, dev, Singh, Jasvinder; +Cc: Ajmera, Megha
> -----Original Message-----
> From: Danilewicz, MarcinX <marcinx.danilewicz@intel.com>
> Sent: Thursday, May 12, 2022 2:11 PM
> To: dev@dpdk.org; Singh, Jasvinder <jasvinder.singh@intel.com>;
> Dumitrescu, Cristian <cristian.dumitrescu@intel.com>
> Cc: Ajmera, Megha <megha.ajmera@intel.com>
> Subject: [PATCH v2] sched: enable CMAN at runtime
>
> Added changes to enable CMAN (RED or PIE) at init
> from profile configuration file.
>
> By default CMAN code is enable but not in use, when
> there is no RED or PIE profile configured.
>
> Log: v2 change in rte_sched.h to avoid ABI breakage.
>
> Signed-off-by: Marcin Danilewicz <marcinx.danilewicz@intel.com>
> ---
> config/rte_config.h | 3 -
> drivers/net/softnic/rte_eth_softnic_tm.c | 12 --
> examples/ip_pipeline/tmgr.c | 4 -
> examples/qos_sched/cfg_file.c | 14 +--
> examples/qos_sched/cfg_file.h | 2 -
> examples/qos_sched/init.c | 4 -
> examples/qos_sched/main.h | 2 -
> examples/qos_sched/profile.cfg | 130 ++++++++++-----------
> examples/qos_sched/profile_pie.cfg | 142 ++++++++++++++++++++++
> examples/qos_sched/profile_red.cfg | 143 +++++++++++++++++++++++
> lib/sched/rte_sched.c | 53 ++-------
> lib/sched/rte_sched.h | 2 +
> 12 files changed, 371 insertions(+), 140 deletions(-)
> create mode 100644 examples/qos_sched/profile_pie.cfg
> create mode 100644 examples/qos_sched/profile_red.cfg
>
> diff --git a/lib/sched/rte_sched.h b/lib/sched/rte_sched.h
> index 5ece64e527..82aa73ff5b 100644
> --- a/lib/sched/rte_sched.h
> +++ b/lib/sched/rte_sched.h
> @@ -128,6 +128,8 @@ extern "C" {
> enum rte_sched_cman_mode {
> RTE_SCHED_CMAN_RED, /**< Random Early Detection (RED) */
> RTE_SCHED_CMAN_PIE, /**< Proportional Integral Controller
> Enhanced (PIE) */
> + /* New enum RTE_SCHED_CMAN_NONE added at the end to avoid
> ABI breakage */
> + RTE_SCHED_CMAN_NONE, /**< no RED|PIE cfg available */
> };
Can you please explain why you need to add the new RTE_SCHED_CMAN_NONE value to this enumeration and what is the ABI breakage that you are trying to avoid?
The library expects the struct rte_sched_subport_params:: cman_params to be NULL when the CMAN is disabled, why is this not enough to detect that CMAN is disabled? I suggest to keep the current approach.
>
> /*
> --
> 2.25.1
^ permalink raw reply [relevance 3%]
* [PATCH v3] pcap: support MTU set
@ 2022-05-30 10:36 3% ` Ido Goshen
2022-05-30 18:05 0% ` Ferruh Yigit
2022-06-06 16:21 3% ` [PATCH v4] " Ido Goshen
2022-06-07 6:27 3% ` [PATCH v5] pcap: support MTU set for linux interafces Ido Goshen
2 siblings, 1 reply; 200+ results
From: Ido Goshen @ 2022-05-30 10:36 UTC (permalink / raw)
To: ferruh.yigit, stephen; +Cc: dev, Ido Goshen
Support rte_eth_dev_set_mtu by pcap vdevs
Enforce mtu on rx/tx
Bugzilla ID: 961
Signed-off-by: Ido Goshen <ido@cgstowernetworks.com>
---
v3:
Preserve pcap behavior to support max size packets by default
alternative to v2 in order to limit the code change to pcap only and
avoid abi change.
Enforce mtu only in case rte_eth_dev_set_mtu was explicitly called.
v2:
Preserve pcap behavior to support max size packets by default.
---
drivers/net/pcap/pcap_ethdev.c | 44 +++++++++++++++++++++++++++++++---
1 file changed, 41 insertions(+), 3 deletions(-)
diff --git a/drivers/net/pcap/pcap_ethdev.c b/drivers/net/pcap/pcap_ethdev.c
index ec29fd6bc5..2e7fff9579 100644
--- a/drivers/net/pcap/pcap_ethdev.c
+++ b/drivers/net/pcap/pcap_ethdev.c
@@ -93,6 +93,7 @@ struct pmd_internals {
int single_iface;
int phy_mac;
unsigned int infinite_rx;
+ int is_mtu_set;
};
struct pmd_process_private {
@@ -278,11 +279,13 @@ eth_pcap_rx(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
const u_char *packet;
struct rte_mbuf *mbuf;
struct pcap_rx_queue *pcap_q = queue;
+ struct rte_eth_dev *dev = &rte_eth_devices[pcap_q->port_id];
+ struct pmd_internals *internals = dev->data->dev_private;
uint16_t num_rx = 0;
uint32_t rx_bytes = 0;
pcap_t *pcap;
- pp = rte_eth_devices[pcap_q->port_id].process_private;
+ pp = dev->process_private;
pcap = pp->rx_pcap[pcap_q->queue_id];
if (unlikely(pcap == NULL || nb_pkts == 0))
@@ -303,6 +306,13 @@ eth_pcap_rx(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
break;
}
+ if (unlikely(header.caplen > dev->data->mtu) &&
+ internals->is_mtu_set) {
+ pcap_q->rx_stat.err_pkts++;
+ rte_pktmbuf_free(mbuf);
+ break;
+ }
+
if (header.caplen <= rte_pktmbuf_tailroom(mbuf)) {
/* pcap packet will fit in the mbuf, can copy it */
rte_memcpy(rte_pktmbuf_mtod(mbuf, void *), packet,
@@ -378,6 +388,8 @@ eth_pcap_tx_dumper(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
struct rte_mbuf *mbuf;
struct pmd_process_private *pp;
struct pcap_tx_queue *dumper_q = queue;
+ struct rte_eth_dev *dev = &rte_eth_devices[dumper_q->port_id];
+ struct pmd_internals *internals = dev->data->dev_private;
uint16_t num_tx = 0;
uint32_t tx_bytes = 0;
struct pcap_pkthdr header;
@@ -385,7 +397,7 @@ eth_pcap_tx_dumper(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
unsigned char temp_data[RTE_ETH_PCAP_SNAPLEN];
size_t len, caplen;
- pp = rte_eth_devices[dumper_q->port_id].process_private;
+ pp = dev->process_private;
dumper = pp->tx_dumper[dumper_q->queue_id];
if (dumper == NULL || nb_pkts == 0)
@@ -396,6 +408,13 @@ eth_pcap_tx_dumper(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
for (i = 0; i < nb_pkts; i++) {
mbuf = bufs[i];
len = caplen = rte_pktmbuf_pkt_len(mbuf);
+
+ if (unlikely(len > dev->data->mtu) &&
+ internals->is_mtu_set) {
+ rte_pktmbuf_free(mbuf);
+ continue;
+ }
+
if (unlikely(!rte_pktmbuf_is_contiguous(mbuf) &&
len > sizeof(temp_data))) {
caplen = sizeof(temp_data);
@@ -464,13 +483,15 @@ eth_pcap_tx(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
struct rte_mbuf *mbuf;
struct pmd_process_private *pp;
struct pcap_tx_queue *tx_queue = queue;
+ struct rte_eth_dev *dev = &rte_eth_devices[tx_queue->port_id];
+ struct pmd_internals *internals = dev->data->dev_private;
uint16_t num_tx = 0;
uint32_t tx_bytes = 0;
pcap_t *pcap;
unsigned char temp_data[RTE_ETH_PCAP_SNAPLEN];
size_t len;
- pp = rte_eth_devices[tx_queue->port_id].process_private;
+ pp = dev->process_private;
pcap = pp->tx_pcap[tx_queue->queue_id];
if (unlikely(nb_pkts == 0 || pcap == NULL))
@@ -479,6 +500,13 @@ eth_pcap_tx(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
for (i = 0; i < nb_pkts; i++) {
mbuf = bufs[i];
len = rte_pktmbuf_pkt_len(mbuf);
+
+ if (unlikely(len > dev->data->mtu) &&
+ internals->is_mtu_set) {
+ rte_pktmbuf_free(mbuf);
+ continue;
+ }
+
if (unlikely(!rte_pktmbuf_is_contiguous(mbuf) &&
len > sizeof(temp_data))) {
PMD_LOG(ERR,
@@ -807,6 +835,14 @@ eth_stats_reset(struct rte_eth_dev *dev)
return 0;
}
+static int eth_mtu_set(struct rte_eth_dev *dev, uint16_t mtu)
+{
+ PMD_LOG(INFO, "mtu set %s %u\n", dev->device->name, mtu);
+ struct pmd_internals *internals = dev->data->dev_private;
+ internals->is_mtu_set = 1;
+ return 0;
+}
+
static inline void
infinite_rx_ring_free(struct rte_ring *pkts)
{
@@ -1004,6 +1040,7 @@ static const struct eth_dev_ops ops = {
.link_update = eth_link_update,
.stats_get = eth_stats_get,
.stats_reset = eth_stats_reset,
+ .mtu_set = eth_mtu_set,
};
static int
@@ -1233,6 +1270,7 @@ pmd_init_internals(struct rte_vdev_device *vdev,
.addr_bytes = { 0x02, 0x70, 0x63, 0x61, 0x70, iface_idx++ }
};
(*internals)->phy_mac = 0;
+ (*internals)->is_mtu_set = 0;
data = (*eth_dev)->data;
data->nb_rx_queues = (uint16_t)nb_rx_queues;
data->nb_tx_queues = (uint16_t)nb_tx_queues;
--
2.17.1
^ permalink raw reply [relevance 3%]
* [PATCH v2 1/2] lpm: add const to lpm arg of rte_lpm_lookup
@ 2022-05-27 18:18 3% ` Stanislaw Kardach
2022-05-30 18:24 3% ` [PATCH v3 " Stanislaw Kardach
1 sibling, 1 reply; 200+ results
From: Stanislaw Kardach @ 2022-05-27 18:18 UTC (permalink / raw)
To: Vladimir Medvedkin
Cc: Stanislaw Kardach, dev, Frank Zhao, Sam Grove, mw, upstream
All other rte_lpm_lookup* functions take lpm argument as a const. As the
basic rte_lpm_lookup() performs the same function, it should also do
that.
As this function is inline, no API/ABI change happens.
Signed-off-by: Stanislaw Kardach <kda@semihalf.com>
---
lib/lpm/rte_lpm.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/lpm/rte_lpm.h b/lib/lpm/rte_lpm.h
index eb91960e81..1cf863a146 100644
--- a/lib/lpm/rte_lpm.h
+++ b/lib/lpm/rte_lpm.h
@@ -279,7 +279,7 @@ rte_lpm_delete_all(struct rte_lpm *lpm);
* -EINVAL for incorrect arguments, -ENOENT on lookup miss, 0 on lookup hit
*/
static inline int
-rte_lpm_lookup(struct rte_lpm *lpm, uint32_t ip, uint32_t *next_hop)
+rte_lpm_lookup(const struct rte_lpm *lpm, uint32_t ip, uint32_t *next_hop)
{
unsigned tbl24_index = (ip >> 8);
uint32_t tbl_entry;
--
2.30.2
^ permalink raw reply [relevance 3%]
* Re: [PATCH 1/1] lpm: add a scalar version of lookupx4 function
@ 2022-05-27 13:16 3% ` Medvedkin, Vladimir
0 siblings, 0 replies; 200+ results
From: Medvedkin, Vladimir @ 2022-05-27 13:16 UTC (permalink / raw)
To: Stanisław Kardach
Cc: Michal Mazurek, dev, Frank Zhao, Sam Grove, Marcin Wojtas,
upstream, Bruce Richardson
Hi Stanislaw,
On 27/05/2022 12:16, Stanisław Kardach wrote:
> On Tue, May 24, 2022 at 6:28 PM Stanisław Kardach <kda@semihalf.com> wrote:
> <snip>
>> That said I wonder why do we have different const requirements for
>> rte_lpm_lookup() and rte_lpm_lookupx4():
>> static inline int rte_lpm_lookup(struct rte_lpm *lpm, uint32_t ip,
>> uint32_t *next_hop)
>> static inline void rte_lpm_lookupx4(const struct rte_lpm *lpm, xmm_t
>> ip, uint32_t hop[4], uint32_t defv);
>> I think both should be const.
>>
> To re-iterate the question, should I also post a patch for changing
> rte_lpm_lookup() to add "const" to "struct rte_lpm *lpm" argument?
> rte_lpm_lookup_bulk_func() and rte_lpm_lookupx4() already take lpm as
> const.
> I'm pushing because otherwise I get a const discard warning in the
> scalar version of rte_lpm_lookupx4() utilizing rte_lpm_lookup().
Since these are inline functions, there will be no problems with the
ABI/API, so please add const to the *lpm argument.
Thanks!
>
> Best Regards,
> Stanislaw Kardach
--
Regards,
Vladimir
^ permalink raw reply [relevance 3%]
* RE: [PATCH v5 1/4] lib/ethdev: introduce protocol type based buffer split
2022-05-19 14:40 0% ` Ding, Xuan
@ 2022-05-26 14:58 0% ` Ding, Xuan
0 siblings, 0 replies; 200+ results
From: Ding, Xuan @ 2022-05-26 14:58 UTC (permalink / raw)
To: Ding, Xuan, Thomas Monjalon, Wang, YuanX, Wu, WenxuanX
Cc: andrew.rybchenko, Li, Xiaoyun, ferruh.yigit, Singh, Aman Deep,
dev, Zhang, Yuying, Zhang, Qi Z, jerinjacobk, stephen, mb,
viacheslavo, Yu, Ping
Hi,
> -----Original Message-----
> From: Ding, Xuan <xuan.ding@intel.com>
> Sent: Thursday, May 19, 2022 10:40 PM
> To: Thomas Monjalon <thomas@monjalon.net>; Wang, YuanX
> <yuanx.wang@intel.com>; Wu, WenxuanX <wenxuanx.wu@intel.com>
> Cc: andrew.rybchenko@oktetlabs.ru; Li, Xiaoyun <xiaoyun.li@intel.com>;
> ferruh.yigit@xilinx.com; Singh, Aman Deep <aman.deep.singh@intel.com>;
> dev@dpdk.org; Zhang, Yuying <yuying.zhang@intel.com>; Zhang, Qi Z
> <qi.z.zhang@intel.com>; jerinjacobk@gmail.com;
> stephen@networkplumber.org; mb@smartsharesystems.com;
> viacheslavo@nvidia.com; Yu, Ping <ping.yu@intel.com>
> Subject: RE: [PATCH v5 1/4] lib/ethdev: introduce protocol type based buffer
> split
>
> Hi Thomas,
>
> > -----Original Message-----
> > From: Thomas Monjalon <thomas@monjalon.net>
> > Sent: Wednesday, May 18, 2022 5:12 AM
> > To: Ding, Xuan <xuan.ding@intel.com>; Wang, YuanX
> > <yuanx.wang@intel.com>; Wu, WenxuanX <wenxuanx.wu@intel.com>
> > Cc: andrew.rybchenko@oktetlabs.ru; Li, Xiaoyun <xiaoyun.li@intel.com>;
> > ferruh.yigit@xilinx.com; Singh, Aman Deep <aman.deep.singh@intel.com>;
> > dev@dpdk.org; Zhang, Yuying <yuying.zhang@intel.com>; Zhang, Qi Z
> > <qi.z.zhang@intel.com>; jerinjacobk@gmail.com;
> > stephen@networkplumber.org; mb@smartsharesystems.com;
> > viacheslavo@nvidia.com; Yu, Ping <ping.yu@intel.com>
> > Subject: Re: [PATCH v5 1/4] lib/ethdev: introduce protocol type based
> > buffer split
> >
> > Hello,
> >
> > It seems you didn't try to address my main comment on v4:
> > "
> > Before doing anything, the first patch of this series should make the
> > current status clearer.
> > Example, this line does not explain what it does:
> > uint16_t split_hdr_size; /**< hdr buf size (header_split
> > enabled).*/ And header_split has been removed in ab3ce1e0c193
> > ("ethdev: remove old offload API")
> >
> > If RTE_ETH_RX_OFFLOAD_HEADER_SPLIT is not needed, let's add a
> comment
> > to start a deprecation.
> > "
>
> Thank you for the detailed review.
>
> First of all, I agree that header split should be deprecated.
> Since it is unrelated with buffer split, I was planning to send the deprecation
> notice in 22.07 sometime later and start the deprecation in 22.11.
>
> If you think it should be the first step, I will send the deprecation notice first.
>
> >
> > Also the comment from Andrew about removing limitation to 2 packets is
> > not addressed.
>
> Secondly, it is said that the protocol based buffer split will divide the packet
> into two segments.
> Because I thought it will only be used in the split between header and
> payload.
>
> In fact, protocol based buffer split can support multi-segment split.
> That is to say, like length-based buffer split, we define a series of protos, as
> the split point of protocol based buffer split. And this series of protos, like
> lengths, indicate the split location.
>
> For example, a packet consists of MAC/IPV4/UDP/payload.
> If we define the buffer split proto with IPV4, and UDP, the packet will be split
> into three segments:
> seg0: MAC and IPV4 header, 34 bytes
> seg1: UDP header, 8 bytes
> seg2: Payload, the actual payload size
>
> What do you think of this design?
>
> >
> > All the part about the protocols capability is missing here.
>
> Yes, I missed the protocols capability with RTE_PTYPE* now.
> I will update the doc with supported protocol capability in v6.
>
> >
> > It is not encouraging.
> >
> > 26/04/2022 13:13, wenxuanx.wu@intel.com:
> > > From: Wenxuan Wu <wenxuanx.wu@intel.com>
> > >
> > > Protocol based buffer split consists of splitting a received packet
> > > into two separate regions based on its content. The split happens
> > > after the packet protocol header and before the packet payload.
> > > Splitting is usually between the packet protocol header that can be
> > > posted to a dedicated buffer and the packet payload that can be
> > > posted to
> > a different buffer.
> > >
> > > Currently, Rx buffer split supports length and offset based packet split.
> > > protocol split is based on buffer split, configuring length of
> > > buffer split is not suitable for NICs that do split based on protocol types.
> >
> > Why? Is it impossible to support length split on Intel NIC?
>
> Yes, our NIC supports split based on protocol types. And I think there are
> other vendors too.
> The existence of tunneling results in the composition of a packet is various.
> Given a changeable length, it is impossible to tell the driver a fixed protocol
> type.
>
> >
> > > Because tunneling makes the conversion from length to protocol type
> > > impossible.
> >
> > This is not a HW issue.
> > I agree on the need but that a different usage than length split.
>
> I think the new usage can solve this problem, so that length split and proto
> split can have the same result.
>
> >
> > > This patch extends the current buffer split to support protocol and
> > > offset based buffer split. A new proto field is introduced in the
> > > rte_eth_rxseg_split structure reserved field to specify header
> > > protocol type. With Rx queue offload
> > RTE_ETH_RX_OFFLOAD_BUFFER_SPLIT
> > > enabled and corresponding protocol type configured. PMD will split
> > > the
> > ingress packets into two separate regions.
> > > Currently, both inner and outer L2/L3/L4 level protocol based buffer
> > > split can be supported.
> > >
> > > For example, let's suppose we configured the Rx queue with the
> > > following segments:
> > > seg0 - pool0, off0=2B
> > > seg1 - pool1, off1=128B
> > >
> > > With protocol split type configured with RTE_PTYPE_L4_UDP. The
> > > packet consists of MAC_IP_UDP_PAYLOAD will be splitted like following:
> > > seg0 - udp header @ RTE_PKTMBUF_HEADROOM + 2 in mbuf from
> pool0
> > > seg1 - payload @ 128 in mbuf from pool1
> >
> > Not clear what is the calculation.
>
> The previous usage of protocol based split is the split between header and
> payload.
> Here for a packet composed of MAC_IP_UDP_PAYLOAD, with protocol split
> type RTE_PTYPE_L4_UDP configured, it means split between the UDP header
> and payload.
> In length configuration, the proto = RTE_PTYPE_L4_UDP means length = 42B.
>
> >
> > > The memory attributes for the split parts may differ either - for
> > > example the mempool0 and mempool1 belong to dpdk memory and
> > external
> > > memory, respectively.
> > >
> > > Signed-off-by: Xuan Ding <xuan.ding@intel.com>
> > > Signed-off-by: Yuan Wang <yuanx.wang@intel.com>
> > > Signed-off-by: Wenxuan Wu <wenxuanx.wu@intel.com>
> > > Reviewed-by: Qi Zhang <qi.z.zhang@intel.com>
> > > ---
> > > lib/ethdev/rte_ethdev.c | 36 +++++++++++++++++++++++++++++-------
> > > lib/ethdev/rte_ethdev.h | 15 ++++++++++++++-
> > > 2 files changed, 43 insertions(+), 8 deletions(-)
> > >
> > > diff --git a/lib/ethdev/rte_ethdev.c b/lib/ethdev/rte_ethdev.c index
> > > 29a3d80466..1a2bc172ab 100644
> > > --- a/lib/ethdev/rte_ethdev.c
> > > +++ b/lib/ethdev/rte_ethdev.c
> > > @@ -1661,6 +1661,7 @@ rte_eth_rx_queue_check_split(const struct
> > rte_eth_rxseg_split *rx_seg,
> > > struct rte_mempool *mpl = rx_seg[seg_idx].mp;
> > > uint32_t length = rx_seg[seg_idx].length;
> > > uint32_t offset = rx_seg[seg_idx].offset;
> > > + uint32_t proto = rx_seg[seg_idx].proto;
> > >
> > > if (mpl == NULL) {
> > > RTE_ETHDEV_LOG(ERR, "null mempool pointer\n");
> > @@ -1694,13
> > > +1695,34 @@ rte_eth_rx_queue_check_split(const struct
> > rte_eth_rxseg_split *rx_seg,
> > > }
> > > offset += seg_idx != 0 ? 0 : RTE_PKTMBUF_HEADROOM;
> > > *mbp_buf_size = rte_pktmbuf_data_room_size(mpl);
> > > - length = length != 0 ? length : *mbp_buf_size;
> > > - if (*mbp_buf_size < length + offset) {
> > > - RTE_ETHDEV_LOG(ERR,
> > > - "%s mbuf_data_room_size %u < %u
> > (segment length=%u + segment offset=%u)\n",
> > > - mpl->name, *mbp_buf_size,
> > > - length + offset, length, offset);
> > > - return -EINVAL;
> > > + if (proto == 0) {
> >
> > Add a comment here, /* split at fixed length */
>
> Thanks for the suggestion, will add it in next version.
>
> >
> > > + length = length != 0 ? length : *mbp_buf_size;
> > > + if (*mbp_buf_size < length + offset) {
> > > + RTE_ETHDEV_LOG(ERR,
> > > + "%s mbuf_data_room_size %u < %u
> > (segment length=%u + segment offset=%u)\n",
> > > + mpl->name, *mbp_buf_size,
> > > + length + offset, length, offset);
> > > + return -EINVAL;
> > > + }
> > > + } else {
> >
> > Add a comment here, /* split after specified protocol header */
>
> Thanks for the suggestion, will add it in next version.
>
> >
> > > + /* Ensure n_seg is 2 in protocol based buffer split. */
> > > + if (n_seg != 2) {
> >
> > (should be a space, not a tab before brace)
>
> Get it.
>
> >
> > Why do you limit the feature to 2 segments only?
>
> Please see the new usage explained above.
>
> >
> > > + RTE_ETHDEV_LOG(ERR, "number of buffer
> > split protocol segments should be 2.\n");
> > > + return -EINVAL;
> > > + }
> > > + /* Length and protocol are exclusive here, so make
> > sure length is 0 in protocol
> > > + based buffer split. */
> > > + if (length != 0) {
> > > + RTE_ETHDEV_LOG(ERR, "segment length
> > should be set to zero in buffer split\n");
> > > + return -EINVAL;
> > > + }
> > > + if (*mbp_buf_size < offset) {
> > > + RTE_ETHDEV_LOG(ERR,
> > > + "%s
> > mbuf_data_room_size %u < %u segment offset)\n",
> > > + mpl->name, *mbp_buf_size,
> > > + offset);
> > > + return -EINVAL;
> > [...]
> > > + * - The proto in the elements defines the split position of received
> packets.
> > > + *
> > > * - If the length in the segment description element is zero
> > > * the actual buffer size will be deduced from the appropriate
> > > * memory pool properties.
> > > @@ -1197,12 +1200,21 @@ struct rte_eth_txmode {
> > > * - pool from the last valid element
> > > * - the buffer size from this pool
> > > * - zero offset
> > > + *
> > > + * - Length based buffer split:
> > > + * - mp, length, offset should be configured.
> > > + * - The proto should not be configured in length split. Zero default.
> > > + *
> > > + * - Protocol based buffer split:
> > > + * - mp, offset, proto should be configured.
> > > + * - The length should not be configured in protocol split. Zero default.
> >
> > What means "Zero default"?
> > You should just ignore the non relevant field.
>
> Yes, you are right, the none relevant field should be just ignored.
> I will update the doc in v6.
Sorry for replying myself.
After consideration, I found it is hard to just ignore the non-relevant field.
Because when length and proto both exist, it is hard to decide whether it is
length based buffer split or protocol based buffer split, which affects the
check in rte_eth_rx_queue_check_split().
So I would like to keep the current design in v6. When choosing one mode of
buffer split, the non-relevant field should not be configured.
Hope to get your feedbacks. :)
Regards,
Xuan
>
> >
> > > struct rte_eth_rxseg_split {
> > > struct rte_mempool *mp; /**< Memory pool to allocate segment
> > from. */
> > > uint16_t length; /**< Segment data length, configures split point. */
> > > uint16_t offset; /**< Data offset from beginning of mbuf data buffer.
> > */
> > > - uint32_t reserved; /**< Reserved field. */
> >
> > How do you manage ABI compatibility?
> > Was the reserved field initialized to 0 in previous versions?
>
> I think we reached an agreement in RFC v1. There is no document for the
> reserved field in the previous release. And it is always initialized to zero in
> real cases.
> And now splitting based on fixed length and protocol header parsing is
> exclusive, we can ignore the none relevant field.
>
> >
> > > + uint32_t proto; /**< Protocol of buffer split, determines protocol
> > > +split point. */
> >
> > What are the values for "proto"?
>
> Yes, I missed the protocol capability here, will fix it in v6.
>
> >
> > > @@ -1664,6 +1676,7 @@ struct rte_eth_conf {
> > > RTE_ETH_RX_OFFLOAD_QINQ_STRIP) #define
> > DEV_RX_OFFLOAD_VLAN
> > > RTE_DEPRECATED(DEV_RX_OFFLOAD_VLAN)
> RTE_ETH_RX_OFFLOAD_VLAN
> > >
> > > +
> >
> > It looks to be an useless change.
>
> Thanks for the catch, will fix it in next version.
>
> Thanks again for your time.
>
> Regards,
> Xuan
>
> >
> > > /*
> > > * If new Rx offload capabilities are defined, they also must be
> > > * mentioned in rte_rx_offload_names in rte_ethdev.c file.
> > >
> >
> >
> >
> >
^ permalink raw reply [relevance 0%]
* Re: [PATCH] eal/ppc: undefine AltiVec keyword vector
2022-05-26 10:18 0% ` Thomas Monjalon
@ 2022-05-26 11:02 0% ` Ray Kinsella
2022-06-01 15:04 0% ` Thomas Monjalon
0 siblings, 1 reply; 200+ results
From: Ray Kinsella @ 2022-05-26 11:02 UTC (permalink / raw)
To: Thomas Monjalon
Cc: Tyler Retzlaff, dev, david.marchand, techboard, David Christensen
Thomas Monjalon <thomas@monjalon.net> writes:
> 25/05/2022 20:34, Tyler Retzlaff:
>> On Wed, May 25, 2022 at 07:02:52PM +0100, Ray Kinsella wrote:
>> > Thomas Monjalon <thomas@monjalon.net> writes:
>> > > 25/05/2022 13:48, Ray Kinsella:
>> > >> Thomas Monjalon <thomas@monjalon.net> writes:
>> > >>
>> > >> > The AltiVec header file is defining "vector", except in C++ build.
>> > >> > The keyword "vector" may conflict easily.
>> > >> > As a rule, it is better to use the alternative keyword "__vector".
>> > >> >
>> > >> > The DPDK header file rte_altivec.h takes care of undefining "vector",
>> > >> > so the applications and dependencies are free to define the name "vector".
>> > >> >
>> > >> > This is a compatibility breakage for applications which were using
>> > >> > the keyword "vector" for its AltiVec meaning.
>> > >> >
>> > >> > Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
>> > >> > ---
>> > >> > doc/guides/rel_notes/release_22_07.rst | 5 +++++
>> > >> > lib/eal/ppc/include/rte_altivec.h | 7 +++++++
>> > >> > 2 files changed, 12 insertions(+)
>> > >> >
>> > >>
>> > >> Acked-by: Ray Kinsella <mdr@ashroe.eu>
>> > >
>> > > Just to make sure, we are all OK to break compatibility of rte_altivec.h?
>> > > It means the keyword vector is not available anymore with this #include.
>> > > Please confirm it is OK to merge in DPDK 22.07.
>> >
>> > I did think about it yes ;-).
>> > I can't see how it would break the ABI in the short term.
>> > And it makes sense to preclude this keyword in the long term.
>> >
>> > So I ack'ed - did I miss something?
>>
>> Acked-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
>>
>> double ack, impact of break is understood as follows.
>>
>> * this is not an issue with abi it is an issue with api.
>> * the break will cause a compile failure, the action to resolve is to
>> replace vector with __vector.
>
> Exactly
>
> I'll wait few days or acks from the techboard, and will apply.
+1
--
Regards, Ray K
^ permalink raw reply [relevance 0%]
* Re: [PATCH] eal/ppc: undefine AltiVec keyword vector
2022-05-25 18:34 3% ` Tyler Retzlaff
@ 2022-05-26 10:18 0% ` Thomas Monjalon
2022-05-26 11:02 0% ` Ray Kinsella
0 siblings, 1 reply; 200+ results
From: Thomas Monjalon @ 2022-05-26 10:18 UTC (permalink / raw)
To: Ray Kinsella, Tyler Retzlaff
Cc: dev, david.marchand, techboard, David Christensen
25/05/2022 20:34, Tyler Retzlaff:
> On Wed, May 25, 2022 at 07:02:52PM +0100, Ray Kinsella wrote:
> > Thomas Monjalon <thomas@monjalon.net> writes:
> > > 25/05/2022 13:48, Ray Kinsella:
> > >> Thomas Monjalon <thomas@monjalon.net> writes:
> > >>
> > >> > The AltiVec header file is defining "vector", except in C++ build.
> > >> > The keyword "vector" may conflict easily.
> > >> > As a rule, it is better to use the alternative keyword "__vector".
> > >> >
> > >> > The DPDK header file rte_altivec.h takes care of undefining "vector",
> > >> > so the applications and dependencies are free to define the name "vector".
> > >> >
> > >> > This is a compatibility breakage for applications which were using
> > >> > the keyword "vector" for its AltiVec meaning.
> > >> >
> > >> > Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
> > >> > ---
> > >> > doc/guides/rel_notes/release_22_07.rst | 5 +++++
> > >> > lib/eal/ppc/include/rte_altivec.h | 7 +++++++
> > >> > 2 files changed, 12 insertions(+)
> > >> >
> > >>
> > >> Acked-by: Ray Kinsella <mdr@ashroe.eu>
> > >
> > > Just to make sure, we are all OK to break compatibility of rte_altivec.h?
> > > It means the keyword vector is not available anymore with this #include.
> > > Please confirm it is OK to merge in DPDK 22.07.
> >
> > I did think about it yes ;-).
> > I can't see how it would break the ABI in the short term.
> > And it makes sense to preclude this keyword in the long term.
> >
> > So I ack'ed - did I miss something?
>
> Acked-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
>
> double ack, impact of break is understood as follows.
>
> * this is not an issue with abi it is an issue with api.
> * the break will cause a compile failure, the action to resolve is to
> replace vector with __vector.
Exactly
I'll wait few days or acks from the techboard, and will apply.
^ permalink raw reply [relevance 0%]
* Re: [PATCH] eal/ppc: undefine AltiVec keyword vector
2022-05-25 18:02 3% ` Ray Kinsella
@ 2022-05-25 18:34 3% ` Tyler Retzlaff
2022-05-26 10:18 0% ` Thomas Monjalon
0 siblings, 1 reply; 200+ results
From: Tyler Retzlaff @ 2022-05-25 18:34 UTC (permalink / raw)
To: Ray Kinsella
Cc: Thomas Monjalon, dev, david.marchand, techboard, David Christensen
On Wed, May 25, 2022 at 07:02:52PM +0100, Ray Kinsella wrote:
>
> Thomas Monjalon <thomas@monjalon.net> writes:
>
> > 25/05/2022 13:48, Ray Kinsella:
> >>
> >> Thomas Monjalon <thomas@monjalon.net> writes:
> >>
> >> > The AltiVec header file is defining "vector", except in C++ build.
> >> > The keyword "vector" may conflict easily.
> >> > As a rule, it is better to use the alternative keyword "__vector".
> >> >
> >> > The DPDK header file rte_altivec.h takes care of undefining "vector",
> >> > so the applications and dependencies are free to define the name "vector".
> >> >
> >> > This is a compatibility breakage for applications which were using
> >> > the keyword "vector" for its AltiVec meaning.
> >> >
> >> > Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
> >> > ---
> >> > doc/guides/rel_notes/release_22_07.rst | 5 +++++
> >> > lib/eal/ppc/include/rte_altivec.h | 7 +++++++
> >> > 2 files changed, 12 insertions(+)
> >> >
> >>
> >> Acked-by: Ray Kinsella <mdr@ashroe.eu>
> >
> > Just to make sure, we are all OK to break compatibility of rte_altivec.h?
> > It means the keyword vector is not available anymore with this #include.
> > Please confirm it is OK to merge in DPDK 22.07.
>
> I did think about it yes ;-).
> I can't see how it would break the ABI in the short term.
> And it makes sense to preclude this keyword in the long term.
>
> So I ack'ed - did I miss something?
Acked-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
double ack, impact of break is understood as follows.
* this is not an issue with abi it is an issue with api.
* the break will cause a compile failure, the action to resolve is to
replace vector with __vector.
>
>
> --
> Regards, Ray K
^ permalink raw reply [relevance 3%]
* Re: [PATCH] eal/ppc: undefine AltiVec keyword vector
@ 2022-05-25 18:02 3% ` Ray Kinsella
2022-05-25 18:34 3% ` Tyler Retzlaff
0 siblings, 1 reply; 200+ results
From: Ray Kinsella @ 2022-05-25 18:02 UTC (permalink / raw)
To: Thomas Monjalon; +Cc: dev, david.marchand, techboard, David Christensen
Thomas Monjalon <thomas@monjalon.net> writes:
> 25/05/2022 13:48, Ray Kinsella:
>>
>> Thomas Monjalon <thomas@monjalon.net> writes:
>>
>> > The AltiVec header file is defining "vector", except in C++ build.
>> > The keyword "vector" may conflict easily.
>> > As a rule, it is better to use the alternative keyword "__vector".
>> >
>> > The DPDK header file rte_altivec.h takes care of undefining "vector",
>> > so the applications and dependencies are free to define the name "vector".
>> >
>> > This is a compatibility breakage for applications which were using
>> > the keyword "vector" for its AltiVec meaning.
>> >
>> > Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
>> > ---
>> > doc/guides/rel_notes/release_22_07.rst | 5 +++++
>> > lib/eal/ppc/include/rte_altivec.h | 7 +++++++
>> > 2 files changed, 12 insertions(+)
>> >
>>
>> Acked-by: Ray Kinsella <mdr@ashroe.eu>
>
> Just to make sure, we are all OK to break compatibility of rte_altivec.h?
> It means the keyword vector is not available anymore with this #include.
> Please confirm it is OK to merge in DPDK 22.07.
I did think about it yes ;-).
I can't see how it would break the ABI in the short term.
And it makes sense to preclude this keyword in the long term.
So I ack'ed - did I miss something?
--
Regards, Ray K
^ permalink raw reply [relevance 3%]
* Re: [RFC v2 3/7] ethdev: introduce Rx queue based limit watermark
2022-05-25 13:58 3% ` Thomas Monjalon
@ 2022-05-25 14:23 0% ` Andrew Rybchenko
0 siblings, 0 replies; 200+ results
From: Andrew Rybchenko @ 2022-05-25 14:23 UTC (permalink / raw)
To: Thomas Monjalon, Stephen Hemminger, Spike Du
Cc: dev, Matan Azrad, Slava Ovsiienko, Ori Kam, Raslan Darawsheh,
ferruh.yigit
On 5/25/22 16:58, Thomas Monjalon wrote:
> 25/05/2022 14:59, Andrew Rybchenko:
>> On 5/24/22 11:18, Thomas Monjalon wrote:
>>> 24/05/2022 04:50, Spike Du:
>>>> From: Thomas Monjalon <thomas@monjalon.net>
>>>>> 23/05/2022 05:01, Spike Du:
>>>>>> From: Stephen Hemminger <stephen@networkplumber.org>
>>>>>>> Spike Du <spiked@nvidia.com> wrote:
>>>>>>>> --- a/lib/ethdev/rte_ethdev.h
>>>>>>>> +++ b/lib/ethdev/rte_ethdev.h
>>>>>>>> @@ -1249,7 +1249,16 @@ struct rte_eth_rxconf {
>>>>>>>> */
>>>>>>>> union rte_eth_rxseg *rx_seg;
>>>>>>>>
>>>>>>>> - uint64_t reserved_64s[2]; /**< Reserved for future fields */
>>>>>>>> + /**
>>>>>>>> + * Per-queue Rx limit watermark defined as percentage of Rx queue
>>>>>>>> + * size. If Rx queue receives traffic higher than this percentage,
>>>>>>>> + * the event RTE_ETH_EVENT_RX_LWM is triggered.
>>>>>>>> + */
>>>>>>>> + uint8_t lwm;
>>>>>>>> +
>>>>>>>> + uint8_t reserved_bits[3];
>>>>>>>> + uint32_t reserved_32s;
>>>>>>>> + uint64_t reserved_64s;
>>>>>>>
>>>>>>> Ok but, this is an ABI risk about this because reserved stuff was
>>>>>>> never required before.
>>>>>
>>>>> An ABI compatibility issue would be for an application compiled with an old
>>>>> DPDK, and loading a new DPDK at runtime.
>>>>> Let's think what would happen in such a case.
>>>>>
>>>>>>> Whenever is a reserved field is introduced the code (in this case
>>>>>>> rte_ethdev_configure).
>>>>>
>>>>> rte_eth_rx_queue_setup() is called with rx_conf->lwm not initialized.
>>>>> Then the library and drivers may interpret a wrong value.
>>>>>
>>>>>>> Best practice would have been to have the code require all reserved
>>>>>>> fields be
>>>>>>> 0 in earlier releases. In this case an application is like to define
>>>>>>> a watermark of zero; how will your code handle it.
>>>>>>
>>>>>> Having watermark of 0 is desired, which is the default. LWM of 0 means
>>>>>> the Rx Queue's watermark is not monitored, hence no LWM event is
>>>>> generated.
>>>>>
>>>>> The problem is to have a value not initialized.
>>>>> I think the best approach is to not expose the LWM value through this
>>>>> configuration structure.
>>>>> If the need is to get the current value, we should better add a field in the
>>>>> struct rte_eth_rxq_info.
>>>>
>>>> At least from all the dpdk app/example code, rxconf is initialized to 0 then setup
>>>> The Rx queue, if user follows these examples we should not have ABI issue.
>>>> Since many people are concerned about rxconf change, it's ok to remove the LWM
>>>> Field there.
>>>> Yes, I think we can add lwm into rte_eth_rxq_info. If we can set Rx queue's attribute,
>>>> We should have a way to get it.
>>>
>>> Unfortunately we cannot rely on examples for ABI compatibility.
>>> My suggestion of moving the field in rte_eth_rxq_info
>>> is not obvious because it could change the size of the struct.
>>> But thanks to __rte_cache_min_aligned, it is OK.
>>> Running pahole on this struct shows we have 50 bytes free:
>>> /* size: 128, cachelines: 2, members: 6 */
>>> /* padding: 50 */
>>>
>>> The other option would be to get the LWM value with a "get" function.
>>>
>>> What others prefer?
>>
>> If I'm not mistaken the changeset breaks ABI in any case since
>> it adds a new event and changes MAX.
>
> I think we can consider it as not a breakage (a rule should be added).
> Last time we had to update this enum, this was the conclusion:
> from https://git.dpdk.org/dpdk/commit/?id=44bf3c796be3f
> "
> The new event type addition in the enum is flagged as an ABI breakage,
> so an ignore rule is added for these reasons:
> - It is not changing value of existing types (except MAX)
> - The new value is not used by existing API if the event is not
> registered
> In general, it is safe adding new ethdev event types at the end of the
> enum, because of event callback registration mechanism.
> "
I see. Makes sense. Thanks for the information.
>> If so, I'd wait for the
>> next ABI breaking release and do not touch reserved fields.
>
> In any case, rte_eth_rxconf is not a good fit
> because we have a separate function for configuration.
Yes, it is better to avoid two ways to configure the same
thing.
> It should be either in rte_eth_rxq_info or a specific "get" function.
I see no point to introduce specific get function for a single
value. I think that rte_eth_rxq_info is the right way to get
current value.
^ permalink raw reply [relevance 0%]
* Re: [RFC v2 3/7] ethdev: introduce Rx queue based limit watermark
2022-05-25 12:59 4% ` Andrew Rybchenko
@ 2022-05-25 13:58 3% ` Thomas Monjalon
2022-05-25 14:23 0% ` Andrew Rybchenko
0 siblings, 1 reply; 200+ results
From: Thomas Monjalon @ 2022-05-25 13:58 UTC (permalink / raw)
To: Stephen Hemminger, Spike Du, Andrew Rybchenko
Cc: dev, Matan Azrad, Slava Ovsiienko, Ori Kam, Raslan Darawsheh,
ferruh.yigit
25/05/2022 14:59, Andrew Rybchenko:
> On 5/24/22 11:18, Thomas Monjalon wrote:
> > 24/05/2022 04:50, Spike Du:
> >> From: Thomas Monjalon <thomas@monjalon.net>
> >>> 23/05/2022 05:01, Spike Du:
> >>>> From: Stephen Hemminger <stephen@networkplumber.org>
> >>>>> Spike Du <spiked@nvidia.com> wrote:
> >>>>>> --- a/lib/ethdev/rte_ethdev.h
> >>>>>> +++ b/lib/ethdev/rte_ethdev.h
> >>>>>> @@ -1249,7 +1249,16 @@ struct rte_eth_rxconf {
> >>>>>> */
> >>>>>> union rte_eth_rxseg *rx_seg;
> >>>>>>
> >>>>>> - uint64_t reserved_64s[2]; /**< Reserved for future fields */
> >>>>>> + /**
> >>>>>> + * Per-queue Rx limit watermark defined as percentage of Rx queue
> >>>>>> + * size. If Rx queue receives traffic higher than this percentage,
> >>>>>> + * the event RTE_ETH_EVENT_RX_LWM is triggered.
> >>>>>> + */
> >>>>>> + uint8_t lwm;
> >>>>>> +
> >>>>>> + uint8_t reserved_bits[3];
> >>>>>> + uint32_t reserved_32s;
> >>>>>> + uint64_t reserved_64s;
> >>>>>
> >>>>> Ok but, this is an ABI risk about this because reserved stuff was
> >>>>> never required before.
> >>>
> >>> An ABI compatibility issue would be for an application compiled with an old
> >>> DPDK, and loading a new DPDK at runtime.
> >>> Let's think what would happen in such a case.
> >>>
> >>>>> Whenever is a reserved field is introduced the code (in this case
> >>>>> rte_ethdev_configure).
> >>>
> >>> rte_eth_rx_queue_setup() is called with rx_conf->lwm not initialized.
> >>> Then the library and drivers may interpret a wrong value.
> >>>
> >>>>> Best practice would have been to have the code require all reserved
> >>>>> fields be
> >>>>> 0 in earlier releases. In this case an application is like to define
> >>>>> a watermark of zero; how will your code handle it.
> >>>>
> >>>> Having watermark of 0 is desired, which is the default. LWM of 0 means
> >>>> the Rx Queue's watermark is not monitored, hence no LWM event is
> >>> generated.
> >>>
> >>> The problem is to have a value not initialized.
> >>> I think the best approach is to not expose the LWM value through this
> >>> configuration structure.
> >>> If the need is to get the current value, we should better add a field in the
> >>> struct rte_eth_rxq_info.
> >>
> >> At least from all the dpdk app/example code, rxconf is initialized to 0 then setup
> >> The Rx queue, if user follows these examples we should not have ABI issue.
> >> Since many people are concerned about rxconf change, it's ok to remove the LWM
> >> Field there.
> >> Yes, I think we can add lwm into rte_eth_rxq_info. If we can set Rx queue's attribute,
> >> We should have a way to get it.
> >
> > Unfortunately we cannot rely on examples for ABI compatibility.
> > My suggestion of moving the field in rte_eth_rxq_info
> > is not obvious because it could change the size of the struct.
> > But thanks to __rte_cache_min_aligned, it is OK.
> > Running pahole on this struct shows we have 50 bytes free:
> > /* size: 128, cachelines: 2, members: 6 */
> > /* padding: 50 */
> >
> > The other option would be to get the LWM value with a "get" function.
> >
> > What others prefer?
>
> If I'm not mistaken the changeset breaks ABI in any case since
> it adds a new event and changes MAX.
I think we can consider it as not a breakage (a rule should be added).
Last time we had to update this enum, this was the conclusion:
from https://git.dpdk.org/dpdk/commit/?id=44bf3c796be3f
"
The new event type addition in the enum is flagged as an ABI breakage,
so an ignore rule is added for these reasons:
- It is not changing value of existing types (except MAX)
- The new value is not used by existing API if the event is not
registered
In general, it is safe adding new ethdev event types at the end of the
enum, because of event callback registration mechanism.
"
> If so, I'd wait for the
> next ABI breaking release and do not touch reserved fields.
In any case, rte_eth_rxconf is not a good fit
because we have a separate function for configuration.
It should be either in rte_eth_rxq_info or a specific "get" function.
^ permalink raw reply [relevance 3%]
* Re: [RFC v2 3/7] ethdev: introduce Rx queue based limit watermark
2022-05-24 8:18 3% ` Thomas Monjalon
@ 2022-05-25 12:59 4% ` Andrew Rybchenko
2022-05-25 13:58 3% ` Thomas Monjalon
0 siblings, 1 reply; 200+ results
From: Andrew Rybchenko @ 2022-05-25 12:59 UTC (permalink / raw)
To: Thomas Monjalon, Stephen Hemminger, Spike Du
Cc: dev, Matan Azrad, Slava Ovsiienko, Ori Kam, Raslan Darawsheh,
ferruh.yigit
On 5/24/22 11:18, Thomas Monjalon wrote:
> 24/05/2022 04:50, Spike Du:
>> From: Thomas Monjalon <thomas@monjalon.net>
>>> 23/05/2022 05:01, Spike Du:
>>>> From: Stephen Hemminger <stephen@networkplumber.org>
>>>>> Spike Du <spiked@nvidia.com> wrote:
>>>>>> --- a/lib/ethdev/rte_ethdev.h
>>>>>> +++ b/lib/ethdev/rte_ethdev.h
>>>>>> @@ -1249,7 +1249,16 @@ struct rte_eth_rxconf {
>>>>>> */
>>>>>> union rte_eth_rxseg *rx_seg;
>>>>>>
>>>>>> - uint64_t reserved_64s[2]; /**< Reserved for future fields */
>>>>>> + /**
>>>>>> + * Per-queue Rx limit watermark defined as percentage of Rx queue
>>>>>> + * size. If Rx queue receives traffic higher than this percentage,
>>>>>> + * the event RTE_ETH_EVENT_RX_LWM is triggered.
>>>>>> + */
>>>>>> + uint8_t lwm;
>>>>>> +
>>>>>> + uint8_t reserved_bits[3];
>>>>>> + uint32_t reserved_32s;
>>>>>> + uint64_t reserved_64s;
>>>>>
>>>>> Ok but, this is an ABI risk about this because reserved stuff was
>>>>> never required before.
>>>
>>> An ABI compatibility issue would be for an application compiled with an old
>>> DPDK, and loading a new DPDK at runtime.
>>> Let's think what would happen in such a case.
>>>
>>>>> Whenever is a reserved field is introduced the code (in this case
>>>>> rte_ethdev_configure).
>>>
>>> rte_eth_rx_queue_setup() is called with rx_conf->lwm not initialized.
>>> Then the library and drivers may interpret a wrong value.
>>>
>>>>> Best practice would have been to have the code require all reserved
>>>>> fields be
>>>>> 0 in earlier releases. In this case an application is like to define
>>>>> a watermark of zero; how will your code handle it.
>>>>
>>>> Having watermark of 0 is desired, which is the default. LWM of 0 means
>>>> the Rx Queue's watermark is not monitored, hence no LWM event is
>>> generated.
>>>
>>> The problem is to have a value not initialized.
>>> I think the best approach is to not expose the LWM value through this
>>> configuration structure.
>>> If the need is to get the current value, we should better add a field in the
>>> struct rte_eth_rxq_info.
>>
>> At least from all the dpdk app/example code, rxconf is initialized to 0 then setup
>> The Rx queue, if user follows these examples we should not have ABI issue.
>> Since many people are concerned about rxconf change, it's ok to remove the LWM
>> Field there.
>> Yes, I think we can add lwm into rte_eth_rxq_info. If we can set Rx queue's attribute,
>> We should have a way to get it.
>
> Unfortunately we cannot rely on examples for ABI compatibility.
> My suggestion of moving the field in rte_eth_rxq_info
> is not obvious because it could change the size of the struct.
> But thanks to __rte_cache_min_aligned, it is OK.
> Running pahole on this struct shows we have 50 bytes free:
> /* size: 128, cachelines: 2, members: 6 */
> /* padding: 50 */
>
> The other option would be to get the LWM value with a "get" function.
>
> What others prefer?
If I'm not mistaken the changeset breaks ABI in any case since
it adds a new event and changes MAX. If so, I'd wait for the
next ABI breaking release and do not touch reserved fields.
^ permalink raw reply [relevance 4%]
* [PATCH] eal/ppc: undefine AltiVec keyword vector
@ 2022-05-25 9:53 4% Thomas Monjalon
0 siblings, 1 reply; 200+ results
From: Thomas Monjalon @ 2022-05-25 9:53 UTC (permalink / raw)
To: dev; +Cc: mdr, david.marchand, techboard, David Christensen
The AltiVec header file is defining "vector", except in C++ build.
The keyword "vector" may conflict easily.
As a rule, it is better to use the alternative keyword "__vector".
The DPDK header file rte_altivec.h takes care of undefining "vector",
so the applications and dependencies are free to define the name "vector".
This is a compatibility breakage for applications which were using
the keyword "vector" for its AltiVec meaning.
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
---
doc/guides/rel_notes/release_22_07.rst | 5 +++++
lib/eal/ppc/include/rte_altivec.h | 7 +++++++
2 files changed, 12 insertions(+)
diff --git a/doc/guides/rel_notes/release_22_07.rst b/doc/guides/rel_notes/release_22_07.rst
index e49cacecef..ee60b17821 100644
--- a/doc/guides/rel_notes/release_22_07.rst
+++ b/doc/guides/rel_notes/release_22_07.rst
@@ -133,6 +133,11 @@ API Changes
Also, make sure to start the actual text at the margin.
=======================================================
+* The DPDK header file ``rte_altivec.h``,
+ which is a wrapper for the PPC header file ``altivec.h``,
+ undefines the AltiVec keyword ``vector``.
+ The alternative keyword ``__vector`` should be used instead.
+
ABI Changes
-----------
diff --git a/lib/eal/ppc/include/rte_altivec.h b/lib/eal/ppc/include/rte_altivec.h
index 1551a94544..7c088d2d16 100644
--- a/lib/eal/ppc/include/rte_altivec.h
+++ b/lib/eal/ppc/include/rte_altivec.h
@@ -9,6 +9,13 @@
/* To include altivec.h, GCC version must be >= 4.8 */
#include <altivec.h>
+/*
+ * The keyword "vector" is defined in altivec.h,
+ * and often conflicts with code in applications or dependencies.
+ * It is preferred to use the alternative keyword "__vector".
+ */
+#undef vector
+
/*
* Compilation workaround for PPC64 when AltiVec is fully enabled, e.g. std=c11.
* Otherwise there would be a type conflict between stdbool and altivec.
--
2.36.0
^ permalink raw reply [relevance 4%]
* RE: [RFT 0/2] pie: floating point fixes
2022-05-24 18:46 3% [RFT 0/2] pie: floating point fixes Stephen Hemminger
@ 2022-05-24 19:31 0% ` Morten Brørup
0 siblings, 0 replies; 200+ results
From: Morten Brørup @ 2022-05-24 19:31 UTC (permalink / raw)
To: Stephen Hemminger, dev
> From: Stephen Hemminger [mailto:stephen@networkplumber.org]
> Sent: Tuesday, 24 May 2022 20.46
>
> A couple of small untested changes to address some
> issues found while reviewing usage of random in DPDK.
>
> The PIE code should get rexamined in later release.
Untested fixes to seemingly untested code. What's not to like? ;-)
> It should not be exposing internal algorithm, that makes
> it brittle for ABI.
Agree. Just look at the mempool... an increasing amount of its internals are getting elevated to public API, so other code can understand and use its internals instead of going through its API. (My current pet peeve.)
>
> Also, no code in DPDK should ever be doing floating point
> math in the data path!
+1
>
> Stephen Hemminger (2):
> rte_pie: remove unnecessary floating point
> rte_pie: fix incorrect floating point math
This looks much better than what it replaces, so...
Series-acked-by: Morten Brørup <mb@smartsharesystems.com>
^ permalink raw reply [relevance 0%]
* [RFT 0/2] pie: floating point fixes
@ 2022-05-24 18:46 3% Stephen Hemminger
2022-05-24 19:31 0% ` Morten Brørup
0 siblings, 1 reply; 200+ results
From: Stephen Hemminger @ 2022-05-24 18:46 UTC (permalink / raw)
To: dev; +Cc: Stephen Hemminger
A couple of small untested changes to address some
issues found while reviewing usage of random in DPDK.
The PIE code should get rexamined in later release.
It should not be exposing internal algorithm, that makes
it brittle for ABI.
Also, no code in DPDK should ever be doing floating point
math in the data path!
Stephen Hemminger (2):
rte_pie: remove unnecessary floating point
rte_pie: fix incorrect floating point math
lib/sched/rte_pie.h | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
--
2.35.1
^ permalink raw reply [relevance 3%]
* Re: [dpdk-dev] [PATCH v7 1/4] ethdev: support device reset and recovery events
2022-05-21 10:33 0% ` fengchengwen
@ 2022-05-24 15:11 0% ` Ray Kinsella
0 siblings, 0 replies; 200+ results
From: Ray Kinsella @ 2022-05-24 15:11 UTC (permalink / raw)
To: fengchengwen
Cc: Thomas Monjalon, Ferruh Yigit, Kalesh A P, dev, ajit.khaparde,
asafp, David Marchand, Andrew Rybchenko, lizhenyi1,
shuliubin 00419723
fengchengwen <fengchengwen@huawei.com> writes:
> Hi all,
>
> This patch lasts for a long time. Are we waiting for 22.11 to deal with it?
That was my read, as can't reliably change the value of _MAX at this
stage without it having impact elsewhere.
> We have the same requirements for the reset or recovery mechanism, but there are differences:
>
> APP PMD
> | |
> | detect error
> | <---report error event--- |
> | |
> do error stats |
> and report |
> | ---start recover--> |
> | do recover
> | <---report recover result |
> | |
> if succ just log
> else may migrate
> service
>
> Can we generalize these processes(means that the implementation is at the framework layer)? or only at PMD API?
>
>
> On 2022/2/15 0:06, Ray Kinsella wrote:
>>
>> Thomas Monjalon <thomas@monjalon.net> writes:
>>
>>> 14/02/2022 11:16, Ray Kinsella:
>>>> Ray Kinsella <mdr@ashroe.eu> writes:
>>>>> Thomas Monjalon <thomas@monjalon.net> writes:
>>>>>> 02/02/2022 12:44, Ray Kinsella:
>>>>>>> Ferruh Yigit <ferruh.yigit@intel.com> writes:
>>>>>>>> On 1/28/2022 12:48 PM, Kalesh A P wrote:
>>>>>>>>> --- a/lib/ethdev/rte_ethdev.h
>>>>>>>>> +++ b/lib/ethdev/rte_ethdev.h
>>>>>>>>> @@ -3818,6 +3818,24 @@ enum rte_eth_event_type {
>>>>>>>>> RTE_ETH_EVENT_DESTROY, /**< port is released */
>>>>>>>>> RTE_ETH_EVENT_IPSEC, /**< IPsec offload related event */
>>>>>>>>> RTE_ETH_EVENT_FLOW_AGED,/**< New aged-out flows is detected */
>>>>>>>>> + RTE_ETH_EVENT_ERR_RECOVERING,
>>>>>>>>> + /**< port recovering from an error
>>>>>>>>> + *
>>>>>>>>> + * PMD detected a FW reset or error condition.
>>>>>>>>> + * PMD will try to recover from the error.
>>>>>>>>> + * Data path may be quiesced and Control path operations
>>>>>>>>> + * may fail at this time.
>>>>>>>>> + */
>>>>>>>>> + RTE_ETH_EVENT_RECOVERED,
>>>>>>>>> + /**< port recovered from an error
>>>>>>>>> + *
>>>>>>>>> + * PMD has recovered from the error condition.
>>>>>>>>> + * Control path and Data path are up now.
>>>>>>>>> + * PMD re-configures the port to the state prior to the error.
>>>>>>>>> + * Since the device has undergone a reset, flow rules
>>>>>>>>> + * offloaded prior to reset may be lost and
>>>>>>>>> + * the application should recreate the rules again.
>>>>>>>>> + */
>>>>>>>>> RTE_ETH_EVENT_MAX /**< max value of this enum */
>>>>>>>>
>>>>>>>>
>>>>>>>> Also ABI check complains about 'RTE_ETH_EVENT_MAX' value check, cc'ed more people
>>>>>>>> to evaluate if it is a false positive:
>>>>>>>>
>>>>>>>>
>>>>>>>> 1 function with some indirect sub-type change:
>>>>>>>> [C] 'function int rte_eth_dev_callback_register(uint16_t, rte_eth_event_type, rte_eth_dev_cb_fn, void*)' at rte_ethdev.c:4637:1 has some indirect sub-type changes:
>>>>>>>> parameter 3 of type 'typedef rte_eth_dev_cb_fn' has sub-type changes:
>>>>>>>> underlying type 'int (typedef uint16_t, enum rte_eth_event_type, void*, void*)*' changed:
>>>>>>>> in pointed to type 'function type int (typedef uint16_t, enum rte_eth_event_type, void*, void*)':
>>>>>>>> parameter 2 of type 'enum rte_eth_event_type' has sub-type changes:
>>>>>>>> type size hasn't changed
>>>>>>>> 2 enumerator insertions:
>>>>>>>> 'rte_eth_event_type::RTE_ETH_EVENT_ERR_RECOVERING' value '11'
>>>>>>>> 'rte_eth_event_type::RTE_ETH_EVENT_RECOVERED' value '12'
>>>>>>>> 1 enumerator change:
>>>>>>>> 'rte_eth_event_type::RTE_ETH_EVENT_MAX' from value '11' to '13' at rte_ethdev.h:3807:1
>>>>>>>
>>>>>>> I don't immediately see the problem that this would cause.
>>>>>>> There are no array sizes etc dependent on the value of MAX for instance.
>>>>>>>
>>>>>>> Looks safe?
>>>>>>
>>>>>> We never know how this enum will be used by the application.
>>>>>> The max value may be used for the size of an event array.
>>>>>> It looks a real ABI issue unfortunately.
>>>>>
>>>>> Right - but we only really care about it when an array size based on MAX
>>>>> is likely to be passed to DPDK, which doesn't apply in this case.
>>>
>>> I don't completely agree.
>>> A developer may assume an event will never exceed MAX value.
>>> However, after an upgrade of DPDK without app rebuild,
>>> a higher event value may be received in the app,
>>> breaking the assumption.
>>> Should we consider this case as an ABI breakage?
>>
>> Nope - I think we should explicitly exclude MAX values from any
>> ABI guarantee, as being able to change them is key to our be able to
>> evolve DPDK while maintaining ABI stability.
>>
>> Consider what it means applying the ABI policy to a MAX value, you are
>> in effect saying that that no value can be added to this enumeration
>> until the next ABI version, for me this is very restrictive without a
>> solid reason.
>>
>>>
>>>>> I noted that some Linux folks explicitly mark similar MAX values as not
>>>>> part of the ABI.
>>>>>
>>>>> /usr/include/linux/perf_event.h
>>>>> 37: PERF_TYPE_MAX, /* non-ABI */
>>>>> 60: PERF_COUNT_HW_MAX, /* non-ABI */
>>>>> 79: PERF_COUNT_HW_CACHE_MAX, /* non-ABI */
>>>>> 87: PERF_COUNT_HW_CACHE_OP_MAX, /* non-ABI */
>>>>> 94: PERF_COUNT_HW_CACHE_RESULT_MAX, /* non-ABI */
>>>>> 116: PERF_COUNT_SW_MAX, /* non-ABI */
>>>>> 149: PERF_SAMPLE_MAX = 1U << 24, /* non-ABI */
>>>>> 151: __PERF_SAMPLE_CALLCHAIN_EARLY = 1ULL << 63, /*
>>>>> non-ABI; internal use */
>>>>> 189: PERF_SAMPLE_BRANCH_MAX_SHIFT /* non-ABI */
>>>>> 267: PERF_TXN_MAX = (1 << 8), /* non-ABI */
>>>>> 301: PERF_FORMAT_MAX = 1U << 4, /* non-ABI */
>>>>> 1067: PERF_RECORD_MAX, /* non-ABI */
>>>>> 1078: PERF_RECORD_KSYMBOL_TYPE_MAX /* non-ABI */
>>>>> 1087: PERF_BPF_EVENT_MAX, /* non-ABI */
>>>>
>>>> Any thoughts on similarly annotating all our _MAX enums in the same way?
>>>> We could also add a section in the ABI Policy to make it explicit _MAX
>>>> enum values are not part of the ABI - what do folks think?
>>>
>>> Interesting. I am not sure it is always ABI-safe though.
>>
>>
--
Regards, Ray K
^ permalink raw reply [relevance 0%]
* Re: [RFC v2 3/7] ethdev: introduce Rx queue based limit watermark
2022-05-24 2:50 3% ` Spike Du
@ 2022-05-24 8:18 3% ` Thomas Monjalon
2022-05-25 12:59 4% ` Andrew Rybchenko
0 siblings, 1 reply; 200+ results
From: Thomas Monjalon @ 2022-05-24 8:18 UTC (permalink / raw)
To: Stephen Hemminger, Spike Du
Cc: dev, Matan Azrad, Slava Ovsiienko, Ori Kam, Raslan Darawsheh,
ferruh.yigit, andrew.rybchenko
24/05/2022 04:50, Spike Du:
> From: Thomas Monjalon <thomas@monjalon.net>
> > 23/05/2022 05:01, Spike Du:
> > > From: Stephen Hemminger <stephen@networkplumber.org>
> > > > Spike Du <spiked@nvidia.com> wrote:
> > > > > --- a/lib/ethdev/rte_ethdev.h
> > > > > +++ b/lib/ethdev/rte_ethdev.h
> > > > > @@ -1249,7 +1249,16 @@ struct rte_eth_rxconf {
> > > > > */
> > > > > union rte_eth_rxseg *rx_seg;
> > > > >
> > > > > - uint64_t reserved_64s[2]; /**< Reserved for future fields */
> > > > > + /**
> > > > > + * Per-queue Rx limit watermark defined as percentage of Rx queue
> > > > > + * size. If Rx queue receives traffic higher than this percentage,
> > > > > + * the event RTE_ETH_EVENT_RX_LWM is triggered.
> > > > > + */
> > > > > + uint8_t lwm;
> > > > > +
> > > > > + uint8_t reserved_bits[3];
> > > > > + uint32_t reserved_32s;
> > > > > + uint64_t reserved_64s;
> > > >
> > > > Ok but, this is an ABI risk about this because reserved stuff was
> > > > never required before.
> >
> > An ABI compatibility issue would be for an application compiled with an old
> > DPDK, and loading a new DPDK at runtime.
> > Let's think what would happen in such a case.
> >
> > > > Whenever is a reserved field is introduced the code (in this case
> > > > rte_ethdev_configure).
> >
> > rte_eth_rx_queue_setup() is called with rx_conf->lwm not initialized.
> > Then the library and drivers may interpret a wrong value.
> >
> > > > Best practice would have been to have the code require all reserved
> > > > fields be
> > > > 0 in earlier releases. In this case an application is like to define
> > > > a watermark of zero; how will your code handle it.
> > >
> > > Having watermark of 0 is desired, which is the default. LWM of 0 means
> > > the Rx Queue's watermark is not monitored, hence no LWM event is
> > generated.
> >
> > The problem is to have a value not initialized.
> > I think the best approach is to not expose the LWM value through this
> > configuration structure.
> > If the need is to get the current value, we should better add a field in the
> > struct rte_eth_rxq_info.
>
> At least from all the dpdk app/example code, rxconf is initialized to 0 then setup
> The Rx queue, if user follows these examples we should not have ABI issue.
> Since many people are concerned about rxconf change, it's ok to remove the LWM
> Field there.
> Yes, I think we can add lwm into rte_eth_rxq_info. If we can set Rx queue's attribute,
> We should have a way to get it.
Unfortunately we cannot rely on examples for ABI compatibility.
My suggestion of moving the field in rte_eth_rxq_info
is not obvious because it could change the size of the struct.
But thanks to __rte_cache_min_aligned, it is OK.
Running pahole on this struct shows we have 50 bytes free:
/* size: 128, cachelines: 2, members: 6 */
/* padding: 50 */
The other option would be to get the LWM value with a "get" function.
What others prefer?
^ permalink raw reply [relevance 3%]
* RE: [RFC v2 3/7] ethdev: introduce Rx queue based limit watermark
2022-05-23 22:54 0% ` Stephen Hemminger
@ 2022-05-24 3:46 0% ` Spike Du
0 siblings, 0 replies; 200+ results
From: Spike Du @ 2022-05-24 3:46 UTC (permalink / raw)
To: Stephen Hemminger
Cc: Matan Azrad, Slava Ovsiienko, Ori Kam,
NBU-Contact-Thomas Monjalon (EXTERNAL),
dev, Raslan Darawsheh
> -----Original Message-----
> From: Stephen Hemminger <stephen@networkplumber.org>
> Sent: Tuesday, May 24, 2022 6:55 AM
> To: Spike Du <spiked@nvidia.com>
> Cc: Matan Azrad <matan@nvidia.com>; Slava Ovsiienko
> <viacheslavo@nvidia.com>; Ori Kam <orika@nvidia.com>; NBU-Contact-
> Thomas Monjalon (EXTERNAL) <thomas@monjalon.net>; dev@dpdk.org;
> Raslan Darawsheh <rasland@nvidia.com>
> Subject: Re: [RFC v2 3/7] ethdev: introduce Rx queue based limit watermark
>
> External email: Use caution opening links or attachments
>
>
> On Mon, 23 May 2022 03:01:20 +0000
> Spike Du <spiked@nvidia.com> wrote:
>
> > Hi, pls see below.
> >
> > > -----Original Message-----
> > > From: Stephen Hemminger <stephen@networkplumber.org>
> > > Sent: Sunday, May 22, 2022 11:23 PM
> > > To: Spike Du <spiked@nvidia.com>
> > > Cc: Matan Azrad <matan@nvidia.com>; Slava Ovsiienko
> > > <viacheslavo@nvidia.com>; Ori Kam <orika@nvidia.com>; NBU-Contact-
> > > Thomas Monjalon (EXTERNAL) <thomas@monjalon.net>; dev@dpdk.org;
> > > Raslan Darawsheh <rasland@nvidia.com>
> > > Subject: Re: [RFC v2 3/7] ethdev: introduce Rx queue based limit
> > > watermark
> > >
> > > External email: Use caution opening links or attachments
> > >
> > >
> > > On Sun, 22 May 2022 08:58:56 +0300
> > > Spike Du <spiked@nvidia.com> wrote:
> > >
> > > > diff --git a/lib/ethdev/rte_ethdev.h b/lib/ethdev/rte_ethdev.h
> > > > index
> > > > 04cff8ee10..687ae5ff29 100644
> > > > --- a/lib/ethdev/rte_ethdev.h
> > > > +++ b/lib/ethdev/rte_ethdev.h
> > > > @@ -1249,7 +1249,16 @@ struct rte_eth_rxconf {
> > > > */
> > > > union rte_eth_rxseg *rx_seg;
> > > >
> > > > - uint64_t reserved_64s[2]; /**< Reserved for future fields */
> > > > + /**
> > > > + * Per-queue Rx limit watermark defined as percentage of Rx queue
> > > > + * size. If Rx queue receives traffic higher than this percentage,
> > > > + * the event RTE_ETH_EVENT_RX_LWM is triggered.
> > > > + */
> > > > + uint8_t lwm;
> > > > +
> > > > + uint8_t reserved_bits[3];
> > > > + uint32_t reserved_32s;
> > > > + uint64_t reserved_64s;
> > > > void *reserved_ptrs[2]; /**< Reserved for future fields */
> > > > };
> > > >
> > >
> > > Ok but, this is an ABI risk about this because reserved stuff was
> > > never required before.
> > > Whenever is a reserved field is introduced the code (in this case
> > > rte_ethdev_configure).
> > >
> > > Best practice would have been to have the code require all reserved
> > > fields be
> > > 0 in earlier releases. In this case an application is like to define
> > > a watermark of zero; how will your code handle it.
> > Having watermark of 0 is desired, which is the default. LWM of 0 means
> > the Rx Queue's watermark is not monitored, hence no LWM event is
> generated.
> > >
> > > Also, using 8 bits as percentage is different than how other API's handle
> this.
> > > Since Rx queue size is in packets, why is this not in packets?
> > The short answer is to simply the LWM configuration.
> > Rx queue descriptor is complex nowadays.
> > For normal queue, user may configure LWM according to queue descriptor
> number easily.
> > But for below queues, it's not easy:
> > Take mprq as example, the testpmd cmd options can be " -a
> >
> 0000:03:00.0,rxqs_min_mprq=1,mprq_en=1,mprq_max_memcpy_len=465,
> mprq_lo
> > g_stride_size=8,mprq_log_stride_num=3
> > -- --mbcache=512 -i --nb-cores=7 --txd=1024 --rxd=1024 ", For MLX5
> > implementation, the minimum "unit" in queue has 64 descriptors, the
> > "unit" number is 16, if you configure according to descriptor number(1024)
> Here, you may easily set LWM as something like 512, but HW doesn't allow it,
> because 512 > 16. If you want the watermark to be half, the correct value is 8.
> > The same issue happens to feature like "Rx queue buffer split" where a
> packet can be split to multiple descriptors.
> > Using percentage doesn't have such issues, PMD will cover all the details.
> >
> > > Also document what behavior of 0 is.
> > Sure. The behavior is like the old days without this feature, pls see above.
> >
> > > Why introduce new query/set operations? This should just be part of
> > > the overall device configuration.
> > Due to different implementation. LWM can be a dynamic configuration
> which can help user design a flexible flow control.
> > User may feel ok with LWM of 80% to get high throughput, or later on with
> 50% to throttle the traffic responsively by handling LWM event in order to
> reduce drop.
> > Some driver like mlx5 may implement LWM event as one-time shot. When
> > you receive LWM event, you need to reconfigure LWM in order to receive
> the event again, thus you will not likely to be overwhelmed by the events.
> > These all require set operation.
> >
> > For the query operation. The rte_event API
> rte_eth_dev_callback_process() is per-port API, it doesn't carry much
> information when an event happens.
> > When a LWM event happens, we need to know in which Rx queue it
> happens or optionally what's the current LWM percentage of this queue.
> > The query operation serves this purpose.
> >
> >
> > Regards,
> > Spike.
> >
> >
>
> The bigger question is why does this have to be just MLX5 and why can't it fit
> into the existing DPDK RX interrupt framework?
>
> Linux and BSD have had this for years in their packet coalescing logic.
> Ethtool provides ability to set lot of irq coalescing parameters like:
>
> ethtool -C|--coalesce devname [adaptive-rx on|off] [adaptive-tx on|off]
> [rx-usecs N] [rx-frames N] [rx-usecs-irq N] [rx-frames-irq N]
> [tx-usecs N] [tx-frames N] [tx-usecs-irq N] [tx-frames-irq N]
> [stats-block-usecs N] [pkt-rate-low N] [rx-usecs-low N]
> [rx-frames-low N] [tx-usecs-low N] [tx-frames-low N]
> [pkt-rate-high N] [rx-usecs-high N] [rx-frames-high N]
> [tx-usecs-high N] [tx-frames-high N] [sample-interval N]
> [cqe-mode-rx on|off] [cqe-mode-tx on|off]
>
> It feels like this is just the DPDK version of a small subset of that.
> Since many device already support IRQ coalescing, it would be best to build
> one new API that has most of these. Rather than a MLX/Nvidia only API for a
> single parameter.
I take MLX5 as example here because I only know how mlx5 works, I don't understand
How other NICs work. It doesn't mean I try to change common code only to satisfy
Mlx5 needs.
I think interrupt coalesce is different from LWM:
Interrupt coalesce is delay interrupt until a batch of packets(or an interval) is received.
LWM intends to notify when a Rx queue is out of buffer. Delaying interrupt can't detect
A specific fullness value of the Rx queue, but LWM can if driver supports it.
Regards,
Spike.
^ permalink raw reply [relevance 0%]
* RE: [RFC v2 3/7] ethdev: introduce Rx queue based limit watermark
2022-05-23 21:45 4% ` Thomas Monjalon
@ 2022-05-24 2:50 3% ` Spike Du
2022-05-24 8:18 3% ` Thomas Monjalon
0 siblings, 1 reply; 200+ results
From: Spike Du @ 2022-05-24 2:50 UTC (permalink / raw)
To: NBU-Contact-Thomas Monjalon (EXTERNAL), Stephen Hemminger
Cc: dev, Matan Azrad, Slava Ovsiienko, Ori Kam, Raslan Darawsheh,
ferruh.yigit, andrew.rybchenko
> -----Original Message-----
> From: Thomas Monjalon <thomas@monjalon.net>
> Sent: Tuesday, May 24, 2022 5:46 AM
> To: Stephen Hemminger <stephen@networkplumber.org>; Spike Du
> <spiked@nvidia.com>
> Cc: dev@dpdk.org; Matan Azrad <matan@nvidia.com>; Slava Ovsiienko
> <viacheslavo@nvidia.com>; Ori Kam <orika@nvidia.com>; Raslan Darawsheh
> <rasland@nvidia.com>; ferruh.yigit@amd.com;
> andrew.rybchenko@oktetlabs.ru
> Subject: Re: [RFC v2 3/7] ethdev: introduce Rx queue based limit watermark
>
> External email: Use caution opening links or attachments
>
>
> 23/05/2022 05:01, Spike Du:
> > From: Stephen Hemminger <stephen@networkplumber.org>
> > > Spike Du <spiked@nvidia.com> wrote:
> > > > --- a/lib/ethdev/rte_ethdev.h
> > > > +++ b/lib/ethdev/rte_ethdev.h
> > > > @@ -1249,7 +1249,16 @@ struct rte_eth_rxconf {
> > > > */
> > > > union rte_eth_rxseg *rx_seg;
> > > >
> > > > - uint64_t reserved_64s[2]; /**< Reserved for future fields */
> > > > + /**
> > > > + * Per-queue Rx limit watermark defined as percentage of Rx queue
> > > > + * size. If Rx queue receives traffic higher than this percentage,
> > > > + * the event RTE_ETH_EVENT_RX_LWM is triggered.
> > > > + */
> > > > + uint8_t lwm;
> > > > +
> > > > + uint8_t reserved_bits[3];
> > > > + uint32_t reserved_32s;
> > > > + uint64_t reserved_64s;
> > >
> > > Ok but, this is an ABI risk about this because reserved stuff was
> > > never required before.
>
> An ABI compatibility issue would be for an application compiled with an old
> DPDK, and loading a new DPDK at runtime.
> Let's think what would happen in such a case.
>
> > > Whenever is a reserved field is introduced the code (in this case
> > > rte_ethdev_configure).
>
> rte_eth_rx_queue_setup() is called with rx_conf->lwm not initialized.
> Then the library and drivers may interpret a wrong value.
>
> > > Best practice would have been to have the code require all reserved
> > > fields be
> > > 0 in earlier releases. In this case an application is like to define
> > > a watermark of zero; how will your code handle it.
> >
> > Having watermark of 0 is desired, which is the default. LWM of 0 means
> > the Rx Queue's watermark is not monitored, hence no LWM event is
> generated.
>
> The problem is to have a value not initialized.
> I think the best approach is to not expose the LWM value through this
> configuration structure.
> If the need is to get the current value, we should better add a field in the
> struct rte_eth_rxq_info.
At least from all the dpdk app/example code, rxconf is initialized to 0 then setup
The Rx queue, if user follows these examples we should not have ABI issue.
Since many people are concerned about rxconf change, it's ok to remove the LWM
Field there.
Yes, I think we can add lwm into rte_eth_rxq_info. If we can set Rx queue's attribute,
We should have a way to get it.
>
> [...]
> >
> > > Why introduce new query/set operations? This should just be part of
> > > the overall device configuration.
>
> Thanks to the "set" function, we can avoid the ABI compat issue.
>
> > Due to different implementation. LWM can be a dynamic configuration
> which can help user design a flexible flow control.
> > User may feel ok with LWM of 80% to get high throughput, or later on with
> 50% to throttle the traffic responsively by handling LWM event in order to
> reduce drop.
> > Some driver like mlx5 may implement LWM event as one-time shot. When
> > you receive LWM event, you need to reconfigure LWM in order to receive
> the event again, thus you will not likely to be overwhelmed by the events.
> > These all require set operation.
>
> Yes it is better to allow dynamic watermark configuration, not using the
> function rte_eth_rx_queue_setup().
>
> > For the query operation. The rte_event API
> rte_eth_dev_callback_process() is per-port API, it doesn't carry much
> information when an event happens.
> > When a LWM event happens, we need to know in which Rx queue it
> happens or optionally what's the current LWM percentage of this queue.
> > The query operation serves this purpose.
>
> Yes "query" has to be called in the event handler because event structure is
> not specific to any event type.
>
>
^ permalink raw reply [relevance 3%]
* Re: [RFC v2 3/7] ethdev: introduce Rx queue based limit watermark
2022-05-23 3:01 0% ` Spike Du
2022-05-23 21:45 4% ` Thomas Monjalon
@ 2022-05-23 22:54 0% ` Stephen Hemminger
2022-05-24 3:46 0% ` Spike Du
1 sibling, 1 reply; 200+ results
From: Stephen Hemminger @ 2022-05-23 22:54 UTC (permalink / raw)
To: Spike Du
Cc: Matan Azrad, Slava Ovsiienko, Ori Kam,
NBU-Contact-Thomas Monjalon (EXTERNAL),
dev, Raslan Darawsheh
On Mon, 23 May 2022 03:01:20 +0000
Spike Du <spiked@nvidia.com> wrote:
> Hi, pls see below.
>
> > -----Original Message-----
> > From: Stephen Hemminger <stephen@networkplumber.org>
> > Sent: Sunday, May 22, 2022 11:23 PM
> > To: Spike Du <spiked@nvidia.com>
> > Cc: Matan Azrad <matan@nvidia.com>; Slava Ovsiienko
> > <viacheslavo@nvidia.com>; Ori Kam <orika@nvidia.com>; NBU-Contact-
> > Thomas Monjalon (EXTERNAL) <thomas@monjalon.net>; dev@dpdk.org;
> > Raslan Darawsheh <rasland@nvidia.com>
> > Subject: Re: [RFC v2 3/7] ethdev: introduce Rx queue based limit watermark
> >
> > External email: Use caution opening links or attachments
> >
> >
> > On Sun, 22 May 2022 08:58:56 +0300
> > Spike Du <spiked@nvidia.com> wrote:
> >
> > > diff --git a/lib/ethdev/rte_ethdev.h b/lib/ethdev/rte_ethdev.h index
> > > 04cff8ee10..687ae5ff29 100644
> > > --- a/lib/ethdev/rte_ethdev.h
> > > +++ b/lib/ethdev/rte_ethdev.h
> > > @@ -1249,7 +1249,16 @@ struct rte_eth_rxconf {
> > > */
> > > union rte_eth_rxseg *rx_seg;
> > >
> > > - uint64_t reserved_64s[2]; /**< Reserved for future fields */
> > > + /**
> > > + * Per-queue Rx limit watermark defined as percentage of Rx queue
> > > + * size. If Rx queue receives traffic higher than this percentage,
> > > + * the event RTE_ETH_EVENT_RX_LWM is triggered.
> > > + */
> > > + uint8_t lwm;
> > > +
> > > + uint8_t reserved_bits[3];
> > > + uint32_t reserved_32s;
> > > + uint64_t reserved_64s;
> > > void *reserved_ptrs[2]; /**< Reserved for future fields */
> > > };
> > >
> >
> > Ok but, this is an ABI risk about this because reserved stuff was never
> > required before.
> > Whenever is a reserved field is introduced the code (in this case
> > rte_ethdev_configure).
> >
> > Best practice would have been to have the code require all reserved fields be
> > 0 in earlier releases. In this case an application is like to define a watermark of
> > zero; how will your code handle it.
> Having watermark of 0 is desired, which is the default. LWM of 0 means the Rx
> Queue's watermark is not monitored, hence no LWM event is generated.
> >
> > Also, using 8 bits as percentage is different than how other API's handle this.
> > Since Rx queue size is in packets, why is this not in packets?
> The short answer is to simply the LWM configuration.
> Rx queue descriptor is complex nowadays.
> For normal queue, user may configure LWM according to queue descriptor number easily.
> But for below queues, it's not easy:
> Take mprq as example, the testpmd cmd options can be " -a 0000:03:00.0,rxqs_min_mprq=1,mprq_en=1,mprq_max_memcpy_len=465,mprq_log_stride_size=8,mprq_log_stride_num=3
> -- --mbcache=512 -i --nb-cores=7 --txd=1024 --rxd=1024 ",
> For MLX5 implementation, the minimum "unit" in queue has 64 descriptors, the "unit" number is 16, if you configure according to descriptor number(1024)
> Here, you may easily set LWM as something like 512, but HW doesn't allow it, because 512 > 16. If you want the watermark to be half, the correct value is 8.
> The same issue happens to feature like "Rx queue buffer split" where a packet can be split to multiple descriptors.
> Using percentage doesn't have such issues, PMD will cover all the details.
>
> > Also document what behavior of 0 is.
> Sure. The behavior is like the old days without this feature, pls see above.
>
> > Why introduce new query/set operations? This should just be part of the
> > overall device configuration.
> Due to different implementation. LWM can be a dynamic configuration which can help user design a flexible flow control.
> User may feel ok with LWM of 80% to get high throughput, or later on with 50% to throttle the traffic responsively by handling LWM event in order to reduce drop.
> Some driver like mlx5 may implement LWM event as one-time shot. When you receive LWM event, you need to reconfigure LWM in order to receive the event again, thus you will
> not likely to be overwhelmed by the events.
> These all require set operation.
>
> For the query operation. The rte_event API rte_eth_dev_callback_process() is per-port API, it doesn't carry much information when an event happens.
> When a LWM event happens, we need to know in which Rx queue it happens or optionally what's the current LWM percentage of this queue.
> The query operation serves this purpose.
>
>
> Regards,
> Spike.
>
>
The bigger question is why does this have to be just MLX5 and why
can't it fit into the existing DPDK RX interrupt framework?
Linux and BSD have had this for years in their packet coalescing logic.
Ethtool provides ability to set lot of irq coalescing parameters like:
ethtool -C|--coalesce devname [adaptive-rx on|off] [adaptive-tx on|off]
[rx-usecs N] [rx-frames N] [rx-usecs-irq N] [rx-frames-irq N]
[tx-usecs N] [tx-frames N] [tx-usecs-irq N] [tx-frames-irq N]
[stats-block-usecs N] [pkt-rate-low N] [rx-usecs-low N]
[rx-frames-low N] [tx-usecs-low N] [tx-frames-low N]
[pkt-rate-high N] [rx-usecs-high N] [rx-frames-high N]
[tx-usecs-high N] [tx-frames-high N] [sample-interval N]
[cqe-mode-rx on|off] [cqe-mode-tx on|off]
It feels like this is just the DPDK version of a small subset of that.
Since many device already support IRQ coalescing, it would be best to build
one new API that has most of these. Rather than a MLX/Nvidia only API for
a single parameter.
^ permalink raw reply [relevance 0%]
* Re: [RFC v2 3/7] ethdev: introduce Rx queue based limit watermark
2022-05-23 3:01 0% ` Spike Du
@ 2022-05-23 21:45 4% ` Thomas Monjalon
2022-05-24 2:50 3% ` Spike Du
2022-05-23 22:54 0% ` Stephen Hemminger
1 sibling, 1 reply; 200+ results
From: Thomas Monjalon @ 2022-05-23 21:45 UTC (permalink / raw)
To: Stephen Hemminger, Spike Du
Cc: dev, Matan Azrad, Slava Ovsiienko, Ori Kam, Raslan Darawsheh,
ferruh.yigit, andrew.rybchenko
23/05/2022 05:01, Spike Du:
> From: Stephen Hemminger <stephen@networkplumber.org>
> > Spike Du <spiked@nvidia.com> wrote:
> > > --- a/lib/ethdev/rte_ethdev.h
> > > +++ b/lib/ethdev/rte_ethdev.h
> > > @@ -1249,7 +1249,16 @@ struct rte_eth_rxconf {
> > > */
> > > union rte_eth_rxseg *rx_seg;
> > >
> > > - uint64_t reserved_64s[2]; /**< Reserved for future fields */
> > > + /**
> > > + * Per-queue Rx limit watermark defined as percentage of Rx queue
> > > + * size. If Rx queue receives traffic higher than this percentage,
> > > + * the event RTE_ETH_EVENT_RX_LWM is triggered.
> > > + */
> > > + uint8_t lwm;
> > > +
> > > + uint8_t reserved_bits[3];
> > > + uint32_t reserved_32s;
> > > + uint64_t reserved_64s;
> >
> > Ok but, this is an ABI risk about this because reserved stuff was never
> > required before.
An ABI compatibility issue would be for an application compiled
with an old DPDK, and loading a new DPDK at runtime.
Let's think what would happen in such a case.
> > Whenever is a reserved field is introduced the code (in this case
> > rte_ethdev_configure).
rte_eth_rx_queue_setup() is called with rx_conf->lwm not initialized.
Then the library and drivers may interpret a wrong value.
> > Best practice would have been to have the code require all reserved fields be
> > 0 in earlier releases. In this case an application is like to define a watermark of
> > zero; how will your code handle it.
>
> Having watermark of 0 is desired, which is the default. LWM of 0 means the Rx
> Queue's watermark is not monitored, hence no LWM event is generated.
The problem is to have a value not initialized.
I think the best approach is to not expose the LWM value
through this configuration structure.
If the need is to get the current value,
we should better add a field in the struct rte_eth_rxq_info.
[...]
>
> > Why introduce new query/set operations? This should just be part of the
> > overall device configuration.
Thanks to the "set" function, we can avoid the ABI compat issue.
> Due to different implementation. LWM can be a dynamic configuration which can help user design a flexible flow control.
> User may feel ok with LWM of 80% to get high throughput, or later on with 50% to throttle the traffic responsively by handling LWM event in order to reduce drop.
> Some driver like mlx5 may implement LWM event as one-time shot. When you receive LWM event, you need to reconfigure LWM in order to receive the event again, thus you will
> not likely to be overwhelmed by the events.
> These all require set operation.
Yes it is better to allow dynamic watermark configuration,
not using the function rte_eth_rx_queue_setup().
> For the query operation. The rte_event API rte_eth_dev_callback_process() is per-port API, it doesn't carry much information when an event happens.
> When a LWM event happens, we need to know in which Rx queue it happens or optionally what's the current LWM percentage of this queue.
> The query operation serves this purpose.
Yes "query" has to be called in the event handler
because event structure is not specific to any event type.
^ permalink raw reply [relevance 4%]
* RE: [RFC v2 3/7] ethdev: introduce Rx queue based limit watermark
2022-05-22 15:23 3% ` Stephen Hemminger
@ 2022-05-23 3:01 0% ` Spike Du
2022-05-23 21:45 4% ` Thomas Monjalon
2022-05-23 22:54 0% ` Stephen Hemminger
0 siblings, 2 replies; 200+ results
From: Spike Du @ 2022-05-23 3:01 UTC (permalink / raw)
To: Stephen Hemminger
Cc: Matan Azrad, Slava Ovsiienko, Ori Kam,
NBU-Contact-Thomas Monjalon (EXTERNAL),
dev, Raslan Darawsheh
Hi, pls see below.
> -----Original Message-----
> From: Stephen Hemminger <stephen@networkplumber.org>
> Sent: Sunday, May 22, 2022 11:23 PM
> To: Spike Du <spiked@nvidia.com>
> Cc: Matan Azrad <matan@nvidia.com>; Slava Ovsiienko
> <viacheslavo@nvidia.com>; Ori Kam <orika@nvidia.com>; NBU-Contact-
> Thomas Monjalon (EXTERNAL) <thomas@monjalon.net>; dev@dpdk.org;
> Raslan Darawsheh <rasland@nvidia.com>
> Subject: Re: [RFC v2 3/7] ethdev: introduce Rx queue based limit watermark
>
> External email: Use caution opening links or attachments
>
>
> On Sun, 22 May 2022 08:58:56 +0300
> Spike Du <spiked@nvidia.com> wrote:
>
> > diff --git a/lib/ethdev/rte_ethdev.h b/lib/ethdev/rte_ethdev.h index
> > 04cff8ee10..687ae5ff29 100644
> > --- a/lib/ethdev/rte_ethdev.h
> > +++ b/lib/ethdev/rte_ethdev.h
> > @@ -1249,7 +1249,16 @@ struct rte_eth_rxconf {
> > */
> > union rte_eth_rxseg *rx_seg;
> >
> > - uint64_t reserved_64s[2]; /**< Reserved for future fields */
> > + /**
> > + * Per-queue Rx limit watermark defined as percentage of Rx queue
> > + * size. If Rx queue receives traffic higher than this percentage,
> > + * the event RTE_ETH_EVENT_RX_LWM is triggered.
> > + */
> > + uint8_t lwm;
> > +
> > + uint8_t reserved_bits[3];
> > + uint32_t reserved_32s;
> > + uint64_t reserved_64s;
> > void *reserved_ptrs[2]; /**< Reserved for future fields */
> > };
> >
>
> Ok but, this is an ABI risk about this because reserved stuff was never
> required before.
> Whenever is a reserved field is introduced the code (in this case
> rte_ethdev_configure).
>
> Best practice would have been to have the code require all reserved fields be
> 0 in earlier releases. In this case an application is like to define a watermark of
> zero; how will your code handle it.
Having watermark of 0 is desired, which is the default. LWM of 0 means the Rx
Queue's watermark is not monitored, hence no LWM event is generated.
>
> Also, using 8 bits as percentage is different than how other API's handle this.
> Since Rx queue size is in packets, why is this not in packets?
The short answer is to simply the LWM configuration.
Rx queue descriptor is complex nowadays.
For normal queue, user may configure LWM according to queue descriptor number easily.
But for below queues, it's not easy:
Take mprq as example, the testpmd cmd options can be " -a 0000:03:00.0,rxqs_min_mprq=1,mprq_en=1,mprq_max_memcpy_len=465,mprq_log_stride_size=8,mprq_log_stride_num=3
-- --mbcache=512 -i --nb-cores=7 --txd=1024 --rxd=1024 ",
For MLX5 implementation, the minimum "unit" in queue has 64 descriptors, the "unit" number is 16, if you configure according to descriptor number(1024)
Here, you may easily set LWM as something like 512, but HW doesn't allow it, because 512 > 16. If you want the watermark to be half, the correct value is 8.
The same issue happens to feature like "Rx queue buffer split" where a packet can be split to multiple descriptors.
Using percentage doesn't have such issues, PMD will cover all the details.
> Also document what behavior of 0 is.
Sure. The behavior is like the old days without this feature, pls see above.
> Why introduce new query/set operations? This should just be part of the
> overall device configuration.
Due to different implementation. LWM can be a dynamic configuration which can help user design a flexible flow control.
User may feel ok with LWM of 80% to get high throughput, or later on with 50% to throttle the traffic responsively by handling LWM event in order to reduce drop.
Some driver like mlx5 may implement LWM event as one-time shot. When you receive LWM event, you need to reconfigure LWM in order to receive the event again, thus you will
not likely to be overwhelmed by the events.
These all require set operation.
For the query operation. The rte_event API rte_eth_dev_callback_process() is per-port API, it doesn't carry much information when an event happens.
When a LWM event happens, we need to know in which Rx queue it happens or optionally what's the current LWM percentage of this queue.
The query operation serves this purpose.
Regards,
Spike.
^ permalink raw reply [relevance 0%]
* RE: [PATCH 04/12] net/ena: fix build with GCC 12
2022-05-21 16:23 0% ` Stephen Hemminger
@ 2022-05-22 20:30 0% ` Morten Brørup
0 siblings, 0 replies; 200+ results
From: Morten Brørup @ 2022-05-22 20:30 UTC (permalink / raw)
To: Stephen Hemminger
Cc: David Marchand, dev, thomas, ferruh.yigit, stable, Marcin Wojtas,
Michal Krawczyk, Shai Brandes, Evgeny Schemeilin, Igor Chauskin
> From: Stephen Hemminger [mailto:stephen@networkplumber.org]
> Sent: Saturday, 21 May 2022 18.24
>
> On Sat, 21 May 2022 11:49:47 +0200
> Morten Brørup <mb@smartsharesystems.com> wrote:
>
> > >
> > > Also, worth considering dropping DPDK random number generator
> > > in userspace for security reasons and just using more secure kernel
> > > code.
> >
> > Absolutely not! We need a fast pseudorandom number generator in DPDK.
> >
> > If anything, we could consider renaming the functions and header file
> to reflect that they are pseudorandom number generators, and not
> (cryptographically) random generators. That would cause an API/ABI
> breakage, so it's probably not going to happen. ;-)
>
>
> The Linux kernel has received an way more attention on random numbers
> than
> DPDK. If you follow the history, what happens is that a simple dumb LCG
> or similar random number generator gets invented, and then gets used
> for
> lots of things that people don't think need a strong generator.
>
> Followed by DoS and other attacks where the weak random number
> generator
> is broken when used for doing things like creating sequence numbers of
> TCP port assignment. This is then followed by even more work on the
> kernel random number generator to make the default random number
> generator
> stronger.
>
> I bring up this history, so that DPDK won't have to repeat it.
>
> Right now the DPDK random number generator is insecure because it uses
> long but weak PRNG and never reseeds itself.
>
> See:
> https://lwn.net/Articles/884875/
>
> There is also FIPS to consider.
> https://lwn.net/Articles/877607/
>
> Since random number generators are hard, prefer that someone else do it
> :-)
First of all, I would like to thank you for the history lesson and references, Stephen, it made my Saturday evening much more nerdy and interesting than expected! Not being a native English speaker, please understand that I mean this sincerely. I really enjoyed reading about this corner of the Linux kernel history.
Overall, I think that RNGs generally fall into two categories: Unsafe (regardless how advanced) and safe for crypto use.
It should be OK for DPDK to provide something blazing fast, but unsafe. The DPDK documentation clearly states that the provided random functions are not safe for crypto, so I would expect the developers to use them accordingly.
Having thought about it, I came to this conclusion: Regardless if we provide unsafe RNG functions in DPDK or not, it is ultimately up to the application developers to choose which RNG category to use for different purposes. If we don't provide something fast, developers will just use the standard rand48() functions or similar. And a blazing fast (but unsafe) RNG is useful for simple things like pseudo-random packet sampling in the data plane.
Who would have thought that using a simple RNG for TCP port assignment could end up being a security problem... The developers will always have a choice between secure and fast, and the risk of a developer making the wrong decision is not affected by DPDK providing some unsafe RNG or not.
At a higher level, I come to think of the RFCs, which all have a Security Considerations chapter. Ideally, all patches had such a chapter, and all reviews considered the security aspects, so someone would catch the use of an unsafe RNG where a safe RNG should be used. Removing the rand() functions from DPDK will not have the desired effect, only raising security awareness will.
And just to leave off where you left off: I 100 % agree that we should not try to invent our own crypto safe RNG!
PS: I assume that safe RNGs cannot generate numbers at the same rate as unsafe RNGs. If this was not generally true, there should be no need to use unsafe RNGs (except for test purposes, where reproducibility is a requirement).
In cases where the safe RNG can generate numbers at a sufficiently high rate, why not use it? This, however, requires that the application developer knows both the required rate and the rate of the safe RNG, which I guess very few developers do.
^ permalink raw reply [relevance 0%]
* Re: [RFC v2 3/7] ethdev: introduce Rx queue based limit watermark
@ 2022-05-22 15:23 3% ` Stephen Hemminger
2022-05-23 3:01 0% ` Spike Du
0 siblings, 1 reply; 200+ results
From: Stephen Hemminger @ 2022-05-22 15:23 UTC (permalink / raw)
To: Spike Du; +Cc: matan, viacheslavo, orika, thomas, dev, rasland
On Sun, 22 May 2022 08:58:56 +0300
Spike Du <spiked@nvidia.com> wrote:
> diff --git a/lib/ethdev/rte_ethdev.h b/lib/ethdev/rte_ethdev.h
> index 04cff8ee10..687ae5ff29 100644
> --- a/lib/ethdev/rte_ethdev.h
> +++ b/lib/ethdev/rte_ethdev.h
> @@ -1249,7 +1249,16 @@ struct rte_eth_rxconf {
> */
> union rte_eth_rxseg *rx_seg;
>
> - uint64_t reserved_64s[2]; /**< Reserved for future fields */
> + /**
> + * Per-queue Rx limit watermark defined as percentage of Rx queue
> + * size. If Rx queue receives traffic higher than this percentage,
> + * the event RTE_ETH_EVENT_RX_LWM is triggered.
> + */
> + uint8_t lwm;
> +
> + uint8_t reserved_bits[3];
> + uint32_t reserved_32s;
> + uint64_t reserved_64s;
> void *reserved_ptrs[2]; /**< Reserved for future fields */
> };
>
Ok but, this is an ABI risk about this because reserved stuff was never required before.
Whenever is a reserved field is introduced the code (in this case rte_ethdev_configure).
Best practice would have been to have the code require all reserved fields be 0
in earlier releases. In this case an application is like to define a watermark
of zero; how will your code handle it.
Also, using 8 bits as percentage is different than how other API's handle this.
Since Rx queue size is in packets, why is this not in packets?
Also document what behavior of 0 is.
Why introduce new query/set operations? This should just be part of the overall
device configuration.
^ permalink raw reply [relevance 3%]
* Re: [PATCH 04/12] net/ena: fix build with GCC 12
2022-05-21 9:49 3% ` Morten Brørup
@ 2022-05-21 16:23 0% ` Stephen Hemminger
2022-05-22 20:30 0% ` Morten Brørup
0 siblings, 1 reply; 200+ results
From: Stephen Hemminger @ 2022-05-21 16:23 UTC (permalink / raw)
To: Morten Brørup
Cc: David Marchand, dev, thomas, ferruh.yigit, stable, Marcin Wojtas,
Michal Krawczyk, Shai Brandes, Evgeny Schemeilin, Igor Chauskin
On Sat, 21 May 2022 11:49:47 +0200
Morten Brørup <mb@smartsharesystems.com> wrote:
> >
> > Also, worth considering dropping DPDK random number generator
> > in userspace for security reasons and just using more secure kernel
> > code.
>
> Absolutely not! We need a fast pseudorandom number generator in DPDK.
>
> If anything, we could consider renaming the functions and header file to reflect that they are pseudorandom number generators, and not (cryptographically) random generators. That would cause an API/ABI breakage, so it's probably not going to happen. ;-)
The Linux kernel has received an way more attention on random numbers than
DPDK. If you follow the history, what happens is that a simple dumb LCG
or similar random number generator gets invented, and then gets used for
lots of things that people don't think need a strong generator.
Followed by DoS and other attacks where the weak random number generator
is broken when used for doing things like creating sequence numbers of
TCP port assignment. This is then followed by even more work on the
kernel random number generator to make the default random number generator
stronger.
I bring up this history, so that DPDK won't have to repeat it.
Right now the DPDK random number generator is insecure because it uses
long but weak PRNG and never reseeds itself.
See:
https://lwn.net/Articles/884875/
There is also FIPS to consider.
https://lwn.net/Articles/877607/
Since random number generators are hard, prefer that someone else do it :-)
^ permalink raw reply [relevance 0%]
* Re: [dpdk-dev] [PATCH v7 1/4] ethdev: support device reset and recovery events
@ 2022-05-21 10:33 0% ` fengchengwen
2022-05-24 15:11 0% ` Ray Kinsella
0 siblings, 1 reply; 200+ results
From: fengchengwen @ 2022-05-21 10:33 UTC (permalink / raw)
To: Ray Kinsella, Thomas Monjalon
Cc: Ferruh Yigit, Kalesh A P, dev, ajit.khaparde, asafp,
David Marchand, Andrew Rybchenko, lizhenyi1, shuliubin 00419723
Hi all,
This patch lasts for a long time. Are we waiting for 22.11 to deal with it?
We have the same requirements for the reset or recovery mechanism, but there are differences:
APP PMD
| |
| detect error
| <---report error event--- |
| |
do error stats |
and report |
| ---start recover--> |
| do recover
| <---report recover result |
| |
if succ just log
else may migrate
service
Can we generalize these processes(means that the implementation is at the framework layer)? or only at PMD API?
On 2022/2/15 0:06, Ray Kinsella wrote:
>
> Thomas Monjalon <thomas@monjalon.net> writes:
>
>> 14/02/2022 11:16, Ray Kinsella:
>>> Ray Kinsella <mdr@ashroe.eu> writes:
>>>> Thomas Monjalon <thomas@monjalon.net> writes:
>>>>> 02/02/2022 12:44, Ray Kinsella:
>>>>>> Ferruh Yigit <ferruh.yigit@intel.com> writes:
>>>>>>> On 1/28/2022 12:48 PM, Kalesh A P wrote:
>>>>>>>> --- a/lib/ethdev/rte_ethdev.h
>>>>>>>> +++ b/lib/ethdev/rte_ethdev.h
>>>>>>>> @@ -3818,6 +3818,24 @@ enum rte_eth_event_type {
>>>>>>>> RTE_ETH_EVENT_DESTROY, /**< port is released */
>>>>>>>> RTE_ETH_EVENT_IPSEC, /**< IPsec offload related event */
>>>>>>>> RTE_ETH_EVENT_FLOW_AGED,/**< New aged-out flows is detected */
>>>>>>>> + RTE_ETH_EVENT_ERR_RECOVERING,
>>>>>>>> + /**< port recovering from an error
>>>>>>>> + *
>>>>>>>> + * PMD detected a FW reset or error condition.
>>>>>>>> + * PMD will try to recover from the error.
>>>>>>>> + * Data path may be quiesced and Control path operations
>>>>>>>> + * may fail at this time.
>>>>>>>> + */
>>>>>>>> + RTE_ETH_EVENT_RECOVERED,
>>>>>>>> + /**< port recovered from an error
>>>>>>>> + *
>>>>>>>> + * PMD has recovered from the error condition.
>>>>>>>> + * Control path and Data path are up now.
>>>>>>>> + * PMD re-configures the port to the state prior to the error.
>>>>>>>> + * Since the device has undergone a reset, flow rules
>>>>>>>> + * offloaded prior to reset may be lost and
>>>>>>>> + * the application should recreate the rules again.
>>>>>>>> + */
>>>>>>>> RTE_ETH_EVENT_MAX /**< max value of this enum */
>>>>>>>
>>>>>>>
>>>>>>> Also ABI check complains about 'RTE_ETH_EVENT_MAX' value check, cc'ed more people
>>>>>>> to evaluate if it is a false positive:
>>>>>>>
>>>>>>>
>>>>>>> 1 function with some indirect sub-type change:
>>>>>>> [C] 'function int rte_eth_dev_callback_register(uint16_t, rte_eth_event_type, rte_eth_dev_cb_fn, void*)' at rte_ethdev.c:4637:1 has some indirect sub-type changes:
>>>>>>> parameter 3 of type 'typedef rte_eth_dev_cb_fn' has sub-type changes:
>>>>>>> underlying type 'int (typedef uint16_t, enum rte_eth_event_type, void*, void*)*' changed:
>>>>>>> in pointed to type 'function type int (typedef uint16_t, enum rte_eth_event_type, void*, void*)':
>>>>>>> parameter 2 of type 'enum rte_eth_event_type' has sub-type changes:
>>>>>>> type size hasn't changed
>>>>>>> 2 enumerator insertions:
>>>>>>> 'rte_eth_event_type::RTE_ETH_EVENT_ERR_RECOVERING' value '11'
>>>>>>> 'rte_eth_event_type::RTE_ETH_EVENT_RECOVERED' value '12'
>>>>>>> 1 enumerator change:
>>>>>>> 'rte_eth_event_type::RTE_ETH_EVENT_MAX' from value '11' to '13' at rte_ethdev.h:3807:1
>>>>>>
>>>>>> I don't immediately see the problem that this would cause.
>>>>>> There are no array sizes etc dependent on the value of MAX for instance.
>>>>>>
>>>>>> Looks safe?
>>>>>
>>>>> We never know how this enum will be used by the application.
>>>>> The max value may be used for the size of an event array.
>>>>> It looks a real ABI issue unfortunately.
>>>>
>>>> Right - but we only really care about it when an array size based on MAX
>>>> is likely to be passed to DPDK, which doesn't apply in this case.
>>
>> I don't completely agree.
>> A developer may assume an event will never exceed MAX value.
>> However, after an upgrade of DPDK without app rebuild,
>> a higher event value may be received in the app,
>> breaking the assumption.
>> Should we consider this case as an ABI breakage?
>
> Nope - I think we should explicitly exclude MAX values from any
> ABI guarantee, as being able to change them is key to our be able to
> evolve DPDK while maintaining ABI stability.
>
> Consider what it means applying the ABI policy to a MAX value, you are
> in effect saying that that no value can be added to this enumeration
> until the next ABI version, for me this is very restrictive without a
> solid reason.
>
>>
>>>> I noted that some Linux folks explicitly mark similar MAX values as not
>>>> part of the ABI.
>>>>
>>>> /usr/include/linux/perf_event.h
>>>> 37: PERF_TYPE_MAX, /* non-ABI */
>>>> 60: PERF_COUNT_HW_MAX, /* non-ABI */
>>>> 79: PERF_COUNT_HW_CACHE_MAX, /* non-ABI */
>>>> 87: PERF_COUNT_HW_CACHE_OP_MAX, /* non-ABI */
>>>> 94: PERF_COUNT_HW_CACHE_RESULT_MAX, /* non-ABI */
>>>> 116: PERF_COUNT_SW_MAX, /* non-ABI */
>>>> 149: PERF_SAMPLE_MAX = 1U << 24, /* non-ABI */
>>>> 151: __PERF_SAMPLE_CALLCHAIN_EARLY = 1ULL << 63, /*
>>>> non-ABI; internal use */
>>>> 189: PERF_SAMPLE_BRANCH_MAX_SHIFT /* non-ABI */
>>>> 267: PERF_TXN_MAX = (1 << 8), /* non-ABI */
>>>> 301: PERF_FORMAT_MAX = 1U << 4, /* non-ABI */
>>>> 1067: PERF_RECORD_MAX, /* non-ABI */
>>>> 1078: PERF_RECORD_KSYMBOL_TYPE_MAX /* non-ABI */
>>>> 1087: PERF_BPF_EVENT_MAX, /* non-ABI */
>>>
>>> Any thoughts on similarly annotating all our _MAX enums in the same way?
>>> We could also add a section in the ABI Policy to make it explicit _MAX
>>> enum values are not part of the ABI - what do folks think?
>>
>> Interesting. I am not sure it is always ABI-safe though.
>
>
^ permalink raw reply [relevance 0%]
* RE: [PATCH 04/12] net/ena: fix build with GCC 12
@ 2022-05-21 9:49 3% ` Morten Brørup
2022-05-21 16:23 0% ` Stephen Hemminger
0 siblings, 1 reply; 200+ results
From: Morten Brørup @ 2022-05-21 9:49 UTC (permalink / raw)
To: Stephen Hemminger, David Marchand
Cc: dev, thomas, ferruh.yigit, stable, Marcin Wojtas,
Michal Krawczyk, Shai Brandes, Evgeny Schemeilin, Igor Chauskin
> From: Stephen Hemminger [mailto:stephen@networkplumber.org]
> Sent: Friday, 20 May 2022 22.28
>
> On Wed, 18 May 2022 12:16:49 +0200
> David Marchand <david.marchand@redhat.com> wrote:
>
> > + for (i = 0; i < RTE_DIM(default_key); ++i)
> > default_key[i] = rte_rand() & 0xff;
>
> We should have rte_random_bytes() functionality if this gets
> used often.
Since the other pseudorandom functions are called rand, such a function should be named rte_rand_bytes().
>
> Also, worth considering dropping DPDK random number generator
> in userspace for security reasons and just using more secure kernel
> code.
Absolutely not! We need a fast pseudorandom number generator in DPDK.
If anything, we could consider renaming the functions and header file to reflect that they are pseudorandom number generators, and not (cryptographically) random generators. That would cause an API/ABI breakage, so it's probably not going to happen. ;-)
^ permalink raw reply [relevance 3%]
* RE: [EXT] [PATCH 00/40] cryptodev: rsa, dh, ecdh changes
2022-05-20 7:30 0% ` [EXT] [PATCH 00/40] cryptodev: rsa, dh, ecdh changes Akhil Goyal
@ 2022-05-20 7:37 0% ` Kusztal, ArkadiuszX
0 siblings, 0 replies; 200+ results
From: Kusztal, ArkadiuszX @ 2022-05-20 7:37 UTC (permalink / raw)
To: Akhil Goyal, dev; +Cc: Anoob Joseph, Zhang, Roy Fan
> -----Original Message-----
> From: Akhil Goyal <gakhil@marvell.com>
> Sent: Friday, May 20, 2022 9:30 AM
> To: Kusztal, ArkadiuszX <arkadiuszx.kusztal@intel.com>; dev@dpdk.org
> Cc: Anoob Joseph <anoobj@marvell.com>; Zhang, Roy Fan
> <roy.fan.zhang@intel.com>
> Subject: RE: [EXT] [PATCH 00/40] cryptodev: rsa, dh, ecdh changes
>
> > This patchset introduces some of changes discussed on mailing list for
> > 22.07 release in cryptodev asym.
> >
> > Key changes:
> >
> > - It fixes API for RSA (expescially signature paddings)
> > - Adds Elliptic-Curve Diffie-Hellman
> > - Removes LIST_END enumerators (ABI issue - supressed asym_xform)
> > - Adds Eliiptic-Curve point verification (DH verification - but will
> > be used only for
> > EC)
> > - Adds RSA missing padding fields.
> > - Adds asym op flags
> > - Fixes many API comments (like EC curves)
> >
> > Commits are grouped by functionality, and mostly independent.
>
> Please ensure all commits compile individually.
> Also mark previous versions in patchworks as superseded.
[Arek] - I will send v2 then, and I will fix all technical issues. Please verify if you are fine with changes proposed,. Most of these changes were already proposed in previous patches and in RFCs with no or minor problems found. Second patchset I would like to send contains capability changes and montgormery/Edwards curvers (would be good to have this in this release).
>
> >
> > Arek Kusztal (40):
> > cryptodev: redefine ec group enum
> > cryptodev: remove list end enumerators
> > test/crypto: remove list end enumerators
> > cryptodev: reduce number of comments in asym xform
> > test/crypto: removed asym xform none
> > cryptodev: separate key exchange operation enum
> > crypto/openssl: separate key exchange operation enum
> > test/crypto: separate key exchange operation enum
> > cryptodev: remove unnecessary zero assignement
> > cryptodev: remove comment about using ephemeral key in dsa
> > cryptodev: remove asym crypto next xform
> > crypto/openssl: remove asym crypto next xform
> > test/crypto: remove asym crypto next xform
> > app/test-crypto-perf: remove asym crypto next xform
> > app/test-eventdev: remove asym crypto next xform
> > cryptodev: move dh type from xform to dh op
> > crypto/openssl: move dh type from xform to dh op
> > test/crypto: move dh type from xform to dh op
> > cryptodev: changed order of dh fields
> > cryptodev: add elliptic curve diffie hellman
> > cryptodev: add public key verify option
> > cryptodev: move RSA padding into separate struct
> > crypto/qat: move RSA padding into separate struct
> > crypto/openssl: move RSA padding into separate struct
> > crypto/octeontx: move RSA padding into separate struct
> > crypto/cnxk: move RSA padding into separate struct
> > common/cpt: move RSA padding into separate struct
> > test/crypto: move RSA padding into separate struct
> > cryptodev: add salt length and optional label
> > cryptodev: reduce rsa struct to only necessary fields
> > crypto/qat: reduce rsa struct to only necessary fields
> > crypto/openssl: reduce rsa struct to only necessary fields
> > crypto/octeontx: reduce rsa struct to only necessary fields
> > crypto/cnxk: reduce rsa struct to only necessary fields
> > common/cpt: reduce rsa struct to only necessary fields
> > test/crypto: reduce rsa struct to only necessary fields
> > cryptodev: add asym op flags
> > cryptodev: clarify usage of private key in dh
> > crypto/openssl: generate dh private key
> > test/crypto: added test for dh priv key generation
> >
> > app/test-crypto-perf/cperf_ops.c | 1 -
> > app/test-eventdev/test_perf_common.c | 1 -
> > app/test/test_cryptodev_asym.c | 117 +++++----
> > app/test/test_cryptodev_dh_test_vectors.h | 1 -
> > app/test/test_cryptodev_dsa_test_vectors.h | 1 -
> > app/test/test_cryptodev_mod_test_vectors.h | 2 -
> > app/test/test_cryptodev_rsa_test_vectors.h | 2 -
> > app/test/test_event_crypto_adapter.c | 4 -
> > devtools/libabigail.abignore | 2 +
> > drivers/common/cpt/cpt_ucode_asym.h | 12 +-
> > drivers/crypto/cnxk/cnxk_ae.h | 44 ++--
> > drivers/crypto/octeontx/otx_cryptodev_ops.c | 26 +-
> > drivers/crypto/openssl/rte_openssl_pmd.c | 47 ++--
> > drivers/crypto/openssl/rte_openssl_pmd_ops.c | 33 +--
> > drivers/crypto/qat/qat_asym.c | 28 +--
> > lib/cryptodev/rte_crypto_asym.h | 342 ++++++++++++++++-----------
> > lib/cryptodev/rte_cryptodev.c | 15 +-
> > 17 files changed, 358 insertions(+), 320 deletions(-)
> >
> > --
> > 2.13.6
^ permalink raw reply [relevance 0%]
* RE: [EXT] [PATCH 00/40] cryptodev: rsa, dh, ecdh changes
2022-05-20 5:54 3% [PATCH 00/40] cryptodev: rsa, dh, ecdh changes Arek Kusztal
2022-05-20 5:54 8% ` [PATCH 02/40] cryptodev: remove list end enumerators Arek Kusztal
@ 2022-05-20 7:30 0% ` Akhil Goyal
2022-05-20 7:37 0% ` Kusztal, ArkadiuszX
1 sibling, 1 reply; 200+ results
From: Akhil Goyal @ 2022-05-20 7:30 UTC (permalink / raw)
To: Arek Kusztal, dev; +Cc: Anoob Joseph, roy.fan.zhang
> This patchset introduces some of changes discussed on mailing list
> for 22.07 release in cryptodev asym.
>
> Key changes:
>
> - It fixes API for RSA (expescially signature paddings)
> - Adds Elliptic-Curve Diffie-Hellman
> - Removes LIST_END enumerators (ABI issue - supressed asym_xform)
> - Adds Eliiptic-Curve point verification (DH verification - but will be used only for
> EC)
> - Adds RSA missing padding fields.
> - Adds asym op flags
> - Fixes many API comments (like EC curves)
>
> Commits are grouped by functionality, and mostly independent.
Please ensure all commits compile individually.
Also mark previous versions in patchworks as superseded.
>
> Arek Kusztal (40):
> cryptodev: redefine ec group enum
> cryptodev: remove list end enumerators
> test/crypto: remove list end enumerators
> cryptodev: reduce number of comments in asym xform
> test/crypto: removed asym xform none
> cryptodev: separate key exchange operation enum
> crypto/openssl: separate key exchange operation enum
> test/crypto: separate key exchange operation enum
> cryptodev: remove unnecessary zero assignement
> cryptodev: remove comment about using ephemeral key in dsa
> cryptodev: remove asym crypto next xform
> crypto/openssl: remove asym crypto next xform
> test/crypto: remove asym crypto next xform
> app/test-crypto-perf: remove asym crypto next xform
> app/test-eventdev: remove asym crypto next xform
> cryptodev: move dh type from xform to dh op
> crypto/openssl: move dh type from xform to dh op
> test/crypto: move dh type from xform to dh op
> cryptodev: changed order of dh fields
> cryptodev: add elliptic curve diffie hellman
> cryptodev: add public key verify option
> cryptodev: move RSA padding into separate struct
> crypto/qat: move RSA padding into separate struct
> crypto/openssl: move RSA padding into separate struct
> crypto/octeontx: move RSA padding into separate struct
> crypto/cnxk: move RSA padding into separate struct
> common/cpt: move RSA padding into separate struct
> test/crypto: move RSA padding into separate struct
> cryptodev: add salt length and optional label
> cryptodev: reduce rsa struct to only necessary fields
> crypto/qat: reduce rsa struct to only necessary fields
> crypto/openssl: reduce rsa struct to only necessary fields
> crypto/octeontx: reduce rsa struct to only necessary fields
> crypto/cnxk: reduce rsa struct to only necessary fields
> common/cpt: reduce rsa struct to only necessary fields
> test/crypto: reduce rsa struct to only necessary fields
> cryptodev: add asym op flags
> cryptodev: clarify usage of private key in dh
> crypto/openssl: generate dh private key
> test/crypto: added test for dh priv key generation
>
> app/test-crypto-perf/cperf_ops.c | 1 -
> app/test-eventdev/test_perf_common.c | 1 -
> app/test/test_cryptodev_asym.c | 117 +++++----
> app/test/test_cryptodev_dh_test_vectors.h | 1 -
> app/test/test_cryptodev_dsa_test_vectors.h | 1 -
> app/test/test_cryptodev_mod_test_vectors.h | 2 -
> app/test/test_cryptodev_rsa_test_vectors.h | 2 -
> app/test/test_event_crypto_adapter.c | 4 -
> devtools/libabigail.abignore | 2 +
> drivers/common/cpt/cpt_ucode_asym.h | 12 +-
> drivers/crypto/cnxk/cnxk_ae.h | 44 ++--
> drivers/crypto/octeontx/otx_cryptodev_ops.c | 26 +-
> drivers/crypto/openssl/rte_openssl_pmd.c | 47 ++--
> drivers/crypto/openssl/rte_openssl_pmd_ops.c | 33 +--
> drivers/crypto/qat/qat_asym.c | 28 +--
> lib/cryptodev/rte_crypto_asym.h | 342 ++++++++++++++++-----------
> lib/cryptodev/rte_cryptodev.c | 15 +-
> 17 files changed, 358 insertions(+), 320 deletions(-)
>
> --
> 2.13.6
^ permalink raw reply [relevance 0%]
* RE: [EXT] [PATCH 02/40] cryptodev: remove list end enumerators
2022-05-20 5:54 8% ` [PATCH 02/40] cryptodev: remove list end enumerators Arek Kusztal
@ 2022-05-20 7:19 0% ` Akhil Goyal
0 siblings, 0 replies; 200+ results
From: Akhil Goyal @ 2022-05-20 7:19 UTC (permalink / raw)
To: Arek Kusztal, dev; +Cc: Anoob Joseph, roy.fan.zhang, mdr
> - Removed LIST_END enumerators from asymmetric crypto API.
> Adding new enum entries would require moving
> LIST_END down, therefore changing its assigned number.
> This would cause problems to ABI stability, so these
> enums were removed.
>
> Cc: mdr@ashroe.eu
>
> Signed-off-by: Arek Kusztal <arkadiuszx.kusztal@intel.com>
> ---
There was already a patch in patchworks but it need rework.
Can you look at this and address the comments
http://patches.dpdk.org/project/dpdk/patch/20211008204516.3497060-1-gakhil@marvell.com/
> devtools/libabigail.abignore | 2 ++
> lib/cryptodev/rte_crypto_asym.h | 10 +++-------
> 2 files changed, 5 insertions(+), 7 deletions(-)
>
> diff --git a/devtools/libabigail.abignore b/devtools/libabigail.abignore
> index 79ff15dc4e..f1945ce3b7 100644
> --- a/devtools/libabigail.abignore
> +++ b/devtools/libabigail.abignore
> @@ -27,6 +27,8 @@
> ; Ignore changes to rte_crypto_asym_op, asymmetric crypto API is
> experimental
> [suppress_type]
> name = rte_crypto_asym_op
> +[suppress_type]
> + name = rte_crypto_asym_xform_type
>
> ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
> ; Temporary exceptions till next major ABI version ;
> diff --git a/lib/cryptodev/rte_crypto_asym.h b/lib/cryptodev/rte_crypto_asym.h
> index 7206652458..a474b6acd1 100644
> --- a/lib/cryptodev/rte_crypto_asym.h
> +++ b/lib/cryptodev/rte_crypto_asym.h
> @@ -95,10 +95,8 @@ enum rte_crypto_asym_xform_type {
> /**< Elliptic Curve Digital Signature Algorithm
> * Perform Signature Generation and Verification.
> */
> - RTE_CRYPTO_ASYM_XFORM_ECPM,
> + RTE_CRYPTO_ASYM_XFORM_ECPM
> /**< Elliptic Curve Point Multiplication */
> - RTE_CRYPTO_ASYM_XFORM_TYPE_LIST_END
> - /**< End of list */
> };
>
> /**
> @@ -117,9 +115,8 @@ enum rte_crypto_asym_op_type {
> /**< DH Private Key generation operation */
> RTE_CRYPTO_ASYM_OP_PUBLIC_KEY_GENERATE,
> /**< DH Public Key generation operation */
> - RTE_CRYPTO_ASYM_OP_SHARED_SECRET_COMPUTE,
> + RTE_CRYPTO_ASYM_OP_SHARED_SECRET_COMPUTE
> /**< DH Shared Secret compute operation */
> - RTE_CRYPTO_ASYM_OP_LIST_END
> };
>
> /**
> @@ -134,9 +131,8 @@ enum rte_crypto_rsa_padding_type {
> */
> RTE_CRYPTO_RSA_PADDING_OAEP,
> /**< RSA PKCS#1 OAEP padding scheme */
> - RTE_CRYPTO_RSA_PADDING_PSS,
> + RTE_CRYPTO_RSA_PADDING_PSS
> /**< RSA PKCS#1 PSS padding scheme */
> - RTE_CRYPTO_RSA_PADDING_TYPE_LIST_END
> };
>
> /**
> --
> 2.13.6
^ permalink raw reply [relevance 0%]
* [PATCH 02/40] cryptodev: remove list end enumerators
2022-05-20 5:54 3% [PATCH 00/40] cryptodev: rsa, dh, ecdh changes Arek Kusztal
@ 2022-05-20 5:54 8% ` Arek Kusztal
2022-05-20 7:19 0% ` [EXT] " Akhil Goyal
2022-05-20 7:30 0% ` [EXT] [PATCH 00/40] cryptodev: rsa, dh, ecdh changes Akhil Goyal
1 sibling, 1 reply; 200+ results
From: Arek Kusztal @ 2022-05-20 5:54 UTC (permalink / raw)
To: dev; +Cc: gakhil, anoobj, roy.fan.zhang, Arek Kusztal, mdr
- Removed LIST_END enumerators from asymmetric crypto API.
Adding new enum entries would require moving
LIST_END down, therefore changing its assigned number.
This would cause problems to ABI stability, so these
enums were removed.
Cc: mdr@ashroe.eu
Signed-off-by: Arek Kusztal <arkadiuszx.kusztal@intel.com>
---
devtools/libabigail.abignore | 2 ++
lib/cryptodev/rte_crypto_asym.h | 10 +++-------
2 files changed, 5 insertions(+), 7 deletions(-)
diff --git a/devtools/libabigail.abignore b/devtools/libabigail.abignore
index 79ff15dc4e..f1945ce3b7 100644
--- a/devtools/libabigail.abignore
+++ b/devtools/libabigail.abignore
@@ -27,6 +27,8 @@
; Ignore changes to rte_crypto_asym_op, asymmetric crypto API is experimental
[suppress_type]
name = rte_crypto_asym_op
+[suppress_type]
+ name = rte_crypto_asym_xform_type
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Temporary exceptions till next major ABI version ;
diff --git a/lib/cryptodev/rte_crypto_asym.h b/lib/cryptodev/rte_crypto_asym.h
index 7206652458..a474b6acd1 100644
--- a/lib/cryptodev/rte_crypto_asym.h
+++ b/lib/cryptodev/rte_crypto_asym.h
@@ -95,10 +95,8 @@ enum rte_crypto_asym_xform_type {
/**< Elliptic Curve Digital Signature Algorithm
* Perform Signature Generation and Verification.
*/
- RTE_CRYPTO_ASYM_XFORM_ECPM,
+ RTE_CRYPTO_ASYM_XFORM_ECPM
/**< Elliptic Curve Point Multiplication */
- RTE_CRYPTO_ASYM_XFORM_TYPE_LIST_END
- /**< End of list */
};
/**
@@ -117,9 +115,8 @@ enum rte_crypto_asym_op_type {
/**< DH Private Key generation operation */
RTE_CRYPTO_ASYM_OP_PUBLIC_KEY_GENERATE,
/**< DH Public Key generation operation */
- RTE_CRYPTO_ASYM_OP_SHARED_SECRET_COMPUTE,
+ RTE_CRYPTO_ASYM_OP_SHARED_SECRET_COMPUTE
/**< DH Shared Secret compute operation */
- RTE_CRYPTO_ASYM_OP_LIST_END
};
/**
@@ -134,9 +131,8 @@ enum rte_crypto_rsa_padding_type {
*/
RTE_CRYPTO_RSA_PADDING_OAEP,
/**< RSA PKCS#1 OAEP padding scheme */
- RTE_CRYPTO_RSA_PADDING_PSS,
+ RTE_CRYPTO_RSA_PADDING_PSS
/**< RSA PKCS#1 PSS padding scheme */
- RTE_CRYPTO_RSA_PADDING_TYPE_LIST_END
};
/**
--
2.13.6
^ permalink raw reply [relevance 8%]
* [PATCH 00/40] cryptodev: rsa, dh, ecdh changes
@ 2022-05-20 5:54 3% Arek Kusztal
2022-05-20 5:54 8% ` [PATCH 02/40] cryptodev: remove list end enumerators Arek Kusztal
2022-05-20 7:30 0% ` [EXT] [PATCH 00/40] cryptodev: rsa, dh, ecdh changes Akhil Goyal
0 siblings, 2 replies; 200+ results
From: Arek Kusztal @ 2022-05-20 5:54 UTC (permalink / raw)
To: dev; +Cc: gakhil, anoobj, roy.fan.zhang, Arek Kusztal
This patchset introduces some of changes discussed on mailing list
for 22.07 release in cryptodev asym.
Key changes:
- It fixes API for RSA (expescially signature paddings)
- Adds Elliptic-Curve Diffie-Hellman
- Removes LIST_END enumerators (ABI issue - supressed asym_xform)
- Adds Eliiptic-Curve point verification (DH verification - but will be used only for EC)
- Adds RSA missing padding fields.
- Adds asym op flags
- Fixes many API comments (like EC curves)
Commits are grouped by functionality, and mostly independent.
Arek Kusztal (40):
cryptodev: redefine ec group enum
cryptodev: remove list end enumerators
test/crypto: remove list end enumerators
cryptodev: reduce number of comments in asym xform
test/crypto: removed asym xform none
cryptodev: separate key exchange operation enum
crypto/openssl: separate key exchange operation enum
test/crypto: separate key exchange operation enum
cryptodev: remove unnecessary zero assignement
cryptodev: remove comment about using ephemeral key in dsa
cryptodev: remove asym crypto next xform
crypto/openssl: remove asym crypto next xform
test/crypto: remove asym crypto next xform
app/test-crypto-perf: remove asym crypto next xform
app/test-eventdev: remove asym crypto next xform
cryptodev: move dh type from xform to dh op
crypto/openssl: move dh type from xform to dh op
test/crypto: move dh type from xform to dh op
cryptodev: changed order of dh fields
cryptodev: add elliptic curve diffie hellman
cryptodev: add public key verify option
cryptodev: move RSA padding into separate struct
crypto/qat: move RSA padding into separate struct
crypto/openssl: move RSA padding into separate struct
crypto/octeontx: move RSA padding into separate struct
crypto/cnxk: move RSA padding into separate struct
common/cpt: move RSA padding into separate struct
test/crypto: move RSA padding into separate struct
cryptodev: add salt length and optional label
cryptodev: reduce rsa struct to only necessary fields
crypto/qat: reduce rsa struct to only necessary fields
crypto/openssl: reduce rsa struct to only necessary fields
crypto/octeontx: reduce rsa struct to only necessary fields
crypto/cnxk: reduce rsa struct to only necessary fields
common/cpt: reduce rsa struct to only necessary fields
test/crypto: reduce rsa struct to only necessary fields
cryptodev: add asym op flags
cryptodev: clarify usage of private key in dh
crypto/openssl: generate dh private key
test/crypto: added test for dh priv key generation
app/test-crypto-perf/cperf_ops.c | 1 -
app/test-eventdev/test_perf_common.c | 1 -
app/test/test_cryptodev_asym.c | 117 +++++----
app/test/test_cryptodev_dh_test_vectors.h | 1 -
app/test/test_cryptodev_dsa_test_vectors.h | 1 -
app/test/test_cryptodev_mod_test_vectors.h | 2 -
app/test/test_cryptodev_rsa_test_vectors.h | 2 -
app/test/test_event_crypto_adapter.c | 4 -
devtools/libabigail.abignore | 2 +
drivers/common/cpt/cpt_ucode_asym.h | 12 +-
drivers/crypto/cnxk/cnxk_ae.h | 44 ++--
drivers/crypto/octeontx/otx_cryptodev_ops.c | 26 +-
drivers/crypto/openssl/rte_openssl_pmd.c | 47 ++--
drivers/crypto/openssl/rte_openssl_pmd_ops.c | 33 +--
drivers/crypto/qat/qat_asym.c | 28 +--
lib/cryptodev/rte_crypto_asym.h | 342 ++++++++++++++++-----------
lib/cryptodev/rte_cryptodev.c | 15 +-
17 files changed, 358 insertions(+), 320 deletions(-)
--
2.13.6
^ permalink raw reply [relevance 3%]
* RE: [PATCH v5 1/4] lib/ethdev: introduce protocol type based buffer split
2022-05-17 21:12 3% ` Thomas Monjalon
@ 2022-05-19 14:40 0% ` Ding, Xuan
2022-05-26 14:58 0% ` Ding, Xuan
0 siblings, 1 reply; 200+ results
From: Ding, Xuan @ 2022-05-19 14:40 UTC (permalink / raw)
To: Thomas Monjalon, Wang, YuanX, Wu, WenxuanX
Cc: andrew.rybchenko, Li, Xiaoyun, ferruh.yigit, Singh, Aman Deep,
dev, Zhang, Yuying, Zhang, Qi Z, jerinjacobk, stephen, mb,
viacheslavo, Yu, Ping
Hi Thomas,
> -----Original Message-----
> From: Thomas Monjalon <thomas@monjalon.net>
> Sent: Wednesday, May 18, 2022 5:12 AM
> To: Ding, Xuan <xuan.ding@intel.com>; Wang, YuanX
> <yuanx.wang@intel.com>; Wu, WenxuanX <wenxuanx.wu@intel.com>
> Cc: andrew.rybchenko@oktetlabs.ru; Li, Xiaoyun <xiaoyun.li@intel.com>;
> ferruh.yigit@xilinx.com; Singh, Aman Deep <aman.deep.singh@intel.com>;
> dev@dpdk.org; Zhang, Yuying <yuying.zhang@intel.com>; Zhang, Qi Z
> <qi.z.zhang@intel.com>; jerinjacobk@gmail.com;
> stephen@networkplumber.org; mb@smartsharesystems.com;
> viacheslavo@nvidia.com; Yu, Ping <ping.yu@intel.com>
> Subject: Re: [PATCH v5 1/4] lib/ethdev: introduce protocol type based buffer
> split
>
> Hello,
>
> It seems you didn't try to address my main comment on v4:
> "
> Before doing anything, the first patch of this series should make the current
> status clearer.
> Example, this line does not explain what it does:
> uint16_t split_hdr_size; /**< hdr buf size (header_split enabled).*/ And
> header_split has been removed in ab3ce1e0c193 ("ethdev: remove old
> offload API")
>
> If RTE_ETH_RX_OFFLOAD_HEADER_SPLIT is not needed, let's add a comment
> to start a deprecation.
> "
Thank you for the detailed review.
First of all, I agree that header split should be deprecated.
Since it is unrelated with buffer split, I was planning to send the deprecation notice
in 22.07 sometime later and start the deprecation in 22.11.
If you think it should be the first step, I will send the deprecation notice first.
>
> Also the comment from Andrew about removing limitation to 2 packets is not
> addressed.
Secondly, it is said that the protocol based buffer split will divide the packet into two segments.
Because I thought it will only be used in the split between header and payload.
In fact, protocol based buffer split can support multi-segment split.
That is to say, like length-based buffer split, we define a series of protos,
as the split point of protocol based buffer split. And this series of protos,
like lengths, indicate the split location.
For example, a packet consists of MAC/IPV4/UDP/payload.
If we define the buffer split proto with IPV4, and UDP, the packet will be
split into three segments:
seg0: MAC and IPV4 header, 34 bytes
seg1: UDP header, 8 bytes
seg2: Payload, the actual payload size
What do you think of this design?
>
> All the part about the protocols capability is missing here.
Yes, I missed the protocols capability with RTE_PTYPE* now.
I will update the doc with supported protocol capability in v6.
>
> It is not encouraging.
>
> 26/04/2022 13:13, wenxuanx.wu@intel.com:
> > From: Wenxuan Wu <wenxuanx.wu@intel.com>
> >
> > Protocol based buffer split consists of splitting a received packet
> > into two separate regions based on its content. The split happens
> > after the packet protocol header and before the packet payload.
> > Splitting is usually between the packet protocol header that can be
> > posted to a dedicated buffer and the packet payload that can be posted to
> a different buffer.
> >
> > Currently, Rx buffer split supports length and offset based packet split.
> > protocol split is based on buffer split, configuring length of buffer
> > split is not suitable for NICs that do split based on protocol types.
>
> Why? Is it impossible to support length split on Intel NIC?
Yes, our NIC supports split based on protocol types. And I think there are other vendors too.
The existence of tunneling results in the composition of a packet is various.
Given a changeable length, it is impossible to tell the driver a fixed protocol type.
>
> > Because tunneling makes the conversion from length to protocol type
> > impossible.
>
> This is not a HW issue.
> I agree on the need but that a different usage than length split.
I think the new usage can solve this problem, so that length split
and proto split can have the same result.
>
> > This patch extends the current buffer split to support protocol and
> > offset based buffer split. A new proto field is introduced in the
> > rte_eth_rxseg_split structure reserved field to specify header
> > protocol type. With Rx queue offload
> RTE_ETH_RX_OFFLOAD_BUFFER_SPLIT
> > enabled and corresponding protocol type configured. PMD will split the
> ingress packets into two separate regions.
> > Currently, both inner and outer L2/L3/L4 level protocol based buffer
> > split can be supported.
> >
> > For example, let's suppose we configured the Rx queue with the
> > following segments:
> > seg0 - pool0, off0=2B
> > seg1 - pool1, off1=128B
> >
> > With protocol split type configured with RTE_PTYPE_L4_UDP. The packet
> > consists of MAC_IP_UDP_PAYLOAD will be splitted like following:
> > seg0 - udp header @ RTE_PKTMBUF_HEADROOM + 2 in mbuf from pool0
> > seg1 - payload @ 128 in mbuf from pool1
>
> Not clear what is the calculation.
The previous usage of protocol based split is the split between header and payload.
Here for a packet composed of MAC_IP_UDP_PAYLOAD, with protocol split type RTE_PTYPE_L4_UDP
configured, it means split between the UDP header and payload.
In length configuration, the proto = RTE_PTYPE_L4_UDP means length = 42B.
>
> > The memory attributes for the split parts may differ either - for
> > example the mempool0 and mempool1 belong to dpdk memory and
> external
> > memory, respectively.
> >
> > Signed-off-by: Xuan Ding <xuan.ding@intel.com>
> > Signed-off-by: Yuan Wang <yuanx.wang@intel.com>
> > Signed-off-by: Wenxuan Wu <wenxuanx.wu@intel.com>
> > Reviewed-by: Qi Zhang <qi.z.zhang@intel.com>
> > ---
> > lib/ethdev/rte_ethdev.c | 36 +++++++++++++++++++++++++++++-------
> > lib/ethdev/rte_ethdev.h | 15 ++++++++++++++-
> > 2 files changed, 43 insertions(+), 8 deletions(-)
> >
> > diff --git a/lib/ethdev/rte_ethdev.c b/lib/ethdev/rte_ethdev.c index
> > 29a3d80466..1a2bc172ab 100644
> > --- a/lib/ethdev/rte_ethdev.c
> > +++ b/lib/ethdev/rte_ethdev.c
> > @@ -1661,6 +1661,7 @@ rte_eth_rx_queue_check_split(const struct
> rte_eth_rxseg_split *rx_seg,
> > struct rte_mempool *mpl = rx_seg[seg_idx].mp;
> > uint32_t length = rx_seg[seg_idx].length;
> > uint32_t offset = rx_seg[seg_idx].offset;
> > + uint32_t proto = rx_seg[seg_idx].proto;
> >
> > if (mpl == NULL) {
> > RTE_ETHDEV_LOG(ERR, "null mempool pointer\n");
> @@ -1694,13
> > +1695,34 @@ rte_eth_rx_queue_check_split(const struct
> rte_eth_rxseg_split *rx_seg,
> > }
> > offset += seg_idx != 0 ? 0 : RTE_PKTMBUF_HEADROOM;
> > *mbp_buf_size = rte_pktmbuf_data_room_size(mpl);
> > - length = length != 0 ? length : *mbp_buf_size;
> > - if (*mbp_buf_size < length + offset) {
> > - RTE_ETHDEV_LOG(ERR,
> > - "%s mbuf_data_room_size %u < %u
> (segment length=%u + segment offset=%u)\n",
> > - mpl->name, *mbp_buf_size,
> > - length + offset, length, offset);
> > - return -EINVAL;
> > + if (proto == 0) {
>
> Add a comment here, /* split at fixed length */
Thanks for the suggestion, will add it in next version.
>
> > + length = length != 0 ? length : *mbp_buf_size;
> > + if (*mbp_buf_size < length + offset) {
> > + RTE_ETHDEV_LOG(ERR,
> > + "%s mbuf_data_room_size %u < %u
> (segment length=%u + segment offset=%u)\n",
> > + mpl->name, *mbp_buf_size,
> > + length + offset, length, offset);
> > + return -EINVAL;
> > + }
> > + } else {
>
> Add a comment here, /* split after specified protocol header */
Thanks for the suggestion, will add it in next version.
>
> > + /* Ensure n_seg is 2 in protocol based buffer split. */
> > + if (n_seg != 2) {
>
> (should be a space, not a tab before brace)
Get it.
>
> Why do you limit the feature to 2 segments only?
Please see the new usage explained above.
>
> > + RTE_ETHDEV_LOG(ERR, "number of buffer
> split protocol segments should be 2.\n");
> > + return -EINVAL;
> > + }
> > + /* Length and protocol are exclusive here, so make
> sure length is 0 in protocol
> > + based buffer split. */
> > + if (length != 0) {
> > + RTE_ETHDEV_LOG(ERR, "segment length
> should be set to zero in buffer split\n");
> > + return -EINVAL;
> > + }
> > + if (*mbp_buf_size < offset) {
> > + RTE_ETHDEV_LOG(ERR,
> > + "%s
> mbuf_data_room_size %u < %u segment offset)\n",
> > + mpl->name, *mbp_buf_size,
> > + offset);
> > + return -EINVAL;
> [...]
> > + * - The proto in the elements defines the split position of received packets.
> > + *
> > * - If the length in the segment description element is zero
> > * the actual buffer size will be deduced from the appropriate
> > * memory pool properties.
> > @@ -1197,12 +1200,21 @@ struct rte_eth_txmode {
> > * - pool from the last valid element
> > * - the buffer size from this pool
> > * - zero offset
> > + *
> > + * - Length based buffer split:
> > + * - mp, length, offset should be configured.
> > + * - The proto should not be configured in length split. Zero default.
> > + *
> > + * - Protocol based buffer split:
> > + * - mp, offset, proto should be configured.
> > + * - The length should not be configured in protocol split. Zero default.
>
> What means "Zero default"?
> You should just ignore the non relevant field.
Yes, you are right, the none relevant field should be just ignored.
I will update the doc in v6.
>
> > struct rte_eth_rxseg_split {
> > struct rte_mempool *mp; /**< Memory pool to allocate segment
> from. */
> > uint16_t length; /**< Segment data length, configures split point. */
> > uint16_t offset; /**< Data offset from beginning of mbuf data buffer.
> */
> > - uint32_t reserved; /**< Reserved field. */
>
> How do you manage ABI compatibility?
> Was the reserved field initialized to 0 in previous versions?
I think we reached an agreement in RFC v1. There is no document for the reserved
field in the previous release. And it is always initialized to zero in real cases.
And now splitting based on fixed length and protocol header parsing is exclusive,
we can ignore the none relevant field.
>
> > + uint32_t proto; /**< Protocol of buffer split, determines protocol
> > +split point. */
>
> What are the values for "proto"?
Yes, I missed the protocol capability here, will fix it in v6.
>
> > @@ -1664,6 +1676,7 @@ struct rte_eth_conf {
> > RTE_ETH_RX_OFFLOAD_QINQ_STRIP) #define
> DEV_RX_OFFLOAD_VLAN
> > RTE_DEPRECATED(DEV_RX_OFFLOAD_VLAN) RTE_ETH_RX_OFFLOAD_VLAN
> >
> > +
>
> It looks to be an useless change.
Thanks for the catch, will fix it in next version.
Thanks again for your time.
Regards,
Xuan
>
> > /*
> > * If new Rx offload capabilities are defined, they also must be
> > * mentioned in rte_rx_offload_names in rte_ethdev.c file.
> >
>
>
>
>
^ permalink raw reply [relevance 0%]
* Re: [RFC v1 3/7] ethdev: introduce Rx queue based limit watermark
@ 2022-05-19 9:37 4% ` Andrew Rybchenko
0 siblings, 0 replies; 200+ results
From: Andrew Rybchenko @ 2022-05-19 9:37 UTC (permalink / raw)
To: Spike Du, matan, viacheslavo, orika, thomas; +Cc: dev, rasland
On 5/6/22 06:56, Spike Du wrote:
> LWM(limit watermark) is a per Rx queue attribute that notifies dpdk
dpdk is not necessary about.
I'm not sure that "attribute" can notify application. Please,
reword the description.
> application event of RTE_ETH_EVENT_RXQ_LIMIT_REACHED when the Rx
> queue's usable descriptor is under the watermark.
> To simplify its configuration, LWM is a percentage of Rx queue
> descriptor size with valid value of [0,99].
> Setting LWM to 0 means disable it.
... which is the default.
Can I request notification when no descriptors left?
1 seems to be close to the answer, but not in the case of big
Rx rings.
> Add LWM's configuration handle in eth_dev_ops.
handle sounds bad here. May be "driver callback" or "driver
method".
>
> Signed-off-by: Spike Du <spiked@nvidia.com>
> ---
> lib/ethdev/ethdev_driver.h | 7 +++++++
> lib/ethdev/rte_ethdev.c | 28 ++++++++++++++++++++++++++++
> lib/ethdev/rte_ethdev.h | 30 +++++++++++++++++++++++++++++-
> lib/ethdev/version.map | 3 +++
> 4 files changed, 67 insertions(+), 1 deletion(-)
>
> diff --git a/lib/ethdev/ethdev_driver.h b/lib/ethdev/ethdev_driver.h
> index 69d9dc2..1e9cdbf 100644
> --- a/lib/ethdev/ethdev_driver.h
> +++ b/lib/ethdev/ethdev_driver.h
> @@ -470,6 +470,10 @@ typedef int (*eth_rx_queue_setup_t)(struct rte_eth_dev *dev,
> const struct rte_eth_rxconf *rx_conf,
> struct rte_mempool *mb_pool);
>
> +typedef int (*eth_rx_queue_set_lwm_t)(struct rte_eth_dev *dev,
> + uint16_t rx_queue_id,
> + uint8_t lwm);
> +
Please, add full description including parameters and return
values.
> /** @internal Setup a transmit queue of an Ethernet device. */
> typedef int (*eth_tx_queue_setup_t)(struct rte_eth_dev *dev,
> uint16_t tx_queue_id,
> @@ -1283,6 +1287,9 @@ struct eth_dev_ops {
>
> /** Dump private info from device */
> eth_dev_priv_dump_t eth_dev_priv_dump;
> +
> + /** Set Rx queue limit watermark */
> + eth_rx_queue_set_lwm_t rx_queue_set_lwm;
> };
>
> /**
> diff --git a/lib/ethdev/rte_ethdev.c b/lib/ethdev/rte_ethdev.c
> index 29a3d80..1e4fc6a 100644
> --- a/lib/ethdev/rte_ethdev.c
> +++ b/lib/ethdev/rte_ethdev.c
> @@ -4414,6 +4414,34 @@ int rte_eth_set_queue_rate_limit(uint16_t port_id, uint16_t queue_idx,
> queue_idx, tx_rate));
> }
>
> +int rte_eth_rx_queue_set_lwm(uint16_t port_id, uint16_t queue_idx,
> + uint8_t lwm)
> +{
> + struct rte_eth_dev *dev;
> + struct rte_eth_dev_info dev_info;
> + int ret;
> +
> + RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV);
> + dev = &rte_eth_devices[port_id];
> +
> + ret = rte_eth_dev_info_get(port_id, &dev_info);
> + if (ret != 0)
> + return ret;
> +
> + if (queue_idx > dev_info.max_rx_queues) {
It should be >=
> + RTE_ETHDEV_LOG(ERR,
> + "Set queue rate limit:port %u: invalid queue ID=%u\n",
> + port_id, queue_idx);
> + return -EINVAL;
> + }
> +
> + if (lwm > 99)
> + return -EINVAL;
> + RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->rx_queue_set_lwm, -ENOTSUP);
> + return eth_err(port_id, (*dev->dev_ops->rx_queue_set_lwm)(dev,
> + queue_idx, lwm));
> +}
> +
> RTE_INIT(eth_dev_init_fp_ops)
> {
> uint32_t i;
> diff --git a/lib/ethdev/rte_ethdev.h b/lib/ethdev/rte_ethdev.h
> index 04cff8e..f29e53b 100644
> --- a/lib/ethdev/rte_ethdev.h
> +++ b/lib/ethdev/rte_ethdev.h
> @@ -1249,8 +1249,12 @@ struct rte_eth_rxconf {
> */
> union rte_eth_rxseg *rx_seg;
>
> - uint64_t reserved_64s[2]; /**< Reserved for future fields */
> + uint64_t reserved_64s;
> + uint32_t reserved_32s;
> + uint32_t lwm:8;
> + uint32_t reserved_bits:24;
I strong dislike bit fields for such purpose. It should
be uint8_t field.
Since we break ABI below anyway, we can break it here as well.
> void *reserved_ptrs[2]; /**< Reserved for future fields */
> +
No unrelated changes, please.
> };
>
> /**
> @@ -3668,6 +3672,29 @@ int rte_eth_dev_set_vlan_ether_type(uint16_t port_id,
> */
> int rte_eth_dev_set_vlan_pvid(uint16_t port_id, uint16_t pvid, int on);
>
> +/**
> + * @warning
> + * @b EXPERIMENTAL: this API may change without prior notice.
> + *
> + * Set Rx queue based limit watermark.
> + *
> + * @param port_id
> + * The port identifier of the Ethernet device.
> + * @param queue_idx
> + * The index of the receive queue
> + * @param lwm
> + * The limit watermark percentage of Rx queue descriptor size.
> + * The valid range is [0,99].
> + * Setting 0 means disable limit watermark.
> + *
> + * @return
> + * - (0) if successful.
> + * - negative if failed.
Please, be precise with negative return values specification
and its meaning.
> + */
> +__rte_experimental
> +int rte_eth_rx_queue_set_lwm(uint16_t port_id, uint16_t queue_idx,
> + uint8_t lwm);
> +
> typedef void (*buffer_tx_error_fn)(struct rte_mbuf **unsent, uint16_t count,
> void *userdata);
>
> @@ -3873,6 +3900,7 @@ enum rte_eth_event_type {
> RTE_ETH_EVENT_DESTROY, /**< port is released */
> RTE_ETH_EVENT_IPSEC, /**< IPsec offload related event */
> RTE_ETH_EVENT_FLOW_AGED,/**< New aged-out flows is detected */
> + RTE_ETH_EVENT_RXQ_LIMIT_REACHED,/**< RX queue limit reached */
RX -> Rx
as I understand it is an ABI breakage.
> RTE_ETH_EVENT_MAX /**< max value of this enum */
> };
>
> diff --git a/lib/ethdev/version.map b/lib/ethdev/version.map
> index 20391ab..8b85ad8 100644
> --- a/lib/ethdev/version.map
> +++ b/lib/ethdev/version.map
> @@ -279,6 +279,9 @@ EXPERIMENTAL {
> rte_flow_async_action_handle_create;
> rte_flow_async_action_handle_destroy;
> rte_flow_async_action_handle_update;
> +
> + # added in 22.07
> + rte_eth_rx_queue_set_lwm;
> };
>
> INTERNAL {
^ permalink raw reply [relevance 4%]
* Re: [PATCH v5 1/4] lib/ethdev: introduce protocol type based buffer split
@ 2022-05-17 21:12 3% ` Thomas Monjalon
2022-05-19 14:40 0% ` Ding, Xuan
0 siblings, 1 reply; 200+ results
From: Thomas Monjalon @ 2022-05-17 21:12 UTC (permalink / raw)
To: xuan.ding, yuanx.wang, wenxuanx.wu
Cc: andrew.rybchenko, xiaoyun.li, ferruh.yigit, aman.deep.singh, dev,
yuying.zhang, qi.z.zhang, jerinjacobk, stephen, mb, viacheslavo,
ping.yu
Hello,
It seems you didn't try to address my main comment on v4:
"
Before doing anything, the first patch of this series should make
the current status clearer.
Example, this line does not explain what it does:
uint16_t split_hdr_size; /**< hdr buf size (header_split enabled).*/
And header_split has been removed in ab3ce1e0c193 ("ethdev: remove old offload API")
If RTE_ETH_RX_OFFLOAD_HEADER_SPLIT is not needed,
let's add a comment to start a deprecation.
"
Also the comment from Andrew about removing limitation to 2 packets
is not addressed.
All the part about the protocols capability is missing here.
It is not encouraging.
26/04/2022 13:13, wenxuanx.wu@intel.com:
> From: Wenxuan Wu <wenxuanx.wu@intel.com>
>
> Protocol based buffer split consists of splitting a received packet into two
> separate regions based on its content. The split happens after the packet
> protocol header and before the packet payload. Splitting is usually between
> the packet protocol header that can be posted to a dedicated buffer and the
> packet payload that can be posted to a different buffer.
>
> Currently, Rx buffer split supports length and offset based packet split.
> protocol split is based on buffer split, configuring length of buffer split
> is not suitable for NICs that do split based on protocol types.
Why? Is it impossible to support length split on Intel NIC?
> Because tunneling makes the conversion from length
> to protocol type impossible.
This is not a HW issue.
I agree on the need but that a different usage than length split.
> This patch extends the current buffer split to support protocol and offset
> based buffer split. A new proto field is introduced in the rte_eth_rxseg_split
> structure reserved field to specify header protocol type. With Rx queue
> offload RTE_ETH_RX_OFFLOAD_BUFFER_SPLIT enabled and corresponding protocol
> type configured. PMD will split the ingress packets into two separate regions.
> Currently, both inner and outer L2/L3/L4 level protocol based buffer split
> can be supported.
>
> For example, let's suppose we configured the Rx queue with the
> following segments:
> seg0 - pool0, off0=2B
> seg1 - pool1, off1=128B
>
> With protocol split type configured with RTE_PTYPE_L4_UDP. The packet
> consists of MAC_IP_UDP_PAYLOAD will be splitted like following:
> seg0 - udp header @ RTE_PKTMBUF_HEADROOM + 2 in mbuf from pool0
> seg1 - payload @ 128 in mbuf from pool1
Not clear what is the calculation.
> The memory attributes for the split parts may differ either - for example
> the mempool0 and mempool1 belong to dpdk memory and external memory,
> respectively.
>
> Signed-off-by: Xuan Ding <xuan.ding@intel.com>
> Signed-off-by: Yuan Wang <yuanx.wang@intel.com>
> Signed-off-by: Wenxuan Wu <wenxuanx.wu@intel.com>
> Reviewed-by: Qi Zhang <qi.z.zhang@intel.com>
> ---
> lib/ethdev/rte_ethdev.c | 36 +++++++++++++++++++++++++++++-------
> lib/ethdev/rte_ethdev.h | 15 ++++++++++++++-
> 2 files changed, 43 insertions(+), 8 deletions(-)
>
> diff --git a/lib/ethdev/rte_ethdev.c b/lib/ethdev/rte_ethdev.c
> index 29a3d80466..1a2bc172ab 100644
> --- a/lib/ethdev/rte_ethdev.c
> +++ b/lib/ethdev/rte_ethdev.c
> @@ -1661,6 +1661,7 @@ rte_eth_rx_queue_check_split(const struct rte_eth_rxseg_split *rx_seg,
> struct rte_mempool *mpl = rx_seg[seg_idx].mp;
> uint32_t length = rx_seg[seg_idx].length;
> uint32_t offset = rx_seg[seg_idx].offset;
> + uint32_t proto = rx_seg[seg_idx].proto;
>
> if (mpl == NULL) {
> RTE_ETHDEV_LOG(ERR, "null mempool pointer\n");
> @@ -1694,13 +1695,34 @@ rte_eth_rx_queue_check_split(const struct rte_eth_rxseg_split *rx_seg,
> }
> offset += seg_idx != 0 ? 0 : RTE_PKTMBUF_HEADROOM;
> *mbp_buf_size = rte_pktmbuf_data_room_size(mpl);
> - length = length != 0 ? length : *mbp_buf_size;
> - if (*mbp_buf_size < length + offset) {
> - RTE_ETHDEV_LOG(ERR,
> - "%s mbuf_data_room_size %u < %u (segment length=%u + segment offset=%u)\n",
> - mpl->name, *mbp_buf_size,
> - length + offset, length, offset);
> - return -EINVAL;
> + if (proto == 0) {
Add a comment here, /* split at fixed length */
> + length = length != 0 ? length : *mbp_buf_size;
> + if (*mbp_buf_size < length + offset) {
> + RTE_ETHDEV_LOG(ERR,
> + "%s mbuf_data_room_size %u < %u (segment length=%u + segment offset=%u)\n",
> + mpl->name, *mbp_buf_size,
> + length + offset, length, offset);
> + return -EINVAL;
> + }
> + } else {
Add a comment here, /* split after specified protocol header */
> + /* Ensure n_seg is 2 in protocol based buffer split. */
> + if (n_seg != 2) {
(should be a space, not a tab before brace)
Why do you limit the feature to 2 segments only?
> + RTE_ETHDEV_LOG(ERR, "number of buffer split protocol segments should be 2.\n");
> + return -EINVAL;
> + }
> + /* Length and protocol are exclusive here, so make sure length is 0 in protocol
> + based buffer split. */
> + if (length != 0) {
> + RTE_ETHDEV_LOG(ERR, "segment length should be set to zero in buffer split\n");
> + return -EINVAL;
> + }
> + if (*mbp_buf_size < offset) {
> + RTE_ETHDEV_LOG(ERR,
> + "%s mbuf_data_room_size %u < %u segment offset)\n",
> + mpl->name, *mbp_buf_size,
> + offset);
> + return -EINVAL;
[...]
> + * - The proto in the elements defines the split position of received packets.
> + *
> * - If the length in the segment description element is zero
> * the actual buffer size will be deduced from the appropriate
> * memory pool properties.
> @@ -1197,12 +1200,21 @@ struct rte_eth_txmode {
> * - pool from the last valid element
> * - the buffer size from this pool
> * - zero offset
> + *
> + * - Length based buffer split:
> + * - mp, length, offset should be configured.
> + * - The proto should not be configured in length split. Zero default.
> + *
> + * - Protocol based buffer split:
> + * - mp, offset, proto should be configured.
> + * - The length should not be configured in protocol split. Zero default.
What means "Zero default"?
You should just ignore the non relevant field.
> struct rte_eth_rxseg_split {
> struct rte_mempool *mp; /**< Memory pool to allocate segment from. */
> uint16_t length; /**< Segment data length, configures split point. */
> uint16_t offset; /**< Data offset from beginning of mbuf data buffer. */
> - uint32_t reserved; /**< Reserved field. */
How do you manage ABI compatibility?
Was the reserved field initialized to 0 in previous versions?
> + uint32_t proto; /**< Protocol of buffer split, determines protocol split point. */
What are the values for "proto"?
> @@ -1664,6 +1676,7 @@ struct rte_eth_conf {
> RTE_ETH_RX_OFFLOAD_QINQ_STRIP)
> #define DEV_RX_OFFLOAD_VLAN RTE_DEPRECATED(DEV_RX_OFFLOAD_VLAN) RTE_ETH_RX_OFFLOAD_VLAN
>
> +
It looks to be an useless change.
> /*
> * If new Rx offload capabilities are defined, they also must be
> * mentioned in rte_rx_offload_names in rte_ethdev.c file.
>
^ permalink raw reply [relevance 3%]
* RE: [PATCH v5 0/7] Add new cryptodev op for event metadata
2022-05-12 12:45 4% ` [PATCH v5 " Akhil Goyal
2022-05-12 12:45 2% ` [PATCH v5 1/7] cryptodev: add APIs to get/set " Akhil Goyal
@ 2022-05-16 18:30 0% ` Akhil Goyal
1 sibling, 0 replies; 200+ results
From: Akhil Goyal @ 2022-05-16 18:30 UTC (permalink / raw)
To: Akhil Goyal, dev
Cc: Anoob Joseph, Jerin Jacob Kollanukkaran, abhinandan.gujjar,
jay.jayatheerthan, narender.vangati, Volodymyr Fialko
> Subject: [PATCH v5 0/7] Add new cryptodev op for event metadata
>
> For using event crypto metadata, event metadata need to be set
> in session. For this session user data was used for symmetric
> crypto sessions and no support was present for asymmetric and
> security sessions.
> The use of userdata to store event metadata (which is dereferenced
> in PMD) is not correct as it is meant for the application to use it.
> Hence, a new API is created to set and get event crypto metadata which
> is scalable to all sessions supported by the crypto PMD.
> The application can use the set API to set event metadata and the
> PMD may store that inside the session private data and PMD need not
> use the get API as it would be internal to the PMD.
> For the software event crypto adapter implementation, the eventdev
> library can use the get API to get the event metadata stored inside
> the session structure.
> For Asymmetric sessions, a new field is added inside the session
> struct which is internal to library.
> For symmetric and security sessions, new field cannot be added as
> it would be ABI break. Hence, session userdata is being used to
> store that as it was used earlier. In next ABI break release this
> would be fixed similar to asymmetric crypto case.
>
> The patchset also add support for asymmetric crypto adapter
> in the test applications and the crypto/cnxk implementation of
> the new cryptodev op and corresponding changes in the eventdev lib.
>
> changes in v5:
> removed extra check for freeing mdata
Series Applied to dpdk-next-crypto
^ permalink raw reply [relevance 0%]
* [PATCH v4 2/5] eventdev: add weight and affinity to queue attributes
2022-05-16 17:35 3% ` [PATCH v4 0/5] Extend and set event queue attributes at runtime Shijith Thotton
@ 2022-05-16 17:35 3% ` Shijith Thotton
0 siblings, 0 replies; 200+ results
From: Shijith Thotton @ 2022-05-16 17:35 UTC (permalink / raw)
To: dev, jerinj
Cc: Shijith Thotton, pbhagavatula, harry.van.haaren, mattias.ronnblom, mdr
Extended eventdev queue QoS attributes to support weight and affinity.
If queues are of the same priority, events from the queue with highest
weight will be scheduled first. Affinity indicates the number of times,
the subsequent schedule calls from an event port will use the same event
queue. Schedule call selects another queue if current queue goes empty
or schedule count reaches affinity count.
To avoid ABI break, weight and affinity attributes are not yet added to
queue config structure and rely on PMD for managing it. New eventdev op
queue_attr_get can be used to get it from the PMD.
Signed-off-by: Shijith Thotton <sthotton@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
---
doc/guides/rel_notes/release_22_07.rst | 7 +++++
lib/eventdev/eventdev_pmd.h | 22 +++++++++++++++
lib/eventdev/rte_eventdev.c | 12 ++++++++
lib/eventdev/rte_eventdev.h | 38 ++++++++++++++++++++++++--
4 files changed, 77 insertions(+), 2 deletions(-)
diff --git a/doc/guides/rel_notes/release_22_07.rst b/doc/guides/rel_notes/release_22_07.rst
index a7a912d665..f35a31bbdf 100644
--- a/doc/guides/rel_notes/release_22_07.rst
+++ b/doc/guides/rel_notes/release_22_07.rst
@@ -70,6 +70,13 @@ New Features
Added new API ``rte_event_queue_attr_set()``, to set event queue attributes
at runtime.
+* **Added new queues attributes weight and affinity in eventdev.**
+
+ Defined new event queue attributes weight and affinity as below:
+
+ * ``RTE_EVENT_QUEUE_ATTR_WEIGHT``
+ * ``RTE_EVENT_QUEUE_ATTR_AFFINITY``
+
Removed Items
-------------
diff --git a/lib/eventdev/eventdev_pmd.h b/lib/eventdev/eventdev_pmd.h
index 3b85d9f7a5..5495aee4f6 100644
--- a/lib/eventdev/eventdev_pmd.h
+++ b/lib/eventdev/eventdev_pmd.h
@@ -341,6 +341,26 @@ typedef int (*eventdev_queue_setup_t)(struct rte_eventdev *dev,
typedef void (*eventdev_queue_release_t)(struct rte_eventdev *dev,
uint8_t queue_id);
+/**
+ * Get an event queue attribute at runtime.
+ *
+ * @param dev
+ * Event device pointer
+ * @param queue_id
+ * Event queue index
+ * @param attr_id
+ * Event queue attribute id
+ * @param[out] attr_value
+ * Event queue attribute value
+ *
+ * @return
+ * - 0: Success.
+ * - <0: Error code on failure.
+ */
+typedef int (*eventdev_queue_attr_get_t)(struct rte_eventdev *dev,
+ uint8_t queue_id, uint32_t attr_id,
+ uint32_t *attr_value);
+
/**
* Set an event queue attribute at runtime.
*
@@ -1231,6 +1251,8 @@ struct eventdev_ops {
/**< Set up an event queue. */
eventdev_queue_release_t queue_release;
/**< Release an event queue. */
+ eventdev_queue_attr_get_t queue_attr_get;
+ /**< Get an event queue attribute. */
eventdev_queue_attr_set_t queue_attr_set;
/**< Set an event queue attribute. */
diff --git a/lib/eventdev/rte_eventdev.c b/lib/eventdev/rte_eventdev.c
index a31e99be02..12b261f923 100644
--- a/lib/eventdev/rte_eventdev.c
+++ b/lib/eventdev/rte_eventdev.c
@@ -838,6 +838,18 @@ rte_event_queue_attr_get(uint8_t dev_id, uint8_t queue_id, uint32_t attr_id,
*attr_value = conf->schedule_type;
break;
+ case RTE_EVENT_QUEUE_ATTR_WEIGHT:
+ *attr_value = RTE_EVENT_QUEUE_WEIGHT_LOWEST;
+ if (dev->dev_ops->queue_attr_get)
+ return (*dev->dev_ops->queue_attr_get)(
+ dev, queue_id, attr_id, attr_value);
+ break;
+ case RTE_EVENT_QUEUE_ATTR_AFFINITY:
+ *attr_value = RTE_EVENT_QUEUE_AFFINITY_LOWEST;
+ if (dev->dev_ops->queue_attr_get)
+ return (*dev->dev_ops->queue_attr_get)(
+ dev, queue_id, attr_id, attr_value);
+ break;
default:
return -EINVAL;
};
diff --git a/lib/eventdev/rte_eventdev.h b/lib/eventdev/rte_eventdev.h
index a79b1397eb..9a7c0bcf25 100644
--- a/lib/eventdev/rte_eventdev.h
+++ b/lib/eventdev/rte_eventdev.h
@@ -222,8 +222,14 @@ struct rte_event;
/* Event device capability bitmap flags */
#define RTE_EVENT_DEV_CAP_QUEUE_QOS (1ULL << 0)
-/**< Event scheduling prioritization is based on the priority associated with
- * each event queue.
+/**< Event scheduling prioritization is based on the priority and weight
+ * associated with each event queue. Events from a queue with highest priority
+ * is scheduled first. If the queues are of same priority, weight of the queues
+ * are considered to select a queue in a weighted round robin fashion.
+ * Subsequent dequeue calls from an event port could see events from the same
+ * event queue, if the queue is configured with an affinity count. Affinity
+ * count is the number of subsequent dequeue calls, in which an event port
+ * should use the same event queue if the queue is non-empty
*
* @see rte_event_queue_setup(), rte_event_queue_attr_set()
*/
@@ -331,6 +337,26 @@ struct rte_event;
* @see rte_event_port_link()
*/
+/* Event queue scheduling weights */
+#define RTE_EVENT_QUEUE_WEIGHT_HIGHEST 255
+/**< Highest weight of an event queue
+ * @see rte_event_queue_attr_get(), rte_event_queue_attr_set()
+ */
+#define RTE_EVENT_QUEUE_WEIGHT_LOWEST 0
+/**< Lowest weight of an event queue
+ * @see rte_event_queue_attr_get(), rte_event_queue_attr_set()
+ */
+
+/* Event queue scheduling affinity */
+#define RTE_EVENT_QUEUE_AFFINITY_HIGHEST 255
+/**< Highest scheduling affinity of an event queue
+ * @see rte_event_queue_attr_get(), rte_event_queue_attr_set()
+ */
+#define RTE_EVENT_QUEUE_AFFINITY_LOWEST 0
+/**< Lowest scheduling affinity of an event queue
+ * @see rte_event_queue_attr_get(), rte_event_queue_attr_set()
+ */
+
/**
* Get the total number of event devices that have been successfully
* initialised.
@@ -684,6 +710,14 @@ rte_event_queue_setup(uint8_t dev_id, uint8_t queue_id,
* The schedule type of the queue.
*/
#define RTE_EVENT_QUEUE_ATTR_SCHEDULE_TYPE 4
+/**
+ * The weight of the queue.
+ */
+#define RTE_EVENT_QUEUE_ATTR_WEIGHT 5
+/**
+ * Affinity of the queue.
+ */
+#define RTE_EVENT_QUEUE_ATTR_AFFINITY 6
/**
* Get an attribute from a queue.
--
2.25.1
^ permalink raw reply [relevance 3%]
* [PATCH v4 0/5] Extend and set event queue attributes at runtime
2022-05-15 9:53 3% ` [PATCH v3 0/5] " Shijith Thotton
2022-05-15 9:53 3% ` [PATCH v3 2/5] eventdev: add weight and affinity to queue attributes Shijith Thotton
@ 2022-05-16 17:35 3% ` Shijith Thotton
2022-05-16 17:35 3% ` [PATCH v4 2/5] eventdev: add weight and affinity to queue attributes Shijith Thotton
1 sibling, 1 reply; 200+ results
From: Shijith Thotton @ 2022-05-16 17:35 UTC (permalink / raw)
To: dev, jerinj
Cc: Shijith Thotton, pbhagavatula, harry.van.haaren, mattias.ronnblom, mdr
This series adds support for setting event queue attributes at runtime
and adds two new event queue attributes weight and affinity. Eventdev
capability RTE_EVENT_DEV_CAP_RUNTIME_QUEUE_ATTR is added to expose the
capability to set attributes at runtime and rte_event_queue_attr_set()
API is used to set the attributes.
Attributes weight and affinity are not yet added to rte_event_queue_conf
structure to avoid ABI break and will be added in 22.11. Till then, PMDs
using the new attributes are expected to manage them.
Test application changes and example implementation are added as last
three patches.
v4:
* Removed EBUSY from rte_event_queue_attr_set() return vals.
v3:
* Updated release notes.
* Removed deprecation patch from series.
* Used event enq/deq to test queue priority.
v2:
* Modified attr_value type from u32 to u64 for set().
* Removed RTE_EVENT_QUEUE_ATTR_MAX macro.
* Fixed return value in implementation.
Pavan Nikhilesh (1):
common/cnxk: use lock when accessing mbox of SSO
Shijith Thotton (4):
eventdev: support to set queue attributes at runtime
eventdev: add weight and affinity to queue attributes
test/event: test cases to test runtime queue attribute
event/cnxk: support to set runtime queue attributes
app/test/test_eventdev.c | 201 ++++++++++++++++++++++
doc/guides/eventdevs/features/cnxk.ini | 1 +
doc/guides/eventdevs/features/default.ini | 1 +
doc/guides/rel_notes/release_22_07.rst | 12 ++
drivers/common/cnxk/roc_sso.c | 174 +++++++++++++------
drivers/common/cnxk/roc_sso_priv.h | 1 +
drivers/common/cnxk/roc_tim.c | 134 ++++++++++-----
drivers/event/cnxk/cn10k_eventdev.c | 4 +
drivers/event/cnxk/cn9k_eventdev.c | 4 +
drivers/event/cnxk/cnxk_eventdev.c | 91 +++++++++-
drivers/event/cnxk/cnxk_eventdev.h | 19 ++
lib/eventdev/eventdev_pmd.h | 44 +++++
lib/eventdev/rte_eventdev.c | 38 ++++
lib/eventdev/rte_eventdev.h | 70 +++++++-
lib/eventdev/version.map | 3 +
15 files changed, 694 insertions(+), 103 deletions(-)
--
2.25.1
^ permalink raw reply [relevance 3%]
* [PATCH v3 2/5] eventdev: add weight and affinity to queue attributes
2022-05-15 9:53 3% ` [PATCH v3 0/5] " Shijith Thotton
@ 2022-05-15 9:53 3% ` Shijith Thotton
2022-05-16 17:35 3% ` [PATCH v4 0/5] Extend and set event queue attributes at runtime Shijith Thotton
1 sibling, 0 replies; 200+ results
From: Shijith Thotton @ 2022-05-15 9:53 UTC (permalink / raw)
To: dev, jerinj
Cc: Shijith Thotton, pbhagavatula, harry.van.haaren, mattias.ronnblom, mdr
Extended eventdev queue QoS attributes to support weight and affinity.
If queues are of the same priority, events from the queue with highest
weight will be scheduled first. Affinity indicates the number of times,
the subsequent schedule calls from an event port will use the same event
queue. Schedule call selects another queue if current queue goes empty
or schedule count reaches affinity count.
To avoid ABI break, weight and affinity attributes are not yet added to
queue config structure and rely on PMD for managing it. New eventdev op
queue_attr_get can be used to get it from the PMD.
Signed-off-by: Shijith Thotton <sthotton@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
---
doc/guides/rel_notes/release_22_07.rst | 7 +++++
lib/eventdev/eventdev_pmd.h | 22 +++++++++++++++
lib/eventdev/rte_eventdev.c | 12 ++++++++
lib/eventdev/rte_eventdev.h | 38 ++++++++++++++++++++++++--
4 files changed, 77 insertions(+), 2 deletions(-)
diff --git a/doc/guides/rel_notes/release_22_07.rst b/doc/guides/rel_notes/release_22_07.rst
index a7a912d665..f35a31bbdf 100644
--- a/doc/guides/rel_notes/release_22_07.rst
+++ b/doc/guides/rel_notes/release_22_07.rst
@@ -70,6 +70,13 @@ New Features
Added new API ``rte_event_queue_attr_set()``, to set event queue attributes
at runtime.
+* **Added new queues attributes weight and affinity in eventdev.**
+
+ Defined new event queue attributes weight and affinity as below:
+
+ * ``RTE_EVENT_QUEUE_ATTR_WEIGHT``
+ * ``RTE_EVENT_QUEUE_ATTR_AFFINITY``
+
Removed Items
-------------
diff --git a/lib/eventdev/eventdev_pmd.h b/lib/eventdev/eventdev_pmd.h
index 3b85d9f7a5..5495aee4f6 100644
--- a/lib/eventdev/eventdev_pmd.h
+++ b/lib/eventdev/eventdev_pmd.h
@@ -341,6 +341,26 @@ typedef int (*eventdev_queue_setup_t)(struct rte_eventdev *dev,
typedef void (*eventdev_queue_release_t)(struct rte_eventdev *dev,
uint8_t queue_id);
+/**
+ * Get an event queue attribute at runtime.
+ *
+ * @param dev
+ * Event device pointer
+ * @param queue_id
+ * Event queue index
+ * @param attr_id
+ * Event queue attribute id
+ * @param[out] attr_value
+ * Event queue attribute value
+ *
+ * @return
+ * - 0: Success.
+ * - <0: Error code on failure.
+ */
+typedef int (*eventdev_queue_attr_get_t)(struct rte_eventdev *dev,
+ uint8_t queue_id, uint32_t attr_id,
+ uint32_t *attr_value);
+
/**
* Set an event queue attribute at runtime.
*
@@ -1231,6 +1251,8 @@ struct eventdev_ops {
/**< Set up an event queue. */
eventdev_queue_release_t queue_release;
/**< Release an event queue. */
+ eventdev_queue_attr_get_t queue_attr_get;
+ /**< Get an event queue attribute. */
eventdev_queue_attr_set_t queue_attr_set;
/**< Set an event queue attribute. */
diff --git a/lib/eventdev/rte_eventdev.c b/lib/eventdev/rte_eventdev.c
index a31e99be02..12b261f923 100644
--- a/lib/eventdev/rte_eventdev.c
+++ b/lib/eventdev/rte_eventdev.c
@@ -838,6 +838,18 @@ rte_event_queue_attr_get(uint8_t dev_id, uint8_t queue_id, uint32_t attr_id,
*attr_value = conf->schedule_type;
break;
+ case RTE_EVENT_QUEUE_ATTR_WEIGHT:
+ *attr_value = RTE_EVENT_QUEUE_WEIGHT_LOWEST;
+ if (dev->dev_ops->queue_attr_get)
+ return (*dev->dev_ops->queue_attr_get)(
+ dev, queue_id, attr_id, attr_value);
+ break;
+ case RTE_EVENT_QUEUE_ATTR_AFFINITY:
+ *attr_value = RTE_EVENT_QUEUE_AFFINITY_LOWEST;
+ if (dev->dev_ops->queue_attr_get)
+ return (*dev->dev_ops->queue_attr_get)(
+ dev, queue_id, attr_id, attr_value);
+ break;
default:
return -EINVAL;
};
diff --git a/lib/eventdev/rte_eventdev.h b/lib/eventdev/rte_eventdev.h
index c1163ee8ec..5d38996f6b 100644
--- a/lib/eventdev/rte_eventdev.h
+++ b/lib/eventdev/rte_eventdev.h
@@ -222,8 +222,14 @@ struct rte_event;
/* Event device capability bitmap flags */
#define RTE_EVENT_DEV_CAP_QUEUE_QOS (1ULL << 0)
-/**< Event scheduling prioritization is based on the priority associated with
- * each event queue.
+/**< Event scheduling prioritization is based on the priority and weight
+ * associated with each event queue. Events from a queue with highest priority
+ * is scheduled first. If the queues are of same priority, weight of the queues
+ * are considered to select a queue in a weighted round robin fashion.
+ * Subsequent dequeue calls from an event port could see events from the same
+ * event queue, if the queue is configured with an affinity count. Affinity
+ * count is the number of subsequent dequeue calls, in which an event port
+ * should use the same event queue if the queue is non-empty
*
* @see rte_event_queue_setup(), rte_event_queue_attr_set()
*/
@@ -331,6 +337,26 @@ struct rte_event;
* @see rte_event_port_link()
*/
+/* Event queue scheduling weights */
+#define RTE_EVENT_QUEUE_WEIGHT_HIGHEST 255
+/**< Highest weight of an event queue
+ * @see rte_event_queue_attr_get(), rte_event_queue_attr_set()
+ */
+#define RTE_EVENT_QUEUE_WEIGHT_LOWEST 0
+/**< Lowest weight of an event queue
+ * @see rte_event_queue_attr_get(), rte_event_queue_attr_set()
+ */
+
+/* Event queue scheduling affinity */
+#define RTE_EVENT_QUEUE_AFFINITY_HIGHEST 255
+/**< Highest scheduling affinity of an event queue
+ * @see rte_event_queue_attr_get(), rte_event_queue_attr_set()
+ */
+#define RTE_EVENT_QUEUE_AFFINITY_LOWEST 0
+/**< Lowest scheduling affinity of an event queue
+ * @see rte_event_queue_attr_get(), rte_event_queue_attr_set()
+ */
+
/**
* Get the total number of event devices that have been successfully
* initialised.
@@ -684,6 +710,14 @@ rte_event_queue_setup(uint8_t dev_id, uint8_t queue_id,
* The schedule type of the queue.
*/
#define RTE_EVENT_QUEUE_ATTR_SCHEDULE_TYPE 4
+/**
+ * The weight of the queue.
+ */
+#define RTE_EVENT_QUEUE_ATTR_WEIGHT 5
+/**
+ * Affinity of the queue.
+ */
+#define RTE_EVENT_QUEUE_ATTR_AFFINITY 6
/**
* Get an attribute from a queue.
--
2.25.1
^ permalink raw reply [relevance 3%]
* [PATCH v3 0/5] Extend and set event queue attributes at runtime
2022-04-05 5:40 3% ` [PATCH v2 " Shijith Thotton
2022-04-05 5:40 3% ` [PATCH v2 2/6] eventdev: add weight and affinity to queue attributes Shijith Thotton
2022-04-11 11:07 3% ` [PATCH v2 0/6] Extend and set event queue attributes at runtime Shijith Thotton
@ 2022-05-15 9:53 3% ` Shijith Thotton
2022-05-15 9:53 3% ` [PATCH v3 2/5] eventdev: add weight and affinity to queue attributes Shijith Thotton
2022-05-16 17:35 3% ` [PATCH v4 0/5] Extend and set event queue attributes at runtime Shijith Thotton
2 siblings, 2 replies; 200+ results
From: Shijith Thotton @ 2022-05-15 9:53 UTC (permalink / raw)
To: dev, jerinj
Cc: Shijith Thotton, pbhagavatula, harry.van.haaren, mattias.ronnblom, mdr
This series adds support for setting event queue attributes at runtime
and adds two new event queue attributes weight and affinity. Eventdev
capability RTE_EVENT_DEV_CAP_RUNTIME_QUEUE_ATTR is added to expose the
capability to set attributes at runtime and rte_event_queue_attr_set()
API is used to set the attributes.
Attributes weight and affinity are not yet added to rte_event_queue_conf
structure to avoid ABI break and will be added in 22.11. Till then, PMDs
using the new attributes are expected to manage them.
Test application changes and example implementation are added as last
three patches.
v3:
* Updated release notes.
* Removed deprecation patch from series.
* Used event enq/deq to test queue priority.
v2:
* Modified attr_value type from u32 to u64 for set().
* Removed RTE_EVENT_QUEUE_ATTR_MAX macro.
* Fixed return value in implementation.
Pavan Nikhilesh (1):
common/cnxk: use lock when accessing mbox of SSO
Shijith Thotton (4):
eventdev: support to set queue attributes at runtime
eventdev: add weight and affinity to queue attributes
test/event: test cases to test runtime queue attribute
event/cnxk: support to set runtime queue attributes
app/test/test_eventdev.c | 201 ++++++++++++++++++++++
doc/guides/eventdevs/features/cnxk.ini | 1 +
doc/guides/eventdevs/features/default.ini | 1 +
doc/guides/rel_notes/release_22_07.rst | 12 ++
drivers/common/cnxk/roc_sso.c | 174 +++++++++++++------
drivers/common/cnxk/roc_sso_priv.h | 1 +
drivers/common/cnxk/roc_tim.c | 134 ++++++++++-----
drivers/event/cnxk/cn10k_eventdev.c | 4 +
drivers/event/cnxk/cn9k_eventdev.c | 4 +
drivers/event/cnxk/cnxk_eventdev.c | 91 +++++++++-
drivers/event/cnxk/cnxk_eventdev.h | 19 ++
lib/eventdev/eventdev_pmd.h | 44 +++++
lib/eventdev/rte_eventdev.c | 38 ++++
lib/eventdev/rte_eventdev.h | 71 +++++++-
lib/eventdev/version.map | 3 +
15 files changed, 695 insertions(+), 103 deletions(-)
--
2.25.1
^ permalink raw reply [relevance 3%]
* [PATCH v2] sched: enable CMAN at runtime
@ 2022-05-12 13:10 4% ` Marcin Danilewicz
2022-05-30 11:19 3% ` Dumitrescu, Cristian
` (2 more replies)
0 siblings, 3 replies; 200+ results
From: Marcin Danilewicz @ 2022-05-12 13:10 UTC (permalink / raw)
To: dev, jasvinder.singh, cristian.dumitrescu; +Cc: megha.ajmera
Added changes to enable CMAN (RED or PIE) at init
from profile configuration file.
By default CMAN code is enable but not in use, when
there is no RED or PIE profile configured.
Log: v2 change in rte_sched.h to avoid ABI breakage.
Signed-off-by: Marcin Danilewicz <marcinx.danilewicz@intel.com>
---
config/rte_config.h | 3 -
drivers/net/softnic/rte_eth_softnic_tm.c | 12 --
examples/ip_pipeline/tmgr.c | 4 -
examples/qos_sched/cfg_file.c | 14 +--
examples/qos_sched/cfg_file.h | 2 -
examples/qos_sched/init.c | 4 -
examples/qos_sched/main.h | 2 -
examples/qos_sched/profile.cfg | 130 ++++++++++-----------
examples/qos_sched/profile_pie.cfg | 142 ++++++++++++++++++++++
examples/qos_sched/profile_red.cfg | 143 +++++++++++++++++++++++
lib/sched/rte_sched.c | 53 ++-------
lib/sched/rte_sched.h | 2 +
12 files changed, 371 insertions(+), 140 deletions(-)
create mode 100644 examples/qos_sched/profile_pie.cfg
create mode 100644 examples/qos_sched/profile_red.cfg
diff --git a/config/rte_config.h b/config/rte_config.h
index 8eb29c1525..1740a1d053 100644
--- a/config/rte_config.h
+++ b/config/rte_config.h
@@ -88,9 +88,6 @@
/* rte_power defines */
#define RTE_MAX_LCORE_FREQS 64
-/* rte_sched defines */
-#undef RTE_SCHED_CMAN
-
/* rte_graph defines */
#define RTE_GRAPH_BURST_SIZE 256
#define RTE_LIBRTE_GRAPH_STATS 1
diff --git a/drivers/net/softnic/rte_eth_softnic_tm.c b/drivers/net/softnic/rte_eth_softnic_tm.c
index 6a7766ba1c..3a5fd676e9 100644
--- a/drivers/net/softnic/rte_eth_softnic_tm.c
+++ b/drivers/net/softnic/rte_eth_softnic_tm.c
@@ -420,11 +420,7 @@ pmd_tm_node_type_get(struct rte_eth_dev *dev,
return 0;
}
-#ifdef RTE_SCHED_CMAN
#define WRED_SUPPORTED 1
-#else
-#define WRED_SUPPORTED 0
-#endif
#define STATS_MASK_DEFAULT \
(RTE_TM_STATS_N_PKTS | \
@@ -2300,8 +2296,6 @@ tm_tc_wred_profile_get(struct rte_eth_dev *dev, uint32_t tc_id)
return NULL;
}
-#ifdef RTE_SCHED_CMAN
-
static void
wred_profiles_set(struct rte_eth_dev *dev, uint32_t subport_id)
{
@@ -2325,12 +2319,6 @@ wred_profiles_set(struct rte_eth_dev *dev, uint32_t subport_id)
}
}
-#else
-
-#define wred_profiles_set(dev, subport_id)
-
-#endif
-
static struct tm_shared_shaper *
tm_tc_shared_shaper_get(struct rte_eth_dev *dev, struct tm_node *tc_node)
{
diff --git a/examples/ip_pipeline/tmgr.c b/examples/ip_pipeline/tmgr.c
index b138e885cf..e68e9961be 100644
--- a/examples/ip_pipeline/tmgr.c
+++ b/examples/ip_pipeline/tmgr.c
@@ -17,7 +17,6 @@ static uint32_t n_subport_profiles;
static struct rte_sched_pipe_params
pipe_profile[TMGR_PIPE_PROFILE_MAX];
-#ifdef RTE_SCHED_CMAN
static struct rte_sched_cman_params cman_params = {
.red_params = {
/* Traffic Class 0 Colors Green / Yellow / Red */
@@ -86,7 +85,6 @@ static struct rte_sched_cman_params cman_params = {
[12][2] = {.min_th = 32, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9},
},
};
-#endif /* RTE_SCHED_CMAN */
static uint32_t n_pipe_profiles;
@@ -96,9 +94,7 @@ static const struct rte_sched_subport_params subport_params_default = {
.pipe_profiles = pipe_profile,
.n_pipe_profiles = 0, /* filled at run time */
.n_max_pipe_profiles = RTE_DIM(pipe_profile),
-#ifdef RTE_SCHED_CMAN
.cman_params = &cman_params,
-#endif /* RTE_SCHED_CMAN */
};
static struct tmgr_port_list tmgr_port_list;
diff --git a/examples/qos_sched/cfg_file.c b/examples/qos_sched/cfg_file.c
index 450482f07d..efff1dbb01 100644
--- a/examples/qos_sched/cfg_file.c
+++ b/examples/qos_sched/cfg_file.c
@@ -229,13 +229,15 @@ cfg_load_subport_profile(struct rte_cfgfile *cfg,
return 0;
}
-#ifdef RTE_SCHED_CMAN
void set_subport_cman_params(struct rte_sched_subport_params *subport_p,
struct rte_sched_cman_params cman_p)
{
int j, k;
subport_p->cman_params->cman_mode = cman_p.cman_mode;
+ if (subport_p->cman_params->cman_mode == RTE_SCHED_CMAN_NONE)
+ return;
+
for (j = 0; j < RTE_SCHED_TRAFFIC_CLASSES_PER_PIPE; j++) {
if (subport_p->cman_params->cman_mode ==
RTE_SCHED_CMAN_RED) {
@@ -261,7 +263,6 @@ void set_subport_cman_params(struct rte_sched_subport_params *subport_p,
}
}
}
-#endif
int
cfg_load_subport(struct rte_cfgfile *cfg, struct rte_sched_subport_params *subport_params)
@@ -276,12 +277,14 @@ cfg_load_subport(struct rte_cfgfile *cfg, struct rte_sched_subport_params *subpo
memset(active_queues, 0, sizeof(active_queues));
n_active_queues = 0;
-#ifdef RTE_SCHED_CMAN
struct rte_sched_cman_params cman_params = {
- .cman_mode = RTE_SCHED_CMAN_RED,
.red_params = { },
};
+ if (cman_params.cman_mode != RTE_SCHED_CMAN_NONE) {
+ cman_params.cman_mode = RTE_SCHED_CMAN_NONE;
+ }
+
if (rte_cfgfile_has_section(cfg, "red")) {
cman_params.cman_mode = RTE_SCHED_CMAN_RED;
@@ -387,7 +390,6 @@ cfg_load_subport(struct rte_cfgfile *cfg, struct rte_sched_subport_params *subpo
}
}
-#endif /* RTE_SCHED_CMAN */
for (i = 0; i < MAX_SCHED_SUBPORTS; i++) {
char sec_name[CFG_NAME_LEN];
@@ -465,9 +467,7 @@ cfg_load_subport(struct rte_cfgfile *cfg, struct rte_sched_subport_params *subpo
}
}
}
-#ifdef RTE_SCHED_CMAN
set_subport_cman_params(subport_params+i, cman_params);
-#endif
}
}
diff --git a/examples/qos_sched/cfg_file.h b/examples/qos_sched/cfg_file.h
index 1a9dce9db5..19df91e7ba 100644
--- a/examples/qos_sched/cfg_file.h
+++ b/examples/qos_sched/cfg_file.h
@@ -12,10 +12,8 @@ int cfg_load_port(struct rte_cfgfile *cfg, struct rte_sched_port_params *port);
int cfg_load_pipe(struct rte_cfgfile *cfg, struct rte_sched_pipe_params *pipe);
-#ifdef RTE_SCHED_CMAN
void set_subport_cman_params(struct rte_sched_subport_params *subport_p,
struct rte_sched_cman_params cman_p);
-#endif
int cfg_load_subport(struct rte_cfgfile *cfg, struct rte_sched_subport_params *subport);
diff --git a/examples/qos_sched/init.c b/examples/qos_sched/init.c
index 8a0fb8a374..0afd553283 100644
--- a/examples/qos_sched/init.c
+++ b/examples/qos_sched/init.c
@@ -201,7 +201,6 @@ static struct rte_sched_subport_profile_params
},
};
-#ifdef RTE_SCHED_CMAN
struct rte_sched_cman_params cman_params = {
.cman_mode = RTE_SCHED_CMAN_RED,
.red_params = {
@@ -271,7 +270,6 @@ struct rte_sched_cman_params cman_params = {
[12][2] = {.min_th = 32, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9},
},
};
-#endif /* RTE_SCHED_CMAN */
struct rte_sched_subport_params subport_params[MAX_SCHED_SUBPORTS] = {
{
@@ -281,9 +279,7 @@ struct rte_sched_subport_params subport_params[MAX_SCHED_SUBPORTS] = {
.n_pipe_profiles = sizeof(pipe_profiles) /
sizeof(struct rte_sched_pipe_params),
.n_max_pipe_profiles = MAX_SCHED_PIPE_PROFILES,
-#ifdef RTE_SCHED_CMAN
.cman_params = &cman_params,
-#endif /* RTE_SCHED_CMAN */
},
};
diff --git a/examples/qos_sched/main.h b/examples/qos_sched/main.h
index 915311bac8..76a68f585f 100644
--- a/examples/qos_sched/main.h
+++ b/examples/qos_sched/main.h
@@ -153,9 +153,7 @@ extern uint32_t active_queues[RTE_SCHED_QUEUES_PER_PIPE];
extern uint32_t n_active_queues;
extern struct rte_sched_port_params port_params;
-#ifdef RTE_SCHED_CMAN
extern struct rte_sched_cman_params cman_params;
-#endif
extern struct rte_sched_subport_params subport_params[MAX_SCHED_SUBPORTS];
int app_parse_args(int argc, char **argv);
diff --git a/examples/qos_sched/profile.cfg b/examples/qos_sched/profile.cfg
index d4b21c0170..db65b0ed01 100644
--- a/examples/qos_sched/profile.cfg
+++ b/examples/qos_sched/profile.cfg
@@ -142,68 +142,68 @@ tc 12 wrr weights = 1 1 1 1
;tc 12 wred inv prob = 10 10 10
;tc 12 wred weight = 9 9 9
-[pie]
-tc 0 qdelay ref = 15
-tc 0 max burst = 150
-tc 0 update interval = 15
-tc 0 tailq th = 64
-
-tc 1 qdelay ref = 15
-tc 1 max burst = 150
-tc 1 update interval = 15
-tc 1 tailq th = 64
-
-tc 2 qdelay ref = 15
-tc 2 max burst = 150
-tc 2 update interval = 15
-tc 2 tailq th = 64
-
-tc 3 qdelay ref = 15
-tc 3 max burst = 150
-tc 3 update interval = 15
-tc 3 tailq th = 64
-
-tc 4 qdelay ref = 15
-tc 4 max burst = 150
-tc 4 update interval = 15
-tc 4 tailq th = 64
-
-tc 5 qdelay ref = 15
-tc 5 max burst = 150
-tc 5 update interval = 15
-tc 5 tailq th = 64
-
-tc 6 qdelay ref = 15
-tc 6 max burst = 150
-tc 6 update interval = 15
-tc 6 tailq th = 64
-
-tc 7 qdelay ref = 15
-tc 7 max burst = 150
-tc 7 update interval = 15
-tc 7 tailq th = 64
-
-tc 8 qdelay ref = 15
-tc 8 max burst = 150
-tc 8 update interval = 15
-tc 8 tailq th = 64
-
-tc 9 qdelay ref = 15
-tc 9 max burst = 150
-tc 9 update interval = 15
-tc 9 tailq th = 64
-
-tc 10 qdelay ref = 15
-tc 10 max burst = 150
-tc 10 update interval = 15
-tc 10 tailq th = 64
-
-tc 11 qdelay ref = 15
-tc 11 max burst = 150
-tc 11 update interval = 15
-tc 11 tailq th = 64
-
-tc 12 qdelay ref = 15
-tc 12 max burst = 150
-tc 12 update interval = 15
-tc 12 tailq th = 64
+;[pie]
+;tc 0 qdelay ref = 15
+;tc 0 max burst = 150
+;tc 0 update interval = 15
+;tc 0 tailq th = 64
+
+;tc 1 qdelay ref = 15
+;tc 1 max burst = 150
+;tc 1 update interval = 15
+;tc 1 tailq th = 64
+
+;tc 2 qdelay ref = 15
+;tc 2 max burst = 150
+;tc 2 update interval = 15
+;tc 2 tailq th = 64
+
+;tc 3 qdelay ref = 15
+;tc 3 max burst = 150
+;tc 3 update interval = 15
+;tc 3 tailq th = 64
+
+;tc 4 qdelay ref = 15
+;tc 4 max burst = 150
+;tc 4 update interval = 15
+;tc 4 tailq th = 64
+
+;tc 5 qdelay ref = 15
+;tc 5 max burst = 150
+;tc 5 update interval = 15
+;tc 5 tailq th = 64
+
+;tc 6 qdelay ref = 15
+;tc 6 max burst = 150
+;tc 6 update interval = 15
+;tc 6 tailq th = 64
+
+;tc 7 qdelay ref = 15
+;tc 7 max burst = 150
+;tc 7 update interval = 15
+;tc 7 tailq th = 64
+
+;tc 8 qdelay ref = 15
+;tc 8 max burst = 150
+;tc 8 update interval = 15
+;tc 8 tailq th = 64
+
+;tc 9 qdelay ref = 15
+;tc 9 max burst = 150
+;tc 9 update interval = 15
+;tc 9 tailq th = 64
+
+;tc 10 qdelay ref = 15
+;tc 10 max burst = 150
+;tc 10 update interval = 15
+;tc 10 tailq th = 64
+
+;tc 11 qdelay ref = 15
+;tc 11 max burst = 150
+;tc 11 update interval = 15
+;tc 11 tailq th = 64
+
+;tc 12 qdelay ref = 15
+;tc 12 max burst = 150
+;tc 12 update interval = 15
+;tc 12 tailq th = 64
diff --git a/examples/qos_sched/profile_pie.cfg b/examples/qos_sched/profile_pie.cfg
new file mode 100644
index 0000000000..241f748b33
--- /dev/null
+++ b/examples/qos_sched/profile_pie.cfg
@@ -0,0 +1,142 @@
+; SPDX-License-Identifier: BSD-3-Clause
+; Copyright(c) 2010-2019 Intel Corporation.
+
+; This file enables the following hierarchical scheduler configuration for each
+; 10GbE output port:
+; * Single subport (subport 0):
+; - Subport rate set to 100% of port rate
+; - Each of the 13 traffic classes has rate set to 100% of port rate
+; * 4K pipes per subport 0 (pipes 0 .. 4095) with identical configuration:
+; - Pipe rate set to 1/4K of port rate
+; - Each of the 13 traffic classes has rate set to 100% of pipe rate
+; - Within lowest priority traffic class (best-effort), the byte-level
+; WRR weights for the 4 queues of best effort traffic class are set
+; to 1:1:1:1
+;
+; For more details, please refer to chapter "Quality of Service (QoS) Framework"
+; of Data Plane Development Kit (DPDK) Programmer's Guide.
+
+; Port configuration
+[port]
+frame overhead = 24
+number of subports per port = 1
+
+; Subport configuration
+[subport 0]
+number of pipes per subport = 4096
+queue sizes = 64 64 64 64 64 64 64 64 64 64 64 64 64
+
+subport 0-8 = 0 ; These subports are configured with subport profile 0
+
+[subport profile 0]
+tb rate = 1250000000 ; Bytes per second
+tb size = 1000000 ; Bytes
+
+tc 0 rate = 1250000000 ; Bytes per second
+tc 1 rate = 1250000000 ; Bytes per second
+tc 2 rate = 1250000000 ; Bytes per second
+tc 3 rate = 1250000000 ; Bytes per second
+tc 4 rate = 1250000000 ; Bytes per second
+tc 5 rate = 1250000000 ; Bytes per second
+tc 6 rate = 1250000000 ; Bytes per second
+tc 7 rate = 1250000000 ; Bytes per second
+tc 8 rate = 1250000000 ; Bytes per second
+tc 9 rate = 1250000000 ; Bytes per second
+tc 10 rate = 1250000000 ; Bytes per second
+tc 11 rate = 1250000000 ; Bytes per second
+tc 12 rate = 1250000000 ; Bytes per second
+
+tc period = 10 ; Milliseconds
+
+pipe 0-4095 = 0 ; These pipes are configured with pipe profile 0
+
+; Pipe configuration
+[pipe profile 0]
+tb rate = 305175 ; Bytes per second
+tb size = 1000000 ; Bytes
+
+tc 0 rate = 305175 ; Bytes per second
+tc 1 rate = 305175 ; Bytes per second
+tc 2 rate = 305175 ; Bytes per second
+tc 3 rate = 305175 ; Bytes per second
+tc 4 rate = 305175 ; Bytes per second
+tc 5 rate = 305175 ; Bytes per second
+tc 6 rate = 305175 ; Bytes per second
+tc 7 rate = 305175 ; Bytes per second
+tc 8 rate = 305175 ; Bytes per second
+tc 9 rate = 305175 ; Bytes per second
+tc 10 rate = 305175 ; Bytes per second
+tc 11 rate = 305175 ; Bytes per second
+tc 12 rate = 305175 ; Bytes per second
+
+tc period = 40 ; Milliseconds
+
+tc 12 oversubscription weight = 1
+
+tc 12 wrr weights = 1 1 1 1
+
+[pie]
+tc 0 qdelay ref = 15
+tc 0 max burst = 150
+tc 0 update interval = 15
+tc 0 tailq th = 64
+
+tc 1 qdelay ref = 15
+tc 1 max burst = 150
+tc 1 update interval = 15
+tc 1 tailq th = 64
+
+tc 2 qdelay ref = 15
+tc 2 max burst = 150
+tc 2 update interval = 15
+tc 2 tailq th = 64
+
+tc 3 qdelay ref = 15
+tc 3 max burst = 150
+tc 3 update interval = 15
+tc 3 tailq th = 64
+
+tc 4 qdelay ref = 15
+tc 4 max burst = 150
+tc 4 update interval = 15
+tc 4 tailq th = 64
+
+tc 5 qdelay ref = 15
+tc 5 max burst = 150
+tc 5 update interval = 15
+tc 5 tailq th = 64
+
+tc 6 qdelay ref = 15
+tc 6 max burst = 150
+tc 6 update interval = 15
+tc 6 tailq th = 64
+
+tc 7 qdelay ref = 15
+tc 7 max burst = 150
+tc 7 update interval = 15
+tc 7 tailq th = 64
+
+tc 8 qdelay ref = 15
+tc 8 max burst = 150
+tc 8 update interval = 15
+tc 8 tailq th = 64
+
+tc 9 qdelay ref = 15
+tc 9 max burst = 150
+tc 9 update interval = 15
+tc 9 tailq th = 64
+
+tc 10 qdelay ref = 15
+tc 10 max burst = 150
+tc 10 update interval = 15
+tc 10 tailq th = 64
+
+tc 11 qdelay ref = 15
+tc 11 max burst = 150
+tc 11 update interval = 15
+tc 11 tailq th = 64
+
+tc 12 qdelay ref = 15
+tc 12 max burst = 150
+tc 12 update interval = 15
+tc 12 tailq th = 64
diff --git a/examples/qos_sched/profile_red.cfg b/examples/qos_sched/profile_red.cfg
new file mode 100644
index 0000000000..4486d2799e
--- /dev/null
+++ b/examples/qos_sched/profile_red.cfg
@@ -0,0 +1,143 @@
+; SPDX-License-Identifier: BSD-3-Clause
+; Copyright(c) 2010-2019 Intel Corporation.
+
+; This file enables the following hierarchical scheduler configuration for each
+; 10GbE output port:
+; * Single subport (subport 0):
+; - Subport rate set to 100% of port rate
+; - Each of the 13 traffic classes has rate set to 100% of port rate
+; * 4K pipes per subport 0 (pipes 0 .. 4095) with identical configuration:
+; - Pipe rate set to 1/4K of port rate
+; - Each of the 13 traffic classes has rate set to 100% of pipe rate
+; - Within lowest priority traffic class (best-effort), the byte-level
+; WRR weights for the 4 queues of best effort traffic class are set
+; to 1:1:1:1
+;
+; For more details, please refer to chapter "Quality of Service (QoS) Framework"
+; of Data Plane Development Kit (DPDK) Programmer's Guide.
+
+; Port configuration
+[port]
+frame overhead = 24
+number of subports per port = 1
+
+; Subport configuration
+[subport 0]
+number of pipes per subport = 4096
+queue sizes = 64 64 64 64 64 64 64 64 64 64 64 64 64
+
+subport 0-8 = 0 ; These subports are configured with subport profile 0
+
+[subport profile 0]
+tb rate = 1250000000 ; Bytes per second
+tb size = 1000000 ; Bytes
+
+tc 0 rate = 1250000000 ; Bytes per second
+tc 1 rate = 1250000000 ; Bytes per second
+tc 2 rate = 1250000000 ; Bytes per second
+tc 3 rate = 1250000000 ; Bytes per second
+tc 4 rate = 1250000000 ; Bytes per second
+tc 5 rate = 1250000000 ; Bytes per second
+tc 6 rate = 1250000000 ; Bytes per second
+tc 7 rate = 1250000000 ; Bytes per second
+tc 8 rate = 1250000000 ; Bytes per second
+tc 9 rate = 1250000000 ; Bytes per second
+tc 10 rate = 1250000000 ; Bytes per second
+tc 11 rate = 1250000000 ; Bytes per second
+tc 12 rate = 1250000000 ; Bytes per second
+
+tc period = 10 ; Milliseconds
+
+pipe 0-4095 = 0 ; These pipes are configured with pipe profile 0
+
+; Pipe configuration
+[pipe profile 0]
+tb rate = 305175 ; Bytes per second
+tb size = 1000000 ; Bytes
+
+tc 0 rate = 305175 ; Bytes per second
+tc 1 rate = 305175 ; Bytes per second
+tc 2 rate = 305175 ; Bytes per second
+tc 3 rate = 305175 ; Bytes per second
+tc 4 rate = 305175 ; Bytes per second
+tc 5 rate = 305175 ; Bytes per second
+tc 6 rate = 305175 ; Bytes per second
+tc 7 rate = 305175 ; Bytes per second
+tc 8 rate = 305175 ; Bytes per second
+tc 9 rate = 305175 ; Bytes per second
+tc 10 rate = 305175 ; Bytes per second
+tc 11 rate = 305175 ; Bytes per second
+tc 12 rate = 305175 ; Bytes per second
+
+tc period = 40 ; Milliseconds
+
+tc 12 oversubscription weight = 1
+
+tc 12 wrr weights = 1 1 1 1
+
+; RED params per traffic class and color (Green / Yellow / Red)
+[red]
+tc 0 wred min = 48 40 32
+tc 0 wred max = 64 64 64
+tc 0 wred inv prob = 10 10 10
+tc 0 wred weight = 9 9 9
+
+tc 1 wred min = 48 40 32
+tc 1 wred max = 64 64 64
+tc 1 wred inv prob = 10 10 10
+tc 1 wred weight = 9 9 9
+
+tc 2 wred min = 48 40 32
+tc 2 wred max = 64 64 64
+tc 2 wred inv prob = 10 10 10
+tc 2 wred weight = 9 9 9
+
+tc 3 wred min = 48 40 32
+tc 3 wred max = 64 64 64
+tc 3 wred inv prob = 10 10 10
+tc 3 wred weight = 9 9 9
+
+tc 4 wred min = 48 40 32
+tc 4 wred max = 64 64 64
+tc 4 wred inv prob = 10 10 10
+tc 4 wred weight = 9 9 9
+
+tc 5 wred min = 48 40 32
+tc 5 wred max = 64 64 64
+tc 5 wred inv prob = 10 10 10
+tc 5 wred weight = 9 9 9
+
+tc 6 wred min = 48 40 32
+tc 6 wred max = 64 64 64
+tc 6 wred inv prob = 10 10 10
+tc 6 wred weight = 9 9 9
+
+tc 7 wred min = 48 40 32
+tc 7 wred max = 64 64 64
+tc 7 wred inv prob = 10 10 10
+tc 7 wred weight = 9 9 9
+
+tc 8 wred min = 48 40 32
+tc 8 wred max = 64 64 64
+tc 8 wred inv prob = 10 10 10
+tc 8 wred weight = 9 9 9
+
+tc 9 wred min = 48 40 32
+tc 9 wred max = 64 64 64
+tc 9 wred inv prob = 10 10 10
+tc 9 wred weight = 9 9 9
+
+tc 10 wred min = 48 40 32
+tc 10 wred max = 64 64 64
+tc 10 wred inv prob = 10 10 10
+tc 10 wred weight = 9 9 9
+
+tc 11 wred min = 48 40 32
+tc 11 wred max = 64 64 64
+tc 11 wred inv prob = 10 10 10
+tc 11 wred weight = 9 9 9
+
+tc 12 wred min = 48 40 32
+tc 12 wred max = 64 64 64
+tc 12 wred inv prob = 10 10 10
+tc 12 wred weight = 9 9 9
diff --git a/lib/sched/rte_sched.c b/lib/sched/rte_sched.c
index ec74bee939..db14934832 100644
--- a/lib/sched/rte_sched.c
+++ b/lib/sched/rte_sched.c
@@ -81,13 +81,11 @@ struct rte_sched_queue {
struct rte_sched_queue_extra {
struct rte_sched_queue_stats stats;
-#ifdef RTE_SCHED_CMAN
RTE_STD_C11
union {
struct rte_red red;
struct rte_pie pie;
};
-#endif
};
enum grinder_state {
@@ -179,7 +177,6 @@ struct rte_sched_subport {
/* Pipe queues size */
uint16_t qsize[RTE_SCHED_TRAFFIC_CLASSES_PER_PIPE];
-#ifdef RTE_SCHED_CMAN
bool cman_enabled;
enum rte_sched_cman_mode cman;
@@ -188,7 +185,6 @@ struct rte_sched_subport {
struct rte_red_config red_config[RTE_SCHED_TRAFFIC_CLASSES_PER_PIPE][RTE_COLORS];
struct rte_pie_config pie_config[RTE_SCHED_TRAFFIC_CLASSES_PER_PIPE];
};
-#endif
/* Scheduling loop detection */
uint32_t pipe_loop;
@@ -1081,7 +1077,6 @@ rte_sched_free_memory(struct rte_sched_port *port, uint32_t n_subports)
rte_free(port);
}
-#ifdef RTE_SCHED_CMAN
static int
rte_sched_red_config(struct rte_sched_port *port,
struct rte_sched_subport *s,
@@ -1161,9 +1156,11 @@ rte_sched_cman_config(struct rte_sched_port *port,
else if (params->cman_params->cman_mode == RTE_SCHED_CMAN_PIE)
return rte_sched_pie_config(port, s, params, n_subports);
+ else if (params->cman_params->cman_mode == RTE_SCHED_CMAN_NONE)
+ return 1;
+
return -EINVAL;
}
-#endif
int
rte_sched_subport_config(struct rte_sched_port *port,
@@ -1254,19 +1251,20 @@ rte_sched_subport_config(struct rte_sched_port *port,
s->n_pipe_profiles = params->n_pipe_profiles;
s->n_max_pipe_profiles = params->n_max_pipe_profiles;
-#ifdef RTE_SCHED_CMAN
+ s->cman_enabled = false;
+
if (params->cman_params != NULL) {
- s->cman_enabled = true;
status = rte_sched_cman_config(port, s, params, n_subports);
if (status) {
- RTE_LOG(NOTICE, SCHED,
- "%s: CMAN configuration fails\n", __func__);
- return status;
+ if (status != 1) {
+ RTE_LOG(NOTICE, SCHED,
+ "%s: CMAN configuration fails\n", __func__);
+ return status;
+ }
+ } else {
+ s->cman_enabled = true;
}
- } else {
- s->cman_enabled = false;
}
-#endif
/* Scheduling loop detection */
s->pipe_loop = RTE_SCHED_PIPE_INVALID;
@@ -1825,14 +1823,10 @@ rte_sched_port_update_queue_stats_on_drop(struct rte_sched_subport *subport,
qe->stats.n_pkts_dropped += 1;
qe->stats.n_bytes_dropped += pkt_len;
-#ifdef RTE_SCHED_CMAN
if (subport->cman_enabled)
qe->stats.n_pkts_cman_dropped += n_pkts_cman_dropped;
-#endif
}
-#ifdef RTE_SCHED_CMAN
-
static inline int
rte_sched_port_cman_drop(struct rte_sched_port *port,
struct rte_sched_subport *subport,
@@ -1902,29 +1896,6 @@ uint32_t qindex, uint32_t pkt_len, uint64_t time) {
}
}
-#else
-
-static inline int rte_sched_port_cman_drop(struct rte_sched_port *port __rte_unused,
- struct rte_sched_subport *subport __rte_unused,
- struct rte_mbuf *pkt __rte_unused,
- uint32_t qindex __rte_unused,
- uint16_t qlen __rte_unused)
-{
- return 0;
-}
-
-#define rte_sched_port_red_set_queue_empty_timestamp(port, subport, qindex)
-
-static inline void
-rte_sched_port_pie_dequeue(struct rte_sched_subport *subport __rte_unused,
- uint32_t qindex __rte_unused,
- uint32_t pkt_len __rte_unused,
- uint64_t time __rte_unused) {
- /* do-nothing when RTE_SCHED_CMAN not defined */
-}
-
-#endif /* RTE_SCHED_CMAN */
-
#ifdef RTE_SCHED_DEBUG
static inline void
diff --git a/lib/sched/rte_sched.h b/lib/sched/rte_sched.h
index 5ece64e527..82aa73ff5b 100644
--- a/lib/sched/rte_sched.h
+++ b/lib/sched/rte_sched.h
@@ -128,6 +128,8 @@ extern "C" {
enum rte_sched_cman_mode {
RTE_SCHED_CMAN_RED, /**< Random Early Detection (RED) */
RTE_SCHED_CMAN_PIE, /**< Proportional Integral Controller Enhanced (PIE) */
+ /* New enum RTE_SCHED_CMAN_NONE added at the end to avoid ABI breakage */
+ RTE_SCHED_CMAN_NONE, /**< no RED|PIE cfg available */
};
/*
--
2.25.1
--------------------------------------------------------------
Intel Research and Development Ireland Limited
Registered in Ireland
Registered Office: Collinstown Industrial Park, Leixlip, County Kildare
Registered Number: 308263
This e-mail and any attachments may contain confidential material for the sole
use of the intended recipient(s). Any review or distribution by others is
strictly prohibited. If you are not the intended recipient, please contact the
sender and delete all copies.
^ permalink raw reply [relevance 4%]
* [PATCH v5 1/7] cryptodev: add APIs to get/set event metadata
2022-05-12 12:45 4% ` [PATCH v5 " Akhil Goyal
@ 2022-05-12 12:45 2% ` Akhil Goyal
2022-05-16 18:30 0% ` [PATCH v5 0/7] Add new cryptodev op for " Akhil Goyal
1 sibling, 0 replies; 200+ results
From: Akhil Goyal @ 2022-05-12 12:45 UTC (permalink / raw)
To: dev
Cc: anoobj, jerinj, abhinandan.gujjar, jay.jayatheerthan,
narender.vangati, vfialko, Akhil Goyal, Fan Zhang,
Abhinandan Gujjar
From: Volodymyr Fialko <vfialko@marvell.com>
Currently, crypto session userdata is used to set event crypto
metadata from the application and the driver is dereferencing it
in driver which is not correct. User data is meant to be opaque
to the driver.
To support this, new API is added to get and set event crypto
metadata. The new API, rte_cryptodev_set_session_event_mdata,
allows setting event metadata in session private data which is
filled inside PMD using a new cryptodev op. This operation
can be performed on any of the PMD supported sessions
(sym/asym/security).
For SW abstraction of event crypto adapter to be used by
eventdev library, a new field is added in asymmetric crypto
session for now and for symmetric case, current implementation
of using userdata is used. Symmetric cases cannot be fixed now,
as it will be ABI breakage which will be resolved in DPDK 22.11.
Signed-off-by: Volodymyr Fialko <vfialko@marvell.com>
Signed-off-by: Akhil Goyal <gakhil@marvell.com>
Acked-by: Fan Zhang <roy.fan.zhang@intel.com>
Acked-by: Abhinandan Gujjar <Abhinandan.gujjar@intel.com>
Acked-by: Anoob Joseph <anoobj@marvell.com>
---
lib/cryptodev/cryptodev_pmd.c | 16 +++++++++++++
lib/cryptodev/cryptodev_pmd.h | 36 +++++++++++++++++++++++++++++
lib/cryptodev/rte_cryptodev.c | 43 +++++++++++++++++++++++++++++++++++
lib/cryptodev/rte_cryptodev.h | 22 ++++++++++++++++++
lib/cryptodev/version.map | 4 ++++
5 files changed, 121 insertions(+)
diff --git a/lib/cryptodev/cryptodev_pmd.c b/lib/cryptodev/cryptodev_pmd.c
index 739a0b3f34..1903ade388 100644
--- a/lib/cryptodev/cryptodev_pmd.c
+++ b/lib/cryptodev/cryptodev_pmd.c
@@ -227,3 +227,19 @@ cryptodev_fp_ops_set(struct rte_crypto_fp_ops *fp_ops,
fp_ops->qp.enq_cb = dev->enq_cbs;
fp_ops->qp.deq_cb = dev->deq_cbs;
}
+
+void *
+rte_cryptodev_session_event_mdata_get(struct rte_crypto_op *op)
+{
+ if (op->type == RTE_CRYPTO_OP_TYPE_SYMMETRIC &&
+ op->sess_type == RTE_CRYPTO_OP_WITH_SESSION)
+ return rte_cryptodev_sym_session_get_user_data(op->sym->session);
+ else if (op->type == RTE_CRYPTO_OP_TYPE_ASYMMETRIC &&
+ op->sess_type == RTE_CRYPTO_OP_WITH_SESSION)
+ return op->asym->session->event_mdata;
+ else if (op->sess_type == RTE_CRYPTO_OP_SESSIONLESS &&
+ op->private_data_offset)
+ return ((uint8_t *)op + op->private_data_offset);
+ else
+ return NULL;
+}
diff --git a/lib/cryptodev/cryptodev_pmd.h b/lib/cryptodev/cryptodev_pmd.h
index 2b1ce2da2d..7a7d3ee3f1 100644
--- a/lib/cryptodev/cryptodev_pmd.h
+++ b/lib/cryptodev/cryptodev_pmd.h
@@ -398,6 +398,25 @@ typedef int (*cryptodev_sym_configure_raw_dp_ctx_t)(
enum rte_crypto_op_sess_type sess_type,
union rte_cryptodev_session_ctx session_ctx, uint8_t is_update);
+/**
+ * Typedef that the driver provided to set event crypto meta data.
+ *
+ * @param dev Crypto device pointer.
+ * @param sess Crypto or security session.
+ * @param op_type Operation type.
+ * @param sess_type Session type.
+ * @param ev_mdata Pointer to the event crypto meta data
+ * (aka *union rte_event_crypto_metadata*)
+ * @return
+ * - On success return 0.
+ * - On failure return negative integer.
+ */
+typedef int (*cryptodev_session_event_mdata_set_t)(
+ struct rte_cryptodev *dev, void *sess,
+ enum rte_crypto_op_type op_type,
+ enum rte_crypto_op_sess_type sess_type,
+ void *ev_mdata);
+
/** Crypto device operations function pointer table */
struct rte_cryptodev_ops {
cryptodev_configure_t dev_configure; /**< Configure device. */
@@ -442,6 +461,8 @@ struct rte_cryptodev_ops {
/**< Initialize raw data path context data. */
};
};
+ cryptodev_session_event_mdata_set_t session_ev_mdata_set;
+ /**< Set a Crypto or Security session even meta data. */
};
@@ -603,6 +624,19 @@ void
cryptodev_fp_ops_set(struct rte_crypto_fp_ops *fp_ops,
const struct rte_cryptodev *dev);
+/**
+ * Get session event meta data (aka *union rte_event_crypto_metadata*)
+ *
+ * @param op pointer to *rte_crypto_op* structure.
+ *
+ * @return
+ * - On success, pointer to event crypto metadata
+ * - On failure, NULL.
+ */
+__rte_internal
+void *
+rte_cryptodev_session_event_mdata_get(struct rte_crypto_op *op);
+
static inline void *
get_sym_session_private_data(const struct rte_cryptodev_sym_session *sess,
uint8_t driver_id) {
@@ -637,6 +671,8 @@ RTE_STD_C11 struct rte_cryptodev_asym_session {
uint16_t user_data_sz;
/**< Session user data will be placed after sess_data */
uint8_t padding[3];
+ void *event_mdata;
+ /**< Event metadata (aka *union rte_event_crypto_metadata*) */
uint8_t sess_private_data[0];
};
diff --git a/lib/cryptodev/rte_cryptodev.c b/lib/cryptodev/rte_cryptodev.c
index 3500a2d470..e16e6802aa 100644
--- a/lib/cryptodev/rte_cryptodev.c
+++ b/lib/cryptodev/rte_cryptodev.c
@@ -2051,6 +2051,8 @@ rte_cryptodev_asym_session_free(uint8_t dev_id, void *sess)
dev->dev_ops->asym_session_clear(dev, sess);
+ rte_free(((struct rte_cryptodev_asym_session *)sess)->event_mdata);
+
/* Return session to mempool */
sess_mp = rte_mempool_from_obj(sess);
rte_mempool_put(sess_mp, sess);
@@ -2259,6 +2261,47 @@ rte_cryptodev_configure_raw_dp_ctx(uint8_t dev_id, uint16_t qp_id,
sess_type, session_ctx, is_update);
}
+int
+rte_cryptodev_session_event_mdata_set(uint8_t dev_id, void *sess,
+ enum rte_crypto_op_type op_type,
+ enum rte_crypto_op_sess_type sess_type,
+ void *ev_mdata,
+ uint16_t size)
+{
+ struct rte_cryptodev *dev;
+
+ if (sess == NULL || ev_mdata == NULL)
+ return -EINVAL;
+
+ if (!rte_cryptodev_is_valid_dev(dev_id))
+ goto skip_pmd_op;
+
+ dev = rte_cryptodev_pmd_get_dev(dev_id);
+ if (dev->dev_ops->session_ev_mdata_set == NULL)
+ goto skip_pmd_op;
+
+ return (*dev->dev_ops->session_ev_mdata_set)(dev, sess, op_type,
+ sess_type, ev_mdata);
+
+skip_pmd_op:
+ if (op_type == RTE_CRYPTO_OP_TYPE_SYMMETRIC)
+ return rte_cryptodev_sym_session_set_user_data(sess, ev_mdata,
+ size);
+ else if (op_type == RTE_CRYPTO_OP_TYPE_ASYMMETRIC) {
+ struct rte_cryptodev_asym_session *s = sess;
+
+ if (s->event_mdata == NULL) {
+ s->event_mdata = rte_malloc(NULL, size, 0);
+ if (s->event_mdata == NULL)
+ return -ENOMEM;
+ }
+ rte_memcpy(s->event_mdata, ev_mdata, size);
+
+ return 0;
+ } else
+ return -ENOTSUP;
+}
+
uint32_t
rte_cryptodev_raw_enqueue_burst(struct rte_crypto_raw_dp_ctx *ctx,
struct rte_crypto_sym_vec *vec, union rte_crypto_sym_ofs ofs,
diff --git a/lib/cryptodev/rte_cryptodev.h b/lib/cryptodev/rte_cryptodev.h
index 45d33f4a50..2c2c2edeb7 100644
--- a/lib/cryptodev/rte_cryptodev.h
+++ b/lib/cryptodev/rte_cryptodev.h
@@ -1269,6 +1269,28 @@ __rte_experimental
int
rte_cryptodev_get_raw_dp_ctx_size(uint8_t dev_id);
+/**
+ * Set session event meta data
+ *
+ * @param dev_id The device identifier.
+ * @param sess Crypto or security session.
+ * @param op_type Operation type.
+ * @param sess_type Session type.
+ * @param ev_mdata Pointer to the event crypto meta data
+ * (aka *union rte_event_crypto_metadata*)
+ * @param size Size of ev_mdata.
+ *
+ * @return
+ * - On success, zero.
+ * - On failure, a negative value.
+ */
+__rte_experimental
+int
+rte_cryptodev_session_event_mdata_set(uint8_t dev_id, void *sess,
+ enum rte_crypto_op_type op_type,
+ enum rte_crypto_op_sess_type sess_type,
+ void *ev_mdata, uint16_t size);
+
/**
* Union of different crypto session types, including session-less xform
* pointer.
diff --git a/lib/cryptodev/version.map b/lib/cryptodev/version.map
index c7c5aefceb..f0abfaa47d 100644
--- a/lib/cryptodev/version.map
+++ b/lib/cryptodev/version.map
@@ -105,6 +105,9 @@ EXPERIMENTAL {
rte_cryptodev_asym_session_pool_create;
rte_cryptodev_asym_session_set_user_data;
__rte_cryptodev_trace_asym_session_pool_create;
+
+ #added in 22.07
+ rte_cryptodev_session_event_mdata_set;
};
INTERNAL {
@@ -123,5 +126,6 @@ INTERNAL {
rte_cryptodev_pmd_parse_input_args;
rte_cryptodev_pmd_probing_finish;
rte_cryptodev_pmd_release_device;
+ rte_cryptodev_session_event_mdata_get;
rte_cryptodevs;
};
--
2.25.1
^ permalink raw reply [relevance 2%]
* [PATCH v5 0/7] Add new cryptodev op for event metadata
2022-05-01 19:24 4% ` [PATCH v4 " Akhil Goyal
2022-05-01 19:24 2% ` [PATCH v4 1/7] cryptodev: add APIs to get/set " Akhil Goyal
2022-05-02 11:08 0% ` [PATCH v4 0/7] Add new cryptodev op for " Gujjar, Abhinandan S
@ 2022-05-12 12:45 4% ` Akhil Goyal
2022-05-12 12:45 2% ` [PATCH v5 1/7] cryptodev: add APIs to get/set " Akhil Goyal
2022-05-16 18:30 0% ` [PATCH v5 0/7] Add new cryptodev op for " Akhil Goyal
2 siblings, 2 replies; 200+ results
From: Akhil Goyal @ 2022-05-12 12:45 UTC (permalink / raw)
To: dev
Cc: anoobj, jerinj, abhinandan.gujjar, jay.jayatheerthan,
narender.vangati, vfialko, Akhil Goyal
For using event crypto metadata, event metadata need to be set
in session. For this session user data was used for symmetric
crypto sessions and no support was present for asymmetric and
security sessions.
The use of userdata to store event metadata (which is dereferenced
in PMD) is not correct as it is meant for the application to use it.
Hence, a new API is created to set and get event crypto metadata which
is scalable to all sessions supported by the crypto PMD.
The application can use the set API to set event metadata and the
PMD may store that inside the session private data and PMD need not
use the get API as it would be internal to the PMD.
For the software event crypto adapter implementation, the eventdev
library can use the get API to get the event metadata stored inside
the session structure.
For Asymmetric sessions, a new field is added inside the session
struct which is internal to library.
For symmetric and security sessions, new field cannot be added as
it would be ABI break. Hence, session userdata is being used to
store that as it was used earlier. In next ABI break release this
would be fixed similar to asymmetric crypto case.
The patchset also add support for asymmetric crypto adapter
in the test applications and the crypto/cnxk implementation of
the new cryptodev op and corresponding changes in the eventdev lib.
changes in v5:
removed extra check for freeing mdata
Changes in v4:
- added null checks in set API
- updated check in session destroy
- updated API comments
- fixed test app failure reported by Abhinandan.
- moved event mdata after padding in asym session struct.
Changes in v3:
- fix SW adapter case of memory allocation/free of mdata. mdata is
allocated in set API and freed in session clear/destroy.
- mark rte_cryptodev_session_event_mdata_get as internal API
as it is only needed for the app or the PMD.
changes in v2:
- v1 patchset only fixed security sessions and also caused ABI breakage.
This is fixed in v2.
- added new API for setting event metadata.
- added new cryptodev op which can handle all sessions
Akhil Goyal (5):
crypto/octeontx: use new API for event metadata
test/event: use new API to set event crypto metadata
eventdev: use new API to get event crypto metadata
test/event: add asymmetric cases for crypto adapter
test-eventdev: support asym ops for crypto adapter
Volodymyr Fialko (2):
cryptodev: add APIs to get/set event metadata
crypto/cnxk: add event metadata set operation
app/test-eventdev/evt_common.h | 2 +
app/test-eventdev/evt_options.c | 17 +
app/test-eventdev/evt_options.h | 4 +
app/test-eventdev/test_perf_atq.c | 12 +-
app/test-eventdev/test_perf_common.c | 254 ++++++++--
app/test-eventdev/test_perf_common.h | 45 +-
app/test-eventdev/test_perf_queue.c | 12 +-
app/test/test_event_crypto_adapter.c | 511 +++++++++++++++++++-
doc/guides/tools/testeventdev.rst | 5 +
drivers/crypto/cnxk/cn10k_cryptodev_ops.c | 144 +++++-
drivers/crypto/cnxk/cn10k_ipsec.h | 2 +
drivers/crypto/cnxk/cn9k_cryptodev_ops.c | 138 +++++-
drivers/crypto/cnxk/cn9k_ipsec.h | 2 +
drivers/crypto/cnxk/cnxk_ae.h | 2 +
drivers/crypto/cnxk/cnxk_cryptodev_ops.h | 18 -
drivers/crypto/cnxk/cnxk_se.h | 2 +
drivers/crypto/octeontx/otx_cryptodev_ops.c | 20 +-
lib/cryptodev/cryptodev_pmd.c | 16 +
lib/cryptodev/cryptodev_pmd.h | 36 ++
lib/cryptodev/rte_cryptodev.c | 43 ++
lib/cryptodev/rte_cryptodev.h | 22 +
lib/cryptodev/version.map | 4 +
lib/eventdev/rte_event_crypto_adapter.c | 55 +--
23 files changed, 1178 insertions(+), 188 deletions(-)
--
2.25.1
^ permalink raw reply [relevance 4%]
* [PATCH v3 7/8] devtools: add RISC-V to test-meson-builds.sh
@ 2022-05-10 15:48 9% ` Stanislaw Kardach
0 siblings, 0 replies; 200+ results
From: Stanislaw Kardach @ 2022-05-10 15:48 UTC (permalink / raw)
To: Bruce Richardson
Cc: Stanislaw Kardach, dev, Frank Zhao, Sam Grove, mw, upstream
Validate RISC-V compilation when test-meson-builds.sh is called. The
check will be only performed if appropriate toolchain is present on the
system (same as with other architectures).
Sponsored-by: Frank Zhao <Frank.Zhao@starfivetech.com>
Sponsored-by: Sam Grove <sam.grove@sifive.com>
Signed-off-by: Stanislaw Kardach <kda@semihalf.com>
---
devtools/test-meson-builds.sh | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/devtools/test-meson-builds.sh b/devtools/test-meson-builds.sh
index a653b253cb..f732dccf6c 100755
--- a/devtools/test-meson-builds.sh
+++ b/devtools/test-meson-builds.sh
@@ -275,6 +275,10 @@ for f in $srcdir/config/ppc/ppc* ; do
build $targetdir $f ABI $use_shared
done
+# RISC-V configuration
+build build-riscv64-linux-gcc $srcdir/config/riscv/riscv64_linux_gcc ABI \
+ $use_shared
+
# Test installation of the x86-generic target, to be used for checking
# the sample apps build using the pkg-config file for cflags and libs
load_env cc
--
2.30.2
^ permalink raw reply [relevance 9%]
* Re: [PATCH v2 7/8] devtools: add RISC-V to test-meson-builds.sh
2022-05-10 15:07 9% ` [PATCH v2 7/8] devtools: add RISC-V to test-meson-builds.sh Stanislaw Kardach
@ 2022-05-10 15:35 0% ` Stanisław Kardach
0 siblings, 0 replies; 200+ results
From: Stanisław Kardach @ 2022-05-10 15:35 UTC (permalink / raw)
To: Bruce Richardson; +Cc: dev, Frank Zhao, Sam Grove, Marcin Wojtas, upstream
[-- Attachment #1: Type: text/plain, Size: 1286 bytes --]
On Tue, May 10, 2022 at 5:08 PM Stanislaw Kardach <kda@semihalf.com> wrote:
> Validate RISC-V compilation when test-meson-builds.sh is called. The
> check will be only performed if appropriate toolchain is present on the
> system (same as with other architectures).
>
> Sponsored-by: Frank Zhao <Frank.Zhao@starfivetech.com>
> Sponsored-by: Sam Grove <sam.grove@sifive.com>
> Signed-off-by: Stanislaw Kardach <kda@semihalf.com>
> ---
> devtools/test-meson-builds.sh | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/devtools/test-meson-builds.sh b/devtools/test-meson-builds.sh
> index a653b253cb..12513e9d7f 100755
> --- a/devtools/test-meson-builds.sh
> +++ b/devtools/test-meson-builds.sh
> @@ -275,6 +275,12 @@ for f in $srcdir/config/ppc/ppc* ; do
> build $targetdir $f ABI $use_shared
> done
>
> +# RISC-V configurations
> +for f in $srcdir/config/riscv/riscv* ; do
> + targetdir=build-$(basename $f | tr '_' '-' | cut -d'-' -f-2)
> + build $targetdir $f ABI $use_shared
> +done
> +
>
This should not be an iteration but a single build command. I'll re-send as
v3.
> # Test installation of the x86-generic target, to be used for checking
> # the sample apps build using the pkg-config file for cflags and libs
> load_env cc
> --
> 2.30.2
>
[-- Attachment #2: Type: text/html, Size: 2017 bytes --]
^ permalink raw reply [relevance 0%]
* [PATCH v2 7/8] devtools: add RISC-V to test-meson-builds.sh
@ 2022-05-10 15:07 9% ` Stanislaw Kardach
2022-05-10 15:35 0% ` Stanisław Kardach
1 sibling, 1 reply; 200+ results
From: Stanislaw Kardach @ 2022-05-10 15:07 UTC (permalink / raw)
To: Bruce Richardson
Cc: Stanislaw Kardach, dev, Frank Zhao, Sam Grove, mw, upstream
Validate RISC-V compilation when test-meson-builds.sh is called. The
check will be only performed if appropriate toolchain is present on the
system (same as with other architectures).
Sponsored-by: Frank Zhao <Frank.Zhao@starfivetech.com>
Sponsored-by: Sam Grove <sam.grove@sifive.com>
Signed-off-by: Stanislaw Kardach <kda@semihalf.com>
---
devtools/test-meson-builds.sh | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/devtools/test-meson-builds.sh b/devtools/test-meson-builds.sh
index a653b253cb..12513e9d7f 100755
--- a/devtools/test-meson-builds.sh
+++ b/devtools/test-meson-builds.sh
@@ -275,6 +275,12 @@ for f in $srcdir/config/ppc/ppc* ; do
build $targetdir $f ABI $use_shared
done
+# RISC-V configurations
+for f in $srcdir/config/riscv/riscv* ; do
+ targetdir=build-$(basename $f | tr '_' '-' | cut -d'-' -f-2)
+ build $targetdir $f ABI $use_shared
+done
+
# Test installation of the x86-generic target, to be used for checking
# the sample apps build using the pkg-config file for cflags and libs
load_env cc
--
2.30.2
^ permalink raw reply [relevance 9%]
* Re: [PATCH 1/3] eventdev: add function to quiesce an event port
@ 2022-05-09 17:29 3% ` Jerin Jacob
0 siblings, 0 replies; 200+ results
From: Jerin Jacob @ 2022-05-09 17:29 UTC (permalink / raw)
To: Pavan Nikhilesh, Jayatheerthan, Jay, Erik Gabriel Carrillo,
Gujjar, Abhinandan S, McDaniel, Timothy, Hemant Agrawal,
Nipun Gupta, Van Haaren, Harry, Mattias Rönnblom, Liang Ma,
Peter Mccarthy
Cc: Jerin Jacob, Ray Kinsella, dpdk-dev, Shijith Thotton
On Wed, Apr 27, 2022 at 5:02 PM Pavan Nikhilesh
<pbhagavatula@marvell.com> wrote:
>
> Add function to quiesce any core specific resources consumed by
> the event port.
>
> When the application decides to migrate the event port to another lcore
> or teardown the current lcore it may to call `rte_event_port_quiesce`
> to make sure that all the data associated with the event port are released
> from the lcore, this might also include any prefetched events.
>
> While releasing the event port from the lcore, this function calls the
> user-provided flush callback once per event.
>
> Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
+ eventdev stake holder
@jay.jayatheerthan@intel.com @erik.g.carrillo@intel.com
@abhinandan.gujjar@intel.com timothy.mcdaniel@intel.com
sthotton@marvell.com hemant.agrawal@nxp.com nipun.gupta@nxp.com
harry.van.haaren@intel.com mattias.ronnblom@ericsson.com
liangma@liangbit.com peter.mccarthy@intel.com
Since it is in a slow path and allows port teardown on migration for
the implementations where core has some state for the port. The new
API addition looks good to me.
Any objection or alternative thought from eventdev stake holders?
Some comments below.
> ---
> lib/eventdev/eventdev_pmd.h | 19 +++++++++++++++++++
> lib/eventdev/rte_eventdev.c | 19 +++++++++++++++++++
> lib/eventdev/rte_eventdev.h | 33 +++++++++++++++++++++++++++++++++
> lib/eventdev/version.map | 3 +++
> 4 files changed, 74 insertions(+)
>
> diff --git a/lib/eventdev/eventdev_pmd.h b/lib/eventdev/eventdev_pmd.h
> index ce469d47a6..cf9f2146a1 100644
> --- a/lib/eventdev/eventdev_pmd.h
> +++ b/lib/eventdev/eventdev_pmd.h
> @@ -381,6 +381,23 @@ typedef int (*eventdev_port_setup_t)(struct rte_eventdev *dev,
> */
> typedef void (*eventdev_port_release_t)(void *port);
>
> +/**
> + * Quiesce any core specific resources consumed by the event port
> + *
> + * @param dev
> + * Event device pointer.
> + * @param port
> + * Event port pointer.
> + * @param flush_cb
> + * User-provided event flush function.
> + * @param args
> + * Arguments to be passed to the user-provided event flush function.
> + *
> + */
> +typedef void (*eventdev_port_quiesce_t)(struct rte_eventdev *dev, void *port,
Please prefix rte_ for public symbols. i.e rte_event_port_quiesce_t.
I know we missed for existing eventdev_stop_flush_t, which we can fix
in the next ABI. I will send a patch for same.
> + eventdev_port_flush_t flush_cb,
> + void *args);
> +
> /**
> * Link multiple source event queues to destination event port.
> *
> @@ -1218,6 +1235,8 @@ struct eventdev_ops {
> /**< Set up an event port. */
> eventdev_port_release_t port_release;
> /**< Release an event port. */
> + eventdev_port_quiesce_t port_quiesce;
> + /**< Quiesce an event port. */
>
> eventdev_port_link_t port_link;
> /**< Link event queues to an event port. */
> diff --git a/lib/eventdev/rte_eventdev.c b/lib/eventdev/rte_eventdev.c
> index 532a253553..541fa5dc61 100644
> --- a/lib/eventdev/rte_eventdev.c
> +++ b/lib/eventdev/rte_eventdev.c
> @@ -730,6 +730,25 @@ rte_event_port_setup(uint8_t dev_id, uint8_t port_id,
> return 0;
> }
>
> +void
> +rte_event_port_quiesce(uint8_t dev_id, uint8_t port_id,
> + eventdev_port_flush_t release_cb, void *args)
> +{
> + struct rte_eventdev *dev;
> +
> + RTE_EVENTDEV_VALID_DEVID_OR_RET(dev_id);
> + dev = &rte_eventdevs[dev_id];
> +
> + if (!is_valid_port(dev, port_id)) {
> + RTE_EDEV_LOG_ERR("Invalid port_id=%" PRIu8, port_id);
> + return;
> + }
> +
> + if (dev->dev_ops->port_quiesce)
> + (*dev->dev_ops->port_quiesce)(dev, dev->data->ports[port_id],
> + release_cb, args);
> +}
> +
> int
> rte_event_dev_attr_get(uint8_t dev_id, uint32_t attr_id,
> uint32_t *attr_value)
> diff --git a/lib/eventdev/rte_eventdev.h b/lib/eventdev/rte_eventdev.h
> index 42a5660169..c86d8a5576 100644
> --- a/lib/eventdev/rte_eventdev.h
> +++ b/lib/eventdev/rte_eventdev.h
> @@ -830,6 +830,39 @@ int
> rte_event_port_setup(uint8_t dev_id, uint8_t port_id,
> const struct rte_event_port_conf *port_conf);
>
> +typedef void (*eventdev_port_flush_t)(uint8_t dev_id, struct rte_event event,
> + void *arg);
> +/**< Callback function prototype that can be passed during
> + * rte_event_port_release(), invoked once per a released event.
> + */
> +
> +/**
> + * Quiesce any core specific resources consumed by the event port.
> + *
> + * Event ports are generally coupled with lcores, and a given Hardware
> + * implementation might require the PMD to store port specific data in the
> + * lcore.
> + * When the application decides to migrate the event port to an other lcore
an other -> another
> + * or teardown the current lcore it may to call `rte_event_port_quiesce`
> + * to make sure that all the data associated with the event port are released
> + * from the lcore, this might also include any prefetched events.
> + * While releasing the event port from the lcore, this function calls the
> + * user-provided flush callback once per event.
> + *
> + * The event port specific config is not reset.
Make this as @note The event port-specific config shall not reset on
this API call or similar.
> + *
> + * @param dev_id
> + * The identifier of the device.
> + * @param port_id
> + * The index of the event port to setup. The value must be in the range
> + * [0, nb_event_ports - 1] previously supplied to rte_event_dev_configure().
> + * @param release_cb
> + * Callback function invoked once per flushed event.
> + */
> +__rte_experimental
> +void rte_event_port_quiesce(uint8_t dev_id, uint8_t port_id,
> + eventdev_port_flush_t release_cb, void *args);
>
Please update doc/guides/prog_guide/eventdev.rst and add section for teardown
and mention existing rte_event_dev_stop_flush_callback_register() and
this new API.
^ permalink raw reply [relevance 3%]
* Re: [PATCH v2 2/6] eventdev: add weight and affinity to queue attributes
2022-04-05 5:40 3% ` [PATCH v2 2/6] eventdev: add weight and affinity to queue attributes Shijith Thotton
@ 2022-05-09 12:46 0% ` Jerin Jacob
0 siblings, 0 replies; 200+ results
From: Jerin Jacob @ 2022-05-09 12:46 UTC (permalink / raw)
To: Shijith Thotton
Cc: dpdk-dev, Jerin Jacob, Pavan Nikhilesh, Van Haaren, Harry,
Mattias Rönnblom
On Tue, Apr 5, 2022 at 11:11 AM Shijith Thotton <sthotton@marvell.com> wrote:
>
> Extended eventdev queue QoS attributes to support weight and affinity.
> If queues are of same priority, events from the queue with highest
the same priority
> weight will be scheduled first. Affinity indicates the number of times,
> the subsequent schedule calls from an event port will use the same event
> queue. Schedule call selects another queue if current queue goes empty
> or schedule count reaches affinity count.
>
> To avoid ABI break, weight and affinity attributes are not yet added to
> queue config structure and relies on PMD for managing it. New eventdev
rely on
> op queue_attr_get can be used to get it from the PMD.
>
> Signed-off-by: Shijith Thotton <sthotton@marvell.com>
Please update the release notes.
With above change,
Acked-by: Jerin Jacob <jerinj@marvell.com>
> ---
> lib/eventdev/eventdev_pmd.h | 22 +++++++++++++++++++++
> lib/eventdev/rte_eventdev.c | 12 ++++++++++++
> lib/eventdev/rte_eventdev.h | 38 +++++++++++++++++++++++++++++++++++--
> 3 files changed, 70 insertions(+), 2 deletions(-)
>
> diff --git a/lib/eventdev/eventdev_pmd.h b/lib/eventdev/eventdev_pmd.h
> index 3b85d9f7a5..5495aee4f6 100644
> --- a/lib/eventdev/eventdev_pmd.h
> +++ b/lib/eventdev/eventdev_pmd.h
> @@ -341,6 +341,26 @@ typedef int (*eventdev_queue_setup_t)(struct rte_eventdev *dev,
> typedef void (*eventdev_queue_release_t)(struct rte_eventdev *dev,
> uint8_t queue_id);
>
> +/**
> + * Get an event queue attribute at runtime.
> + *
> + * @param dev
> + * Event device pointer
> + * @param queue_id
> + * Event queue index
> + * @param attr_id
> + * Event queue attribute id
> + * @param[out] attr_value
> + * Event queue attribute value
> + *
> + * @return
> + * - 0: Success.
> + * - <0: Error code on failure.
> + */
> +typedef int (*eventdev_queue_attr_get_t)(struct rte_eventdev *dev,
> + uint8_t queue_id, uint32_t attr_id,
> + uint32_t *attr_value);
> +
> /**
> * Set an event queue attribute at runtime.
> *
> @@ -1231,6 +1251,8 @@ struct eventdev_ops {
> /**< Set up an event queue. */
> eventdev_queue_release_t queue_release;
> /**< Release an event queue. */
> + eventdev_queue_attr_get_t queue_attr_get;
> + /**< Get an event queue attribute. */
> eventdev_queue_attr_set_t queue_attr_set;
> /**< Set an event queue attribute. */
>
> diff --git a/lib/eventdev/rte_eventdev.c b/lib/eventdev/rte_eventdev.c
> index a31e99be02..12b261f923 100644
> --- a/lib/eventdev/rte_eventdev.c
> +++ b/lib/eventdev/rte_eventdev.c
> @@ -838,6 +838,18 @@ rte_event_queue_attr_get(uint8_t dev_id, uint8_t queue_id, uint32_t attr_id,
>
> *attr_value = conf->schedule_type;
> break;
> + case RTE_EVENT_QUEUE_ATTR_WEIGHT:
> + *attr_value = RTE_EVENT_QUEUE_WEIGHT_LOWEST;
> + if (dev->dev_ops->queue_attr_get)
> + return (*dev->dev_ops->queue_attr_get)(
> + dev, queue_id, attr_id, attr_value);
> + break;
> + case RTE_EVENT_QUEUE_ATTR_AFFINITY:
> + *attr_value = RTE_EVENT_QUEUE_AFFINITY_LOWEST;
> + if (dev->dev_ops->queue_attr_get)
> + return (*dev->dev_ops->queue_attr_get)(
> + dev, queue_id, attr_id, attr_value);
> + break;
> default:
> return -EINVAL;
> };
> diff --git a/lib/eventdev/rte_eventdev.h b/lib/eventdev/rte_eventdev.h
> index 16e9d5fb5b..a6fbaf1c11 100644
> --- a/lib/eventdev/rte_eventdev.h
> +++ b/lib/eventdev/rte_eventdev.h
> @@ -222,8 +222,14 @@ struct rte_event;
>
> /* Event device capability bitmap flags */
> #define RTE_EVENT_DEV_CAP_QUEUE_QOS (1ULL << 0)
> -/**< Event scheduling prioritization is based on the priority associated with
> - * each event queue.
> +/**< Event scheduling prioritization is based on the priority and weight
> + * associated with each event queue. Events from a queue with highest priority
> + * is scheduled first. If the queues are of same priority, weight of the queues
> + * are considered to select a queue in a weighted round robin fashion.
> + * Subsequent dequeue calls from an event port could see events from the same
> + * event queue, if the queue is configured with an affinity count. Affinity
> + * count is the number of subsequent dequeue calls, in which an event port
> + * should use the same event queue if the queue is non-empty
> *
> * @see rte_event_queue_setup(), rte_event_queue_attr_set()
> */
> @@ -331,6 +337,26 @@ struct rte_event;
> * @see rte_event_port_link()
> */
>
> +/* Event queue scheduling weights */
> +#define RTE_EVENT_QUEUE_WEIGHT_HIGHEST 255
> +/**< Highest weight of an event queue
> + * @see rte_event_queue_attr_get(), rte_event_queue_attr_set()
> + */
> +#define RTE_EVENT_QUEUE_WEIGHT_LOWEST 0
> +/**< Lowest weight of an event queue
> + * @see rte_event_queue_attr_get(), rte_event_queue_attr_set()
> + */
> +
> +/* Event queue scheduling affinity */
> +#define RTE_EVENT_QUEUE_AFFINITY_HIGHEST 255
> +/**< Highest scheduling affinity of an event queue
> + * @see rte_event_queue_attr_get(), rte_event_queue_attr_set()
> + */
> +#define RTE_EVENT_QUEUE_AFFINITY_LOWEST 0
> +/**< Lowest scheduling affinity of an event queue
> + * @see rte_event_queue_attr_get(), rte_event_queue_attr_set()
> + */
> +
> /**
> * Get the total number of event devices that have been successfully
> * initialised.
> @@ -684,6 +710,14 @@ rte_event_queue_setup(uint8_t dev_id, uint8_t queue_id,
> * The schedule type of the queue.
> */
> #define RTE_EVENT_QUEUE_ATTR_SCHEDULE_TYPE 4
> +/**
> + * The weight of the queue.
> + */
> +#define RTE_EVENT_QUEUE_ATTR_WEIGHT 5
> +/**
> + * Affinity of the queue.
> + */
> +#define RTE_EVENT_QUEUE_ATTR_AFFINITY 6
>
> /**
> * Get an attribute from a queue.
> --
> 2.25.1
>
^ permalink raw reply [relevance 0%]
* [PATCH v2 1/2] ci: switch to Ubuntu 20.04
2022-04-26 7:18 4% [PATCH 1/2] ci: switch to Ubuntu 20.04 David Marchand
@ 2022-05-06 11:57 4% ` David Marchand
0 siblings, 0 replies; 200+ results
From: David Marchand @ 2022-05-06 11:57 UTC (permalink / raw)
To: dev
Cc: Aaron Conole, Michael Santana, Ruifeng Wang, Jan Viktorin,
Bruce Richardson, David Christensen
Ubuntu 18.04 is now rather old.
Besides, other entities in our CI are also testing this distribution.
Switch to a newer Ubuntu release and benefit from more recent
tool(chain)s: for example, net/cnxk now builds fine and can be
re-enabled.
Note: Ubuntu 18.04 and 20.04 seem to preserve the same paths for the ARM
and PPC cross compilation toolchains, so we can use a single
configuration file (with the hope, future releases of Ubuntu will do the
same).
Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Aaron Conole <aconole@redhat.com>
---
Changes since v1:
- renamed ubuntu cross compilation configs for ARM and PPC,
---
.ci/linux-build.sh | 7 ++----
.github/workflows/build.yml | 22 +++++++++----------
...ntu1804 => arm64_armv8_linux_clang_ubuntu} | 0
...tu1804 => ppc64le-power8-linux-gcc-ubuntu} | 0
4 files changed, 12 insertions(+), 17 deletions(-)
rename config/arm/{arm64_armv8_linux_clang_ubuntu1804 => arm64_armv8_linux_clang_ubuntu} (100%)
rename config/ppc/{ppc64le-power8-linux-gcc-ubuntu1804 => ppc64le-power8-linux-gcc-ubuntu} (100%)
diff --git a/.ci/linux-build.sh b/.ci/linux-build.sh
index 774a1441bf..2dea0c93fa 100755
--- a/.ci/linux-build.sh
+++ b/.ci/linux-build.sh
@@ -57,18 +57,15 @@ catch_coredump() {
}
if [ "$AARCH64" = "true" ]; then
- # Note: common/cnxk is disabled for Ubuntu 18.04
- # https://bugs.dpdk.org/show_bug.cgi?id=697
- OPTS="$OPTS -Ddisable_drivers=common/cnxk"
if [ "${CC%%clang}" != "$CC" ]; then
- OPTS="$OPTS --cross-file config/arm/arm64_armv8_linux_clang_ubuntu1804"
+ OPTS="$OPTS --cross-file config/arm/arm64_armv8_linux_clang_ubuntu"
else
OPTS="$OPTS --cross-file config/arm/arm64_armv8_linux_gcc"
fi
fi
if [ "$PPC64LE" = "true" ]; then
- OPTS="$OPTS --cross-file config/ppc/ppc64le-power8-linux-gcc-ubuntu1804"
+ OPTS="$OPTS --cross-file config/ppc/ppc64le-power8-linux-gcc-ubuntu"
fi
if [ "$BUILD_DOCS" = "true" ]; then
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 22daaabb91..812aa7055d 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -30,43 +30,41 @@ jobs:
fail-fast: false
matrix:
config:
- - os: ubuntu-18.04
+ - os: ubuntu-20.04
compiler: gcc
library: static
- - os: ubuntu-18.04
+ - os: ubuntu-20.04
compiler: gcc
library: shared
mini: mini
- - os: ubuntu-18.04
+ - os: ubuntu-20.04
compiler: gcc
library: shared
checks: abi+doc+tests
- - os: ubuntu-18.04
+ - os: ubuntu-20.04
compiler: clang
library: static
- - os: ubuntu-18.04
+ - os: ubuntu-20.04
compiler: clang
library: shared
checks: doc+tests
- - os: ubuntu-18.04
+ - os: ubuntu-20.04
compiler: gcc
library: static
cross: i386
- # Note: common/cnxk is disabled for Ubuntu 18.04
- # https://bugs.dpdk.org/show_bug.cgi?id=697
- - os: ubuntu-18.04
+ - os: ubuntu-20.04
compiler: gcc
library: static
cross: aarch64
- - os: ubuntu-18.04
+ - os: ubuntu-20.04
compiler: gcc
library: shared
cross: aarch64
- - os: ubuntu-18.04
+ - os: ubuntu-20.04
compiler: gcc
library: static
cross: ppc64le
- - os: ubuntu-18.04
+ - os: ubuntu-20.04
compiler: gcc
library: shared
cross: ppc64le
diff --git a/config/arm/arm64_armv8_linux_clang_ubuntu1804 b/config/arm/arm64_armv8_linux_clang_ubuntu
similarity index 100%
rename from config/arm/arm64_armv8_linux_clang_ubuntu1804
rename to config/arm/arm64_armv8_linux_clang_ubuntu
diff --git a/config/ppc/ppc64le-power8-linux-gcc-ubuntu1804 b/config/ppc/ppc64le-power8-linux-gcc-ubuntu
similarity index 100%
rename from config/ppc/ppc64le-power8-linux-gcc-ubuntu1804
rename to config/ppc/ppc64le-power8-linux-gcc-ubuntu
--
2.23.0
^ permalink raw reply [relevance 4%]
* [PATCH 10/11] devtools: add RISC-V to test-meson-builds.sh
@ 2022-05-05 17:30 9% ` Stanislaw Kardach
1 sibling, 0 replies; 200+ results
From: Stanislaw Kardach @ 2022-05-05 17:30 UTC (permalink / raw)
To: Bruce Richardson
Cc: Stanislaw Kardach, dev, Frank Zhao, Sam Grove, mw, upstream
Validate RISC-V compilation when test-meson-builds.sh is called. The
check will be only performed if appropriate toolchain is present on the
system (same as with other architectures).
Signed-off-by: Stanislaw Kardach <kda@semihalf.com>
Sponsored-by: Frank Zhao <Frank.Zhao@starfivetech.com>
Sponsored-by: Sam Grove <sam.grove@sifive.com>
---
devtools/test-meson-builds.sh | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/devtools/test-meson-builds.sh b/devtools/test-meson-builds.sh
index a653b253cb..12513e9d7f 100755
--- a/devtools/test-meson-builds.sh
+++ b/devtools/test-meson-builds.sh
@@ -275,6 +275,12 @@ for f in $srcdir/config/ppc/ppc* ; do
build $targetdir $f ABI $use_shared
done
+# RISC-V configurations
+for f in $srcdir/config/riscv/riscv* ; do
+ targetdir=build-$(basename $f | tr '_' '-' | cut -d'-' -f-2)
+ build $targetdir $f ABI $use_shared
+done
+
# Test installation of the x86-generic target, to be used for checking
# the sample apps build using the pkg-config file for cflags and libs
load_env cc
--
2.30.2
^ permalink raw reply [relevance 9%]
* [PATCH 0/6] Vhost checksum offload improvements
@ 2022-05-05 10:27 3% Maxime Coquelin
0 siblings, 0 replies; 200+ results
From: Maxime Coquelin @ 2022-05-05 10:27 UTC (permalink / raw)
To: dev, jasowang, chenbo.xia, david.marchand, olivier.matz
Cc: stable, Maxime Coquelin
This series aims at improving Vhost checksum offloading
support.
The first patch reverts overwritting MAC address in
testpmd CSUM forward mode. This is required to be able to
test checksum offloading with real traffic. MAC forwarding
mode should be used if the MAC addresses need to be
changed.
Second patch is a Vhost library fix to be compliant with
the Virtio specification, which requires that the
pseudo-header checksum is being set by the device when
offloading the checksum to the guest.
Third patch enables the compliant offloading mode of Vhost
library in Vhost PMD by default, since the legacy mode
violates the mbuf API by setting Tx flags in the receive
path. A new devarg is introduced for application willing
to use the legacy mode.
Fourth patch is just a small cleanup to represent a boolean
value as a boolean.
The two last patches introduces compatibility layers
that performs checksum in SW when the ethdev and Virtio
features are not aligned.
Note that the two last patches are not tagged as fixes
because they rely on the new compliant offload mode of
Vhost library, and so would casue an ABI breakage if
backported.
With this series, it is now possible to perform IO
forwarding between a vhost-user port and a Vitio-user
with kernel backend port even if the guest has negotiated
VIRTIO_NET_F_CSUM.
With csum forward mode, it now works whathever the
offloading configuration set either on Virtio or Ethdev
sides.
Maxime Coquelin (6):
Revert "app/testpmd: modify mac in csum forwarding"
vhost: fix missing enqueue pseudo-header calculation
net/vhost: enable compliant offloading mode
net/vhost: make VLAN stripping flag a boolean
net/vhost: perform SW checksum in Rx path
net/vhost: perform SW checksum in Tx path
app/test-pmd/csumonly.c | 4 -
doc/guides/nics/features/vhost.ini | 1 +
doc/guides/nics/vhost.rst | 6 ++
drivers/net/vhost/rte_eth_vhost.c | 166 ++++++++++++++++++++++++++++-
lib/vhost/virtio_net.c | 10 ++
5 files changed, 179 insertions(+), 8 deletions(-)
--
2.35.1
^ permalink raw reply [relevance 3%]
* [PATCH v2 2/2] ci: build some job with ASan
@ 2022-05-05 9:29 3% ` David Marchand
0 siblings, 0 replies; 200+ results
From: David Marchand @ 2022-05-05 9:29 UTC (permalink / raw)
To: dev; +Cc: john.mcnamara, Aaron Conole, Michael Santana
Enable ASan, this can greatly help identify leaks and buffer overflows.
Running unit tests relying on multiprocess is unreliable with ASan
enabled, so skip them.
Signed-off-by: David Marchand <david.marchand@redhat.com>
---
Changes since v1:
- reinstated table_autotest in "ASan-safe" list of ut,
---
.ci/linux-build.sh | 8 ++
.github/workflows/build.yml | 3 +-
app/test/meson.build | 208 +++++++++++++++++++-----------------
3 files changed, 118 insertions(+), 101 deletions(-)
diff --git a/.ci/linux-build.sh b/.ci/linux-build.sh
index 774a1441bf..93706c0131 100755
--- a/.ci/linux-build.sh
+++ b/.ci/linux-build.sh
@@ -95,6 +95,14 @@ if [ "$MINI" = "true" ]; then
OPTS="$OPTS -Denable_drivers=net/null"
OPTS="$OPTS -Ddisable_libs=*"
fi
+
+if [ "$ASAN" = "true" ]; then
+ OPTS="$OPTS -Db_sanitize=address"
+ if [ "${CC%%clang}" != "$CC" ]; then
+ OPTS="$OPTS -Db_lundef=false"
+ fi
+fi
+
meson build --werror $OPTS
ninja -C build
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 22daaabb91..45871e76ed 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -16,6 +16,7 @@ jobs:
env:
AARCH64: ${{ matrix.config.cross == 'aarch64' }}
ABI_CHECKS: ${{ contains(matrix.config.checks, 'abi') }}
+ ASAN: ${{ contains(matrix.config.checks, 'asan') }}
BUILD_32BIT: ${{ matrix.config.cross == 'i386' }}
BUILD_DOCS: ${{ contains(matrix.config.checks, 'doc') }}
CC: ccache ${{ matrix.config.compiler }}
@@ -47,7 +48,7 @@ jobs:
- os: ubuntu-18.04
compiler: clang
library: shared
- checks: doc+tests
+ checks: asan+doc+tests
- os: ubuntu-18.04
compiler: gcc
library: static
diff --git a/app/test/meson.build b/app/test/meson.build
index 5fc1dd1b7b..bb4621ed2a 100644
--- a/app/test/meson.build
+++ b/app/test/meson.build
@@ -149,96 +149,97 @@ test_deps = enabled_libs
# as well as libs, the pci and vdev bus drivers are needed for a lot of tests
test_deps += ['bus_pci', 'bus_vdev']
-# Each test is marked with flag true/false
-# to indicate whether it can run in no-huge mode.
+# Each test is marked with flags:
+# - the first flag indicates whether the test can run in no-huge mode,
+# - the second flag indicates whether the test can run with ASan enabled,
fast_tests = [
- ['acl_autotest', true],
- ['atomic_autotest', false],
- ['bitmap_autotest', true],
- ['bpf_autotest', true],
- ['bpf_convert_autotest', true],
- ['bitops_autotest', true],
- ['byteorder_autotest', true],
- ['cksum_autotest', true],
- ['cmdline_autotest', true],
- ['common_autotest', true],
- ['cpuflags_autotest', true],
- ['debug_autotest', true],
- ['devargs_autotest', true],
- ['eal_flags_c_opt_autotest', false],
- ['eal_flags_main_opt_autotest', false],
- ['eal_flags_n_opt_autotest', false],
- ['eal_flags_hpet_autotest', false],
- ['eal_flags_no_huge_autotest', false],
- ['eal_flags_a_opt_autotest', false],
- ['eal_flags_b_opt_autotest', false],
- ['eal_flags_vdev_opt_autotest', false],
- ['eal_flags_r_opt_autotest', false],
- ['eal_flags_mem_autotest', false],
- ['eal_flags_file_prefix_autotest', false],
- ['eal_flags_misc_autotest', false],
- ['eal_fs_autotest', true],
- ['errno_autotest', true],
- ['ethdev_link_status', true],
- ['event_ring_autotest', true],
- ['fib_autotest', true],
- ['fib6_autotest', true],
- ['func_reentrancy_autotest', false],
- ['hash_autotest', true],
- ['interrupt_autotest', true],
- ['ipfrag_autotest', false],
- ['lcores_autotest', true],
- ['logs_autotest', true],
- ['lpm_autotest', true],
- ['lpm6_autotest', true],
- ['malloc_autotest', false],
- ['mbuf_autotest', false],
- ['mcslock_autotest', false],
- ['memcpy_autotest', true],
- ['memory_autotest', false],
- ['mempool_autotest', false],
- ['memzone_autotest', false],
- ['meter_autotest', true],
- ['multiprocess_autotest', false],
- ['per_lcore_autotest', true],
- ['pflock_autotest', true],
- ['prefetch_autotest', true],
- ['rcu_qsbr_autotest', true],
- ['pie_autotest', true],
- ['rib_autotest', true],
- ['rib6_autotest', true],
- ['ring_autotest', true],
- ['rwlock_test1_autotest', true],
- ['rwlock_rda_autotest', true],
- ['rwlock_rds_wrm_autotest', true],
- ['rwlock_rde_wro_autotest', true],
- ['sched_autotest', true],
- ['security_autotest', false],
- ['spinlock_autotest', true],
- ['stack_autotest', false],
- ['stack_lf_autotest', false],
- ['string_autotest', true],
- ['tailq_autotest', true],
- ['ticketlock_autotest', true],
- ['timer_autotest', false],
- ['user_delay_us', true],
- ['version_autotest', true],
- ['crc_autotest', true],
- ['distributor_autotest', false],
- ['eventdev_common_autotest', true],
- ['fbarray_autotest', true],
- ['hash_readwrite_func_autotest', false],
- ['ipsec_autotest', true],
- ['kni_autotest', false],
- ['kvargs_autotest', true],
- ['member_autotest', true],
- ['power_cpufreq_autotest', false],
- ['power_autotest', true],
- ['power_kvm_vm_autotest', false],
- ['reorder_autotest', true],
- ['service_autotest', true],
- ['thash_autotest', true],
- ['trace_autotest', true],
+ ['acl_autotest', true, true],
+ ['atomic_autotest', false, true],
+ ['bitmap_autotest', true, true],
+ ['bpf_autotest', true, true],
+ ['bpf_convert_autotest', true, true],
+ ['bitops_autotest', true, true],
+ ['byteorder_autotest', true, true],
+ ['cksum_autotest', true, true],
+ ['cmdline_autotest', true, true],
+ ['common_autotest', true, true],
+ ['cpuflags_autotest', true, true],
+ ['debug_autotest', true, true],
+ ['devargs_autotest', true, true],
+ ['eal_flags_c_opt_autotest', false, false],
+ ['eal_flags_main_opt_autotest', false, false],
+ ['eal_flags_n_opt_autotest', false, false],
+ ['eal_flags_hpet_autotest', false, false],
+ ['eal_flags_no_huge_autotest', false, false],
+ ['eal_flags_a_opt_autotest', false, false],
+ ['eal_flags_b_opt_autotest', false, false],
+ ['eal_flags_vdev_opt_autotest', false, false],
+ ['eal_flags_r_opt_autotest', false, false],
+ ['eal_flags_mem_autotest', false, false],
+ ['eal_flags_file_prefix_autotest', false, false],
+ ['eal_flags_misc_autotest', false, false],
+ ['eal_fs_autotest', true, true],
+ ['errno_autotest', true, true],
+ ['ethdev_link_status', true, true],
+ ['event_ring_autotest', true, true],
+ ['fib_autotest', true, true],
+ ['fib6_autotest', true, true],
+ ['func_reentrancy_autotest', false, true],
+ ['hash_autotest', true, true],
+ ['interrupt_autotest', true, true],
+ ['ipfrag_autotest', false, true],
+ ['lcores_autotest', true, true],
+ ['logs_autotest', true, true],
+ ['lpm_autotest', true, true],
+ ['lpm6_autotest', true, true],
+ ['malloc_autotest', false, true],
+ ['mbuf_autotest', false, true],
+ ['mcslock_autotest', false, true],
+ ['memcpy_autotest', true, true],
+ ['memory_autotest', false, true],
+ ['mempool_autotest', false, true],
+ ['memzone_autotest', false, true],
+ ['meter_autotest', true, true],
+ ['multiprocess_autotest', false, false],
+ ['per_lcore_autotest', true, true],
+ ['pflock_autotest', true, true],
+ ['prefetch_autotest', true, true],
+ ['rcu_qsbr_autotest', true, true],
+ ['pie_autotest', true, true],
+ ['rib_autotest', true, true],
+ ['rib6_autotest', true, true],
+ ['ring_autotest', true, true],
+ ['rwlock_test1_autotest', true, true],
+ ['rwlock_rda_autotest', true, true],
+ ['rwlock_rds_wrm_autotest', true, true],
+ ['rwlock_rde_wro_autotest', true, true],
+ ['sched_autotest', true, true],
+ ['security_autotest', false, true],
+ ['spinlock_autotest', true, true],
+ ['stack_autotest', false, true],
+ ['stack_lf_autotest', false, true],
+ ['string_autotest', true, true],
+ ['tailq_autotest', true, true],
+ ['ticketlock_autotest', true, true],
+ ['timer_autotest', false, true],
+ ['user_delay_us', true, true],
+ ['version_autotest', true, true],
+ ['crc_autotest', true, true],
+ ['distributor_autotest', false, true],
+ ['eventdev_common_autotest', true, true],
+ ['fbarray_autotest', true, true],
+ ['hash_readwrite_func_autotest', false, true],
+ ['ipsec_autotest', true, true],
+ ['kni_autotest', false, true],
+ ['kvargs_autotest', true, true],
+ ['member_autotest', true, true],
+ ['power_cpufreq_autotest', false, true],
+ ['power_autotest', true, true],
+ ['power_kvm_vm_autotest', false, true],
+ ['reorder_autotest', true, true],
+ ['service_autotest', true, true],
+ ['thash_autotest', true, true],
+ ['trace_autotest', true, true],
]
# Tests known to have issues or which don't belong in other tests lists.
@@ -345,15 +346,16 @@ endif
if dpdk_conf.has('RTE_LIB_FLOW_CLASSIFY')
test_sources += 'test_flow_classify.c'
- fast_tests += [['flow_classify_autotest', false]]
+ fast_tests += [['flow_classify_autotest', false, true]]
endif
if dpdk_conf.has('RTE_LIB_METRICS')
test_sources += ['test_metrics.c']
- fast_tests += [['metrics_autotest', true]]
+ fast_tests += [['metrics_autotest', true, true]]
endif
if not is_windows and dpdk_conf.has('RTE_LIB_TELEMETRY')
test_sources += ['test_telemetry_json.c', 'test_telemetry_data.c']
- fast_tests += [['telemetry_json_autotest', true], ['telemetry_data_autotest', true]]
+ fast_tests += [['telemetry_json_autotest', true, true]]
+ fast_tests += [['telemetry_data_autotest', true, true]]
endif
if dpdk_conf.has('RTE_LIB_PIPELINE')
# pipeline lib depends on port and table libs, so those must be present
@@ -366,7 +368,7 @@ if dpdk_conf.has('RTE_LIB_PIPELINE')
'test_table_ports.c',
'test_table_tables.c',
]
- fast_tests += [['table_autotest', true]]
+ fast_tests += [['table_autotest', true, true]]
endif
# The following linkages of drivers are required because
@@ -386,26 +388,26 @@ if dpdk_conf.has('RTE_NET_RING')
test_sources += 'test_pmd_ring.c'
test_sources += 'test_event_eth_tx_adapter.c'
test_sources += 'sample_packet_forward.c'
- fast_tests += [['ring_pmd_autotest', true]]
+ fast_tests += [['ring_pmd_autotest', true, true]]
perf_test_names += 'ring_pmd_perf_autotest'
- fast_tests += [['event_eth_tx_adapter_autotest', false]]
+ fast_tests += [['event_eth_tx_adapter_autotest', false, true]]
if dpdk_conf.has('RTE_LIB_BITRATESTATS')
test_sources += 'test_bitratestats.c'
- fast_tests += [['bitratestats_autotest', true]]
+ fast_tests += [['bitratestats_autotest', true, true]]
endif
if dpdk_conf.has('RTE_LIB_LATENCYSTATS')
test_sources += 'test_latencystats.c'
- fast_tests += [['latencystats_autotest', true]]
+ fast_tests += [['latencystats_autotest', true, true]]
endif
if dpdk_conf.has('RTE_LIB_PDUMP')
test_sources += 'test_pdump.c'
- fast_tests += [['pdump_autotest', true]]
+ fast_tests += [['pdump_autotest', true, false]]
endif
endif
if dpdk_conf.has('RTE_NET_NULL')
test_deps += 'net_null'
test_sources += 'test_vdev.c'
- fast_tests += [['vdev_autotest', true]]
+ fast_tests += [['vdev_autotest', true, true]]
endif
if dpdk_conf.has('RTE_HAS_LIBPCAP')
@@ -431,7 +433,7 @@ if dpdk_conf.has('RTE_LIB_COMPRESSDEV')
if compress_test_dep.found()
test_dep_objs += compress_test_dep
test_sources += 'test_compressdev.c'
- fast_tests += [['compressdev_autotest', false]]
+ fast_tests += [['compressdev_autotest', false, true]]
endif
endif
@@ -478,6 +480,12 @@ foreach arg : fast_tests
endif
endif
+ if get_option('b_sanitize') == 'address' or get_option('b_sanitize') == 'address,undefined'
+ if not arg[2]
+ run_test = false
+ endif
+ endif
+
if (get_option('default_library') == 'shared' and
arg[0] == 'event_eth_tx_adapter_autotest')
foreach drv:dpdk_drivers
--
2.23.0
^ permalink raw reply [relevance 3%]
* RE: [PATCH v4 0/7] Add new cryptodev op for event metadata
2022-05-01 19:24 4% ` [PATCH v4 " Akhil Goyal
2022-05-01 19:24 2% ` [PATCH v4 1/7] cryptodev: add APIs to get/set " Akhil Goyal
@ 2022-05-02 11:08 0% ` Gujjar, Abhinandan S
2022-05-12 12:45 4% ` [PATCH v5 " Akhil Goyal
2 siblings, 0 replies; 200+ results
From: Gujjar, Abhinandan S @ 2022-05-02 11:08 UTC (permalink / raw)
To: Akhil Goyal, dev
Cc: anoobj, jerinj, Jayatheerthan, Jay, Vangati, Narender, vfialko
Acked-by: Abhinandan Gujjar <Abhinandan.gujjar@intel.com>
> -----Original Message-----
> From: Akhil Goyal <gakhil@marvell.com>
> Sent: Monday, May 2, 2022 12:55 AM
> To: dev@dpdk.org
> Cc: anoobj@marvell.com; jerinj@marvell.com; Gujjar, Abhinandan S
> <abhinandan.gujjar@intel.com>; Jayatheerthan, Jay
> <jay.jayatheerthan@intel.com>; Vangati, Narender
> <narender.vangati@intel.com>; vfialko@marvell.com; Akhil Goyal
> <gakhil@marvell.com>
> Subject: [PATCH v4 0/7] Add new cryptodev op for event metadata
>
> For using event crypto metadata, event metadata need to be set in session. For
> this session user data was used for symmetric crypto sessions and no support
> was present for asymmetric and security sessions.
> The use of userdata to store event metadata (which is dereferenced in PMD) is
> not correct as it is meant for the application to use it.
> Hence, a new API is created to set and get event crypto metadata which is
> scalable to all sessions supported by the crypto PMD.
> The application can use the set API to set event metadata and the PMD may
> store that inside the session private data and PMD need not use the get API as
> it would be internal to the PMD.
> For the software event crypto adapter implementation, the eventdev library
> can use the get API to get the event metadata stored inside the session
> structure.
> For Asymmetric sessions, a new field is added inside the session struct which is
> internal to library.
> For symmetric and security sessions, new field cannot be added as it would be
> ABI break. Hence, session userdata is being used to store that as it was used
> earlier. In next ABI break release this would be fixed similar to asymmetric
> crypto case.
>
> The patchset also add support for asymmetric crypto adapter in the test
> applications and the crypto/cnxk implementation of the new cryptodev op and
> corresponding changes in the eventdev lib.
>
> Changes in v4:
> - added null checks in set API
> - updated check in session destroy
> - updated API comments
> - fixed test app failure reported by Abhinandan.
> - moved event mdata after padding in asym session struct.
>
> Changes in v3:
> - fix SW adapter case of memory allocation/free of mdata. mdata is allocated in
> set API and freed in session clear/destroy.
> - mark rte_cryptodev_session_event_mdata_get as internal API as it is only
> needed for the app or the PMD.
>
> changes in v2:
> - v1 patchset only fixed security sessions and also caused ABI breakage.
> This is fixed in v2.
> - added new API for setting event metadata.
> - added new cryptodev op which can handle all sessions
>
>
> Akhil Goyal (5):
> crypto/octeontx: use new API for event metadata
> test/event: use new API to set event crypto metadata
> eventdev: use new API to get event crypto metadata
> test/event: add asymmetric cases for crypto adapter
> test-eventdev: support asym ops for crypto adapter
>
> Volodymyr Fialko (2):
> cryptodev: add APIs to get/set event metadata
> crypto/cnxk: add event metadata set operation
>
> app/test-eventdev/evt_common.h | 2 +
> app/test-eventdev/evt_options.c | 17 +
> app/test-eventdev/evt_options.h | 4 +
> app/test-eventdev/test_perf_atq.c | 12 +-
> app/test-eventdev/test_perf_common.c | 254 ++++++++--
> app/test-eventdev/test_perf_common.h | 45 +-
> app/test-eventdev/test_perf_queue.c | 12 +-
> app/test/test_event_crypto_adapter.c | 511 +++++++++++++++++++-
> doc/guides/tools/testeventdev.rst | 5 +
> drivers/crypto/cnxk/cn10k_cryptodev_ops.c | 144 +++++-
> drivers/crypto/cnxk/cn10k_ipsec.h | 2 +
> drivers/crypto/cnxk/cn9k_cryptodev_ops.c | 138 +++++-
> drivers/crypto/cnxk/cn9k_ipsec.h | 2 +
> drivers/crypto/cnxk/cnxk_ae.h | 2 +
> drivers/crypto/cnxk/cnxk_cryptodev_ops.h | 18 -
> drivers/crypto/cnxk/cnxk_se.h | 2 +
> drivers/crypto/octeontx/otx_cryptodev_ops.c | 20 +-
> lib/cryptodev/cryptodev_pmd.c | 16 +
> lib/cryptodev/cryptodev_pmd.h | 36 ++
> lib/cryptodev/rte_cryptodev.c | 44 ++
> lib/cryptodev/rte_cryptodev.h | 22 +
> lib/cryptodev/version.map | 4 +
> lib/eventdev/rte_event_crypto_adapter.c | 55 +--
> 23 files changed, 1179 insertions(+), 188 deletions(-)
>
> --
> 2.25.1
^ permalink raw reply [relevance 0%]
* RE: [PATCH v4 1/7] cryptodev: add APIs to get/set event metadata
2022-05-01 19:24 2% ` [PATCH v4 1/7] cryptodev: add APIs to get/set " Akhil Goyal
2022-05-02 9:01 0% ` Anoob Joseph
@ 2022-05-02 11:06 0% ` Gujjar, Abhinandan S
1 sibling, 0 replies; 200+ results
From: Gujjar, Abhinandan S @ 2022-05-02 11:06 UTC (permalink / raw)
To: Akhil Goyal, dev
Cc: anoobj, jerinj, Jayatheerthan, Jay, Vangati, Narender, vfialko,
Zhang, Roy Fan
Acked-by: Abhinandan Gujjar <Abhinandan.gujjar@intel.com>
> -----Original Message-----
> From: Akhil Goyal <gakhil@marvell.com>
> Sent: Monday, May 2, 2022 12:55 AM
> To: dev@dpdk.org
> Cc: anoobj@marvell.com; jerinj@marvell.com; Gujjar, Abhinandan S
> <abhinandan.gujjar@intel.com>; Jayatheerthan, Jay
> <jay.jayatheerthan@intel.com>; Vangati, Narender
> <narender.vangati@intel.com>; vfialko@marvell.com; Akhil Goyal
> <gakhil@marvell.com>; Zhang, Roy Fan <roy.fan.zhang@intel.com>
> Subject: [PATCH v4 1/7] cryptodev: add APIs to get/set event metadata
>
> From: Volodymyr Fialko <vfialko@marvell.com>
>
> Currently, crypto session userdata is used to set event crypto metadata from
> the application and the driver is dereferencing it in driver which is not correct.
> User data is meant to be opaque to the driver.
> To support this, new API is added to get and set event crypto metadata. The
> new API, rte_cryptodev_set_session_event_mdata,
> allows setting event metadata in session private data which is filled inside PMD
> using a new cryptodev op. This operation can be performed on any of the PMD
> supported sessions (sym/asym/security).
> For SW abstraction of event crypto adapter to be used by eventdev library, a
> new field is added in asymmetric crypto session for now and for symmetric
> case, current implementation of using userdata is used. Symmetric cases cannot
> be fixed now, as it will be ABI breakage which will be resolved in DPDK 22.11.
>
> Signed-off-by: Volodymyr Fialko <vfialko@marvell.com>
> Signed-off-by: Akhil Goyal <gakhil@marvell.com>
> Acked-by: Fan Zhang <roy.fan.zhang@intel.com>
> ---
> lib/cryptodev/cryptodev_pmd.c | 16 +++++++++++++
> lib/cryptodev/cryptodev_pmd.h | 36 ++++++++++++++++++++++++++++
> lib/cryptodev/rte_cryptodev.c | 44 +++++++++++++++++++++++++++++++++++
> lib/cryptodev/rte_cryptodev.h | 22 ++++++++++++++++++
> lib/cryptodev/version.map | 4 ++++
> 5 files changed, 122 insertions(+)
>
> diff --git a/lib/cryptodev/cryptodev_pmd.c b/lib/cryptodev/cryptodev_pmd.c
> index 739a0b3f34..1903ade388 100644
> --- a/lib/cryptodev/cryptodev_pmd.c
> +++ b/lib/cryptodev/cryptodev_pmd.c
> @@ -227,3 +227,19 @@ cryptodev_fp_ops_set(struct rte_crypto_fp_ops
> *fp_ops,
> fp_ops->qp.enq_cb = dev->enq_cbs;
> fp_ops->qp.deq_cb = dev->deq_cbs;
> }
> +
> +void *
> +rte_cryptodev_session_event_mdata_get(struct rte_crypto_op *op) {
> + if (op->type == RTE_CRYPTO_OP_TYPE_SYMMETRIC &&
> + op->sess_type == RTE_CRYPTO_OP_WITH_SESSION)
> + return rte_cryptodev_sym_session_get_user_data(op->sym-
> >session);
> + else if (op->type == RTE_CRYPTO_OP_TYPE_ASYMMETRIC &&
> + op->sess_type == RTE_CRYPTO_OP_WITH_SESSION)
> + return op->asym->session->event_mdata;
> + else if (op->sess_type == RTE_CRYPTO_OP_SESSIONLESS &&
> + op->private_data_offset)
> + return ((uint8_t *)op + op->private_data_offset);
> + else
> + return NULL;
> +}
> diff --git a/lib/cryptodev/cryptodev_pmd.h b/lib/cryptodev/cryptodev_pmd.h
> index 2b1ce2da2d..7a7d3ee3f1 100644
> --- a/lib/cryptodev/cryptodev_pmd.h
> +++ b/lib/cryptodev/cryptodev_pmd.h
> @@ -398,6 +398,25 @@ typedef int
> (*cryptodev_sym_configure_raw_dp_ctx_t)(
> enum rte_crypto_op_sess_type sess_type,
> union rte_cryptodev_session_ctx session_ctx, uint8_t is_update);
>
> +/**
> + * Typedef that the driver provided to set event crypto meta data.
> + *
> + * @param dev Crypto device pointer.
> + * @param sess Crypto or security session.
> + * @param op_type Operation type.
> + * @param sess_type Session type.
> + * @param ev_mdata Pointer to the event crypto meta data
> + * (aka *union rte_event_crypto_metadata*)
> + * @return
> + * - On success return 0.
> + * - On failure return negative integer.
> + */
> +typedef int (*cryptodev_session_event_mdata_set_t)(
> + struct rte_cryptodev *dev, void *sess,
> + enum rte_crypto_op_type op_type,
> + enum rte_crypto_op_sess_type sess_type,
> + void *ev_mdata);
> +
> /** Crypto device operations function pointer table */ struct
> rte_cryptodev_ops {
> cryptodev_configure_t dev_configure; /**< Configure device. */
> @@ -442,6 +461,8 @@ struct rte_cryptodev_ops {
> /**< Initialize raw data path context data. */
> };
> };
> + cryptodev_session_event_mdata_set_t session_ev_mdata_set;
> + /**< Set a Crypto or Security session even meta data. */
> };
>
>
> @@ -603,6 +624,19 @@ void
> cryptodev_fp_ops_set(struct rte_crypto_fp_ops *fp_ops,
> const struct rte_cryptodev *dev);
>
> +/**
> + * Get session event meta data (aka *union rte_event_crypto_metadata*)
> + *
> + * @param op pointer to *rte_crypto_op* structure.
> + *
> + * @return
> + * - On success, pointer to event crypto metadata
> + * - On failure, NULL.
> + */
> +__rte_internal
> +void *
> +rte_cryptodev_session_event_mdata_get(struct rte_crypto_op *op);
> +
> static inline void *
> get_sym_session_private_data(const struct rte_cryptodev_sym_session *sess,
> uint8_t driver_id) {
> @@ -637,6 +671,8 @@ RTE_STD_C11 struct rte_cryptodev_asym_session {
> uint16_t user_data_sz;
> /**< Session user data will be placed after sess_data */
> uint8_t padding[3];
> + void *event_mdata;
> + /**< Event metadata (aka *union rte_event_crypto_metadata*) */
> uint8_t sess_private_data[0];
> };
>
> diff --git a/lib/cryptodev/rte_cryptodev.c b/lib/cryptodev/rte_cryptodev.c index
> 3500a2d470..5ebc423afa 100644
> --- a/lib/cryptodev/rte_cryptodev.c
> +++ b/lib/cryptodev/rte_cryptodev.c
> @@ -2051,6 +2051,9 @@ rte_cryptodev_asym_session_free(uint8_t dev_id,
> void *sess)
>
> dev->dev_ops->asym_session_clear(dev, sess);
>
> + if (((struct rte_cryptodev_asym_session *)sess)->event_mdata != NULL)
> + rte_free(((struct rte_cryptodev_asym_session *)sess)-
> >event_mdata);
> +
> /* Return session to mempool */
> sess_mp = rte_mempool_from_obj(sess);
> rte_mempool_put(sess_mp, sess);
> @@ -2259,6 +2262,47 @@ rte_cryptodev_configure_raw_dp_ctx(uint8_t
> dev_id, uint16_t qp_id,
> sess_type, session_ctx, is_update);
> }
>
> +int
> +rte_cryptodev_session_event_mdata_set(uint8_t dev_id, void *sess,
> + enum rte_crypto_op_type op_type,
> + enum rte_crypto_op_sess_type sess_type,
> + void *ev_mdata,
> + uint16_t size)
> +{
> + struct rte_cryptodev *dev;
> +
> + if (sess == NULL || ev_mdata == NULL)
> + return -EINVAL;
> +
> + if (!rte_cryptodev_is_valid_dev(dev_id))
> + goto skip_pmd_op;
> +
> + dev = rte_cryptodev_pmd_get_dev(dev_id);
> + if (dev->dev_ops->session_ev_mdata_set == NULL)
> + goto skip_pmd_op;
> +
> + return (*dev->dev_ops->session_ev_mdata_set)(dev, sess, op_type,
> + sess_type, ev_mdata);
> +
> +skip_pmd_op:
> + if (op_type == RTE_CRYPTO_OP_TYPE_SYMMETRIC)
> + return rte_cryptodev_sym_session_set_user_data(sess,
> ev_mdata,
> + size);
> + else if (op_type == RTE_CRYPTO_OP_TYPE_ASYMMETRIC) {
> + struct rte_cryptodev_asym_session *s = sess;
> +
> + if (s->event_mdata == NULL) {
> + s->event_mdata = rte_malloc(NULL, size, 0);
> + if (s->event_mdata == NULL)
> + return -ENOMEM;
> + }
> + rte_memcpy(s->event_mdata, ev_mdata, size);
> +
> + return 0;
> + } else
> + return -ENOTSUP;
> +}
> +
> uint32_t
> rte_cryptodev_raw_enqueue_burst(struct rte_crypto_raw_dp_ctx *ctx,
> struct rte_crypto_sym_vec *vec, union rte_crypto_sym_ofs ofs, diff --
> git a/lib/cryptodev/rte_cryptodev.h b/lib/cryptodev/rte_cryptodev.h index
> 45d33f4a50..2c2c2edeb7 100644
> --- a/lib/cryptodev/rte_cryptodev.h
> +++ b/lib/cryptodev/rte_cryptodev.h
> @@ -1269,6 +1269,28 @@ __rte_experimental int
> rte_cryptodev_get_raw_dp_ctx_size(uint8_t dev_id);
>
> +/**
> + * Set session event meta data
> + *
> + * @param dev_id The device identifier.
> + * @param sess Crypto or security session.
> + * @param op_type Operation type.
> + * @param sess_type Session type.
> + * @param ev_mdata Pointer to the event crypto meta data
> + * (aka *union rte_event_crypto_metadata*)
> + * @param size Size of ev_mdata.
> + *
> + * @return
> + * - On success, zero.
> + * - On failure, a negative value.
> + */
> +__rte_experimental
> +int
> +rte_cryptodev_session_event_mdata_set(uint8_t dev_id, void *sess,
> + enum rte_crypto_op_type op_type,
> + enum rte_crypto_op_sess_type sess_type,
> + void *ev_mdata, uint16_t size);
> +
> /**
> * Union of different crypto session types, including session-less xform
> * pointer.
> diff --git a/lib/cryptodev/version.map b/lib/cryptodev/version.map index
> c7c5aefceb..f0abfaa47d 100644
> --- a/lib/cryptodev/version.map
> +++ b/lib/cryptodev/version.map
> @@ -105,6 +105,9 @@ EXPERIMENTAL {
> rte_cryptodev_asym_session_pool_create;
> rte_cryptodev_asym_session_set_user_data;
> __rte_cryptodev_trace_asym_session_pool_create;
> +
> + #added in 22.07
> + rte_cryptodev_session_event_mdata_set;
> };
>
> INTERNAL {
> @@ -123,5 +126,6 @@ INTERNAL {
> rte_cryptodev_pmd_parse_input_args;
> rte_cryptodev_pmd_probing_finish;
> rte_cryptodev_pmd_release_device;
> + rte_cryptodev_session_event_mdata_get;
> rte_cryptodevs;
> };
> --
> 2.25.1
^ permalink raw reply [relevance 0%]
* RE: [PATCH v4 1/7] cryptodev: add APIs to get/set event metadata
2022-05-01 19:24 2% ` [PATCH v4 1/7] cryptodev: add APIs to get/set " Akhil Goyal
@ 2022-05-02 9:01 0% ` Anoob Joseph
2022-05-02 11:06 0% ` Gujjar, Abhinandan S
1 sibling, 0 replies; 200+ results
From: Anoob Joseph @ 2022-05-02 9:01 UTC (permalink / raw)
To: Akhil Goyal, dev
Cc: Jerin Jacob Kollanukkaran, abhinandan.gujjar, jay.jayatheerthan,
narender.vangati, Volodymyr Fialko, Akhil Goyal, Fan Zhang
Hi Akhil,
Minor nit inline.
With that addressed,
Series Acked-by: Anoob Joseph <anoobj@marvell.com>
Thanks,
Anoob
> -----Original Message-----
> From: Akhil Goyal <gakhil@marvell.com>
> Sent: Monday, May 2, 2022 12:55 AM
> To: dev@dpdk.org
> Cc: Anoob Joseph <anoobj@marvell.com>; Jerin Jacob Kollanukkaran
> <jerinj@marvell.com>; abhinandan.gujjar@intel.com;
> jay.jayatheerthan@intel.com; narender.vangati@intel.com; Volodymyr
> Fialko <vfialko@marvell.com>; Akhil Goyal <gakhil@marvell.com>; Fan Zhang
> <roy.fan.zhang@intel.com>
> Subject: [PATCH v4 1/7] cryptodev: add APIs to get/set event metadata
>
> From: Volodymyr Fialko <vfialko@marvell.com>
>
> Currently, crypto session userdata is used to set event crypto metadata from
> the application and the driver is dereferencing it in driver which is not correct.
> User data is meant to be opaque to the driver.
> To support this, new API is added to get and set event crypto metadata. The
> new API, rte_cryptodev_set_session_event_mdata,
> allows setting event metadata in session private data which is filled inside
> PMD using a new cryptodev op. This operation can be performed on any of
> the PMD supported sessions (sym/asym/security).
> For SW abstraction of event crypto adapter to be used by eventdev library, a
> new field is added in asymmetric crypto session for now and for symmetric
> case, current implementation of using userdata is used. Symmetric cases
> cannot be fixed now, as it will be ABI breakage which will be resolved in DPDK
> 22.11.
>
> Signed-off-by: Volodymyr Fialko <vfialko@marvell.com>
> Signed-off-by: Akhil Goyal <gakhil@marvell.com>
> Acked-by: Fan Zhang <roy.fan.zhang@intel.com>
> ---
> lib/cryptodev/cryptodev_pmd.c | 16 +++++++++++++
> lib/cryptodev/cryptodev_pmd.h | 36 ++++++++++++++++++++++++++++
> lib/cryptodev/rte_cryptodev.c | 44
> +++++++++++++++++++++++++++++++++++
> lib/cryptodev/rte_cryptodev.h | 22 ++++++++++++++++++
> lib/cryptodev/version.map | 4 ++++
> 5 files changed, 122 insertions(+)
>
[snip]
> diff --git a/lib/cryptodev/rte_cryptodev.c b/lib/cryptodev/rte_cryptodev.c
> index 3500a2d470..5ebc423afa 100644
> --- a/lib/cryptodev/rte_cryptodev.c
> +++ b/lib/cryptodev/rte_cryptodev.c
> @@ -2051,6 +2051,9 @@ rte_cryptodev_asym_session_free(uint8_t dev_id,
> void *sess)
>
> dev->dev_ops->asym_session_clear(dev, sess);
>
> + if (((struct rte_cryptodev_asym_session *)sess)->event_mdata !=
> NULL)
> + rte_free(((struct rte_cryptodev_asym_session *)sess)-
> >event_mdata);
> +
[Anoob] rte_free would do a NULL check. So the other NULL check may not be required.
^ permalink raw reply [relevance 0%]
* [PATCH v4 1/7] cryptodev: add APIs to get/set event metadata
2022-05-01 19:24 4% ` [PATCH v4 " Akhil Goyal
@ 2022-05-01 19:24 2% ` Akhil Goyal
2022-05-02 9:01 0% ` Anoob Joseph
2022-05-02 11:06 0% ` Gujjar, Abhinandan S
2022-05-02 11:08 0% ` [PATCH v4 0/7] Add new cryptodev op for " Gujjar, Abhinandan S
2022-05-12 12:45 4% ` [PATCH v5 " Akhil Goyal
2 siblings, 2 replies; 200+ results
From: Akhil Goyal @ 2022-05-01 19:24 UTC (permalink / raw)
To: dev
Cc: anoobj, jerinj, abhinandan.gujjar, jay.jayatheerthan,
narender.vangati, vfialko, Akhil Goyal, Fan Zhang
From: Volodymyr Fialko <vfialko@marvell.com>
Currently, crypto session userdata is used to set event crypto
metadata from the application and the driver is dereferencing it
in driver which is not correct. User data is meant to be opaque
to the driver.
To support this, new API is added to get and set event crypto
metadata. The new API, rte_cryptodev_set_session_event_mdata,
allows setting event metadata in session private data which is
filled inside PMD using a new cryptodev op. This operation
can be performed on any of the PMD supported sessions
(sym/asym/security).
For SW abstraction of event crypto adapter to be used by
eventdev library, a new field is added in asymmetric crypto
session for now and for symmetric case, current implementation
of using userdata is used. Symmetric cases cannot be fixed now,
as it will be ABI breakage which will be resolved in DPDK 22.11.
Signed-off-by: Volodymyr Fialko <vfialko@marvell.com>
Signed-off-by: Akhil Goyal <gakhil@marvell.com>
Acked-by: Fan Zhang <roy.fan.zhang@intel.com>
---
lib/cryptodev/cryptodev_pmd.c | 16 +++++++++++++
lib/cryptodev/cryptodev_pmd.h | 36 ++++++++++++++++++++++++++++
lib/cryptodev/rte_cryptodev.c | 44 +++++++++++++++++++++++++++++++++++
lib/cryptodev/rte_cryptodev.h | 22 ++++++++++++++++++
lib/cryptodev/version.map | 4 ++++
5 files changed, 122 insertions(+)
diff --git a/lib/cryptodev/cryptodev_pmd.c b/lib/cryptodev/cryptodev_pmd.c
index 739a0b3f34..1903ade388 100644
--- a/lib/cryptodev/cryptodev_pmd.c
+++ b/lib/cryptodev/cryptodev_pmd.c
@@ -227,3 +227,19 @@ cryptodev_fp_ops_set(struct rte_crypto_fp_ops *fp_ops,
fp_ops->qp.enq_cb = dev->enq_cbs;
fp_ops->qp.deq_cb = dev->deq_cbs;
}
+
+void *
+rte_cryptodev_session_event_mdata_get(struct rte_crypto_op *op)
+{
+ if (op->type == RTE_CRYPTO_OP_TYPE_SYMMETRIC &&
+ op->sess_type == RTE_CRYPTO_OP_WITH_SESSION)
+ return rte_cryptodev_sym_session_get_user_data(op->sym->session);
+ else if (op->type == RTE_CRYPTO_OP_TYPE_ASYMMETRIC &&
+ op->sess_type == RTE_CRYPTO_OP_WITH_SESSION)
+ return op->asym->session->event_mdata;
+ else if (op->sess_type == RTE_CRYPTO_OP_SESSIONLESS &&
+ op->private_data_offset)
+ return ((uint8_t *)op + op->private_data_offset);
+ else
+ return NULL;
+}
diff --git a/lib/cryptodev/cryptodev_pmd.h b/lib/cryptodev/cryptodev_pmd.h
index 2b1ce2da2d..7a7d3ee3f1 100644
--- a/lib/cryptodev/cryptodev_pmd.h
+++ b/lib/cryptodev/cryptodev_pmd.h
@@ -398,6 +398,25 @@ typedef int (*cryptodev_sym_configure_raw_dp_ctx_t)(
enum rte_crypto_op_sess_type sess_type,
union rte_cryptodev_session_ctx session_ctx, uint8_t is_update);
+/**
+ * Typedef that the driver provided to set event crypto meta data.
+ *
+ * @param dev Crypto device pointer.
+ * @param sess Crypto or security session.
+ * @param op_type Operation type.
+ * @param sess_type Session type.
+ * @param ev_mdata Pointer to the event crypto meta data
+ * (aka *union rte_event_crypto_metadata*)
+ * @return
+ * - On success return 0.
+ * - On failure return negative integer.
+ */
+typedef int (*cryptodev_session_event_mdata_set_t)(
+ struct rte_cryptodev *dev, void *sess,
+ enum rte_crypto_op_type op_type,
+ enum rte_crypto_op_sess_type sess_type,
+ void *ev_mdata);
+
/** Crypto device operations function pointer table */
struct rte_cryptodev_ops {
cryptodev_configure_t dev_configure; /**< Configure device. */
@@ -442,6 +461,8 @@ struct rte_cryptodev_ops {
/**< Initialize raw data path context data. */
};
};
+ cryptodev_session_event_mdata_set_t session_ev_mdata_set;
+ /**< Set a Crypto or Security session even meta data. */
};
@@ -603,6 +624,19 @@ void
cryptodev_fp_ops_set(struct rte_crypto_fp_ops *fp_ops,
const struct rte_cryptodev *dev);
+/**
+ * Get session event meta data (aka *union rte_event_crypto_metadata*)
+ *
+ * @param op pointer to *rte_crypto_op* structure.
+ *
+ * @return
+ * - On success, pointer to event crypto metadata
+ * - On failure, NULL.
+ */
+__rte_internal
+void *
+rte_cryptodev_session_event_mdata_get(struct rte_crypto_op *op);
+
static inline void *
get_sym_session_private_data(const struct rte_cryptodev_sym_session *sess,
uint8_t driver_id) {
@@ -637,6 +671,8 @@ RTE_STD_C11 struct rte_cryptodev_asym_session {
uint16_t user_data_sz;
/**< Session user data will be placed after sess_data */
uint8_t padding[3];
+ void *event_mdata;
+ /**< Event metadata (aka *union rte_event_crypto_metadata*) */
uint8_t sess_private_data[0];
};
diff --git a/lib/cryptodev/rte_cryptodev.c b/lib/cryptodev/rte_cryptodev.c
index 3500a2d470..5ebc423afa 100644
--- a/lib/cryptodev/rte_cryptodev.c
+++ b/lib/cryptodev/rte_cryptodev.c
@@ -2051,6 +2051,9 @@ rte_cryptodev_asym_session_free(uint8_t dev_id, void *sess)
dev->dev_ops->asym_session_clear(dev, sess);
+ if (((struct rte_cryptodev_asym_session *)sess)->event_mdata != NULL)
+ rte_free(((struct rte_cryptodev_asym_session *)sess)->event_mdata);
+
/* Return session to mempool */
sess_mp = rte_mempool_from_obj(sess);
rte_mempool_put(sess_mp, sess);
@@ -2259,6 +2262,47 @@ rte_cryptodev_configure_raw_dp_ctx(uint8_t dev_id, uint16_t qp_id,
sess_type, session_ctx, is_update);
}
+int
+rte_cryptodev_session_event_mdata_set(uint8_t dev_id, void *sess,
+ enum rte_crypto_op_type op_type,
+ enum rte_crypto_op_sess_type sess_type,
+ void *ev_mdata,
+ uint16_t size)
+{
+ struct rte_cryptodev *dev;
+
+ if (sess == NULL || ev_mdata == NULL)
+ return -EINVAL;
+
+ if (!rte_cryptodev_is_valid_dev(dev_id))
+ goto skip_pmd_op;
+
+ dev = rte_cryptodev_pmd_get_dev(dev_id);
+ if (dev->dev_ops->session_ev_mdata_set == NULL)
+ goto skip_pmd_op;
+
+ return (*dev->dev_ops->session_ev_mdata_set)(dev, sess, op_type,
+ sess_type, ev_mdata);
+
+skip_pmd_op:
+ if (op_type == RTE_CRYPTO_OP_TYPE_SYMMETRIC)
+ return rte_cryptodev_sym_session_set_user_data(sess, ev_mdata,
+ size);
+ else if (op_type == RTE_CRYPTO_OP_TYPE_ASYMMETRIC) {
+ struct rte_cryptodev_asym_session *s = sess;
+
+ if (s->event_mdata == NULL) {
+ s->event_mdata = rte_malloc(NULL, size, 0);
+ if (s->event_mdata == NULL)
+ return -ENOMEM;
+ }
+ rte_memcpy(s->event_mdata, ev_mdata, size);
+
+ return 0;
+ } else
+ return -ENOTSUP;
+}
+
uint32_t
rte_cryptodev_raw_enqueue_burst(struct rte_crypto_raw_dp_ctx *ctx,
struct rte_crypto_sym_vec *vec, union rte_crypto_sym_ofs ofs,
diff --git a/lib/cryptodev/rte_cryptodev.h b/lib/cryptodev/rte_cryptodev.h
index 45d33f4a50..2c2c2edeb7 100644
--- a/lib/cryptodev/rte_cryptodev.h
+++ b/lib/cryptodev/rte_cryptodev.h
@@ -1269,6 +1269,28 @@ __rte_experimental
int
rte_cryptodev_get_raw_dp_ctx_size(uint8_t dev_id);
+/**
+ * Set session event meta data
+ *
+ * @param dev_id The device identifier.
+ * @param sess Crypto or security session.
+ * @param op_type Operation type.
+ * @param sess_type Session type.
+ * @param ev_mdata Pointer to the event crypto meta data
+ * (aka *union rte_event_crypto_metadata*)
+ * @param size Size of ev_mdata.
+ *
+ * @return
+ * - On success, zero.
+ * - On failure, a negative value.
+ */
+__rte_experimental
+int
+rte_cryptodev_session_event_mdata_set(uint8_t dev_id, void *sess,
+ enum rte_crypto_op_type op_type,
+ enum rte_crypto_op_sess_type sess_type,
+ void *ev_mdata, uint16_t size);
+
/**
* Union of different crypto session types, including session-less xform
* pointer.
diff --git a/lib/cryptodev/version.map b/lib/cryptodev/version.map
index c7c5aefceb..f0abfaa47d 100644
--- a/lib/cryptodev/version.map
+++ b/lib/cryptodev/version.map
@@ -105,6 +105,9 @@ EXPERIMENTAL {
rte_cryptodev_asym_session_pool_create;
rte_cryptodev_asym_session_set_user_data;
__rte_cryptodev_trace_asym_session_pool_create;
+
+ #added in 22.07
+ rte_cryptodev_session_event_mdata_set;
};
INTERNAL {
@@ -123,5 +126,6 @@ INTERNAL {
rte_cryptodev_pmd_parse_input_args;
rte_cryptodev_pmd_probing_finish;
rte_cryptodev_pmd_release_device;
+ rte_cryptodev_session_event_mdata_get;
rte_cryptodevs;
};
--
2.25.1
^ permalink raw reply [relevance 2%]
* [PATCH v4 0/7] Add new cryptodev op for event metadata
2022-04-21 14:37 4% ` [PATCH v3 0/7] Add new cryptodev op for " Akhil Goyal
` (2 preceding siblings ...)
2022-04-28 14:24 0% ` Gujjar, Abhinandan S
@ 2022-05-01 19:24 4% ` Akhil Goyal
2022-05-01 19:24 2% ` [PATCH v4 1/7] cryptodev: add APIs to get/set " Akhil Goyal
` (2 more replies)
3 siblings, 3 replies; 200+ results
From: Akhil Goyal @ 2022-05-01 19:24 UTC (permalink / raw)
To: dev
Cc: anoobj, jerinj, abhinandan.gujjar, jay.jayatheerthan,
narender.vangati, vfialko, Akhil Goyal
For using event crypto metadata, event metadata need to be set
in session. For this session user data was used for symmetric
crypto sessions and no support was present for asymmetric and
security sessions.
The use of userdata to store event metadata (which is dereferenced
in PMD) is not correct as it is meant for the application to use it.
Hence, a new API is created to set and get event crypto metadata which
is scalable to all sessions supported by the crypto PMD.
The application can use the set API to set event metadata and the
PMD may store that inside the session private data and PMD need not
use the get API as it would be internal to the PMD.
For the software event crypto adapter implementation, the eventdev
library can use the get API to get the event metadata stored inside
the session structure.
For Asymmetric sessions, a new field is added inside the session
struct which is internal to library.
For symmetric and security sessions, new field cannot be added as
it would be ABI break. Hence, session userdata is being used to
store that as it was used earlier. In next ABI break release this
would be fixed similar to asymmetric crypto case.
The patchset also add support for asymmetric crypto adapter
in the test applications and the crypto/cnxk implementation of
the new cryptodev op and corresponding changes in the eventdev lib.
Changes in v4:
- added null checks in set API
- updated check in session destroy
- updated API comments
- fixed test app failure reported by Abhinandan.
- moved event mdata after padding in asym session struct.
Changes in v3:
- fix SW adapter case of memory allocation/free of mdata. mdata is
allocated in set API and freed in session clear/destroy.
- mark rte_cryptodev_session_event_mdata_get as internal API
as it is only needed for the app or the PMD.
changes in v2:
- v1 patchset only fixed security sessions and also caused ABI breakage.
This is fixed in v2.
- added new API for setting event metadata.
- added new cryptodev op which can handle all sessions
Akhil Goyal (5):
crypto/octeontx: use new API for event metadata
test/event: use new API to set event crypto metadata
eventdev: use new API to get event crypto metadata
test/event: add asymmetric cases for crypto adapter
test-eventdev: support asym ops for crypto adapter
Volodymyr Fialko (2):
cryptodev: add APIs to get/set event metadata
crypto/cnxk: add event metadata set operation
app/test-eventdev/evt_common.h | 2 +
app/test-eventdev/evt_options.c | 17 +
app/test-eventdev/evt_options.h | 4 +
app/test-eventdev/test_perf_atq.c | 12 +-
app/test-eventdev/test_perf_common.c | 254 ++++++++--
app/test-eventdev/test_perf_common.h | 45 +-
app/test-eventdev/test_perf_queue.c | 12 +-
app/test/test_event_crypto_adapter.c | 511 +++++++++++++++++++-
doc/guides/tools/testeventdev.rst | 5 +
drivers/crypto/cnxk/cn10k_cryptodev_ops.c | 144 +++++-
drivers/crypto/cnxk/cn10k_ipsec.h | 2 +
drivers/crypto/cnxk/cn9k_cryptodev_ops.c | 138 +++++-
drivers/crypto/cnxk/cn9k_ipsec.h | 2 +
drivers/crypto/cnxk/cnxk_ae.h | 2 +
drivers/crypto/cnxk/cnxk_cryptodev_ops.h | 18 -
drivers/crypto/cnxk/cnxk_se.h | 2 +
drivers/crypto/octeontx/otx_cryptodev_ops.c | 20 +-
lib/cryptodev/cryptodev_pmd.c | 16 +
lib/cryptodev/cryptodev_pmd.h | 36 ++
lib/cryptodev/rte_cryptodev.c | 44 ++
lib/cryptodev/rte_cryptodev.h | 22 +
lib/cryptodev/version.map | 4 +
lib/eventdev/rte_event_crypto_adapter.c | 55 +--
23 files changed, 1179 insertions(+), 188 deletions(-)
--
2.25.1
^ permalink raw reply [relevance 4%]
* [dpdk-dev] [PATCH v5] ethdev: mtr: support protocol based input color selection
2022-04-21 18:02 5% ` [dpdk-dev] [PATCH v4] ethdev: mtr: support protocol based " jerinj
2022-04-26 10:19 0% ` Ray Kinsella
@ 2022-05-01 14:46 5% ` jerinj
1 sibling, 0 replies; 200+ results
From: jerinj @ 2022-05-01 14:46 UTC (permalink / raw)
To: dev, Cristian Dumitrescu, Thomas Monjalon, Ferruh Yigit,
Andrew Rybchenko, Ray Kinsella
Cc: ajit.khaparde, aboyer, beilei.xing, bruce.richardson, chas3,
chenbo.xia, ciara.loftus, dsinghrawat, ed.czeck, evgenys, grive,
g.singh, zhouguoyang, haiyue.wang, hkalra, heinrich.kuhn,
hemant.agrawal, hyonkim, igorch, irusskikh, jgrajcia,
jasvinder.singh, jianwang, jiawenwu, jingjing.wu, johndale,
john.miller, linville, keith.wiles, kirankumark, oulijun, lironh,
longli, mw, spinler, matan, matt.peters, maxime.coquelin, mk,
humin29, pnalla, ndabilpuram, qiming.yang, qi.z.zhang, radhac,
rahul.lakkireddy, rmody, rosen.xu, sachin.saxena, skoteshwar,
shshaikh, shaibran, shepard.siegel, asomalap, somnath.kotur,
sthemmin, steven.webster, skori, mtetsuyah, vburru, viacheslavo,
xiao.w.wang, cloud.wangxiaoyun, yisen.zhuang, yongwang,
xuanziyang2, Jerin Jacob
From: Jerin Jacob <jerinj@marvell.com>
Currently, meter object supports only DSCP based on input color table,
The patch enhance that to support VLAN based input color table,
color table based on inner field for the tunnel use case, and
support for fallback color per meter if packet based on a different field.
All of the above features are exposed through capability and added
additional capability to specify the implementation supports
more than one input color table per ethdev port.
Suggested-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Signed-off-by: Jerin Jacob <jerinj@marvell.com>
---
v5..v4:
- Improved the Doxgen comments as per
http://patches.dpdk.org/project/dpdk/patch/20220421180241.514767-1-jerinj@marvell.com/
- Removed input_color_proto_mask
- Renamed rte_mtr_color_in_protocol_priority_set() to rte_mtr_color_in_protocol_set()
- Introduced rte_mtr_color_in_protocol_get(), rte_mtr_color_in_protocol_priority_get()
for getting the configured input color protocol.
v4..v3:
- Aligned with community meeting call which is documented in
https://patches.dpdk.org/project/dpdk/patch/20220301085824.1041009-1-skori@marvell.com/
as last message. With following exception,
- Used RTE_MTR_COLOR_IN_*_DSCP instead of RTE_MTR_COLOR_IN_*_IP as
there is already dscp_table and rte_mtr_meter_dscp_table_update() API.
Changing above symbols break existing application for no good.
- Updated 22.07 release notes
- Remove testpmd changes from series to finalize the API spec first and
then we can send testpmd changes.
v3..v2:
- Fix input color flags as a bitmask
- Add definitions for newly added API
v2..v1:
- Fix seperate typo
v1..RFC:
Address the review comments by Cristian at
https://patches.dpdk.org/project/dpdk/patch/20210820082401.3778736-1-jerinj@marvell.com/
.../traffic_metering_and_policing.rst | 35 +++
doc/guides/rel_notes/release_22_07.rst | 10 +
lib/ethdev/rte_mtr.c | 50 ++++
lib/ethdev/rte_mtr.h | 216 +++++++++++++++++-
lib/ethdev/rte_mtr_driver.h | 38 +++
lib/ethdev/version.map | 6 +
6 files changed, 345 insertions(+), 10 deletions(-)
diff --git a/doc/guides/prog_guide/traffic_metering_and_policing.rst b/doc/guides/prog_guide/traffic_metering_and_policing.rst
index ceb5a96488..d1958a023d 100644
--- a/doc/guides/prog_guide/traffic_metering_and_policing.rst
+++ b/doc/guides/prog_guide/traffic_metering_and_policing.rst
@@ -21,6 +21,7 @@ The main features are:
* Policer actions (per meter output color): recolor, drop
* Statistics (per policer output color)
* Chaining multiple meter objects
+* Protocol based input color selection
Configuration steps
-------------------
@@ -105,3 +106,37 @@ traffic meter and policing library.
* Adding one (or multiple) actions of the type ``RTE_FLOW_ACTION_TYPE_METER``
to the list of meter actions (``struct rte_mtr_meter_policy_params::actions``)
specified per color as show in :numref:`figure_rte_mtr_chaining`.
+
+Protocol based input color selection
+------------------------------------
+
+The API supports selecting the input color based on the packet content.
+Following is the API usage model for the same.
+
+#. Probe the protocol based input color selection device capabilities using
+ the following parameters with ``rte_mtr_capabilities_get()`` API.
+
+ * ``struct rte_mtr_capabilities::input_color_proto_mask;``
+ * ``struct rte_mtr_capabilities::separate_input_color_table_per_port``
+
+#. When creating the meter object using ``rte_mtr_create()``, configure
+ relevant input color selection parameters such as
+
+ * Fill the tables ``struct rte_mtr_params::dscp_table``,
+ ``struct rte_mtr_params::vlan_table`` based on input color selected.
+
+ * Update the ``struct rte_mtr_params::default_input_color`` to determine
+ the default input color in case the input packet does not match
+ the input color method.
+
+#. Use the following APIs to configure the meter object
+
+ * Select the input protocol color with ``rte_mtr_color_in_protocol_set()`` API.
+
+ * If needed, update the input color table at runtime using
+ ``rte_mtr_meter_vlan_table_update()`` and ``rte_mtr_meter_dscp_table_update()``
+ APIs.
+
+ * Application can query the configured input color protocol and its associated
+ priority using ``rte_mtr_color_in_protocol_get()`` and
+ ``rte_mtr_color_in_protocol_priority_get()`` APIs.
diff --git a/doc/guides/rel_notes/release_22_07.rst b/doc/guides/rel_notes/release_22_07.rst
index 88d6e96cc1..74ecc3f53d 100644
--- a/doc/guides/rel_notes/release_22_07.rst
+++ b/doc/guides/rel_notes/release_22_07.rst
@@ -55,6 +55,13 @@ New Features
Also, make sure to start the actual text at the margin.
=======================================================
+* **Added protocol based input color selection for meter.**
+
+ Added new APIs ``rte_mtr_color_in_protocol_set()``, ``rte_mtr_color_in_protocol_get()``,
+ ``rte_mtr_color_in_protocol_priority_get()``, ``rte_mtr_meter_vlan_table_update()``
+ and updated ``struct rte_mtr_params`` and ``struct rte_mtr_capabilities`` to
+ support protocol based input color selection for meter.
+
* **Updated Intel iavf driver.**
* Added Tx QoS queue rate limitation support.
@@ -112,6 +119,9 @@ ABI Changes
* No ABI change that would break compatibility with 21.11.
+* Experimental structures ``struct rte_mtr_params``
+ and ``struct rte_mtr_capabilities`` updated to support
+ protocol based input color for meter.
Known Issues
------------
diff --git a/lib/ethdev/rte_mtr.c b/lib/ethdev/rte_mtr.c
index e49fcf271c..441ea1dca9 100644
--- a/lib/ethdev/rte_mtr.c
+++ b/lib/ethdev/rte_mtr.c
@@ -207,6 +207,56 @@ rte_mtr_meter_dscp_table_update(uint16_t port_id,
mtr_id, dscp_table, error);
}
+/** MTR object meter VLAN table update */
+int
+rte_mtr_meter_vlan_table_update(uint16_t port_id,
+ uint32_t mtr_id,
+ enum rte_color *vlan_table,
+ struct rte_mtr_error *error)
+{
+ struct rte_eth_dev *dev = &rte_eth_devices[port_id];
+ return RTE_MTR_FUNC(port_id, meter_vlan_table_update)(dev,
+ mtr_id, vlan_table, error);
+}
+
+/** Set the input color protocol on MTR object */
+int
+rte_mtr_color_in_protocol_set(uint16_t port_id,
+ uint32_t mtr_id,
+ enum rte_mtr_color_in_protocol proto,
+ uint32_t priority,
+ struct rte_mtr_error *error)
+{
+ struct rte_eth_dev *dev = &rte_eth_devices[port_id];
+ return RTE_MTR_FUNC(port_id, in_proto_set)(dev,
+ mtr_id, proto, priority, error);
+}
+
+/** Get input color protocols of MTR object */
+int
+rte_mtr_color_in_protocol_get(uint16_t port_id,
+ uint32_t mtr_id,
+ uint64_t *proto_mask,
+ struct rte_mtr_error *error)
+{
+ struct rte_eth_dev *dev = &rte_eth_devices[port_id];
+ return RTE_MTR_FUNC(port_id, in_proto_get)(dev,
+ mtr_id, proto_mask, error);
+}
+
+/** Get input color protocol priority of MTR object */
+int
+rte_mtr_color_in_protocol_priority_get(uint16_t port_id,
+ uint32_t mtr_id,
+ enum rte_mtr_color_in_protocol proto,
+ uint32_t *priority,
+ struct rte_mtr_error *error)
+{
+ struct rte_eth_dev *dev = &rte_eth_devices[port_id];
+ return RTE_MTR_FUNC(port_id, in_proto_prio_get)(dev,
+ mtr_id, proto, priority, error);
+}
+
/** MTR object enabled stats update */
int
rte_mtr_stats_update(uint16_t port_id,
diff --git a/lib/ethdev/rte_mtr.h b/lib/ethdev/rte_mtr.h
index 40df0888c8..008bc84f0d 100644
--- a/lib/ethdev/rte_mtr.h
+++ b/lib/ethdev/rte_mtr.h
@@ -213,6 +213,51 @@ struct rte_mtr_meter_policy_params {
const struct rte_flow_action *actions[RTE_COLORS];
};
+/**
+ * Input color protocol method
+ *
+ * More than one of the method can be enabled for a given meter.
+ * Even if enabled, a method might not be applicable to each input packet,
+ * in case the associated protocol header is not present in the packet.
+ * The highest priority method that is both enabled for the meter and also
+ * applicable for the current input packet wins;
+ * if none is both enabled and applicable, the default input color is used.
+ * @see function rte_mtr_color_in_protocol_set()
+ *
+ */
+enum rte_mtr_color_in_protocol {
+ /**
+ * Enable the detection of the packet input color based on the outermost
+ * VLAN header fields DEI (1 bit) and PCP (3 bits).
+ * These fields are used as index into the VLAN table.
+ *
+ * @see struct rte_mtr_params::vlan_table
+ */
+ RTE_MTR_COLOR_IN_PROTO_OUTER_VLAN = RTE_BIT64(0),
+ /**
+ * Enable the detection of the packet input color based on the innermost
+ * VLAN header fields DEI (1 bit) and PCP (3 bits).
+ * These fields are used as index into the VLAN table.
+ *
+ * @see struct rte_mtr_params::vlan_table
+ */
+ RTE_MTR_COLOR_IN_PROTO_INNER_VLAN = RTE_BIT64(1),
+ /**
+ * Enable the detection of the packet input color based on the outermost
+ * IP DSCP field. These fields are used as index into the DSCP table.
+ *
+ * @see struct rte_mtr_params::dscp_table
+ */
+ RTE_MTR_COLOR_IN_PROTO_OUTER_IP = RTE_BIT64(2),
+ /**
+ * Enable the detection of the packet input color based on the innermost
+ * IP DSCP field. These fields are used as index into the DSCP table.
+ *
+ * @see struct rte_mtr_params::dscp_table
+ */
+ RTE_MTR_COLOR_IN_PROTO_INNER_IP = RTE_BIT64(3),
+};
+
/**
* Parameters for each traffic metering & policing object
*
@@ -233,20 +278,58 @@ struct rte_mtr_params {
*/
int use_prev_mtr_color;
- /** Meter input color. When non-NULL: it points to a pre-allocated and
+ /** Meter input color based on IP DSCP protocol field.
+ *
+ * Valid when *input_color_proto_mask* set to any of the following
+ * RTE_MTR_COLOR_IN_PROTO_OUTER_IP,
+ * RTE_MTR_COLOR_IN_PROTO_INNER_IP
+ *
+ * When non-NULL: it points to a pre-allocated and
* pre-populated table with exactly 64 elements providing the input
* color for each value of the IPv4/IPv6 Differentiated Services Code
- * Point (DSCP) input packet field. When NULL: it is equivalent to
- * setting this parameter to an all-green populated table (i.e. table
- * with all the 64 elements set to green color). The color blind mode
- * is configured by setting *use_prev_mtr_color* to 0 and *dscp_table*
- * to either NULL or to an all-green populated table. When
- * *use_prev_mtr_color* is non-zero value or when *dscp_table* contains
- * at least one yellow or red color element, then the color aware mode
- * is configured.
+ * Point (DSCP) input packet field.
+ *
+ * When NULL: it is equivalent to setting this parameter to an all-green
+ * populated table (i.e. table with all the 64 elements set to green
+ * color). The color blind mode is configured by setting
+ * *use_prev_mtr_color* to 0 and *dscp_table* to either NULL or to an
+ * all-green populated table.
+ *
+ * When *use_prev_mtr_color* is non-zero value or when *dscp_table*
+ * contains at least one yellow or red color element, then the color
+ * aware mode is configured.
+ *
+ * @see enum rte_mtr_color_in_protocol::RTE_MTR_COLOR_IN_PROTO_OUTER_IP
+ * @see enum rte_mtr_color_in_protocol::RTE_MTR_COLOR_IN_PROTO_INNER_IP
+ * @see struct rte_mtr_params::input_color_proto_mask
*/
enum rte_color *dscp_table;
-
+ /** Meter input color based on VLAN DEI(1bit), PCP(3 bits) protocol
+ * fields.
+ *
+ * Valid when *input_color_proto_mask* set to any of the following
+ * RTE_MTR_COLOR_IN_PROTO_OUTER_VLAN,
+ * RTE_MTR_COLOR_IN_PROTO_INNER_VLAN
+ *
+ * When non-NULL: it points to a pre-allocated and pre-populated
+ * table with exactly 16 elements providing the input color for
+ * each value of the DEI(1bit), PCP(3 bits) input packet field.
+ *
+ * When NULL: it is equivalent to setting this parameter to an
+ * all-green populated table (i.e. table with
+ * all the 16 elements set to green color). The color blind mode
+ * is configured by setting *use_prev_mtr_color* to 0 and
+ * *vlan_table* to either NULL or to an all-green populated table.
+ *
+ * When *use_prev_mtr_color* is non-zero value
+ * or when *vlan_table* contains at least one yellow or
+ * red color element, then the color aware mode is configured.
+ *
+ * @see enum rte_mtr_color_in_protocol::RTE_MTR_COLOR_IN_PROTO_OUTER_VLAN
+ * @see enum rte_mtr_color_in_protocol::RTE_MTR_COLOR_IN_PROTO_INNER_VLAN
+ * @see struct rte_mtr_params::input_color_proto_mask
+ */
+ enum rte_color *vlan_table;
/** Non-zero to enable the meter, zero to disable the meter at the time
* of MTR object creation. Ignored when the meter profile indicated by
* *meter_profile_id* is set to NONE.
@@ -261,6 +344,12 @@ struct rte_mtr_params {
/** Meter policy ID. @see rte_mtr_meter_policy_add() */
uint32_t meter_policy_id;
+
+ /** Input color to be set for the input packet when none of the
+ * enabled input color methods is applicable to the input packet.
+ * Ignored when this when *input_color_proto_mask* set to zero.
+ */
+ enum rte_color default_input_color;
};
/**
@@ -417,6 +506,16 @@ struct rte_mtr_capabilities {
* @see enum rte_mtr_stats_type
*/
uint64_t stats_mask;
+
+ /** Set of supported input color protocol.
+ * @see enum rte_mtr_color_in_protocol
+ */
+ uint64_t input_color_proto_mask;
+
+ /** When non-zero, it indicates that driver supports separate
+ * input color table for given ethdev port.
+ */
+ int separate_input_color_table_per_port;
};
/**
@@ -832,6 +931,103 @@ rte_mtr_meter_dscp_table_update(uint16_t port_id,
enum rte_color *dscp_table,
struct rte_mtr_error *error);
+/**
+ * MTR object VLAN table update
+ *
+ * @param[in] port_id
+ * The port identifier of the Ethernet device.
+ * @param[in] mtr_id
+ * MTR object ID. Needs to be valid.
+ * @param[in] vlan_table
+ * When non-NULL: it points to a pre-allocated and pre-populated table with
+ * exactly 16 elements providing the input color for each value of the
+ * each value of the DEI(1bit), PCP(3 bits) input packet field.
+ * When NULL: it is equivalent to setting this parameter to an "all-green"
+ * populated table (i.e. table with all the 16 elements set to green color).
+ * @param[out] error
+ * Error details. Filled in only on error, when not NULL.
+ * @return
+ * 0 on success, non-zero error code otherwise.
+ */
+__rte_experimental
+int
+rte_mtr_meter_vlan_table_update(uint16_t port_id, uint32_t mtr_id,
+ enum rte_color *vlan_table,
+ struct rte_mtr_error *error);
+
+/**
+ * Set the input color protocol for a given MTR object
+ *
+ * More than one of the method can be enabled for a given meter.
+ * Even if enabled, a method might not be applicable to each input packet,
+ * in case the associated protocol header is not present in the packet.
+ * The highest priority method that is both enabled for the meter and also
+ * applicable for the current input packet wins;
+ * if none is both enabled and applicable, the default input color is used.
+ *
+ * @param[in] port_id
+ * The port identifier of the Ethernet device.
+ * @param[in] mtr_id
+ * MTR object ID. Needs to be valid.
+ * @param[in] proto
+ * Input color protocol.
+ * @param[in] priority
+ * Input color protocol priority. Value zero indicates
+ * the highest priority.
+ * @param[out] error
+ * Error details. Filled in only on error, when not NULL.
+ * @return
+ * 0 on success, non-zero error code otherwise.
+ */
+__rte_experimental
+int
+rte_mtr_color_in_protocol_set(uint16_t port_id, uint32_t mtr_id,
+ enum rte_mtr_color_in_protocol proto, uint32_t priority,
+ struct rte_mtr_error *error);
+
+/**
+ * Get the input color protocol for a given MTR object
+ *
+ * @param[in] port_id
+ * The port identifier of the Ethernet device.
+ * @param[in] mtr_id
+ * MTR object ID. Needs to be valid.
+ * @param[out] proto_mask
+ * Selected input color protocols as bit mask.
+ * @param[out] error
+ * Error details. Filled in only on error, when not NULL.
+ * @return
+ * 0 on success, non-zero error code otherwise.
+ *
+ */
+__rte_experimental
+int
+rte_mtr_color_in_protocol_get(uint16_t port_id, uint32_t mtr_id,
+ uint64_t *proto_mask,
+ struct rte_mtr_error *error);
+
+/**
+ * Get the priority associated with input color protocol for a given MTR object
+ *
+ * @param[in] port_id
+ * The port identifier of the Ethernet device.
+ * @param[in] mtr_id
+ * MTR object ID. Needs to be valid.
+ * @param[in] proto
+ * Input color protocol.
+ * @param[out] priority
+ * Input color protocol priority associated with proto.
+ * @param[out] error
+ * Error details. Filled in only on error, when not NULL.
+ * @return
+ * 0 on success, non-zero error code otherwise.
+ */
+__rte_experimental
+int
+rte_mtr_color_in_protocol_priority_get(uint16_t port_id, uint32_t mtr_id,
+ enum rte_mtr_color_in_protocol proto, uint32_t *priority,
+ struct rte_mtr_error *error);
+
/**
* MTR object enabled statistics counters update
*
diff --git a/lib/ethdev/rte_mtr_driver.h b/lib/ethdev/rte_mtr_driver.h
index ee8c6ef7ad..f7dca9a54c 100644
--- a/lib/ethdev/rte_mtr_driver.h
+++ b/lib/ethdev/rte_mtr_driver.h
@@ -97,6 +97,32 @@ typedef int (*rte_mtr_meter_dscp_table_update_t)(struct rte_eth_dev *dev,
enum rte_color *dscp_table,
struct rte_mtr_error *error);
+/** @internal mtr object meter vlan table update. */
+typedef int (*rte_mtr_meter_vlan_table_update_t)(struct rte_eth_dev *dev,
+ uint32_t mtr_id,
+ enum rte_color *vlan_table,
+ struct rte_mtr_error *error);
+
+/** @internal Set the input color protocol on MTR object. */
+typedef int (*rte_mtr_meter_color_in_proto_set_t)(struct rte_eth_dev *dev,
+ uint32_t mtr_id,
+ enum rte_mtr_color_in_protocol proto,
+ uint32_t priority,
+ struct rte_mtr_error *error);
+
+/** @internal Get the input color protocols of MTR object. */
+typedef int (*rte_mtr_meter_color_in_proto_get_t)(struct rte_eth_dev *dev,
+ uint32_t mtr_id,
+ uint64_t *proto_mask,
+ struct rte_mtr_error *error);
+
+/** @internal Get the input color protocol priority of MTR object. */
+typedef int (*rte_mtr_meter_color_in_proto_prio_get_t)(struct rte_eth_dev *dev,
+ uint32_t mtr_id,
+ enum rte_mtr_color_in_protocol proto,
+ uint32_t *priority,
+ struct rte_mtr_error *error);
+
/** @internal MTR object enabled stats update. */
typedef int (*rte_mtr_stats_update_t)(struct rte_eth_dev *dev,
uint32_t mtr_id,
@@ -139,6 +165,18 @@ struct rte_mtr_ops {
/** MTR object meter DSCP table update */
rte_mtr_meter_dscp_table_update_t meter_dscp_table_update;
+ /** MTR object meter VLAN table update */
+ rte_mtr_meter_vlan_table_update_t meter_vlan_table_update;
+
+ /** Set the input color protocol on MTR object. */
+ rte_mtr_meter_color_in_proto_set_t in_proto_set;
+
+ /** Get the input color protocol of MTR object. */
+ rte_mtr_meter_color_in_proto_get_t in_proto_get;
+
+ /** Get the input color protocol priority of MTR object. */
+ rte_mtr_meter_color_in_proto_prio_get_t in_proto_prio_get;
+
/** MTR object enabled stats update */
rte_mtr_stats_update_t stats_update;
diff --git a/lib/ethdev/version.map b/lib/ethdev/version.map
index 20391ab29e..daca7851f2 100644
--- a/lib/ethdev/version.map
+++ b/lib/ethdev/version.map
@@ -279,6 +279,12 @@ EXPERIMENTAL {
rte_flow_async_action_handle_create;
rte_flow_async_action_handle_destroy;
rte_flow_async_action_handle_update;
+
+ # added in 22.07
+ rte_mtr_color_in_protocol_get;
+ rte_mtr_color_in_protocol_priority_get;
+ rte_mtr_color_in_protocol_set;
+ rte_mtr_meter_vlan_table_update;
};
INTERNAL {
--
2.36.0
^ permalink raw reply [relevance 5%]
* RE: [PATCH v3 1/7] cryptodev: add APIs to get/set event metadata
2022-04-21 14:37 2% ` [PATCH v3 1/7] cryptodev: add APIs to get/set " Akhil Goyal
2022-04-27 15:38 0% ` Zhang, Roy Fan
@ 2022-04-28 14:42 0% ` Gujjar, Abhinandan S
1 sibling, 0 replies; 200+ results
From: Gujjar, Abhinandan S @ 2022-04-28 14:42 UTC (permalink / raw)
To: Akhil Goyal, dev
Cc: anoobj, jerinj, Jayatheerthan, Jay, Vangati, Narender, vfialko
> -----Original Message-----
> From: Akhil Goyal <gakhil@marvell.com>
> Sent: Thursday, April 21, 2022 8:07 PM
> To: dev@dpdk.org
> Cc: anoobj@marvell.com; jerinj@marvell.com; Gujjar, Abhinandan S
> <abhinandan.gujjar@intel.com>; Jayatheerthan, Jay
> <jay.jayatheerthan@intel.com>; Vangati, Narender
> <narender.vangati@intel.com>; vfialko@marvell.com; Akhil Goyal
> <gakhil@marvell.com>
> Subject: [PATCH v3 1/7] cryptodev: add APIs to get/set event metadata
>
> From: Volodymyr Fialko <vfialko@marvell.com>
>
> Currently, crypto session userdata is used to set event crypto metadata from
> the application and the driver is dereferencing it in driver which is not correct.
> User data is meant to be opaque to the driver.
> To support this, new API is added to get and set event crypto metadata. The
> new API, rte_cryptodev_set_session_event_mdata,
> allows setting event metadata in session private data which is filled inside PMD
> using a new cryptodev op. This operation can be performed on any of the PMD
> supported sessions (sym/asym/security).
> For SW abstraction of event crypto adapter to be used by eventdev library, a
> new field is added in asymmetric crypto session for now and for symmetric
> case, current implementation of using userdata is used. Symmetric cases cannot
> be fixed now, as it will be ABI breakage which will be resolved in DPDK 22.11.
>
> Signed-off-by: Volodymyr Fialko <vfialko@marvell.com>
> Signed-off-by: Akhil Goyal <gakhil@marvell.com>
> ---
> lib/cryptodev/cryptodev_pmd.c | 16 ++++++++++++++
> lib/cryptodev/cryptodev_pmd.h | 36 ++++++++++++++++++++++++++++++
> lib/cryptodev/rte_cryptodev.c | 41 +++++++++++++++++++++++++++++++++++
> lib/cryptodev/rte_cryptodev.h | 22 +++++++++++++++++++
> lib/cryptodev/version.map | 4 ++++
> 5 files changed, 119 insertions(+)
>
> diff --git a/lib/cryptodev/cryptodev_pmd.c b/lib/cryptodev/cryptodev_pmd.c
> index 739a0b3f34..1903ade388 100644
> --- a/lib/cryptodev/cryptodev_pmd.c
> +++ b/lib/cryptodev/cryptodev_pmd.c
> @@ -227,3 +227,19 @@ cryptodev_fp_ops_set(struct rte_crypto_fp_ops
> *fp_ops,
> fp_ops->qp.enq_cb = dev->enq_cbs;
> fp_ops->qp.deq_cb = dev->deq_cbs;
> }
> +
> +void *
> +rte_cryptodev_session_event_mdata_get(struct rte_crypto_op *op) {
Null check for op?
> + if (op->type == RTE_CRYPTO_OP_TYPE_SYMMETRIC &&
> + op->sess_type == RTE_CRYPTO_OP_WITH_SESSION)
> + return rte_cryptodev_sym_session_get_user_data(op->sym-
> >session);
> + else if (op->type == RTE_CRYPTO_OP_TYPE_ASYMMETRIC &&
> + op->sess_type == RTE_CRYPTO_OP_WITH_SESSION)
> + return op->asym->session->event_mdata;
> + else if (op->sess_type == RTE_CRYPTO_OP_SESSIONLESS &&
> + op->private_data_offset)
> + return ((uint8_t *)op + op->private_data_offset);
> + else
> + return NULL;
> +}
> diff --git a/lib/cryptodev/cryptodev_pmd.h b/lib/cryptodev/cryptodev_pmd.h
> index 2b1ce2da2d..7969944b66 100644
> --- a/lib/cryptodev/cryptodev_pmd.h
> +++ b/lib/cryptodev/cryptodev_pmd.h
> @@ -398,6 +398,25 @@ typedef int
> (*cryptodev_sym_configure_raw_dp_ctx_t)(
> enum rte_crypto_op_sess_type sess_type,
> union rte_cryptodev_session_ctx session_ctx, uint8_t is_update);
>
> +/**
> + * Typedef that the driver provided to set event crypto meta data.
> + *
> + * @param dev Crypto device pointer.
> + * @param sess Crypto or security session.
> + * @param op_type Operation type.
> + * @param sess_type Session type.
> + * @param ev_mdata Pointer to the event crypto meta data
> + * (aka *union rte_event_crypto_metadata*)
> + * @return
> + * - On success return 0.
> + * - On failure return negative integer.
> + */
> +typedef int (*cryptodev_session_event_mdata_set_t)(
> + struct rte_cryptodev *dev, void *sess,
> + enum rte_crypto_op_type op_type,
> + enum rte_crypto_op_sess_type sess_type,
> + void *ev_mdata);
> +
> /** Crypto device operations function pointer table */ struct
> rte_cryptodev_ops {
> cryptodev_configure_t dev_configure; /**< Configure device. */
> @@ -442,6 +461,8 @@ struct rte_cryptodev_ops {
> /**< Initialize raw data path context data. */
> };
> };
> + cryptodev_session_event_mdata_set_t session_ev_mdata_set;
> + /**< Set a Crypto or Security session even meta data. */
> };
>
>
> @@ -603,6 +624,19 @@ void
> cryptodev_fp_ops_set(struct rte_crypto_fp_ops *fp_ops,
> const struct rte_cryptodev *dev);
>
> +/**
> + * Get session event meta data (aka *union rte_event_crypto_metadata*)
> + *
> + * @param op pointer to *rte_crypto_op* structure.
> + *
> + * @return
> + * - On success, pointer to event crypto metadata
> + * - On failure, a negative value.
> + */
> +__rte_internal
> +void *
> +rte_cryptodev_session_event_mdata_get(struct rte_crypto_op *op);
> +
> static inline void *
> get_sym_session_private_data(const struct rte_cryptodev_sym_session *sess,
> uint8_t driver_id) {
> @@ -636,6 +670,8 @@ RTE_STD_C11 struct rte_cryptodev_asym_session {
> /**< Size of private data used when creating mempool */
> uint16_t user_data_sz;
> /**< Session user data will be placed after sess_data */
> + void *event_mdata;
> + /**< Event crypto adapter metadata */
Add reference to rte_event_crypto_metadata for clarity?
> uint8_t padding[3];
> uint8_t sess_private_data[0];
> };
> diff --git a/lib/cryptodev/rte_cryptodev.c b/lib/cryptodev/rte_cryptodev.c index
> 3500a2d470..a070cb2a00 100644
> --- a/lib/cryptodev/rte_cryptodev.c
> +++ b/lib/cryptodev/rte_cryptodev.c
> @@ -2051,6 +2051,9 @@ rte_cryptodev_asym_session_free(uint8_t dev_id,
> void *sess)
>
> dev->dev_ops->asym_session_clear(dev, sess);
>
> + if (((struct rte_cryptodev_asym_session *)sess)->event_mdata)
> + rte_free(((struct rte_cryptodev_asym_session *)sess)-
> >event_mdata);
> +
Who allocates memory for event_mdata? If this done by application before calling
rte_cryptodev_session_event_mdata_set(), please document it.
> /* Return session to mempool */
> sess_mp = rte_mempool_from_obj(sess);
> rte_mempool_put(sess_mp, sess);
> @@ -2259,6 +2262,44 @@ rte_cryptodev_configure_raw_dp_ctx(uint8_t
> dev_id, uint16_t qp_id,
> sess_type, session_ctx, is_update);
> }
>
> +int
> +rte_cryptodev_session_event_mdata_set(uint8_t dev_id, void *sess,
> + enum rte_crypto_op_type op_type,
> + enum rte_crypto_op_sess_type sess_type,
> + void *ev_mdata,
> + uint16_t size)
> +{
> + struct rte_cryptodev *dev;
> +
> + if (!rte_cryptodev_is_valid_dev(dev_id))
> + goto skip_pmd_op;
> +
> + dev = rte_cryptodev_pmd_get_dev(dev_id);
> + if (dev->dev_ops->session_ev_mdata_set == NULL)
> + goto skip_pmd_op;
> +
> + return (*dev->dev_ops->session_ev_mdata_set)(dev, sess, op_type,
> + sess_type, ev_mdata);
> +
> +skip_pmd_op:
> + if (op_type == RTE_CRYPTO_OP_TYPE_SYMMETRIC)
> + return rte_cryptodev_sym_session_set_user_data(sess,
> ev_mdata,
> + size);
> + else if (op_type == RTE_CRYPTO_OP_TYPE_ASYMMETRIC) {
> + struct rte_cryptodev_asym_session *s = sess;
Null check for sess?
> +
> + if (s->event_mdata == NULL) {
> + s->event_mdata = rte_malloc(NULL, size, 0);
> + if (s->event_mdata == NULL)
> + return -ENOMEM;
> + }
> + rte_memcpy(s->event_mdata, ev_mdata, size);
> +
> + return 0;
> + } else
> + return -ENOTSUP;
> +}
> +
> uint32_t
> rte_cryptodev_raw_enqueue_burst(struct rte_crypto_raw_dp_ctx *ctx,
> struct rte_crypto_sym_vec *vec, union rte_crypto_sym_ofs ofs, diff --
> git a/lib/cryptodev/rte_cryptodev.h b/lib/cryptodev/rte_cryptodev.h index
> 45d33f4a50..2c2c2edeb7 100644
> --- a/lib/cryptodev/rte_cryptodev.h
> +++ b/lib/cryptodev/rte_cryptodev.h
> @@ -1269,6 +1269,28 @@ __rte_experimental int
> rte_cryptodev_get_raw_dp_ctx_size(uint8_t dev_id);
>
> +/**
> + * Set session event meta data
> + *
> + * @param dev_id The device identifier.
> + * @param sess Crypto or security session.
> + * @param op_type Operation type.
> + * @param sess_type Session type.
> + * @param ev_mdata Pointer to the event crypto meta data
> + * (aka *union rte_event_crypto_metadata*)
> + * @param size Size of ev_mdata.
> + *
> + * @return
> + * - On success, zero.
> + * - On failure, a negative value.
> + */
> +__rte_experimental
> +int
> +rte_cryptodev_session_event_mdata_set(uint8_t dev_id, void *sess,
> + enum rte_crypto_op_type op_type,
> + enum rte_crypto_op_sess_type sess_type,
> + void *ev_mdata, uint16_t size);
> +
> /**
> * Union of different crypto session types, including session-less xform
> * pointer.
> diff --git a/lib/cryptodev/version.map b/lib/cryptodev/version.map index
> c7c5aefceb..f0abfaa47d 100644
> --- a/lib/cryptodev/version.map
> +++ b/lib/cryptodev/version.map
> @@ -105,6 +105,9 @@ EXPERIMENTAL {
> rte_cryptodev_asym_session_pool_create;
> rte_cryptodev_asym_session_set_user_data;
> __rte_cryptodev_trace_asym_session_pool_create;
> +
> + #added in 22.07
> + rte_cryptodev_session_event_mdata_set;
> };
>
> INTERNAL {
> @@ -123,5 +126,6 @@ INTERNAL {
> rte_cryptodev_pmd_parse_input_args;
> rte_cryptodev_pmd_probing_finish;
> rte_cryptodev_pmd_release_device;
> + rte_cryptodev_session_event_mdata_get;
> rte_cryptodevs;
> };
> --
> 2.25.1
^ permalink raw reply [relevance 0%]
* RE: [PATCH v3 0/7] Add new cryptodev op for event metadata
2022-04-21 14:37 4% ` [PATCH v3 0/7] Add new cryptodev op for " Akhil Goyal
2022-04-21 14:37 2% ` [PATCH v3 1/7] cryptodev: add APIs to get/set " Akhil Goyal
2022-04-27 15:37 0% ` [PATCH v3 0/7] Add new cryptodev op for " Zhang, Roy Fan
@ 2022-04-28 14:24 0% ` Gujjar, Abhinandan S
2022-05-01 19:24 4% ` [PATCH v4 " Akhil Goyal
3 siblings, 0 replies; 200+ results
From: Gujjar, Abhinandan S @ 2022-04-28 14:24 UTC (permalink / raw)
To: Akhil Goyal, dev
Cc: anoobj, jerinj, Jayatheerthan, Jay, Vangati, Narender, vfialko
Acked-by: Abhinandan Gujjar <Abhinandan.gujjar@intel.com>
> -----Original Message-----
> From: Akhil Goyal <gakhil@marvell.com>
> Sent: Thursday, April 21, 2022 8:07 PM
> To: dev@dpdk.org
> Cc: anoobj@marvell.com; jerinj@marvell.com; Gujjar, Abhinandan S
> <abhinandan.gujjar@intel.com>; Jayatheerthan, Jay
> <jay.jayatheerthan@intel.com>; Vangati, Narender
> <narender.vangati@intel.com>; vfialko@marvell.com; Akhil Goyal
> <gakhil@marvell.com>
> Subject: [PATCH v3 0/7] Add new cryptodev op for event metadata
>
> For using event crypto metadata, event metadata need to be set in session. For
> this session user data was used for symmetric crypto sessions and no support
> was present for asymmetric and security sessions.
> The use of userdata to store event metadata (which is dereferenced in PMD) is
> not correct as it is meant for the application to use it.
> Hence, a new API is created to set and get event crypto metadata which is
> scalable to all sessions supported by the crypto PMD.
> The application can use the set API to set event metadata and the PMD may
> store that inside the session private data and PMD need not use the get API as
> it would be internal to the PMD.
> For the software event crypto adapter implementation, the eventdev library
> can use the get API to get the event metadata stored inside the session
> structure.
> For Asymmetric sessions, a new field is added inside the session struct which is
> internal to library.
> For symmetric and security sessions, new field cannot be added as it would be
> ABI break. Hence, session userdata is being used to store that as it was used
> earlier. In next ABI break release this would be fixed similar to asymmetric
> crypto case.
>
> The patchset also add support for asymmetric crypto adapter in the test
> applications and the crypto/cnxk implementation of the new cryptodev op and
> corresponding changes in the eventdev lib.
>
> Changes in v3:
> - fix SW adapter case of memory allocation/free of mdata. mdata is allocated in
> set API and freed in session clear/destroy.
> - mark rte_cryptodev_session_event_mdata_get as internal API as it is only
> needed for the app or the PMD.
>
> changes in v2:
> - v1 patchset only fixed security sessions and also caused ABI breakage.
> This is fixed in v2.
> - added new API for setting event metadata.
> - added new cryptodev op which can handle all sessions
>
>
> Akhil Goyal (5):
> crypto/octeontx: use new API for event metadata
> test/event: use new API to set event crypto metadata
> eventdev: use new API to get event crypto metadata
> test/event: add asymmetric cases for crypto adapter
> test-eventdev: support asym ops for crypto adapter
>
> Volodymyr Fialko (2):
> cryptodev: add APIs to get/set event metadata
> crypto/cnxk: add event metadata set operation
>
> app/test-eventdev/evt_common.h | 2 +
> app/test-eventdev/evt_options.c | 17 +
> app/test-eventdev/evt_options.h | 4 +
> app/test-eventdev/test_perf_atq.c | 12 +-
> app/test-eventdev/test_perf_common.c | 254 ++++++++--
> app/test-eventdev/test_perf_common.h | 45 +-
> app/test-eventdev/test_perf_queue.c | 12 +-
> app/test/test_event_crypto_adapter.c | 503 +++++++++++++++++++-
> doc/guides/tools/testeventdev.rst | 5 +
> drivers/crypto/cnxk/cn10k_cryptodev_ops.c | 144 +++++-
> drivers/crypto/cnxk/cn10k_ipsec.h | 2 +
> drivers/crypto/cnxk/cn9k_cryptodev_ops.c | 138 +++++-
> drivers/crypto/cnxk/cn9k_ipsec.h | 2 +
> drivers/crypto/cnxk/cnxk_ae.h | 2 +
> drivers/crypto/cnxk/cnxk_cryptodev_ops.h | 18 -
> drivers/crypto/cnxk/cnxk_se.h | 2 +
> drivers/crypto/octeontx/otx_cryptodev_ops.c | 20 +-
> lib/cryptodev/cryptodev_pmd.c | 16 +
> lib/cryptodev/cryptodev_pmd.h | 36 ++
> lib/cryptodev/rte_cryptodev.c | 41 ++
> lib/cryptodev/rte_cryptodev.h | 22 +
> lib/cryptodev/version.map | 4 +
> lib/eventdev/rte_event_crypto_adapter.c | 55 +--
> 23 files changed, 1168 insertions(+), 188 deletions(-)
>
> --
> 2.25.1
^ permalink raw reply [relevance 0%]
* Re: librte_bpf: roadmap or any specific plans for this library
@ 2022-04-28 10:34 4% ` David Marchand
0 siblings, 0 replies; 200+ results
From: David Marchand @ 2022-04-28 10:34 UTC (permalink / raw)
To: Björn Svensson A; +Cc: dev, Ananyev, Konstantin, Stephen Hemminger
Hello,
On Tue, Apr 26, 2022 at 10:34 AM Björn Svensson A
<bjorn.a.svensson@est.tech> wrote:
>
> Hi all,
> I hope this is the correct maillist for this topic.
Yes it is.
I copied the maintainer and people that might be interested in this topic.
>
> DPDK provides the nice library `librte_bpf` to load and execute eBPF bytecode
> and we would like to broaden our usage of this library.
>
> Today there are hints that this library might have been purpose built to enable inspection or modification of packets;
> for example the eBPF program is expected to only use a single input argument, pointing to data of some sort.
> We believe it would be beneficial to be able to use this library to run generic eBPF programs as well,
> as an alternative to run them as RX- TX-port/queue callbacks (i.e. generic programs which only uses supported features)
>
> I have seen some discussions regarding moving towards using a common library with the kernel implementation of bpf,
> but I couldn't figure out the outcome.
I don't think there was progress on this.
> My question is if there any plans to evolve this library or would improvements possibly be accepted?
>
> Here are some improvements we are interested to look into:
>
> * Add additional API for loading eBPF code.
> Today it's possible to load eBPF code from an ELF file, but having an API to load code from an ELF image from memory
> would open up for other ways to manage eBPF code.
>
> Example of the new API:
> struct rte_bpf *
> rte_bpf_elf_image_load(const struct rte_bpf_prm *prm, char *image,
> size_t size, const char *sname);
>
> * Add support of more than a single input argument.
> There are cases when additional information is needed. Being able to use more than a single input argument
> would help when running generic eBPF programs.
>
> Example of change:
> struct rte_bpf_prm {
> ...
> - struct rte_bpf_arg prog_arg; /**< eBPF program input arg description */
> + uint32_t nb_args;
> + struct rte_bpf_arg prog_args[EBPF_FUNC_MAX_ARGS]; /**< eBPF program input args */
> };
All I can tell, is that this proposal breaks ABI.
This is a blocker to get it accepted until next ABI breakage window opens.
--
David Marchand
^ permalink raw reply [relevance 4%]
* RE: [PATCH v3 1/7] cryptodev: add APIs to get/set event metadata
2022-04-21 14:37 2% ` [PATCH v3 1/7] cryptodev: add APIs to get/set " Akhil Goyal
@ 2022-04-27 15:38 0% ` Zhang, Roy Fan
2022-04-28 14:42 0% ` Gujjar, Abhinandan S
1 sibling, 0 replies; 200+ results
From: Zhang, Roy Fan @ 2022-04-27 15:38 UTC (permalink / raw)
To: Akhil Goyal, dev
Cc: anoobj, jerinj, Gujjar, Abhinandan S, Jayatheerthan, Jay,
Vangati, Narender, vfialko
> -----Original Message-----
> From: Akhil Goyal <gakhil@marvell.com>
> Sent: Thursday, April 21, 2022 3:37 PM
> To: dev@dpdk.org
> Cc: anoobj@marvell.com; jerinj@marvell.com; Gujjar, Abhinandan S
> <abhinandan.gujjar@intel.com>; Jayatheerthan, Jay
> <jay.jayatheerthan@intel.com>; Vangati, Narender
> <narender.vangati@intel.com>; vfialko@marvell.com; Akhil Goyal
> <gakhil@marvell.com>
> Subject: [PATCH v3 1/7] cryptodev: add APIs to get/set event metadata
>
> From: Volodymyr Fialko <vfialko@marvell.com>
>
> Currently, crypto session userdata is used to set event crypto
> metadata from the application and the driver is dereferencing it
> in driver which is not correct. User data is meant to be opaque
> to the driver.
> To support this, new API is added to get and set event crypto
> metadata. The new API, rte_cryptodev_set_session_event_mdata,
> allows setting event metadata in session private data which is
> filled inside PMD using a new cryptodev op. This operation
> can be performed on any of the PMD supported sessions
> (sym/asym/security).
> For SW abstraction of event crypto adapter to be used by
> eventdev library, a new field is added in asymmetric crypto
> session for now and for symmetric case, current implementation
> of using userdata is used. Symmetric cases cannot be fixed now,
> as it will be ABI breakage which will be resolved in DPDK 22.11.
>
> Signed-off-by: Volodymyr Fialko <vfialko@marvell.com>
> Signed-off-by: Akhil Goyal <gakhil@marvell.com>
> ---
Acked-by: Fan Zhang <roy.fan.zhang@intel.com>
^ permalink raw reply [relevance 0%]
* RE: [PATCH v3 0/7] Add new cryptodev op for event metadata
2022-04-21 14:37 4% ` [PATCH v3 0/7] Add new cryptodev op for " Akhil Goyal
2022-04-21 14:37 2% ` [PATCH v3 1/7] cryptodev: add APIs to get/set " Akhil Goyal
@ 2022-04-27 15:37 0% ` Zhang, Roy Fan
2022-04-28 14:24 0% ` Gujjar, Abhinandan S
2022-05-01 19:24 4% ` [PATCH v4 " Akhil Goyal
3 siblings, 0 replies; 200+ results
From: Zhang, Roy Fan @ 2022-04-27 15:37 UTC (permalink / raw)
To: Akhil Goyal, dev
Cc: anoobj, jerinj, Gujjar, Abhinandan S, Jayatheerthan, Jay,
Vangati, Narender, vfialko
> -----Original Message-----
> From: Akhil Goyal <gakhil@marvell.com>
> Sent: Thursday, April 21, 2022 3:37 PM
> To: dev@dpdk.org
> Cc: anoobj@marvell.com; jerinj@marvell.com; Gujjar, Abhinandan S
> <abhinandan.gujjar@intel.com>; Jayatheerthan, Jay
> <jay.jayatheerthan@intel.com>; Vangati, Narender
> <narender.vangati@intel.com>; vfialko@marvell.com; Akhil Goyal
> <gakhil@marvell.com>
> Subject: [PATCH v3 0/7] Add new cryptodev op for event metadata
>
> For using event crypto metadata, event metadata need to be set
> in session. For this session user data was used for symmetric
> crypto sessions and no support was present for asymmetric and
> security sessions.
> The use of userdata to store event metadata (which is dereferenced
> in PMD) is not correct as it is meant for the application to use it.
> Hence, a new API is created to set and get event crypto metadata which
> is scalable to all sessions supported by the crypto PMD.
> The application can use the set API to set event metadata and the
> PMD may store that inside the session private data and PMD need not
> use the get API as it would be internal to the PMD.
> For the software event crypto adapter implementation, the eventdev
> library can use the get API to get the event metadata stored inside
> the session structure.
> For Asymmetric sessions, a new field is added inside the session
> struct which is internal to library.
> For symmetric and security sessions, new field cannot be added as
> it would be ABI break. Hence, session userdata is being used to
> store that as it was used earlier. In next ABI break release this
> would be fixed similar to asymmetric crypto case.
>
> The patchset also add support for asymmetric crypto adapter
> in the test applications and the crypto/cnxk implementation of
> the new cryptodev op and corresponding changes in the eventdev lib.
>
> Changes in v3:
> - fix SW adapter case of memory allocation/free of mdata. mdata is
> allocated in set API and freed in session clear/destroy.
> - mark rte_cryptodev_session_event_mdata_get as internal API
> as it is only needed for the app or the PMD.
>
> changes in v2:
> - v1 patchset only fixed security sessions and also caused ABI breakage.
> This is fixed in v2.
> - added new API for setting event metadata.
> - added new cryptodev op which can handle all sessions
>
>
> Akhil Goyal (5):
> crypto/octeontx: use new API for event metadata
> test/event: use new API to set event crypto metadata
> eventdev: use new API to get event crypto metadata
> test/event: add asymmetric cases for crypto adapter
> test-eventdev: support asym ops for crypto adapter
>
> Volodymyr Fialko (2):
> cryptodev: add APIs to get/set event metadata
> crypto/cnxk: add event metadata set operation
>
> app/test-eventdev/evt_common.h | 2 +
> app/test-eventdev/evt_options.c | 17 +
> app/test-eventdev/evt_options.h | 4 +
> app/test-eventdev/test_perf_atq.c | 12 +-
> app/test-eventdev/test_perf_common.c | 254 ++++++++--
> app/test-eventdev/test_perf_common.h | 45 +-
> app/test-eventdev/test_perf_queue.c | 12 +-
> app/test/test_event_crypto_adapter.c | 503 +++++++++++++++++++-
> doc/guides/tools/testeventdev.rst | 5 +
> drivers/crypto/cnxk/cn10k_cryptodev_ops.c | 144 +++++-
> drivers/crypto/cnxk/cn10k_ipsec.h | 2 +
> drivers/crypto/cnxk/cn9k_cryptodev_ops.c | 138 +++++-
> drivers/crypto/cnxk/cn9k_ipsec.h | 2 +
> drivers/crypto/cnxk/cnxk_ae.h | 2 +
> drivers/crypto/cnxk/cnxk_cryptodev_ops.h | 18 -
> drivers/crypto/cnxk/cnxk_se.h | 2 +
> drivers/crypto/octeontx/otx_cryptodev_ops.c | 20 +-
> lib/cryptodev/cryptodev_pmd.c | 16 +
> lib/cryptodev/cryptodev_pmd.h | 36 ++
> lib/cryptodev/rte_cryptodev.c | 41 ++
> lib/cryptodev/rte_cryptodev.h | 22 +
> lib/cryptodev/version.map | 4 +
> lib/eventdev/rte_event_crypto_adapter.c | 55 +--
> 23 files changed, 1168 insertions(+), 188 deletions(-)
>
> --
> 2.25.1
Series-acked-by: Fan Zhang <roy.fan.zhang@intel.com>
^ permalink raw reply [relevance 0%]
* DPDK 21.11.1 released
@ 2022-04-26 13:58 1% Kevin Traynor
0 siblings, 0 replies; 200+ results
From: Kevin Traynor @ 2022-04-26 13:58 UTC (permalink / raw)
To: announce
Hi all,
Here is a new stable release:
https://fast.dpdk.org/rel/dpdk-21.11.1.tar.xz
The git tree is at:
https://dpdk.org/browse/dpdk-stable/?h=21.11
This is the first stable release of 21.11 LTS and contains
~400 fixes.
See the release notes for details:
http://doc.dpdk.org/guides-21.11/rel_notes/release_21_11.html#fixes
Thanks to the authors who helped with backports and to the
following who helped with validation:
Nvidia, Intel, Canonical and Red Hat.
Kevin
---
MAINTAINERS | 2 +
VERSION | 2 +-
app/dumpcap/main.c | 9 +-
app/pdump/main.c | 16 +-
app/proc-info/main.c | 6 +-
app/test-acl/main.c | 6 +-
app/test-compress-perf/comp_perf_test_cyclecount.c | 9 +-
app/test-compress-perf/comp_perf_test_throughput.c | 2 +-
app/test-compress-perf/comp_perf_test_verify.c | 2 +-
app/test-compress-perf/main.c | 5 +-
app/test-crypto-perf/cperf_test_pmd_cyclecount.c | 2 +-
app/test-eventdev/evt_options.c | 2 +-
app/test-eventdev/test_order_common.c | 2 +-
app/test-fib/main.c | 12 +-
app/test-flow-perf/config.h | 2 +-
app/test-flow-perf/main.c | 2 +-
app/test-pmd/cmd_flex_item.c | 3 +-
app/test-pmd/cmdline.c | 18 +-
app/test-pmd/cmdline_flow.c | 13 +-
app/test-pmd/cmdline_tm.c | 4 +-
app/test-pmd/config.c | 22 +-
app/test-pmd/csumonly.c | 24 +-
app/test-pmd/parameters.c | 2 +-
app/test-pmd/testpmd.c | 28 +-
app/test-pmd/testpmd.h | 1 +
app/test-pmd/txonly.c | 24 +-
app/test-regex/main.c | 38 +-
app/test/meson.build | 2 +-
app/test/test_barrier.c | 2 +-
app/test/test_bpf.c | 10 +-
app/test/test_compressdev.c | 2 +-
app/test/test_cryptodev.c | 13 +-
app/test/test_cryptodev_asym.c | 2 +-
app/test/test_cryptodev_rsa_test_vectors.h | 2 +-
app/test/test_dmadev.c | 8 +-
app/test/test_efd.c | 2 +-
app/test/test_fib_perf.c | 2 +-
app/test/test_kni.c | 4 +-
app/test/test_kvargs.c | 16 +-
app/test/test_link_bonding.c | 4 +
app/test/test_link_bonding_rssconf.c | 4 +
app/test/test_lpm6_data.h | 2 +-
app/test/test_mbuf.c | 4 -
app/test/test_member.c | 2 +-
app/test/test_memory.c | 2 +-
app/test/test_mempool.c | 4 +-
app/test/test_memzone.c | 6 +-
app/test/test_metrics.c | 2 +-
app/test/test_pcapng.c | 2 +-
app/test/test_power_cpufreq.c | 2 +-
app/test/test_rcu_qsbr.c | 4 +-
app/test/test_red.c | 8 +-
app/test/test_security.c | 2 +-
app/test/test_table_pipeline.c | 2 +-
app/test/test_thash.c | 2 +-
buildtools/binutils-avx512-check.py | 4 +-
buildtools/call-sphinx-build.py | 4 +-
buildtools/meson.build | 5 +-
config/arm/meson.build | 10 +-
config/meson.build | 5 +-
config/x86/meson.build | 2 +-
devtools/check-abi.sh | 4 -
devtools/check-forbidden-tokens.awk | 3 +
devtools/check-symbol-change.sh | 6 +-
devtools/check-symbol-maps.sh | 7 +
devtools/libabigail.abignore | 20 +
doc/api/generate_examples.sh | 14 +-
doc/api/meson.build | 10 +-
doc/guides/compressdevs/mlx5.rst | 6 +-
doc/guides/conf.py | 6 +-
doc/guides/cryptodevs/mlx5.rst | 6 +-
doc/guides/dmadevs/hisilicon.rst | 4 +-
doc/guides/dmadevs/idxd.rst | 29 +-
doc/guides/eventdevs/dlb2.rst | 19 +-
doc/guides/gpus/features/cuda.ini | 10 +
.../img/virtio_user_for_container_networking.svg | 2 +-
doc/guides/linux_gsg/enable_func.rst | 8 +-
doc/guides/linux_gsg/linux_drivers.rst | 11 +-
doc/guides/linux_gsg/sys_reqs.rst | 6 +-
doc/guides/nics/af_packet.rst | 2 +-
doc/guides/nics/features/ice_dcf.ini | 5 +
doc/guides/nics/hns3.rst | 5 +
doc/guides/nics/ice.rst | 4 +
doc/guides/nics/kni.rst | 2 +-
doc/guides/nics/mlx4.rst | 6 +-
doc/guides/nics/mlx5.rst | 33 +-
doc/guides/prog_guide/cryptodev_lib.rst | 3 +-
doc/guides/prog_guide/env_abstraction_layer.rst | 4 +-
...{flow_tru_droppper.png => flow_tru_dropper.png} | Bin
doc/guides/prog_guide/img/turbo_tb_decode.svg | 2 +-
doc/guides/prog_guide/img/turbo_tb_encode.svg | 2 +-
doc/guides/prog_guide/qos_framework.rst | 6 +-
doc/guides/prog_guide/rte_flow.rst | 8 +-
doc/guides/rawdevs/cnxk_bphy.rst | 2 +-
doc/guides/regexdevs/features_overview.rst | 2 +-
doc/guides/regexdevs/mlx5.rst | 8 +-
doc/guides/rel_notes/release_16_07.rst | 2 +-
doc/guides/rel_notes/release_17_08.rst | 2 +-
doc/guides/rel_notes/release_21_11.rst | 518 +++++++++++++++++++++
doc/guides/rel_notes/release_2_1.rst | 2 +-
doc/guides/sample_app_ug/fips_validation.rst | 3 +-
doc/guides/sample_app_ug/ip_reassembly.rst | 4 +-
doc/guides/sample_app_ug/l2_forward_cat.rst | 2 +-
doc/guides/sample_app_ug/server_node_efd.rst | 2 +-
doc/guides/sample_app_ug/skeleton.rst | 2 +-
doc/guides/sample_app_ug/vm_power_management.rst | 2 +-
doc/guides/testpmd_app_ug/testpmd_funcs.rst | 2 +-
drivers/baseband/acc100/rte_acc100_pmd.c | 3 +-
drivers/baseband/acc100/rte_acc100_pmd.h | 1 +
drivers/baseband/fpga_lte_fec/fpga_lte_fec.c | 8 +-
drivers/baseband/null/bbdev_null.c | 2 +-
drivers/baseband/turbo_sw/bbdev_turbo_software.c | 2 +-
drivers/bus/auxiliary/version.map | 2 +
drivers/bus/dpaa/dpaa_bus.c | 2 +-
drivers/bus/dpaa/include/fsl_qman.h | 6 +-
drivers/bus/dpaa/include/fsl_usd.h | 2 +-
drivers/bus/dpaa/include/process.h | 2 +-
drivers/bus/fslmc/fslmc_bus.c | 2 +-
drivers/bus/fslmc/portal/dpaa2_hw_dpio.c | 2 +-
drivers/bus/fslmc/portal/dpaa2_hw_pvt.h | 2 +-
drivers/bus/fslmc/qbman/include/fsl_qbman_portal.h | 20 +-
drivers/bus/ifpga/ifpga_bus.c | 6 +-
drivers/bus/pci/linux/pci_vfio.c | 2 +-
drivers/bus/pci/pci_common.c | 5 +-
drivers/bus/vdev/rte_bus_vdev.h | 2 +-
drivers/bus/vmbus/vmbus_common.c | 2 +-
drivers/common/cnxk/cnxk_security.c | 4 -
drivers/common/cnxk/cnxk_telemetry_nix.c | 3 +
drivers/common/cnxk/hw/cpt.h | 14 +-
drivers/common/cnxk/roc_bphy_cgx.c | 2 +-
drivers/common/cnxk/roc_bphy_irq.c | 2 +-
drivers/common/cnxk/roc_cpt.c | 10 +-
drivers/common/cnxk/roc_dev.c | 21 +-
drivers/common/cnxk/roc_irq.c | 5 +-
drivers/common/cnxk/roc_nix.h | 1 +
drivers/common/cnxk/roc_nix_bpf.c | 2 +-
drivers/common/cnxk/roc_nix_debug.c | 10 +-
drivers/common/cnxk/roc_nix_fc.c | 12 +
drivers/common/cnxk/roc_nix_inl.c | 5 +-
drivers/common/cnxk/roc_nix_inl_dev.c | 12 +
drivers/common/cnxk/roc_nix_inl_priv.h | 1 +
drivers/common/cnxk/roc_nix_irq.c | 5 +-
drivers/common/cnxk/roc_nix_npc.c | 2 +-
drivers/common/cnxk/roc_nix_priv.h | 1 +
drivers/common/cnxk/roc_nix_ptp.c | 8 +
drivers/common/cnxk/roc_nix_queue.c | 93 +++-
drivers/common/cnxk/roc_nix_stats.c | 18 +
drivers/common/cnxk/roc_nix_tm.c | 8 +-
drivers/common/cnxk/roc_nix_tm_ops.c | 2 +-
drivers/common/cnxk/roc_nix_tm_utils.c | 3 +-
drivers/common/cnxk/roc_npc.c | 14 +-
drivers/common/cnxk/roc_npc_mcam.c | 4 +-
drivers/common/cnxk/roc_npc_mcam_dump.c | 40 +-
drivers/common/cnxk/roc_npc_parse.c | 13 +-
drivers/common/cnxk/roc_npc_priv.h | 2 +-
drivers/common/cnxk/roc_npc_utils.c | 7 +-
drivers/common/cnxk/version.map | 1 +
drivers/common/cpt/cpt_ucode.h | 4 +-
drivers/common/cpt/cpt_ucode_asym.h | 2 +-
drivers/common/dpaax/caamflib/desc/algo.h | 2 +-
drivers/common/dpaax/caamflib/desc/sdap.h | 6 +-
drivers/common/dpaax/dpaax_iova_table.c | 2 +-
drivers/common/iavf/iavf_type.h | 2 +-
drivers/common/iavf/virtchnl.h | 2 +-
drivers/common/iavf/virtchnl_inline_ipsec.h | 9 +
drivers/common/mlx5/linux/meson.build | 2 +-
drivers/common/mlx5/linux/mlx5_common_os.c | 2 +-
drivers/common/mlx5/linux/mlx5_common_os.h | 2 +
drivers/common/mlx5/linux/mlx5_nl.c | 102 +++-
drivers/common/mlx5/linux/mlx5_nl.h | 8 +-
drivers/common/mlx5/mlx5_common.c | 22 +-
drivers/common/mlx5/mlx5_common_mr.c | 11 +-
drivers/common/mlx5/mlx5_devx_cmds.c | 32 +-
drivers/common/mlx5/mlx5_devx_cmds.h | 3 +
drivers/common/mlx5/mlx5_malloc.c | 4 +-
drivers/common/mlx5/mlx5_malloc.h | 2 +-
drivers/common/mlx5/mlx5_prm.h | 30 +-
drivers/common/mlx5/version.map | 5 +
drivers/common/mlx5/windows/meson.build | 4 +-
drivers/common/mlx5/windows/mlx5_common_os.c | 4 +-
drivers/common/mlx5/windows/mlx5_common_os.h | 2 +-
.../qat/qat_adf/adf_transport_access_macros.h | 2 +-
drivers/common/sfc_efx/base/efx_mae.c | 11 +-
drivers/common/sfc_efx/efsys.h | 2 +-
drivers/compress/mlx5/mlx5_compress.c | 13 +-
drivers/compress/octeontx/include/zip_regs.h | 4 +-
drivers/compress/octeontx/otx_zip.h | 2 +-
drivers/compress/octeontx/otx_zip_pmd.c | 6 +-
drivers/compress/qat/qat_comp_pmd.c | 2 +-
drivers/crypto/bcmfs/bcmfs_device.h | 2 +-
drivers/crypto/bcmfs/bcmfs_qp.c | 2 +-
drivers/crypto/bcmfs/bcmfs_sym_defs.h | 6 +-
drivers/crypto/bcmfs/bcmfs_sym_engine.h | 2 +-
drivers/crypto/bcmfs/hw/bcmfs5_rm.c | 2 +-
drivers/crypto/caam_jr/caam_jr_hw_specific.h | 4 +-
drivers/crypto/caam_jr/caam_jr_pvt.h | 4 +-
drivers/crypto/caam_jr/caam_jr_uio.c | 2 +-
drivers/crypto/ccp/ccp_crypto.c | 2 +-
drivers/crypto/ccp/ccp_crypto.h | 2 +-
drivers/crypto/ccp/ccp_dev.h | 2 +-
drivers/crypto/cnxk/cn9k_ipsec_la_ops.h | 6 +-
drivers/crypto/cnxk/cnxk_cryptodev_ops.c | 21 +-
drivers/crypto/cnxk/cnxk_cryptodev_ops.h | 6 +-
drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c | 6 +-
drivers/crypto/dpaa_sec/dpaa_sec.c | 8 +-
drivers/crypto/ipsec_mb/ipsec_mb_ops.c | 10 +-
drivers/crypto/ipsec_mb/ipsec_mb_private.h | 4 +-
drivers/crypto/ipsec_mb/pmd_aesni_gcm.c | 16 +-
drivers/crypto/ipsec_mb/pmd_aesni_mb.c | 134 ++++--
drivers/crypto/ipsec_mb/pmd_aesni_mb_priv.h | 4 +-
drivers/crypto/ipsec_mb/pmd_zuc.c | 22 +-
drivers/crypto/ipsec_mb/pmd_zuc_priv.h | 2 +-
drivers/crypto/octeontx/otx_cryptodev_hw_access.c | 2 +-
drivers/crypto/octeontx/otx_cryptodev_mbox.h | 2 +-
drivers/crypto/octeontx/otx_cryptodev_ops.c | 2 +-
drivers/crypto/qat/qat_asym.c | 6 +-
drivers/crypto/qat/qat_sym.c | 2 +-
drivers/crypto/qat/qat_sym_hw_dp.c | 16 +-
drivers/crypto/virtio/virtio_rxtx.c | 3 +
drivers/crypto/virtio/virtqueue.h | 2 +-
drivers/dma/cnxk/meson.build | 1 -
drivers/dma/hisilicon/hisi_dmadev.c | 23 +-
drivers/dma/idxd/dpdk_idxd_cfg.py | 19 +-
drivers/dma/idxd/idxd_common.c | 10 +-
drivers/dma/skeleton/skeleton_dmadev.c | 2 +-
drivers/event/cnxk/cn10k_eventdev.c | 4 +-
drivers/event/cnxk/cn10k_worker.h | 2 -
drivers/event/cnxk/cn9k_eventdev.c | 11 +-
drivers/event/cnxk/cn9k_worker.h | 2 -
drivers/event/cnxk/cnxk_eventdev.c | 2 +-
drivers/event/cnxk/cnxk_eventdev.h | 8 +-
drivers/event/cnxk/cnxk_eventdev_adptr.c | 2 +-
drivers/event/cnxk/cnxk_eventdev_selftest.c | 4 +-
drivers/event/cnxk/cnxk_tim_worker.c | 2 +-
drivers/event/cnxk/cnxk_tim_worker.h | 4 +-
drivers/event/dlb2/dlb2.c | 32 +-
drivers/event/dlb2/dlb2_priv.h | 2 +-
drivers/event/dlb2/dlb2_selftest.c | 2 +-
drivers/event/dlb2/pf/base/dlb2_resource.c | 23 +-
drivers/event/dlb2/rte_pmd_dlb2.h | 2 +-
drivers/event/dpaa2/dpaa2_eventdev_selftest.c | 2 +-
drivers/event/dsw/dsw_evdev.h | 4 +-
drivers/event/dsw/dsw_event.c | 4 +-
drivers/event/octeontx/ssovf_evdev.h | 2 +-
drivers/event/octeontx/ssovf_evdev_selftest.c | 2 +-
drivers/event/octeontx2/otx2_evdev_selftest.c | 2 +-
drivers/event/octeontx2/otx2_worker_dual.h | 2 +-
drivers/event/opdl/opdl_evdev.c | 2 +-
drivers/event/opdl/opdl_test.c | 2 +-
drivers/event/sw/sw_evdev.h | 2 +-
drivers/event/sw/sw_evdev_selftest.c | 2 +-
drivers/gpu/cuda/cuda.c | 8 +-
drivers/mempool/cnxk/cn10k_mempool_ops.c | 2 +-
drivers/mempool/dpaa/dpaa_mempool.c | 2 +-
drivers/mempool/octeontx/octeontx_fpavf.c | 4 +-
drivers/net/af_xdp/rte_eth_af_xdp.c | 167 +++----
drivers/net/ark/ark_global.h | 2 +-
drivers/net/atlantic/atl_ethdev.c | 2 +-
drivers/net/atlantic/atl_rxtx.c | 2 +-
drivers/net/atlantic/hw_atl/hw_atl_b0.c | 2 +-
drivers/net/axgbe/axgbe_dev.c | 2 +-
drivers/net/axgbe/axgbe_ethdev.c | 41 +-
drivers/net/axgbe/axgbe_ethdev.h | 2 +-
drivers/net/axgbe/axgbe_phy_impl.c | 4 +-
drivers/net/axgbe/axgbe_rxtx_vec_sse.c | 2 +-
drivers/net/bnx2x/bnx2x.c | 38 +-
drivers/net/bnx2x/bnx2x.h | 10 +-
drivers/net/bnx2x/bnx2x_stats.c | 2 +-
drivers/net/bnx2x/bnx2x_stats.h | 4 +-
drivers/net/bnx2x/bnx2x_vfpf.c | 2 +-
drivers/net/bnx2x/bnx2x_vfpf.h | 2 +-
drivers/net/bnx2x/ecore_fw_defs.h | 2 +-
drivers/net/bnx2x/ecore_hsi.h | 26 +-
drivers/net/bnx2x/ecore_init_ops.h | 6 +-
drivers/net/bnx2x/ecore_reg.h | 28 +-
drivers/net/bnx2x/ecore_sp.c | 6 +-
drivers/net/bnx2x/ecore_sp.h | 6 +-
drivers/net/bnx2x/elink.c | 20 +-
drivers/net/bnxt/bnxt.h | 18 +-
drivers/net/bnxt/bnxt_cpr.c | 25 +-
drivers/net/bnxt/bnxt_ethdev.c | 133 ++++--
drivers/net/bnxt/bnxt_flow.c | 14 +-
drivers/net/bnxt/bnxt_hwrm.c | 123 +++--
drivers/net/bnxt/bnxt_hwrm.h | 7 +-
drivers/net/bnxt/bnxt_reps.c | 33 +-
drivers/net/bnxt/bnxt_ring.c | 3 +
drivers/net/bnxt/bnxt_rxq.c | 9 +-
drivers/net/bnxt/bnxt_rxr.c | 6 +
drivers/net/bnxt/bnxt_stats.c | 105 +++--
drivers/net/bnxt/bnxt_txr.c | 3 +
drivers/net/bnxt/bnxt_vnic.c | 84 ++--
drivers/net/bnxt/bnxt_vnic.h | 7 +-
drivers/net/bnxt/tf_core/tf_session.c | 8 +-
drivers/net/bnxt/tf_core/tfp.c | 2 +-
drivers/net/bnxt/tf_core/tfp.h | 2 +-
drivers/net/bonding/eth_bond_8023ad_private.h | 2 +-
drivers/net/bonding/eth_bond_private.h | 8 +-
drivers/net/bonding/rte_eth_bond_8023ad.c | 20 +-
drivers/net/bonding/rte_eth_bond_8023ad.h | 4 +-
drivers/net/bonding/rte_eth_bond_alb.h | 2 +-
drivers/net/bonding/rte_eth_bond_api.c | 12 +-
drivers/net/bonding/rte_eth_bond_pmd.c | 163 ++++++-
drivers/net/cnxk/cn10k_ethdev.c | 6 +
drivers/net/cnxk/cn10k_ethdev.h | 5 +-
drivers/net/cnxk/cn10k_ethdev_sec.c | 42 +-
drivers/net/cnxk/cn10k_rx.c | 4 +
drivers/net/cnxk/cn10k_rx.h | 9 +-
drivers/net/cnxk/cn10k_tx.c | 4 +
drivers/net/cnxk/cn10k_tx.h | 6 +-
drivers/net/cnxk/cn9k_rx.c | 4 +
drivers/net/cnxk/cn9k_rx.h | 14 +-
drivers/net/cnxk/cn9k_tx.c | 4 +
drivers/net/cnxk/cn9k_tx.h | 6 +-
drivers/net/cnxk/cnxk_ethdev.c | 15 +-
drivers/net/cnxk/cnxk_ethdev.h | 9 +-
drivers/net/cnxk/cnxk_ethdev_mtr.c | 59 ++-
drivers/net/cnxk/cnxk_ethdev_ops.c | 5 +-
drivers/net/cnxk/cnxk_ptp.c | 2 +-
drivers/net/cxgbe/base/adapter.h | 2 -
drivers/net/cxgbe/base/t4_hw.c | 83 ++--
drivers/net/cxgbe/base/t4vf_hw.c | 28 +-
drivers/net/cxgbe/cxgbe_flow.c | 2 +-
drivers/net/cxgbe/cxgbevf_main.c | 2 +-
drivers/net/cxgbe/sge.c | 8 +-
drivers/net/dpaa/dpaa_ethdev.c | 6 +-
drivers/net/dpaa/dpaa_rxtx.c | 4 +-
drivers/net/dpaa/fmlib/fm_ext.h | 2 +-
drivers/net/dpaa/fmlib/fm_pcd_ext.h | 8 +-
drivers/net/dpaa/fmlib/fm_port_ext.h | 14 +-
drivers/net/dpaa2/dpaa2_ethdev.c | 23 +-
drivers/net/dpaa2/dpaa2_ethdev.h | 4 +-
drivers/net/dpaa2/dpaa2_flow.c | 8 +-
drivers/net/dpaa2/dpaa2_mux.c | 2 +-
drivers/net/dpaa2/dpaa2_ptp.c | 8 +-
drivers/net/dpaa2/dpaa2_rxtx.c | 45 +-
drivers/net/dpaa2/mc/fsl_dpni.h | 10 +-
drivers/net/e1000/e1000_ethdev.h | 4 +-
drivers/net/e1000/em_ethdev.c | 10 +-
drivers/net/e1000/em_rxtx.c | 6 +-
drivers/net/e1000/igb_ethdev.c | 18 +-
drivers/net/e1000/igb_flow.c | 4 +-
drivers/net/e1000/igb_pf.c | 2 +-
drivers/net/e1000/igb_rxtx.c | 14 +-
drivers/net/ena/ena_ethdev.c | 71 +--
drivers/net/ena/ena_ethdev.h | 7 +-
drivers/net/enetfec/enet_regs.h | 2 +-
drivers/net/enic/enic_flow.c | 18 +-
drivers/net/enic/enic_fm_flow.c | 12 +-
drivers/net/enic/enic_main.c | 2 +-
drivers/net/enic/enic_rxtx.c | 2 +-
drivers/net/fm10k/fm10k.h | 2 +-
drivers/net/fm10k/fm10k_ethdev.c | 12 +-
drivers/net/fm10k/fm10k_rxtx_vec.c | 10 +-
drivers/net/hinic/hinic_pmd_ethdev.c | 4 +-
drivers/net/hinic/hinic_pmd_ethdev.h | 2 +-
drivers/net/hinic/hinic_pmd_flow.c | 4 +-
drivers/net/hinic/hinic_pmd_tx.c | 2 +-
drivers/net/hns3/hns3_cmd.c | 4 +-
drivers/net/hns3/hns3_cmd.h | 1 -
drivers/net/hns3/hns3_common.c | 10 +-
drivers/net/hns3/hns3_dcb.c | 10 +-
drivers/net/hns3/hns3_ethdev.c | 53 ++-
drivers/net/hns3/hns3_ethdev.h | 9 +-
drivers/net/hns3/hns3_ethdev_vf.c | 14 +-
drivers/net/hns3/hns3_fdir.h | 2 +-
drivers/net/hns3/hns3_flow.c | 27 +-
drivers/net/hns3/hns3_mbx.c | 4 +-
drivers/net/hns3/hns3_mbx.h | 2 +-
drivers/net/hns3/hns3_mp.c | 7 +-
drivers/net/hns3/hns3_ptp.c | 1 +
drivers/net/hns3/hns3_rss.c | 62 ++-
drivers/net/hns3/hns3_rss.h | 2 +-
drivers/net/hns3/hns3_rxtx.c | 73 ++-
drivers/net/hns3/hns3_rxtx.h | 2 +-
drivers/net/hns3/hns3_rxtx_vec.c | 20 +-
drivers/net/hns3/hns3_stats.c | 124 +++--
drivers/net/hns3/hns3_stats.h | 11 +-
drivers/net/i40e/i40e_ethdev.c | 53 ++-
drivers/net/i40e/i40e_ethdev.h | 10 +-
drivers/net/i40e/i40e_fdir.c | 10 +-
drivers/net/i40e/i40e_flow.c | 2 +-
drivers/net/i40e/i40e_pf.c | 8 +-
drivers/net/i40e/i40e_rxtx.c | 20 +-
drivers/net/i40e/i40e_rxtx_vec_altivec.c | 2 +-
drivers/net/i40e/i40e_rxtx_vec_neon.c | 4 +-
drivers/net/i40e/i40e_rxtx_vec_sse.c | 6 +-
drivers/net/i40e/rte_pmd_i40e.c | 2 +-
drivers/net/iavf/iavf_ethdev.c | 6 +-
drivers/net/iavf/iavf_ipsec_crypto.c | 38 +-
drivers/net/iavf/iavf_ipsec_crypto.h | 6 +-
drivers/net/iavf/iavf_rxtx.c | 104 +++--
drivers/net/iavf/iavf_rxtx.h | 2 -
drivers/net/iavf/iavf_rxtx_vec_sse.c | 4 +-
drivers/net/iavf/iavf_vchnl.c | 6 +-
drivers/net/ice/base/ice_flex_pipe.c | 11 +-
drivers/net/ice/base/ice_flex_type.h | 1 +
drivers/net/ice/base/ice_protocol_type.h | 1 +
drivers/net/ice/base/ice_switch.c | 1 +
drivers/net/ice/ice_dcf.c | 2 +-
drivers/net/ice/ice_dcf_ethdev.c | 15 +-
drivers/net/ice/ice_dcf_ethdev.h | 1 +
drivers/net/ice/ice_dcf_parent.c | 18 +-
drivers/net/ice/ice_ethdev.c | 14 +-
drivers/net/ice/ice_ethdev.h | 2 +
drivers/net/ice/ice_fdir_filter.c | 32 ++
drivers/net/ice/ice_generic_flow.c | 4 +-
drivers/net/ice/ice_rxtx.c | 27 +-
drivers/net/ice/ice_rxtx_vec_common.h | 5 +-
drivers/net/ice/ice_rxtx_vec_sse.c | 4 +-
drivers/net/ice/ice_switch_filter.c | 45 +-
drivers/net/igc/igc_filter.c | 2 +-
drivers/net/igc/igc_txrx.c | 4 +-
drivers/net/ionic/ionic_if.h | 6 +-
drivers/net/ipn3ke/ipn3ke_ethdev.c | 2 +-
drivers/net/ipn3ke/ipn3ke_ethdev.h | 4 +-
drivers/net/ipn3ke/ipn3ke_flow.c | 2 +-
drivers/net/ipn3ke/ipn3ke_representor.c | 12 +-
drivers/net/ipn3ke/meson.build | 2 +-
drivers/net/ixgbe/ixgbe_bypass.c | 2 +-
drivers/net/ixgbe/ixgbe_bypass_api.h | 4 +-
drivers/net/ixgbe/ixgbe_ethdev.c | 65 ++-
drivers/net/ixgbe/ixgbe_ethdev.h | 2 +-
drivers/net/ixgbe/ixgbe_fdir.c | 2 +-
drivers/net/ixgbe/ixgbe_flow.c | 4 +-
drivers/net/ixgbe/ixgbe_ipsec.c | 2 +-
drivers/net/ixgbe/ixgbe_pf.c | 2 +-
drivers/net/ixgbe/ixgbe_rxtx.c | 10 +-
drivers/net/ixgbe/ixgbe_rxtx_vec_sse.c | 13 +-
drivers/net/kni/rte_eth_kni.c | 2 +-
drivers/net/memif/memif_socket.c | 5 +-
drivers/net/memif/rte_eth_memif.c | 21 +-
drivers/net/mlx4/meson.build | 2 +-
drivers/net/mlx4/mlx4.h | 2 +-
drivers/net/mlx4/mlx4_ethdev.c | 2 +-
drivers/net/mlx5/linux/mlx5_ethdev_os.c | 63 ++-
drivers/net/mlx5/linux/mlx5_flow_os.c | 3 +-
drivers/net/mlx5/linux/mlx5_os.c | 203 ++++----
drivers/net/mlx5/linux/mlx5_verbs.c | 4 +-
drivers/net/mlx5/linux/mlx5_vlan_os.c | 2 +-
drivers/net/mlx5/mlx5.c | 43 +-
drivers/net/mlx5/mlx5.h | 27 +-
drivers/net/mlx5/mlx5_defs.h | 6 +-
drivers/net/mlx5/mlx5_devx.c | 6 +-
drivers/net/mlx5/mlx5_ethdev.c | 2 +-
drivers/net/mlx5/mlx5_flow.c | 403 ++++++++++------
drivers/net/mlx5/mlx5_flow.h | 24 +-
drivers/net/mlx5/mlx5_flow_aso.c | 117 ++---
drivers/net/mlx5/mlx5_flow_dv.c | 234 ++++++----
drivers/net/mlx5/mlx5_flow_flex.c | 14 +-
drivers/net/mlx5/mlx5_flow_meter.c | 39 +-
drivers/net/mlx5/mlx5_flow_verbs.c | 89 +++-
drivers/net/mlx5/mlx5_rx.c | 24 +-
drivers/net/mlx5/mlx5_rx.h | 15 +-
drivers/net/mlx5/mlx5_rxq.c | 269 +++++++----
drivers/net/mlx5/mlx5_rxtx_vec.c | 8 +-
drivers/net/mlx5/mlx5_rxtx_vec_altivec.h | 2 +-
drivers/net/mlx5/mlx5_rxtx_vec_neon.h | 2 +-
drivers/net/mlx5/mlx5_rxtx_vec_sse.h | 2 +-
drivers/net/mlx5/mlx5_trigger.c | 12 +-
drivers/net/mlx5/mlx5_tx.c | 2 +-
drivers/net/mlx5/mlx5_tx.h | 1 -
drivers/net/mlx5/mlx5_utils.c | 43 +-
drivers/net/mlx5/mlx5_utils.h | 30 +-
drivers/net/mlx5/windows/mlx5_flow_os.c | 4 +-
drivers/net/mlx5/windows/mlx5_os.c | 54 ++-
drivers/net/mvneta/mvneta_ethdev.c | 2 +-
drivers/net/mvpp2/mrvl_ethdev.c | 2 +-
drivers/net/mvpp2/mrvl_qos.c | 4 +-
drivers/net/netvsc/hn_nvs.c | 2 +-
drivers/net/netvsc/hn_rxtx.c | 4 +-
drivers/net/netvsc/hn_vf.c | 2 +-
drivers/net/nfb/nfb.h | 4 -
drivers/net/nfb/nfb_ethdev.c | 15 +-
drivers/net/nfb/nfb_rxmode.c | 20 +-
drivers/net/nfp/nfp_common.c | 4 -
drivers/net/nfp/nfp_ethdev.c | 2 +
drivers/net/nfp/nfp_ethdev_vf.c | 2 +
drivers/net/nfp/nfp_rxtx.c | 2 +
drivers/net/nfp/nfpcore/nfp-common/nfp_resid.h | 6 +-
drivers/net/nfp/nfpcore/nfp_cppcore.c | 2 +-
drivers/net/nfp/nfpcore/nfp_nsp.h | 2 +-
drivers/net/nfp/nfpcore/nfp_resource.c | 2 +-
drivers/net/nfp/nfpcore/nfp_rtsym.c | 2 +-
drivers/net/nfp/nfpcore/nfp_target.h | 26 +-
drivers/net/ngbe/base/ngbe_dummy.h | 4 +
drivers/net/ngbe/base/ngbe_eeprom.c | 22 +-
drivers/net/ngbe/base/ngbe_hw.c | 247 +++++-----
drivers/net/ngbe/base/ngbe_hw.h | 3 +
drivers/net/ngbe/base/ngbe_mbx.c | 22 -
drivers/net/ngbe/base/ngbe_mng.c | 71 ++-
drivers/net/ngbe/base/ngbe_mng.h | 21 +
drivers/net/ngbe/base/ngbe_phy.c | 30 +-
drivers/net/ngbe/base/ngbe_phy_mvl.c | 13 +-
drivers/net/ngbe/base/ngbe_phy_rtl.c | 10 +-
drivers/net/ngbe/base/ngbe_phy_yt.c | 16 +-
drivers/net/ngbe/base/ngbe_regs.h | 51 +-
drivers/net/ngbe/base/ngbe_type.h | 10 +
drivers/net/ngbe/ngbe_ethdev.c | 133 ++----
drivers/net/ngbe/ngbe_ethdev.h | 1 +
drivers/net/ngbe/ngbe_logs.h | 7 +-
drivers/net/ngbe/ngbe_pf.c | 2 +-
drivers/net/octeontx/octeontx_ethdev.c | 2 +-
drivers/net/octeontx2/otx2_ethdev_irq.c | 2 +-
drivers/net/octeontx2/otx2_ptp.c | 2 +-
drivers/net/octeontx2/otx2_tx.h | 4 +-
drivers/net/octeontx2/otx2_vlan.c | 2 +-
drivers/net/octeontx_ep/otx2_ep_vf.c | 2 +-
drivers/net/octeontx_ep/otx_ep_vf.c | 2 +-
drivers/net/pfe/pfe_ethdev.c | 2 +-
drivers/net/pfe/pfe_hal.c | 2 +-
drivers/net/pfe/pfe_hif.c | 4 +-
drivers/net/pfe/pfe_hif.h | 2 +-
drivers/net/pfe/pfe_hif_lib.c | 8 +-
drivers/net/qede/qede_debug.c | 6 +-
drivers/net/qede/qede_ethdev.c | 2 +-
drivers/net/qede/qede_rxtx.c | 161 +++----
drivers/net/qede/qede_rxtx.h | 2 +-
drivers/net/sfc/sfc.c | 2 +-
drivers/net/sfc/sfc_dp.c | 2 +-
drivers/net/sfc/sfc_dp_rx.h | 4 +-
drivers/net/sfc/sfc_ef100.h | 2 +-
drivers/net/sfc/sfc_ef100_rx.c | 2 +-
drivers/net/sfc/sfc_ef10_essb_rx.c | 2 +-
drivers/net/sfc/sfc_ef10_rx_ev.h | 2 +-
drivers/net/sfc/sfc_ethdev.c | 6 -
drivers/net/sfc/sfc_flow.c | 8 +-
drivers/net/sfc/sfc_flow_tunnel.c | 4 +-
drivers/net/sfc/sfc_intr.c | 2 +-
drivers/net/sfc/sfc_repr_proxy.c | 5 +
drivers/net/sfc/sfc_rx.c | 6 +-
drivers/net/sfc/sfc_sw_stats.c | 2 +-
drivers/net/sfc/sfc_tx.c | 10 +-
drivers/net/softnic/rte_eth_softnic_flow.c | 2 +-
drivers/net/tap/rte_eth_tap.c | 82 +++-
drivers/net/tap/tap_bpf_api.c | 4 +-
drivers/net/tap/tap_flow.c | 4 +-
drivers/net/thunderx/nicvf_svf.c | 2 +-
drivers/net/txgbe/base/meson.build | 2 +-
drivers/net/txgbe/base/txgbe_eeprom.c | 41 +-
drivers/net/txgbe/base/txgbe_hw.c | 202 ++------
drivers/net/txgbe/base/txgbe_mbx.c | 38 --
drivers/net/txgbe/base/txgbe_mng.c | 15 +-
drivers/net/txgbe/base/txgbe_osdep.h | 1 +
drivers/net/txgbe/base/txgbe_phy.c | 88 +---
drivers/net/txgbe/base/txgbe_vf.c | 12 +-
drivers/net/txgbe/txgbe_ethdev.c | 11 +-
drivers/net/txgbe/txgbe_ethdev_vf.c | 6 +-
drivers/net/txgbe/txgbe_ipsec.c | 2 +-
drivers/net/txgbe/txgbe_logs.h | 7 +-
drivers/net/txgbe/txgbe_pf.c | 2 +-
drivers/net/virtio/virtio_ethdev.c | 7 +-
drivers/net/virtio/virtio_pci.c | 2 +-
drivers/net/virtio/virtio_rxtx.c | 6 +-
drivers/net/virtio/virtio_rxtx_packed.h | 3 +-
drivers/net/virtio/virtio_rxtx_packed_avx.h | 2 +-
drivers/net/virtio/virtio_user/vhost_user.c | 6 +-
drivers/net/virtio/virtio_user_ethdev.c | 1 +
drivers/net/virtio/virtqueue.c | 2 +-
drivers/net/virtio/virtqueue.h | 4 +-
drivers/raw/dpaa2_qdma/dpaa2_qdma.c | 2 +-
drivers/raw/dpaa2_qdma/dpaa2_qdma.h | 4 +-
drivers/raw/ifpga/base/ifpga_defines.h | 6 +-
drivers/raw/ifpga/base/opae_spi.c | 12 +
drivers/raw/ifpga/base/opae_spi.h | 4 +
drivers/raw/ifpga/base/opae_spi_transaction.c | 215 +++++----
drivers/raw/ifpga/ifpga_rawdev.c | 173 ++++---
drivers/raw/ifpga/ifpga_rawdev.h | 9 +-
drivers/raw/ntb/ntb.c | 4 +
drivers/raw/ntb/ntb.h | 2 +-
drivers/regex/mlx5/mlx5_rxp.c | 2 +-
drivers/vdpa/ifc/base/ifcvf.c | 14 +-
drivers/vdpa/mlx5/mlx5_vdpa.c | 4 +-
drivers/vdpa/mlx5/mlx5_vdpa_mem.c | 2 +-
drivers/vdpa/mlx5/mlx5_vdpa_virtq.c | 2 +-
drivers/vdpa/sfc/sfc_vdpa.c | 3 +-
drivers/vdpa/sfc/sfc_vdpa_ops.c | 4 +-
examples/bbdev_app/main.c | 2 +-
examples/bond/main.c | 4 +-
examples/distributor/main.c | 2 +-
examples/dma/dmafwd.c | 2 +-
examples/ethtool/lib/rte_ethtool.c | 2 +-
examples/ethtool/lib/rte_ethtool.h | 4 +-
examples/flow_classify/flow_classify.c | 2 +-
examples/ip_reassembly/main.c | 8 +-
examples/ipsec-secgw/event_helper.c | 19 +-
examples/ipsec-secgw/ipsec-secgw.c | 21 +-
examples/ipsec-secgw/ipsec_process.c | 6 +-
examples/ipsec-secgw/ipsec_worker.c | 15 +-
examples/ipsec-secgw/sa.c | 6 +-
examples/ipsec-secgw/sp4.c | 2 +-
examples/ipsec-secgw/sp6.c | 2 +-
examples/ipsec-secgw/test/common_defs.sh | 4 +-
examples/kni/main.c | 4 +-
examples/l2fwd-cat/l2fwd-cat.c | 2 +-
examples/l2fwd-crypto/main.c | 2 +-
examples/l2fwd-event/l2fwd_event_generic.c | 2 +-
examples/l2fwd-event/l2fwd_event_internal_port.c | 2 +-
examples/l2fwd-jobstats/main.c | 2 +-
examples/l3fwd-acl/main.c | 6 +-
examples/l3fwd-power/main.c | 4 +-
examples/l3fwd/l3fwd.h | 4 +
examples/l3fwd/l3fwd_common.h | 8 +-
examples/l3fwd/l3fwd_event.c | 2 -
examples/l3fwd/l3fwd_event_internal_port.c | 2 +
examples/l3fwd/l3fwd_neon.h | 2 +-
examples/l3fwd/l3fwd_sse.h | 2 +-
examples/l3fwd/main.c | 59 ++-
examples/multi_process/hotplug_mp/commands.c | 2 +-
examples/multi_process/simple_mp/main.c | 2 +-
examples/multi_process/symmetric_mp/main.c | 2 +-
examples/ntb/ntb_fwd.c | 2 +-
examples/packet_ordering/main.c | 2 +-
examples/performance-thread/common/lthread.c | 6 +-
examples/performance-thread/common/lthread_diag.c | 2 +-
examples/performance-thread/common/lthread_int.h | 2 +-
examples/performance-thread/common/lthread_tls.c | 2 +-
examples/performance-thread/l3fwd-thread/main.c | 12 +-
.../performance-thread/pthread_shim/pthread_shim.h | 2 +-
examples/pipeline/examples/registers.spec | 2 +-
examples/qos_sched/args.c | 5 +-
examples/qos_sched/cmdline.c | 2 +-
examples/server_node_efd/node/node.c | 2 +-
examples/skeleton/basicfwd.c | 2 +-
examples/vhost/main.c | 93 ++--
examples/vm_power_manager/channel_monitor.c | 2 +-
examples/vm_power_manager/power_manager.h | 2 +-
examples/vmdq/main.c | 2 +-
kernel/freebsd/meson.build | 4 +-
kernel/linux/kni/kni_fifo.h | 2 +-
kernel/linux/kni/kni_misc.c | 12 +-
kernel/linux/kni/meson.build | 10 +-
kernel/linux/meson.build | 9 +-
lib/acl/acl_bld.c | 2 +-
lib/acl/acl_run_altivec.h | 2 +-
lib/acl/acl_run_avx512.c | 2 +-
lib/acl/acl_run_avx512x16.h | 14 +-
lib/acl/acl_run_avx512x8.h | 12 +-
lib/acl/rte_acl_osdep.h | 8 +
lib/bpf/bpf_convert.c | 4 +-
lib/bpf/bpf_def.h | 8 +
lib/bpf/bpf_impl.h | 6 +-
lib/compressdev/rte_compressdev_internal.h | 13 +-
lib/cryptodev/cryptodev_pmd.h | 8 +
lib/cryptodev/rte_crypto.h | 9 +
lib/cryptodev/rte_crypto_asym.h | 2 +-
lib/distributor/rte_distributor_single.c | 3 +-
lib/dmadev/rte_dmadev.h | 4 +-
lib/dmadev/rte_dmadev_pmd.h | 2 +
lib/eal/arm/include/rte_cycles_32.h | 2 +-
lib/eal/common/eal_common_devargs.c | 1 +
lib/eal/common/eal_common_dynmem.c | 4 +
lib/eal/common/eal_common_proc.c | 20 +-
lib/eal/freebsd/eal_interrupts.c | 4 +-
lib/eal/freebsd/include/rte_os.h | 8 +
lib/eal/include/generic/rte_pflock.h | 2 +-
lib/eal/include/generic/rte_ticketlock.h | 14 +-
lib/eal/include/meson.build | 1 +
lib/eal/include/rte_bitops.h | 8 +
lib/eal/include/rte_branch_prediction.h | 8 +
lib/eal/include/rte_compat.h | 8 +
lib/eal/include/rte_hypervisor.h | 8 +
lib/eal/include/rte_keepalive.h | 8 +
lib/eal/include/rte_malloc.h | 4 +-
lib/eal/include/rte_pci_dev_feature_defs.h | 8 +
lib/eal/include/rte_pci_dev_features.h | 8 +
lib/eal/include/rte_time.h | 8 +
lib/eal/include/rte_trace_point.h | 2 +-
lib/eal/include/rte_trace_point_register.h | 8 +
lib/eal/linux/eal.c | 4 +
lib/eal/linux/eal_dev.c | 5 +-
lib/eal/linux/eal_interrupts.c | 4 +-
lib/eal/linux/eal_memalloc.c | 8 +-
lib/eal/linux/eal_vfio.h | 3 +-
lib/eal/linux/eal_vfio_mp_sync.c | 8 +
lib/eal/linux/include/rte_os.h | 8 +
lib/eal/windows/eal_memalloc.c | 6 +-
lib/eal/windows/eal_windows.h | 2 +-
lib/eal/windows/include/dirent.h | 4 +-
lib/eal/windows/include/fnmatch.h | 4 +-
lib/eal/x86/include/rte_atomic.h | 2 +-
lib/efd/rte_efd.c | 2 +-
lib/ethdev/ethdev_driver.h | 26 ++
lib/ethdev/ethdev_pci.h | 13 +-
lib/ethdev/ethdev_vdev.h | 8 +
lib/ethdev/rte_dev_info.h | 8 +
lib/ethdev/rte_ethdev.c | 28 +-
lib/ethdev/rte_ethdev.h | 4 +-
lib/ethdev/version.map | 1 +
lib/eventdev/eventdev_pmd.h | 4 +
lib/eventdev/eventdev_pmd_pci.h | 8 +
lib/eventdev/eventdev_pmd_vdev.h | 8 +
lib/eventdev/rte_event_eth_rx_adapter.c | 142 ++++--
lib/eventdev/rte_event_eth_tx_adapter.c | 14 +-
lib/eventdev/rte_event_ring.h | 9 +
lib/eventdev/rte_event_timer_adapter.h | 4 +
lib/eventdev/rte_eventdev.h | 14 +-
lib/fib/rte_fib.c | 6 +-
lib/fib/rte_fib.h | 4 +-
lib/fib/rte_fib6.c | 6 +-
lib/fib/rte_fib6.h | 4 +-
lib/gpudev/version.map | 2 +
lib/graph/rte_graph_worker.h | 2 +-
lib/ipsec/ipsec_telemetry.c | 2 +-
lib/ipsec/rte_ipsec_group.h | 4 +-
lib/ipsec/rte_ipsec_sad.h | 2 +-
lib/ipsec/sa.c | 2 +-
lib/kni/rte_kni_common.h | 8 +
lib/mbuf/rte_mbuf_core.h | 2 +-
lib/meson.build | 2 +-
lib/metrics/rte_metrics_telemetry.h | 7 +
lib/net/rte_l2tpv2.h | 36 +-
lib/pcapng/rte_pcapng.c | 4 +-
lib/pipeline/rte_swx_ctl.c | 52 ++-
lib/pipeline/rte_swx_ctl.h | 4 +-
lib/pipeline/rte_swx_pipeline.c | 2 +-
lib/pipeline/rte_swx_pipeline_internal.h | 4 +-
lib/pipeline/rte_swx_pipeline_spec.c | 2 +-
lib/power/power_cppc_cpufreq.c | 2 +-
lib/regexdev/rte_regexdev.h | 10 +-
lib/regexdev/rte_regexdev_driver.h | 3 +
lib/regexdev/version.map | 11 +
lib/ring/rte_ring.c | 4 +-
lib/ring/rte_ring_core.h | 2 +-
lib/sched/rte_pie.c | 22 +-
lib/sched/rte_pie.h | 6 +-
lib/sched/rte_red.h | 4 +-
lib/sched/rte_sched.c | 2 +-
lib/sched/rte_sched.h | 2 +-
lib/stack/meson.build | 1 +
lib/table/rte_swx_table.h | 2 +-
lib/table/rte_swx_table_selector.h | 2 +-
lib/table/rte_table_hash_func.h | 32 +-
lib/telemetry/rte_telemetry.h | 8 +
lib/telemetry/telemetry.c | 2 +-
lib/telemetry/telemetry_json.h | 2 +-
lib/vhost/rte_vdpa.h | 9 +
lib/vhost/rte_vhost.h | 2 +
lib/vhost/rte_vhost_async.h | 8 +
lib/vhost/rte_vhost_crypto.h | 8 +
lib/vhost/vdpa_driver.h | 8 +
lib/vhost/version.map | 2 +-
lib/vhost/vhost.h | 29 +-
lib/vhost/vhost_user.c | 148 +++---
lib/vhost/virtio_net.c | 11 +-
meson.build | 4 +-
745 files changed, 6605 insertions(+), 3994 deletions(-)
Adham Masarwah (2):
net/mlx5: fix destroying empty matchers list
app/testpmd: fix show RSS RETA on Windows
Ajit Khaparde (7):
net/bnxt: fix ring teardown
net/bnxt: fix PAM4 mask setting
net/bnxt: fix crash by validating pointer
net/bnxt: check VF representor pointer before access
net/bnxt: fix VF resource allocation strategy
net/bnxt: set HW coalescing parameters
net/bnxt: fix ring calculation for representors
Alexander Kozyrev (4):
net/mlx5: fix maximum packet headers size for TSO
net/mlx5: fix MPRQ WQE size assertion
net/mlx5: fix committed bucket size
net/mlx5: fix meter capabilities reporting
Ali Alnubani (1):
doc: fix typos and punctuation in flow API guide
Anatoly Burakov (1):
net/qede: fix redundant condition in debug code
Andy Pei (1):
vdpa/ifc: fix log info mismatch
Ankur Dwivedi (1):
common/cnxk: fix NPC key extraction validation
Anoob Joseph (4):
common/cnxk: fix reset of fields
crypto/cnxk: fix inflight count calculation
crypto/cnxk: fix extend tail calculation
crypto/cnxk: fix update of number of descriptors
Arek Kusztal (1):
cryptodev: fix RSA key type name
Asaf Ravid (1):
net/cnxk: fix promiscuous mode in multicast enable flow
Ashwin Sekhar T K (1):
mempool/cnxk: fix batch allocation failure path
Bin Zheng (1):
net/ixgbe: add vector Rx parameter check
Bing Zhao (5):
common/mlx5: fix probing failure code
app/testpmd: fix raw encap of GENEVE option
net/mlx5: fix matcher priority with ICMP or ICMPv6
net/mlx5: remove unused reference counter
net/mlx5: fix configuration without Rx queue
Brian Dooley (13):
eal: add missing C++ guards
telemetry: add missing C++ guards
ethdev: add missing C++ guards
metrics: add missing C++ guards
acl: add missing C++ guards
compressdev: add missing C++ guards
eventdev: add missing C++ guards
kni: add missing C++ guards
vhost: add missing C++ guards
bpf: add missing C++ guards
cryptodev: add missing C++ guards
examples/l2fwd-crypto: fix port mask overflow
crypto/virtio: fix out-of-bounds access
Bruce Richardson (23):
doc: remove dependency on findutils on FreeBSD
dma/idxd: fix burst capacity calculation
dma/idxd: fix paths to driver sysfs directory
dma/idxd: fix wrap-around in burst capacity calculation
build: fix warnings when running external commands
build: remove deprecated Meson functions
eal: fix C++ include
eventdev: fix C++ include
graph: fix C++ include
ipsec: fix C++ include
table: fix C++ include
vhost: fix C++ include
ethdev: fix cast for C++ compatibility
test/dma: fix missing checks for device capacity
dma/idxd: configure maximum batch size to high value
doc: improve configuration examples in idxd guide
distributor: fix potential overflow
eal/freebsd: add missing C++ include guards
compressdev: fix missing space in log macro
cryptodev: fix clang C++ include
eventdev: fix clang C++ include
doc: replace characters for (R) symbol in Linux guide
doc: fix missing note on UIO module in Linux guide
Chandubabu Namburu (1):
net/axgbe: use PCI root complex device to distinguish device
Chenbo Xia (1):
vhost: fix queue number check when setting inflight FD
Chengchang Tang (1):
net/bonding: fix offloading configuration
Chengwen Feng (2):
net/hns3: delete duplicated RSS type
dma/hisilicon: use common PCI device naming
Chuanshe Zhang (1):
examples/flow_classify: fix failure message
Ciara Loftus (2):
net/af_xdp: fix build with -Wunused-function
net/af_xdp: ensure socket is deleted on Rx queue setup error
Ciara Power (4):
crypto/ipsec_mb: fix queue setup null pointer dereference
crypto/ipsec_mb: fix queue cleanup null pointer dereference
crypto/ipsec_mb: fix tainted data for session
crypto/ipsec_mb: remove useless check
Cristian Dumitrescu (2):
pipeline: fix annotation checks
pipeline: fix table state memory allocation
Dapeng Yu (2):
net/ice: track DCF state of PF
net/i40e: enable maximum frame size at port level
Dariusz Sosnowski (3):
net/mlx5: fix inline length for multi-segment TSO
net/mlx5: fix MPLS/GRE Verbs spec ordering
net/mlx5: fix VLAN push action validation
David Marchand (8):
devtools: fix comment detection in forbidden token check
stack: fix stubs header export
test/mbuf: fix mbuf data content check
ethdev: fix MAC address in telemetry device info
net/af_xdp: add missing trailing newline in logs
devtools: remove event/dlb exception in ABI check
vhost: fix FD leak with inflight messages
bpf: fix build with some libpcap version on FreeBSD
Dawid Gorecki (2):
net/ena: fix reset reason being overwritten
net/ena: check memory BAR before initializing LLQ
Devendra Singh Rawat (3):
net/qede: fix Tx completion
net/qede: fix Rx bulk
net/qede: fix maximum Rx packet length
Dmitry Kozlyuk (8):
net/mlx5: fix GCC uninitialized variable warning
net/mlx5: relax headroom assertion
app/testpmd: fix external buffer allocation
common/mlx5: fix MR lookup for non-contiguous mempool
common/mlx5: add Netlink event helpers
net/mlx5: fix link status change detection
net/mlx5: fix initial link status detection
net/mlx5: fix modify port action validation
Elena Agostini (3):
gpu/cuda: fix memory list cleanup
doc: add CUDA driver features
gpu/cuda: fix dependency loading path
Ferruh Yigit (2):
net/bonding: fix MTU set for slaves
ethdev: fix doxygen comments for device info struct
Geoffrey Le Gourriérec (1):
net/bnxt: restore dependency on kernel modules
Gerry Gribbon (1):
app/regex: fix number of matches
Gowrishankar Muthukrishnan (6):
event/cnxk: fix variables casting
event/cnxk: fix uninitialized local variables
common/cnxk: add missing checks of return values
common/cnxk fix unintended sign extension
common/cnxk: fix uninitialized pointer read
net/cnxk: fix uninitialized local variable
Gregory Etelson (11):
net/mlx5: fix RSS expansion with explicit next protocol
net/mlx5: fix GRE protocol type translation for Verbs
net/mlx5: fix GRE item translation in Verbs
net/mlx5: reduce flex item flow handle size
net/mlx5: fix flex item header length translation
net/mlx5: fix inet IPIP protocol type
net/mlx5: fix next protocol RSS expansion
net/mlx5: fix flex item availability
app/testpmd: fix GTP header parsing in checksum engine
app/testpmd: fix flow rule with flex input link
net/mlx5: fix flex item availability
Haiyue Wang (2):
net/iavf: remove git residue symbol
doc: fix KNI PMD name typo
Harman Kalra (3):
common/cnxk: reset stale values on error debug registers
common/cnxk: always use single interrupt ID with NIX
common/cnxk: fix mbuf data offset for VF
Harold Huang (2):
net/virtio-user: fix resource leak on probing failure
net/kni: fix config initialization
Heinrich Kuhn (1):
net/nfp: free HW ring memzone on queue release
Hemant Agrawal (1):
crypto/dpaax_sec: fix auth/cipher xform chain checks
Honnappa Nagarahalli (3):
examples/distributor: reduce Tx queue number to 1
examples/l3fwd: share queue size variables
examples/l3fwd: make Rx and Tx queue size configurable
Huisong Li (10):
net/hns3: fix mailbox wait time
net/hns3: fix using enum as boolean
net/hns3: fix max packet size rollback in PF
net/hns3: fix insecure way to query MAC statistics
net/hns3: fix double decrement of secondary count
net/hns3: fix operating queue when TCAM table is invalid
kni: fix freeing order in device release
net/hns3: fix RSS TC mode entry
net/hns3: fix VF RSS TC mode entry
net/hns3: increase time waiting for PF reset completion
Ivan Malov (8):
net/sfc: validate queue span when parsing flow action RSS
net/sfc: fix lock releases
net/sfc: do not push fast free offload to default TxQ config
net/sfc: demand Tx fast free offload on EF10 simple datapath
common/sfc_efx/base: fix recirculation ID set in outer rules
common/sfc_efx/base: add missing handler for 1-byte fields
net/sfc: fix flow tunnel support detection
net/sfc: reduce log level of tunnel restore info error
Jakub Poczatek (1):
doc: fix FIPS guide
Jiawei Wang (4):
net/mlx5: fix NIC egress flow mismatch in switchdev mode
net/mlx5: fix sample flow action on trusted device
net/mlx5: fix implicit tag insertion with sample action
net/mlx5: fix port matching in sample flow rule
Jiawen Wu (8):
net/ngbe: fix Rx by initializing packet buffer early
net/ngbe: fix missed link interrupt
net/ngbe: fix Tx hang on queue disable
net/ngbe: fix packet statistics
net/txgbe: fix link up and down
net/txgbe: fix KR auto-negotiation
net/ngbe: fix debug logs
net/txgbe: fix debug logs
Jie Hai (1):
net/hns3: remove duplicate macro definition
Jie Wang (1):
net: fix L2TPv2 common header
Jie Zhou (2):
eal/windows: fix error code for not supported API
test/mem: fix error check
Josh Soref (1):
fix spelling in comments and strings
Junfeng Guo (3):
net/ice: fix pattern check for flow director parser
net/ice: fix pattern check in flow director
raw/ntb: clear all valid doorbell bits on init
Junjie Wan (1):
net/bonding: fix slaves initializing on MTU setting
Junxiao Shi (1):
net/af_xdp: fix custom program loading with multiple queues
Juraj Linkeš (1):
config/arm: add values for native armv7
Kai Ji (2):
test/crypto: fix out-of-place SGL in raw datapath
crypto/qat: fix GEN4 AEAD job in raw data path
Kalesh AP (15):
net/bnxt: fix multicast address set
net/bnxt: fix multicast MAC restore during reset recovery
net/bnxt: fix queue stop operation
net/bnxt: restore RSS configuration after reset recovery
net/bnxt: fix restoring VLAN filtering after recovery
net/bnxt: cap maximum number of unicast MAC addresses
net/bnxt: set fast-path pointers only if recovery succeeds
net/bnxt: add null check for mark table
net/bnxt: fix flow create when RSS is disabled
net/bnxt: get maximum supported multicast filters count
net/bnxt: fix handling of VF configuration change
net/bnxt: fix xstats query
net/bnxt: fix check for autoneg enablement
net/bnxt: handle ring cleanup in case of error
net/bnxt: fix memzone allocation per VNIC
Karl Bonde Torp (1):
build: fix build on FreeBSD with Meson 0.61.1
Kathleen Capella (2):
net/iavf: count continuous DD bits for Arm
net/iavf: count continuous DD bits for Arm in flex Rx
Kevin Liu (2):
net/ice: fix Tx checksum offload
net/ice: fix Tx offload path choice
Kevin Traynor (6):
maintainers: update for stable branches
build: suppress rte_crypto_asym_op abi check
Revert "crypto/ipsec_mb: fix length and offset settings"
Revert "net/mlx5: fix flex item availability"
version: 21.11.1-rc1
version: 21.11.1
Kumara Parameshwaran (2):
ethdev: add internal function to device struct from name
net/tap: fix to populate FDs in secondary process
Lance Richardson (2):
buildtools: fix AVX512 check for Python 3.5
net/bnxt: fix xstats names query overrun
Leyi Rong (1):
net/iavf: fix potential out-of-bounds access
Lijun Ou (1):
net/hns3: fix RSS key with null
Lior Margalit (1):
net/mlx5: fix assertion on flags set in packet mbuf
Madhuker Mythri (1):
devargs: fix crash with uninitialized parsing
Martijn Bakker (1):
pflock: fix header file installation
Martin Spinler (2):
net/nfb: fix array indexes in deinit functions
net/nfb: fix multicast/promiscuous mode switching
Marvin Liu (1):
net/virtio: fix slots number when indirect feature on
Matan Azrad (1):
vdpa/mlx5: workaround queue stop with traffic
Maxime Coquelin (1):
vhost: fix unsafe vring addresses modifications
Maxime Gouin (3):
bus/ifpga: remove useless check while browsing devices
net/nfp: remove duplicated check when setting MAC address
net/nfp: remove useless range checks
Megha Ajmera (1):
examples/qos_sched: fix core mask overflow
Michael Baum (17):
common/mlx5: add minimum WQE size for striding RQ
net/mlx5: improve stride parameter names
net/mlx5: fix MPRQ stride devargs adjustment
common/mlx5: fix error handling in multi-class probe
net/mlx5: fix memory socket selection in ASO management
common/mlx5: fix missing validation in devargs parsing
net/mlx5: fix sibling device config check
net/mlx5: fix ineffective metadata argument adjustment
net/mlx5: fix ASO CT object release
net/mlx5: fix errno update in shared context creation
net/mlx5: fix entry in shared Rx queues list
doc: remove obsolete vector Tx explanations from mlx5 guide
doc: replace broken links in mlx guides
doc: correct name of BlueField-2 in mlx5 guide
net/mlx5: fix shared counter flag in flow validation
net/mlx5: fix check in count action validation
common/mlx5: consider local functions as internal
Michal Krawczyk (6):
net/ena: remove unused enumeration
net/ena: remove unused offload variables
net/ena: skip timer if reset is triggered
net/ena: fix meta descriptor DF flag setup
net/ena: fix checksum flag for L4
bus/pci: assign driver pointer before mapping
Michal Wilczynski (1):
net/ice: fix overwriting of LSE bit by DCF
Min Hu (Connor) (6):
net/hns3: fix Rx/Tx functions update
net/hns3: fix vector Rx/Tx when PTP enabled
net/bonding: fix promiscuous and allmulticast state
net/bonding: fix reference count on mbufs
app/testpmd: fix bonding mode set
app/testpmd: check starting port is not in bonding
Naga Harish K S V (2):
eventdev/eth_tx: fix queue add error code
eventdev/eth_rx: fix queue config query
Nicolas Chautru (1):
baseband/acc100: avoid out-of-bounds access
Nipun Gupta (1):
examples/l3fwd: fix Rx burst size for event mode
Nithin Dabilpuram (11):
examples/ipsec-secgw: fix eventdev start sequence
examples/ipsec-secgw: fix default flow rule creation
common/cnxk: fix shift offset for TL3 length disable
common/cnxk: fix byte order of frag sizes and infos
common/cnxk: fix null pointer dereferences
common/cnxk: fix uninitialized variables
examples/ipsec-secgw: fix buffer freeing in vector mode
net/cnxk: fix inline device RQ tag mask
net/cnxk: register callback early to handle initial packets
net/cnxk: fix inline IPsec security error handling
common/cnxk: fix bitmap usage for TM
Pablo de Lara (9):
crypto/ipsec_mb: fix buffer overrun
crypto/ipsec_mb: check missing operation types
crypto/ipsec_mb: fix ZUC authentication verify
crypto/ipsec_mb: fix ZUC operation overwrite
crypto/ipsec_mb: fix length and offset settings
test/efd: fix sockets mask size
efd: fix uninitialized structure
crypto/ipsec_mb: fix length and offset settings
crypto/ipsec_mb: fix GMAC parameters setting
Pavan Nikhilesh (6):
eventdev/eth_rx: fix missing internal port checks
event/cnxk: fix QoS devargs parsing
common/cnxk: add workaround for vWQE flush
config: align mempool elements to 128 bytes on CN10K
event/cnxk: fix sub-event clearing mask length
event/cnxk: fix Rx adapter config check
Peng Yu (1):
vhost: fix linker script syntax
Piotr Bronowski (2):
crypto/ipsec_mb: fix premature dereference
crypto/ipsec_mb: fix GCM requested digest length
Qi Zhang (2):
net/ice: fix Tx checksum offload capability
doc: update matching versions in ice guide
Radu Nicolau (5):
examples/ipsec-secgw: fix offload flag used for TSO IPv6
net/iavf: fix segmentation offload condition
net/iavf: fix segmentation offload buffer size
net/iavf: support NAT-T / UDP encapsulation
net/iavf: fix AES-GMAC IV size
Rahul Bhansali (2):
net/cnxk: fix mbuf data length
examples/l3fwd: fix buffer overflow in Tx
Rahul Lakkireddy (1):
net/cxgbe: fix dangling pointer by mailbox access rework
Raja Zidane (8):
net/mlx5: fix mark enabling for Rx
app/testpmd: fix GENEVE parsing in checksum mode
app/compress-perf: fix cycle count operations allocation
app/compress-perf: optimize operations pool allocation
compress/mlx5: support out-of-space status
app/compress-perf: fix socket ID type during init
app/compress-perf: fix number of queue pairs to setup
compressdev: fix socket ID type
Rakesh Kudurumalla (3):
net/cnxk: fix build with GCC 12
net/cnxk: fix RSS RETA table update
net/cnxk: fix build with optimization
Rashmi Shetty (1):
doc: fix dlb2 guide
Reshma Pattan (1):
app/pdump: abort on multi-core capture limit
Rongwei Liu (3):
net/mlx5: fix shared RSS destroy
net/mlx5: fix meter creation default state
net/mlx5: forbid multiple ASO actions in a single rule
Ruifeng Wang (1):
config: add arch define for Arm
Satheesh Paul (5):
common/cnxk: fix nibble parsing order when dumping MCAM
common/cnxk: fix flow deletion
common/cnxk: fix log level during MCAM allocation
common/cnxk: fix base rule merge
net/cnxk: fix Rx/Tx function update
Sean Morrissey (2):
app/testpmd: fix dereference before null check
doc: fix telemetry example in cryptodev guide
Shijith Thotton (1):
crypto/cnxk: enable allocated queues only
Shun Hao (3):
net/mlx5: fix meter sub-policy creation
net/mlx5: fix E-Switch manager vport ID
net/mlx5: fix meter policy creation assert
Simei Su (1):
net/ice: fix mbuf offload flag for Rx timestamp
Srikanth Yalavarthi (1):
dma/cnxk: fix installing internal headers
Stephen Douthit (1):
net/ixgbe: fix FSP check for X550EM devices
Stephen Hemminger (7):
eal/linux: log hugepage create errors with filename
net/memif: remove unnecessary Rx interrupt stub
ipc: end multiprocess thread during cleanup
vfio: cleanup the multiprocess sync handle
pcapng: handle failure of link status query
test/bpf: skip dump if conversion fails
app/dumpcap: check for failure to set promiscuous
Steve Yang (4):
app/testpmd: fix stack overflow for EEPROM display
net/i40e: fix unintentional integer overflow
eal/linux: fix illegal memory access in uevent handler
net/iavf: fix function pointer in multi-process
Suanming Mou (3):
net/mlx5: set flow error for hash list create
net/mlx5: remove unused function
net/mlx5: fix indexed pool fetch overlap
Thinh Tran (1):
net/mlx5: fix CPU socket ID for Rx queue creation
Thomas Monjalon (6):
doc: replace deprecated distutils version parsing
dmadev: add missing header include
app/testpmd: fix build without drivers
regexdev: fix section attribute of symbols
build: hide local symbols in shared libraries
devtools: fix symbols check
Tianfei Zhang (2):
raw/ifpga/base: fix SPI transaction
raw/ifpga: fix thread closing
Tianli Lai (1):
examples/kni: add missing trailing newline in log
Timothy McDaniel (3):
event/dlb2: update rolling mask used for dequeue
event/dlb2: poll HW CQ inflights before mapping queue
event/dlb2: add shift value check in sparse dequeue
Vanshika Shukla (2):
net/dpaa2: fix unregistering interrupt handler
net/dpaa2: fix timestamping for IEEE1588
Viacheslav Ovsiienko (4):
net/mlx5: fix modify field MAC address offset
app/testpmd: fix Tx scheduling interval
net/mlx5: fix metadata endianness in modify field action
doc: fix modify field action description for mlx5
Vladimir Medvedkin (1):
app/fib: fix division by zero
Wei Huang (5):
raw/ifpga/base: fix port feature ID
raw/ifpga: fix variable initialization in probing
raw/ifpga: fix interrupt handle allocation
raw/ifpga: fix monitor thread
raw/ifpga: fix build with optimization
Weiguo Li (14):
common/cnxk: fix error checking
net/enic: fix dereference before null check
net/dpaa2: fix null pointer dereference
regex/mlx5: fix memory allocation check
net/memif: remove pointer deference before null check
net/iavf: fix null pointer dereference
vdpa/sfc: fix null dereference during config
vdpa/sfc: fix null dereference during removal
compress/octeontx: fix null pointer dereference
eventdev/eth_rx: fix parameters parsing memory leak
net/sfc: fix memory allocation size for cache
net/txgbe: fix queue statistics mapping
sched: remove useless malloc in PIE data init
net/bnxt: fix null dereference in session cleanup
Wenwu Ma (1):
examples/vhost: fix launch with physical port
Wenxuan Wu (1):
eal/linux: fix device monitor stop return
Xiaoyu Min (1):
net/mlx5: reject jump to root table
Xuan Ding (2):
vhost: fix field naming in guest page struct
vhost: fix physical address mapping
Xueming Li (1):
net/virtio: fix Tx queue 0 overriden by queue 128
Yajun Wu (1):
common/mlx5: fix queue pair ack timeout configuration
Yiding Zhou (1):
net/ice: fix build with 16-byte Rx descriptor
Yu Wenjun (1):
net/bonding: fix RSS with early configure
Yuan Wang (1):
vhost: fix guest to host physical address mapping
Yunjian Wang (12):
net/bonding: fix mode type mismatch
ethdev: fix Rx queue telemetry memory leak on failure
net/ice: fix link up when starting device
net/virtio-user: check FD flags getting failure
net/virtio: fix uninitialized RSS key
ring: fix error code when creating ring
net/ixgbe: check filter init failure
mem: check allocation in dynamic hugepage init
ethdev: remove unnecessary null check
net/ixgbe: reset security context pointer on close
net/txgbe: reset security context pointer on close
net/iavf: reset security context pointer on stop
Yuying Zhang (1):
net/ice/base: add profile validation on switch filter
Zhihong Wang (1):
ring: fix overflow in memory size calculation
^ permalink raw reply [relevance 1%]
* Re: [dpdk-dev] [PATCH v4] ethdev: mtr: support protocol based input color selection
2022-04-21 18:02 5% ` [dpdk-dev] [PATCH v4] ethdev: mtr: support protocol based " jerinj
@ 2022-04-26 10:19 0% ` Ray Kinsella
2022-05-01 14:46 5% ` [dpdk-dev] [PATCH v5] " jerinj
1 sibling, 0 replies; 200+ results
From: Ray Kinsella @ 2022-04-26 10:19 UTC (permalink / raw)
To: jerinj
Cc: dev, Cristian Dumitrescu, Thomas Monjalon, Ferruh Yigit,
Andrew Rybchenko, ajit.khaparde, aboyer, beilei.xing,
bruce.richardson, chas3, chenbo.xia, ciara.loftus, dsinghrawat,
ed.czeck, evgenys, grive, g.singh, zhouguoyang, haiyue.wang,
hkalra, heinrich.kuhn, hemant.agrawal, hyonkim, igorch,
irusskikh, jgrajcia, jasvinder.singh, jianwang, jiawenwu,
jingjing.wu, johndale, john.miller, linville, keith.wiles,
kirankumark, oulijun, lironh, longli, mw, spinler, matan,
matt.peters, maxime.coquelin, mk, humin29, pnalla, ndabilpuram,
qiming.yang, qi.z.zhang, radhac, rahul.lakkireddy, rmody,
rosen.xu, sachin.saxena, skoteshwar, shshaikh, shaibran,
shepard.siegel, asomalap, somnath.kotur, sthemmin,
steven.webster, skori, mtetsuyah, vburru, viacheslavo,
xiao.w.wang, cloud.wangxiaoyun, yisen.zhuang, yongwang,
xuanziyang2
jerinj@marvell.com writes:
> From: Jerin Jacob <jerinj@marvell.com>
>
> Currently, meter object supports only DSCP based on input color table,
> The patch enhance that to support VLAN based input color table,
> color table based on inner field for the tunnel use case, and
> support for fallback color per meter if packet based on a different field.
>
> All of the above features are exposed through capability and added
> additional capability to specify the implementation supports
> more than one input color table per ethdev port.
>
> Suggested-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
> Signed-off-by: Jerin Jacob <jerinj@marvell.com>
> ---
> v4..v3:
>
> - Aligned with community meeting call which is documented in
> https://patches.dpdk.org/project/dpdk/patch/20220301085824.1041009-1-skori@marvell.com/
> as last message. With following exception,
> - Used RTE_MTR_COLOR_IN_*_DSCP instead of RTE_MTR_COLOR_IN_*_IP as
> there is already dscp_table and rte_mtr_meter_dscp_table_update() API.
> Changing above symbols break existing application for no good.
> - Updated 22.07 release notes
> - Remove testpmd changes from series to finalize the API spec first and
> then we can send testpmd changes.
>
> v3..v2:
>
> - Fix input color flags as a bitmask
> - Add definitions for newly added API
>
> v2..v1:
> - Fix seperate typo
>
> v1..RFC:
>
> Address the review comments by Cristian at
> https://patches.dpdk.org/project/dpdk/patch/20210820082401.3778736-1-jerinj@marvell.com/
>
> - Moved to v22.07 release
> - Updated rte_mtr_input_color_method to support all VLAN, DSCP, Inner
> cases
> - Added input_color_method
> - Removed union between vlan_table and dscp_table
> - Kept VLAN instead of PCP as HW coloring based on DEI(1bit), PCP(3
> bits)
>
> .../traffic_metering_and_policing.rst | 33 ++++
> doc/guides/rel_notes/release_22_07.rst | 10 +
> lib/ethdev/rte_mtr.c | 23 +++
> lib/ethdev/rte_mtr.h | 186 +++++++++++++++++-
> lib/ethdev/rte_mtr_driver.h | 19 ++
> lib/ethdev/version.map | 4 +
> 6 files changed, 265 insertions(+), 10 deletions(-)
>
> diff --git a/doc/guides/prog_guide/traffic_metering_and_policing.rst b/doc/guides/prog_guide/traffic_metering_and_policing.rst
> index ceb5a96488..75deabbaf1 100644
> --- a/doc/guides/prog_guide/traffic_metering_and_policing.rst
> +++ b/doc/guides/prog_guide/traffic_metering_and_policing.rst
> @@ -21,6 +21,7 @@ The main features are:
> * Policer actions (per meter output color): recolor, drop
> * Statistics (per policer output color)
> * Chaining multiple meter objects
> +* Protocol based input color selection
>
> Configuration steps
> -------------------
> @@ -105,3 +106,35 @@ traffic meter and policing library.
> * Adding one (or multiple) actions of the type ``RTE_FLOW_ACTION_TYPE_METER``
> to the list of meter actions (``struct rte_mtr_meter_policy_params::actions``)
> specified per color as show in :numref:`figure_rte_mtr_chaining`.
> +
> +Protocol based input color selection
> +------------------------------------
> +
> +The API supports selecting the input color based on the packet content.
> +Following is the API usage model for the same.
> +
> +#. Probe the protocol based input color selection device capabilities using
> + following parameter using ``rte_mtr_capabilities_get()`` API.
> +
> + * ``struct rte_mtr_capabilities::input_color_proto_mask;``
> + * ``struct rte_mtr_capabilities::separate_input_color_table_per_port``
> +
> +#. When creating the meter object using ``rte_mtr_create()``, configure
> + relevant input color selection parameters such as
> +
> + * Input color protocols with ``struct rte_mtr_params::input_color_proto_mask``
> +
> + * If ``struct rte_mtr_params::input_color_proto_mask`` has multiple bits set then
> + ``rte_mtr_color_in_protocol_priority_set()`` shall be used to set the priority,
> + in the order, in which protocol to be used to find the input color.
> +
> + * Fill the tables ``struct rte_mtr_params::dscp_table``,
> + ``struct rte_mtr_params::vlan_table`` based on input color selected.
> +
> + * Update the ``struct rte_mtr_params::default_input_color`` to determine
> + the default input color in case the input packet does not match
> + the input color method.
> +
> + * If needed, update the input color table at runtime using
> + ``rte_mtr_meter_vlan_table_update()`` and ``rte_mtr_meter_dscp_table_update()``
> + APIs.
> diff --git a/doc/guides/rel_notes/release_22_07.rst b/doc/guides/rel_notes/release_22_07.rst
> index 42a5f2d990..746622f9b3 100644
> --- a/doc/guides/rel_notes/release_22_07.rst
> +++ b/doc/guides/rel_notes/release_22_07.rst
> @@ -55,6 +55,13 @@ New Features
> Also, make sure to start the actual text at the margin.
> =======================================================
>
> +* **Added protocol based input color for meter.**
> +
> + Added new APIs ``rte_mtr_color_in_protocol_priority_set()``,
> + ``rte_mtr_meter_vlan_table_update()`` and updated ``struct rte_mtr_params``
> + and ``struct rte_mtr_capabilities`` to support protocol based
> + input color for meter.
> +
>
> Removed Items
> -------------
> @@ -102,6 +109,9 @@ ABI Changes
>
> * No ABI change that would break compatibility with 21.11.
>
> +* Experimental structures ``struct rte_mtr_params``
> + and ``struct rte_mtr_capabilities`` updated to support
> + protocol based input color for meter.
>
> Known Issues
> ------------
> diff --git a/lib/ethdev/rte_mtr.c b/lib/ethdev/rte_mtr.c
> index e49fcf271c..a112fe65f5 100644
> --- a/lib/ethdev/rte_mtr.c
> +++ b/lib/ethdev/rte_mtr.c
> @@ -207,6 +207,29 @@ rte_mtr_meter_dscp_table_update(uint16_t port_id,
> mtr_id, dscp_table, error);
> }
>
> +/** MTR object meter VLAN table update */
> +int
> +rte_mtr_meter_vlan_table_update(uint16_t port_id, uint32_t mtr_id,
> + enum rte_color *vlan_table,
> + struct rte_mtr_error *error)
> +{
> + struct rte_eth_dev *dev = &rte_eth_devices[port_id];
> + return RTE_MTR_FUNC(port_id, meter_vlan_table_update)(dev,
> + mtr_id, vlan_table, error);
> +}
> +
> +/** Set the priority for input color protocol on MTR object */
> +int
> +rte_mtr_color_in_protocol_priority_set(uint16_t port_id, uint32_t mtr_id,
> + enum rte_mtr_color_in_protocol proto,
> + uint32_t priority,
> + struct rte_mtr_error *error)
> +{
> + struct rte_eth_dev *dev = &rte_eth_devices[port_id];
> + return RTE_MTR_FUNC(port_id, in_proto_prio_set)(dev,
> + mtr_id, proto, priority, error);
> +}
> +
> /** MTR object enabled stats update */
> int
> rte_mtr_stats_update(uint16_t port_id,
> diff --git a/lib/ethdev/rte_mtr.h b/lib/ethdev/rte_mtr.h
> index 40df0888c8..76ffbcf724 100644
> --- a/lib/ethdev/rte_mtr.h
> +++ b/lib/ethdev/rte_mtr.h
> @@ -213,6 +213,52 @@ struct rte_mtr_meter_policy_params {
> const struct rte_flow_action *actions[RTE_COLORS];
> };
>
> +/**
> + * Input color protocol method
> + */
> +enum rte_mtr_color_in_protocol {
> + /**
> + * If the input packet has at least one VLAN label, its input color is
> + * detected by the outermost VLAN DEI(1bit), PCP(3 bits)
> + * indexing into the struct rte_mtr_params::vlan_table.
> + * Otherwise, the *default_input_color* is applied.
> + *
> + * @see struct rte_mtr_params::default_input_color
> + * @see struct rte_mtr_params::vlan_table
> + */
> + RTE_MTR_COLOR_IN_PROTO_OUTER_VLAN = RTE_BIT64(0),
> + /**
> + * If the input packet has at least one VLAN label, its input color is
> + * detected by the innermost VLAN DEI(1bit), PCP(3 bits)
> + * indexing into the struct rte_mtr_params::vlan_table.
> + * Otherwise, the *default_input_color* is applied.
> + *
> + * @see struct rte_mtr_params::default_input_color
> + * @see struct rte_mtr_params::vlan_table
> + */
> + RTE_MTR_COLOR_IN_PROTO_INNER_VLAN = RTE_BIT64(1),
> + /**
> + * If the input packet is IPv4 or IPv6, its input color is detected by
> + * the outermost DSCP field indexing into the
> + * struct rte_mtr_params::dscp_table.
> + * Otherwise, the *default_input_color* is applied.
> + *
> + * @see struct rte_mtr_params::default_input_color
> + * @see struct rte_mtr_params::dscp_table
> + */
> + RTE_MTR_COLOR_IN_PROTO_OUTER_DSCP = RTE_BIT64(2),
> + /**
> + * If the input packet is IPv4 or IPv6, its input color is detected by
> + * the innermost DSCP field indexing into the
> + * struct rte_mtr_params::dscp_table.
> + * Otherwise, the *default_input_color* is applied.
> + *
> + * @see struct rte_mtr_params::default_input_color
> + * @see struct rte_mtr_params::dscp_table
> + */
> + RTE_MTR_COLOR_IN_PROTO_INNER_DSCP = RTE_BIT64(3),
> +};
> +
> /**
> * Parameters for each traffic metering & policing object
> *
> @@ -233,20 +279,58 @@ struct rte_mtr_params {
> */
> int use_prev_mtr_color;
>
> - /** Meter input color. When non-NULL: it points to a pre-allocated and
> + /** Meter input color based on IP DSCP protocol field.
> + *
> + * Valid when *input_color_proto_mask* set to any of the following
> + * RTE_MTR_COLOR_IN_PROTO_OUTER_DSCP,
> + * RTE_MTR_COLOR_IN_PROTO_INNER_DSCP
> + *
> + * When non-NULL: it points to a pre-allocated and
> * pre-populated table with exactly 64 elements providing the input
> * color for each value of the IPv4/IPv6 Differentiated Services Code
> - * Point (DSCP) input packet field. When NULL: it is equivalent to
> - * setting this parameter to an all-green populated table (i.e. table
> - * with all the 64 elements set to green color). The color blind mode
> - * is configured by setting *use_prev_mtr_color* to 0 and *dscp_table*
> - * to either NULL or to an all-green populated table. When
> - * *use_prev_mtr_color* is non-zero value or when *dscp_table* contains
> - * at least one yellow or red color element, then the color aware mode
> - * is configured.
> + * Point (DSCP) input packet field.
> + *
> + * When NULL: it is equivalent to setting this parameter to an all-green
> + * populated table (i.e. table with all the 64 elements set to green
> + * color). The color blind mode is configured by setting
> + * *use_prev_mtr_color* to 0 and *dscp_table* to either NULL or to an
> + * all-green populated table.
> + *
> + * When *use_prev_mtr_color* is non-zero value or when *dscp_table*
> + * contains at least one yellow or red color element, then the color
> + * aware mode is configured.
> + *
> + * @see enum rte_mtr_color_in_protocol::RTE_MTR_COLOR_IN_PROTO_OUTER_DSCP
> + * @see enum rte_mtr_color_in_protocol::RTE_MTR_COLOR_IN_PROTO_INNER_DSCP
> + * @see struct rte_mtr_params::input_color_proto_mask
> */
> enum rte_color *dscp_table;
> -
> + /** Meter input color based on VLAN DEI(1bit), PCP(3 bits) protocol
> + * fields.
> + *
> + * Valid when *input_color_proto_mask* set to any of the following
> + * RTE_MTR_COLOR_IN_PROTO_OUTER_VLAN,
> + * RTE_MTR_COLOR_IN_PROTO_INNER_VLAN
> + *
> + * When non-NULL: it points to a pre-allocated and pre-populated
> + * table with exactly 16 elements providing the input color for
> + * each value of the DEI(1bit), PCP(3 bits) input packet field.
> + *
> + * When NULL: it is equivalent to setting this parameter to an
> + * all-green populated table (i.e. table with
> + * all the 16 elements set to green color). The color blind mode
> + * is configured by setting *use_prev_mtr_color* to 0 and
> + * *vlan_table* to either NULL or to an all-green populated table.
> + *
> + * When *use_prev_mtr_color* is non-zero value
> + * or when *vlan_table* contains at least one yellow or
> + * red color element, then the color aware mode is configured.
> + *
> + * @see enum rte_mtr_color_in_protocol::RTE_MTR_COLOR_IN_PROTO_OUTER_VLAN
> + * @see enum rte_mtr_color_in_protocol::RTE_MTR_COLOR_IN_PROTO_INNER_VLAN
> + * @see struct rte_mtr_params::input_color_proto_mask
> + */
> + enum rte_color *vlan_table;
> /** Non-zero to enable the meter, zero to disable the meter at the time
> * of MTR object creation. Ignored when the meter profile indicated by
> * *meter_profile_id* is set to NONE.
> @@ -261,6 +345,25 @@ struct rte_mtr_params {
>
> /** Meter policy ID. @see rte_mtr_meter_policy_add() */
> uint32_t meter_policy_id;
> +
> + /** Set of input color protocols to be enabled.
> + *
> + * Set value to zero to configure as color blind mode.
> + *
> + * When multiple bits set then rte_mtr_color_in_protocol_priority_set()
> + * shall be used to set the priority, in the order, in which protocol
> + * to be used to find the inpput color.
> + *
> + * @see enum rte_mtr_color_in_protocol
> + * @see rte_mtr_color_in_protocol_priority_set()
> + */
> + uint64_t input_color_proto_mask;
> +
> + /** Input color to be set for the input packet when none of the
> + * enabled input color methods is applicable to the input packet.
> + * Ignored when this when *input_color_proto_mask* set to zero.
> + */
> + enum rte_color default_input_color;
> };
>
> /**
> @@ -417,6 +520,16 @@ struct rte_mtr_capabilities {
> * @see enum rte_mtr_stats_type
> */
> uint64_t stats_mask;
> +
> + /** Set of supported input color protocol.
> + * @see enum rte_mtr_color_in_protocol
> + */
> + uint64_t input_color_proto_mask;
> +
> + /** When non-zero, it indicates that driver supports separate
> + * input color table for given ethdev port.
> + */
> + int separate_input_color_table_per_port;
> };
>
> /**
> @@ -832,6 +945,59 @@ rte_mtr_meter_dscp_table_update(uint16_t port_id,
> enum rte_color *dscp_table,
> struct rte_mtr_error *error);
>
> +/**
> + * MTR object VLAN table update
> + *
> + * @param[in] port_id
> + * The port identifier of the Ethernet device.
> + * @param[in] mtr_id
> + * MTR object ID. Needs to be valid.
> + * @param[in] vlan_table
> + * When non-NULL: it points to a pre-allocated and pre-populated table with
> + * exactly 16 elements providing the input color for each value of the
> + * each value of the DEI(1bit), PCP(3 bits) input packet field.
> + * When NULL: it is equivalent to setting this parameter to an "all-green"
> + * populated table (i.e. table with all the 16 elements set to green color).
> + * @param[out] error
> + * Error details. Filled in only on error, when not NULL.
> + * @return
> + * 0 on success, non-zero error code otherwise.
> + */
> +__rte_experimental
> +int
> +rte_mtr_meter_vlan_table_update(uint16_t port_id, uint32_t mtr_id,
> + enum rte_color *vlan_table,
> + struct rte_mtr_error *error);
> +/**
> + * Set the priority for input color protocol
> + *
> + * When multiple bits set in struct rte_mtr_params::input_color_proto_mask
> + * then this API shall be used to set the priority, in the order, in
> + * which protocol to be used to find the input color.
> + *
> + * @param[in] port_id
> + * The port identifier of the Ethernet device.
> + * @param[in] mtr_id
> + * MTR object ID. Needs to be valid.
> + * @param[in] proto
> + * Input color protocol to apply priority.
> + * MTR object's *input_color_proto_mask* should be configured
> + * with proto value.
> + * @param[in] priority
> + * Input color protocol priority. Value zero indicates
> + * the highest priority.
> + * @param[out] error
> + * Error details. Filled in only on error, when not NULL.
> + * @return
> + * 0 on success, non-zero error code otherwise.
> + *
> + * @see rte_mtr_params::input_color_proto_mask
> + */
> +__rte_experimental
> +int
> +rte_mtr_color_in_protocol_priority_set(uint16_t port_id, uint32_t mtr_id,
> + enum rte_mtr_color_in_protocol proto, uint32_t priority,
> + struct rte_mtr_error *error);
> /**
> * MTR object enabled statistics counters update
> *
> diff --git a/lib/ethdev/rte_mtr_driver.h b/lib/ethdev/rte_mtr_driver.h
> index ee8c6ef7ad..827952adc6 100644
> --- a/lib/ethdev/rte_mtr_driver.h
> +++ b/lib/ethdev/rte_mtr_driver.h
> @@ -97,6 +97,19 @@ typedef int (*rte_mtr_meter_dscp_table_update_t)(struct rte_eth_dev *dev,
> enum rte_color *dscp_table,
> struct rte_mtr_error *error);
>
> +/** @internal mtr object meter vlan table update. */
> +typedef int (*rte_mtr_meter_vlan_table_update_t)(struct rte_eth_dev *dev,
> + uint32_t mtr_id,
> + enum rte_color *vlan_table,
> + struct rte_mtr_error *error);
> +
> +/** @internal Set the priority for input color protocol on MTR object. */
> +typedef int (*rte_mtr_meter_color_in_proto_prio_set_t)(struct rte_eth_dev *dev,
> + uint32_t mtr_id,
> + enum rte_mtr_color_in_protocol proto,
> + uint32_t priority,
> + struct rte_mtr_error *error);
> +
> /** @internal MTR object enabled stats update. */
> typedef int (*rte_mtr_stats_update_t)(struct rte_eth_dev *dev,
> uint32_t mtr_id,
> @@ -139,6 +152,12 @@ struct rte_mtr_ops {
> /** MTR object meter DSCP table update */
> rte_mtr_meter_dscp_table_update_t meter_dscp_table_update;
>
> + /** MTR object meter VLAN table update */
> + rte_mtr_meter_vlan_table_update_t meter_vlan_table_update;
> +
> + /** Set the priority for input color protocol on MTR object. */
> + rte_mtr_meter_color_in_proto_prio_set_t in_proto_prio_set;
> +
> /** MTR object enabled stats update */
> rte_mtr_stats_update_t stats_update;
>
> diff --git a/lib/ethdev/version.map b/lib/ethdev/version.map
> index 20391ab29e..cccbf6dee5 100644
> --- a/lib/ethdev/version.map
> +++ b/lib/ethdev/version.map
> @@ -279,6 +279,10 @@ EXPERIMENTAL {
> rte_flow_async_action_handle_create;
> rte_flow_async_action_handle_destroy;
> rte_flow_async_action_handle_update;
> +
> + # added in 22.07
Symbols are not in alphabetical order.
> + rte_mtr_meter_vlan_table_update;
> + rte_mtr_color_in_protocol_priority_set;
> };
>
> INTERNAL {
--
Regards, Ray K
^ permalink raw reply [relevance 0%]
* [PATCH 1/2] ci: switch to Ubuntu 20.04
@ 2022-04-26 7:18 4% David Marchand
2022-05-06 11:57 4% ` [PATCH v2 " David Marchand
0 siblings, 1 reply; 200+ results
From: David Marchand @ 2022-04-26 7:18 UTC (permalink / raw)
To: dev
Cc: Aaron Conole, Michael Santana, Ruifeng Wang, Jan Viktorin,
Bruce Richardson, David Christensen
Ubuntu 18.04 is now rather old.
Besides, other entities in our CI are also testing this distribution.
Switch to a newer Ubuntu release and benefit from more recent
tool(chain)s: for example, net/cnxk now builds fine and can be
re-enabled.
Signed-off-by: David Marchand <david.marchand@redhat.com>
---
.ci/linux-build.sh | 7 ++----
.github/workflows/build.yml | 22 +++++++++----------
config/arm/arm64_armv8_linux_clang_ubuntu2004 | 1 +
.../ppc/ppc64le-power8-linux-gcc-ubuntu2004 | 1 +
4 files changed, 14 insertions(+), 17 deletions(-)
create mode 120000 config/arm/arm64_armv8_linux_clang_ubuntu2004
create mode 120000 config/ppc/ppc64le-power8-linux-gcc-ubuntu2004
diff --git a/.ci/linux-build.sh b/.ci/linux-build.sh
index 6a937611fa..30119b61ba 100755
--- a/.ci/linux-build.sh
+++ b/.ci/linux-build.sh
@@ -38,18 +38,15 @@ catch_coredump() {
}
if [ "$AARCH64" = "true" ]; then
- # Note: common/cnxk is disabled for Ubuntu 18.04
- # https://bugs.dpdk.org/show_bug.cgi?id=697
- OPTS="$OPTS -Ddisable_drivers=common/cnxk"
if [ "${CC%%clang}" != "$CC" ]; then
- OPTS="$OPTS --cross-file config/arm/arm64_armv8_linux_clang_ubuntu1804"
+ OPTS="$OPTS --cross-file config/arm/arm64_armv8_linux_clang_ubuntu2004"
else
OPTS="$OPTS --cross-file config/arm/arm64_armv8_linux_gcc"
fi
fi
if [ "$PPC64LE" = "true" ]; then
- OPTS="$OPTS --cross-file config/ppc/ppc64le-power8-linux-gcc-ubuntu1804"
+ OPTS="$OPTS --cross-file config/ppc/ppc64le-power8-linux-gcc-ubuntu2004"
fi
if [ "$BUILD_DOCS" = "true" ]; then
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 22daaabb91..812aa7055d 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -30,43 +30,41 @@ jobs:
fail-fast: false
matrix:
config:
- - os: ubuntu-18.04
+ - os: ubuntu-20.04
compiler: gcc
library: static
- - os: ubuntu-18.04
+ - os: ubuntu-20.04
compiler: gcc
library: shared
mini: mini
- - os: ubuntu-18.04
+ - os: ubuntu-20.04
compiler: gcc
library: shared
checks: abi+doc+tests
- - os: ubuntu-18.04
+ - os: ubuntu-20.04
compiler: clang
library: static
- - os: ubuntu-18.04
+ - os: ubuntu-20.04
compiler: clang
library: shared
checks: doc+tests
- - os: ubuntu-18.04
+ - os: ubuntu-20.04
compiler: gcc
library: static
cross: i386
- # Note: common/cnxk is disabled for Ubuntu 18.04
- # https://bugs.dpdk.org/show_bug.cgi?id=697
- - os: ubuntu-18.04
+ - os: ubuntu-20.04
compiler: gcc
library: static
cross: aarch64
- - os: ubuntu-18.04
+ - os: ubuntu-20.04
compiler: gcc
library: shared
cross: aarch64
- - os: ubuntu-18.04
+ - os: ubuntu-20.04
compiler: gcc
library: static
cross: ppc64le
- - os: ubuntu-18.04
+ - os: ubuntu-20.04
compiler: gcc
library: shared
cross: ppc64le
diff --git a/config/arm/arm64_armv8_linux_clang_ubuntu2004 b/config/arm/arm64_armv8_linux_clang_ubuntu2004
new file mode 120000
index 0000000000..01f5b7643e
--- /dev/null
+++ b/config/arm/arm64_armv8_linux_clang_ubuntu2004
@@ -0,0 +1 @@
+arm64_armv8_linux_clang_ubuntu1804
\ No newline at end of file
diff --git a/config/ppc/ppc64le-power8-linux-gcc-ubuntu2004 b/config/ppc/ppc64le-power8-linux-gcc-ubuntu2004
new file mode 120000
index 0000000000..9d6139a19b
--- /dev/null
+++ b/config/ppc/ppc64le-power8-linux-gcc-ubuntu2004
@@ -0,0 +1 @@
+ppc64le-power8-linux-gcc-ubuntu1804
\ No newline at end of file
--
2.23.0
^ permalink raw reply [relevance 4%]
* Re: 21.11.1 patches review and test
2022-04-20 5:50 3% ` Christian Ehrhardt
@ 2022-04-25 13:39 0% ` Kevin Traynor
0 siblings, 0 replies; 200+ results
From: Kevin Traynor @ 2022-04-25 13:39 UTC (permalink / raw)
To: Christian Ehrhardt
Cc: stable, dev, Abhishek Marathe, Ali Alnubani, benjamin.walker,
David Christensen, hariprasad.govindharajan, Hemant Agrawal,
Ian Stokes, Jerin Jacob, John McNamara, Ju-Hyoung Lee,
Luca Boccassi, Pei Zhang, qian.q.xu, Raslan Darawsheh,
Thomas Monjalon, yuan.peng, zhaoyan.chen
On 20/04/2022 06:50, Christian Ehrhardt wrote:
> On Fri, Apr 1, 2022 at 12:22 PM Kevin Traynor<ktraynor@redhat.com> wrote:
>> Hi all,
>>
>> Here is a list of patches targeted for stable release 21.11.1.
>>
>> Please try and complete validation by April 13th.
>>
>> Please help with testing and validation of your use cases and report
>> any issues/results with reply-all to this mail. For the final release
>> the fixes and reported validations will be added to the release notes.
>>
>> A release candidate tarball can be found at:
>>
>> https://dpdk.org/browse/dpdk-stable/tag/?id=v21.11.1-rc1
>>
>> These patches are located at branch 21.11 of dpdk-stable repo:
>> https://dpdk.org/browse/dpdk-stable/
> Hi Kevin,
> now that the ABI change discussion has somewhat settled I have run the
> tests ignoring the symbols changes for now.
> All LGTM on Ubuntu 22.04 + OVS 2.17 + DPDK 21.11.1-rc1
>
> 1.0.0 (11:42:53): phys (BM) tests
> 1.1.0 (11:42:53): initialize environment
> 1.1.1 (11:44:54): testpmd => Pass
> 1.1.2 (11:45:43): check testpmd output => Pass
> 2.0.0 (11:45:43): prep virtual test environment
>
> 1.0.0 (11:48:05): virt tests
> 1.1.0 (11:48:05): initialize environment
> 3.0.0 (11:49:30): performance tests
> 3.1.0 (11:49:30): prep benchmarks
> 3.2.0 (11:49:51): performance tests
> 3.2.1 (11:50:02): test guest-openvswitch for OVS-5CPU => Pass
> 3.2.2 (12:09:30): test guest-dpdk-vhost-user-client-multiq for
> OVSDPDK-VUC => Pass
> 4.0.0 (12:28:54): VUC endurance checks
> 4.1.0 (12:28:54): prep VUC endurance tests
> 4.1.1 (12:41:59): start stop guests (client) => Pass
> 4.1.2 (13:48:30): add/remove ports (client) => Pass
> 4.2.0 (13:58:11): Final cleanup
>
> The above is kind of a high level test log, for the validation section
> of a stable release I usually use:
>
> * Build tests of DPDK & OVS 2.13.3 on Ubuntu 20.04 (meson based)
> * Functional and performance tests based on OVS-DPDK on x86_64
> * Autopkgtests for DPDK and OpenvSwitch
>
>
Thanks for the testing and Christian. I will add your summary to the
validation section.
^ permalink raw reply [relevance 0%]
* Re: kni: check abi version between kmod and lib
2022-04-24 8:51 15% ` [PATCH v3] " youcai
@ 2022-04-24 10:35 4% ` Stephen Coleman
0 siblings, 0 replies; 200+ results
From: Stephen Coleman @ 2022-04-24 10:35 UTC (permalink / raw)
To: dev; +Cc: Ray Kinsella, Stephen Hemminger, Ferruh Yigit, youcai
[-- Attachment #1: Type: text/plain, Size: 9534 bytes --]
execuse me, one of the Windows check is failing but I didn't find where's
the build log, nor to determine whether it is related.
> KNI ioctl functions copy data from userspace lib, and this interface
> of kmod is not compatible indeed. If the user use incompatible rte_kni.ko
> bad things happen: sometimes various fields contain garbage value,
> sometimes it cause a kmod soft lockup.
>
> Some common distros ship their own rte_kni.ko, so this is likely to
> happen.
>
> This patch add abi version checking between userland lib and kmod so
> that:
>
> * if kmod ioctl got a wrong abi magic, it refuse to go on
> * if userland lib, probed a wrong abi version via newly added ioctl, it
> also refuse to go on
>
> Bugzilla ID: 998
>
> Signed-off-by: youcai <omegacoleman@gmail.com>
>
> ---
> V3: fix code format issues
>
> V2: use ABI_VERSION instead of a new magic
> V2: fix some indent
> ---
> kernel/linux/kni/kni_misc.c | 42 ++++++++++++++++++++++++++++++++++++
> kernel/linux/kni/meson.build | 4 ++--
> lib/kni/meson.build | 1 +
> lib/kni/rte_kni.c | 18 ++++++++++++++++
> lib/kni/rte_kni_abi.h | 17 +++++++++++++++
> lib/kni/rte_kni_common.h | 3 +++
> 6 files changed, 83 insertions(+), 2 deletions(-)
> create mode 100644 lib/kni/rte_kni_abi.h
>
> diff --git a/kernel/linux/kni/kni_misc.c b/kernel/linux/kni/kni_misc.c
> index 780187d8bf..d92500414d 100644
> --- a/kernel/linux/kni/kni_misc.c
> +++ b/kernel/linux/kni/kni_misc.c
> @@ -17,6 +17,7 @@
> #include <net/netns/generic.h>
>
> #include <rte_kni_common.h>
> +#include <rte_kni_abi.h>
>
> #include "compat.h"
> #include "kni_dev.h"
> @@ -236,12 +237,26 @@ kni_release(struct inode *inode, struct file *file)
> return 0;
> }
>
> +static int
> +kni_check_abi_version_magic(uint16_t abi_version_magic)
> +{
> + if (abi_version_magic != RTE_KNI_ABI_VERSION_MAGIC) {
> + pr_err("KNI kmod ABI incompatible with librte_kni --
%u\n",
> +
RTE_KNI_ABI_VERSION_FROM_MAGIC(abi_version_magic));
> + return -1;
> + }
> + return 0;
> +}
> +
> static int
> kni_check_param(struct kni_dev *kni, struct rte_kni_device_info *dev)
> {
> if (!kni || !dev)
> return -1;
>
> + if (kni_check_abi_version_magic(dev->abi_version_magic) < 0)
> + return -1;
> +
> /* Check if network name has been used */
> if (!strncmp(kni->name, dev->name, RTE_KNI_NAMESIZE)) {
> pr_err("KNI name %s duplicated\n", dev->name);
> @@ -301,12 +316,19 @@ kni_ioctl_create(struct net *net, uint32_t
ioctl_num,
> struct rte_kni_device_info dev_info;
> struct net_device *net_dev = NULL;
> struct kni_dev *kni, *dev, *n;
> + uint16_t abi_version_magic;
>
> pr_info("Creating kni...\n");
> /* Check the buffer size, to avoid warning */
> if (_IOC_SIZE(ioctl_num) > sizeof(dev_info))
> return -EINVAL;
>
> + /* perform abi check ahead of copy, to avoid possible violation */
> + if (copy_from_user(&abi_version_magic, (void *)ioctl_param,
sizeof(uint16_t)))
> + return -EFAULT;
> + if (kni_check_abi_version_magic(abi_version_magic) < 0)
> + return -EINVAL;
> +
> /* Copy kni info from user space */
> if (copy_from_user(&dev_info, (void *)ioctl_param,
sizeof(dev_info)))
> return -EFAULT;
> @@ -451,10 +473,17 @@ kni_ioctl_release(struct net *net, uint32_t
ioctl_num,
> int ret = -EINVAL;
> struct kni_dev *dev, *n;
> struct rte_kni_device_info dev_info;
> + uint16_t abi_version_magic;
>
> if (_IOC_SIZE(ioctl_num) > sizeof(dev_info))
> return -EINVAL;
>
> + /* perform abi check ahead of copy, to avoid possible violation */
> + if (copy_from_user(&abi_version_magic, (void *)ioctl_param,
sizeof(uint16_t)))
> + return -EFAULT;
> + if (kni_check_abi_version_magic(abi_version_magic) < 0)
> + return -EINVAL;
> +
> if (copy_from_user(&dev_info, (void *)ioctl_param,
sizeof(dev_info)))
> return -EFAULT;
>
> @@ -484,6 +513,16 @@ kni_ioctl_release(struct net *net, uint32_t
ioctl_num,
> return ret;
> }
>
> +static int
> +kni_ioctl_abi_version(struct net *net, uint32_t ioctl_num,
> + unsigned long ioctl_param)
> +{
> + uint16_t abi_version = ABI_VERSION_MAJOR;
> + if (copy_to_user((void *)ioctl_param, &abi_version,
sizeof(uint16_t)))
> + return -EFAULT;
> + return 0;
> +}
> +
> static long
> kni_ioctl(struct file *file, unsigned int ioctl_num, unsigned long
ioctl_param)
> {
> @@ -505,6 +544,9 @@ kni_ioctl(struct file *file, unsigned int ioctl_num,
unsigned long ioctl_param)
> case _IOC_NR(RTE_KNI_IOCTL_RELEASE):
> ret = kni_ioctl_release(net, ioctl_num, ioctl_param);
> break;
> + case _IOC_NR(RTE_KNI_IOCTL_ABI_VERSION):
> + ret = kni_ioctl_abi_version(net, ioctl_num, ioctl_param);
> + break;
> default:
> pr_debug("IOCTL default\n");
> break;
> diff --git a/kernel/linux/kni/meson.build b/kernel/linux/kni/meson.build
> index 4c90069e99..c8cd23acd9 100644
> --- a/kernel/linux/kni/meson.build
> +++ b/kernel/linux/kni/meson.build
> @@ -3,12 +3,12 @@
>
> # For SUSE build check function arguments of ndo_tx_timeout API
> # Ref: https://jira.devtools.intel.com/browse/DPDK-29263
> -kmod_cflags = ''
> +kmod_cflags = '-DABI_VERSION_MAJOR=@0@'.format(abi_version.split('.')[0])
> file_path = kernel_source_dir + '/include/linux/netdevice.h'
> run_cmd = run_command('grep', 'ndo_tx_timeout', file_path, check: false)
>
> if run_cmd.stdout().contains('txqueue') == true
> - kmod_cflags = '-DHAVE_ARG_TX_QUEUE'
> + kmod_cflags += ' -DHAVE_ARG_TX_QUEUE'
> endif
>
>
> diff --git a/lib/kni/meson.build b/lib/kni/meson.build
> index 8a71d8ba6f..f22a27b15b 100644
> --- a/lib/kni/meson.build
> +++ b/lib/kni/meson.build
> @@ -14,3 +14,4 @@ endif
> sources = files('rte_kni.c')
> headers = files('rte_kni.h', 'rte_kni_common.h')
> deps += ['ethdev', 'pci']
> +cflags += ['-DABI_VERSION_MAJOR=@0@'.format(abi_version.split('.')[0])]
> diff --git a/lib/kni/rte_kni.c b/lib/kni/rte_kni.c
> index 7971c56bb4..9bdeeb3806 100644
> --- a/lib/kni/rte_kni.c
> +++ b/lib/kni/rte_kni.c
> @@ -22,6 +22,7 @@
> #include <rte_eal_memconfig.h>
> #include <rte_kni_common.h>
> #include "rte_kni_fifo.h"
> +#include "rte_kni_abi.h"
>
> #define MAX_MBUF_BURST_NUM 32
>
> @@ -113,6 +114,20 @@ rte_kni_init(unsigned int max_kni_ifaces
__rte_unused)
> }
> }
>
> + uint16_t abi_version;
> + int ret = ioctl(kni_fd, RTE_KNI_IOCTL_ABI_VERSION, &abi_version);
> + if (ret < 0) {
> + RTE_LOG(ERR, KNI, "Cannot verify rte_kni kmod ABI
version: ioctl failed\n");
> + return -1;
> + }
> + if (abi_version != ABI_VERSION_MAJOR) {
> + RTE_LOG(ERR, KNI,
> + "rte_kni kmod ABI version mismatch: "
> + "need %" PRIu16 " got %" PRIu16 "\n",
> + ABI_VERSION_MAJOR, abi_version);
> + return -1;
> + }
> +
> return 0;
> }
>
> @@ -255,6 +270,7 @@ rte_kni_alloc(struct rte_mempool *pktmbuf_pool,
> kni->ops.port_id = UINT16_MAX;
>
> memset(&dev_info, 0, sizeof(dev_info));
> + dev_info.abi_version_magic = RTE_KNI_ABI_VERSION_MAGIC;
> dev_info.core_id = conf->core_id;
> dev_info.force_bind = conf->force_bind;
> dev_info.group_id = conf->group_id;
> @@ -409,6 +425,8 @@ rte_kni_release(struct rte_kni *kni)
> if (!kni)
> return -1;
>
> + dev_info.abi_version_magic = RTE_KNI_ABI_VERSION_MAGIC;
> +
> kni_list = RTE_TAILQ_CAST(rte_kni_tailq.head, rte_kni_list);
>
> rte_mcfg_tailq_write_lock();
> diff --git a/lib/kni/rte_kni_abi.h b/lib/kni/rte_kni_abi.h
> new file mode 100644
> index 0000000000..7dde394c72
> --- /dev/null
> +++ b/lib/kni/rte_kni_abi.h
> @@ -0,0 +1,17 @@
> +/* SPDX-License-Identifier: (BSD-3-Clause OR LGPL-2.1) */
> +/*
> + * Copyright(c) 2007-2014 Intel Corporation.
> + */
> +
> +#ifndef _RTE_KNI_ABI_H_
> +#define _RTE_KNI_ABI_H_
> +
> +#ifndef ABI_VERSION_MAJOR
> +#error Need ABI_VERSION_MAJOR being the major part of dpdk/ABI_VERSION
> +#endif
> +#define RTE_KNI_ABI_VERSION_MAGIC_MASK 0xAAAA
> +#define RTE_KNI_ABI_VERSION_MAGIC (((ABI_VERSION_MAJOR) ^
RTE_KNI_ABI_VERSION_MAGIC_MASK))
> +#define RTE_KNI_ABI_VERSION_FROM_MAGIC(__magic) (((__magic) ^
RTE_KNI_ABI_VERSION_MAGIC_MASK))
> +
> +#endif
> +
> diff --git a/lib/kni/rte_kni_common.h b/lib/kni/rte_kni_common.h
> index 8d3ee0fa4f..f9432b742c 100644
> --- a/lib/kni/rte_kni_common.h
> +++ b/lib/kni/rte_kni_common.h
> @@ -102,6 +102,8 @@ struct rte_kni_mbuf {
> */
>
> struct rte_kni_device_info {
> + uint16_t abi_version_magic;
> +
> char name[RTE_KNI_NAMESIZE]; /**< Network device name for KNI */
>
> phys_addr_t tx_phys;
> @@ -139,6 +141,7 @@ struct rte_kni_device_info {
> #define RTE_KNI_IOCTL_TEST _IOWR(0, 1, int)
> #define RTE_KNI_IOCTL_CREATE _IOWR(0, 2, struct rte_kni_device_info)
> #define RTE_KNI_IOCTL_RELEASE _IOWR(0, 3, struct rte_kni_device_info)
> +#define RTE_KNI_IOCTL_ABI_VERSION _IOWR(0, 4, uint16_t)
>
> #ifdef __cplusplus
> }
> --
> 2.35.1
>
>
[-- Attachment #2: Type: text/html, Size: 12224 bytes --]
^ permalink raw reply [relevance 4%]
* [PATCH v3] kni: check abi version between kmod and lib
2022-04-21 4:38 16% kni: check abi version between kmod and lib Stephen Coleman
` (2 preceding siblings ...)
2022-04-21 16:34 15% ` [PATCH v2] " youcai
@ 2022-04-24 8:51 15% ` youcai
2022-04-24 10:35 4% ` Stephen Coleman
3 siblings, 1 reply; 200+ results
From: youcai @ 2022-04-24 8:51 UTC (permalink / raw)
To: dev; +Cc: Ray Kinsella, Stephen Hemminger, Ferruh Yigit, youcai
KNI ioctl functions copy data from userspace lib, and this interface
of kmod is not compatible indeed. If the user use incompatible rte_kni.ko
bad things happen: sometimes various fields contain garbage value,
sometimes it cause a kmod soft lockup.
Some common distros ship their own rte_kni.ko, so this is likely to
happen.
This patch add abi version checking between userland lib and kmod so
that:
* if kmod ioctl got a wrong abi magic, it refuse to go on
* if userland lib, probed a wrong abi version via newly added ioctl, it
also refuse to go on
Bugzilla ID: 998
Signed-off-by: youcai <omegacoleman@gmail.com>
---
V3: fix code format issues
V2: use ABI_VERSION instead of a new magic
V2: fix some indent
---
kernel/linux/kni/kni_misc.c | 42 ++++++++++++++++++++++++++++++++++++
kernel/linux/kni/meson.build | 4 ++--
lib/kni/meson.build | 1 +
lib/kni/rte_kni.c | 18 ++++++++++++++++
lib/kni/rte_kni_abi.h | 17 +++++++++++++++
lib/kni/rte_kni_common.h | 3 +++
6 files changed, 83 insertions(+), 2 deletions(-)
create mode 100644 lib/kni/rte_kni_abi.h
diff --git a/kernel/linux/kni/kni_misc.c b/kernel/linux/kni/kni_misc.c
index 780187d8bf..d92500414d 100644
--- a/kernel/linux/kni/kni_misc.c
+++ b/kernel/linux/kni/kni_misc.c
@@ -17,6 +17,7 @@
#include <net/netns/generic.h>
#include <rte_kni_common.h>
+#include <rte_kni_abi.h>
#include "compat.h"
#include "kni_dev.h"
@@ -236,12 +237,26 @@ kni_release(struct inode *inode, struct file *file)
return 0;
}
+static int
+kni_check_abi_version_magic(uint16_t abi_version_magic)
+{
+ if (abi_version_magic != RTE_KNI_ABI_VERSION_MAGIC) {
+ pr_err("KNI kmod ABI incompatible with librte_kni -- %u\n",
+ RTE_KNI_ABI_VERSION_FROM_MAGIC(abi_version_magic));
+ return -1;
+ }
+ return 0;
+}
+
static int
kni_check_param(struct kni_dev *kni, struct rte_kni_device_info *dev)
{
if (!kni || !dev)
return -1;
+ if (kni_check_abi_version_magic(dev->abi_version_magic) < 0)
+ return -1;
+
/* Check if network name has been used */
if (!strncmp(kni->name, dev->name, RTE_KNI_NAMESIZE)) {
pr_err("KNI name %s duplicated\n", dev->name);
@@ -301,12 +316,19 @@ kni_ioctl_create(struct net *net, uint32_t ioctl_num,
struct rte_kni_device_info dev_info;
struct net_device *net_dev = NULL;
struct kni_dev *kni, *dev, *n;
+ uint16_t abi_version_magic;
pr_info("Creating kni...\n");
/* Check the buffer size, to avoid warning */
if (_IOC_SIZE(ioctl_num) > sizeof(dev_info))
return -EINVAL;
+ /* perform abi check ahead of copy, to avoid possible violation */
+ if (copy_from_user(&abi_version_magic, (void *)ioctl_param, sizeof(uint16_t)))
+ return -EFAULT;
+ if (kni_check_abi_version_magic(abi_version_magic) < 0)
+ return -EINVAL;
+
/* Copy kni info from user space */
if (copy_from_user(&dev_info, (void *)ioctl_param, sizeof(dev_info)))
return -EFAULT;
@@ -451,10 +473,17 @@ kni_ioctl_release(struct net *net, uint32_t ioctl_num,
int ret = -EINVAL;
struct kni_dev *dev, *n;
struct rte_kni_device_info dev_info;
+ uint16_t abi_version_magic;
if (_IOC_SIZE(ioctl_num) > sizeof(dev_info))
return -EINVAL;
+ /* perform abi check ahead of copy, to avoid possible violation */
+ if (copy_from_user(&abi_version_magic, (void *)ioctl_param, sizeof(uint16_t)))
+ return -EFAULT;
+ if (kni_check_abi_version_magic(abi_version_magic) < 0)
+ return -EINVAL;
+
if (copy_from_user(&dev_info, (void *)ioctl_param, sizeof(dev_info)))
return -EFAULT;
@@ -484,6 +513,16 @@ kni_ioctl_release(struct net *net, uint32_t ioctl_num,
return ret;
}
+static int
+kni_ioctl_abi_version(struct net *net, uint32_t ioctl_num,
+ unsigned long ioctl_param)
+{
+ uint16_t abi_version = ABI_VERSION_MAJOR;
+ if (copy_to_user((void *)ioctl_param, &abi_version, sizeof(uint16_t)))
+ return -EFAULT;
+ return 0;
+}
+
static long
kni_ioctl(struct file *file, unsigned int ioctl_num, unsigned long ioctl_param)
{
@@ -505,6 +544,9 @@ kni_ioctl(struct file *file, unsigned int ioctl_num, unsigned long ioctl_param)
case _IOC_NR(RTE_KNI_IOCTL_RELEASE):
ret = kni_ioctl_release(net, ioctl_num, ioctl_param);
break;
+ case _IOC_NR(RTE_KNI_IOCTL_ABI_VERSION):
+ ret = kni_ioctl_abi_version(net, ioctl_num, ioctl_param);
+ break;
default:
pr_debug("IOCTL default\n");
break;
diff --git a/kernel/linux/kni/meson.build b/kernel/linux/kni/meson.build
index 4c90069e99..c8cd23acd9 100644
--- a/kernel/linux/kni/meson.build
+++ b/kernel/linux/kni/meson.build
@@ -3,12 +3,12 @@
# For SUSE build check function arguments of ndo_tx_timeout API
# Ref: https://jira.devtools.intel.com/browse/DPDK-29263
-kmod_cflags = ''
+kmod_cflags = '-DABI_VERSION_MAJOR=@0@'.format(abi_version.split('.')[0])
file_path = kernel_source_dir + '/include/linux/netdevice.h'
run_cmd = run_command('grep', 'ndo_tx_timeout', file_path, check: false)
if run_cmd.stdout().contains('txqueue') == true
- kmod_cflags = '-DHAVE_ARG_TX_QUEUE'
+ kmod_cflags += ' -DHAVE_ARG_TX_QUEUE'
endif
diff --git a/lib/kni/meson.build b/lib/kni/meson.build
index 8a71d8ba6f..f22a27b15b 100644
--- a/lib/kni/meson.build
+++ b/lib/kni/meson.build
@@ -14,3 +14,4 @@ endif
sources = files('rte_kni.c')
headers = files('rte_kni.h', 'rte_kni_common.h')
deps += ['ethdev', 'pci']
+cflags += ['-DABI_VERSION_MAJOR=@0@'.format(abi_version.split('.')[0])]
diff --git a/lib/kni/rte_kni.c b/lib/kni/rte_kni.c
index 7971c56bb4..9bdeeb3806 100644
--- a/lib/kni/rte_kni.c
+++ b/lib/kni/rte_kni.c
@@ -22,6 +22,7 @@
#include <rte_eal_memconfig.h>
#include <rte_kni_common.h>
#include "rte_kni_fifo.h"
+#include "rte_kni_abi.h"
#define MAX_MBUF_BURST_NUM 32
@@ -113,6 +114,20 @@ rte_kni_init(unsigned int max_kni_ifaces __rte_unused)
}
}
+ uint16_t abi_version;
+ int ret = ioctl(kni_fd, RTE_KNI_IOCTL_ABI_VERSION, &abi_version);
+ if (ret < 0) {
+ RTE_LOG(ERR, KNI, "Cannot verify rte_kni kmod ABI version: ioctl failed\n");
+ return -1;
+ }
+ if (abi_version != ABI_VERSION_MAJOR) {
+ RTE_LOG(ERR, KNI,
+ "rte_kni kmod ABI version mismatch: "
+ "need %" PRIu16 " got %" PRIu16 "\n",
+ ABI_VERSION_MAJOR, abi_version);
+ return -1;
+ }
+
return 0;
}
@@ -255,6 +270,7 @@ rte_kni_alloc(struct rte_mempool *pktmbuf_pool,
kni->ops.port_id = UINT16_MAX;
memset(&dev_info, 0, sizeof(dev_info));
+ dev_info.abi_version_magic = RTE_KNI_ABI_VERSION_MAGIC;
dev_info.core_id = conf->core_id;
dev_info.force_bind = conf->force_bind;
dev_info.group_id = conf->group_id;
@@ -409,6 +425,8 @@ rte_kni_release(struct rte_kni *kni)
if (!kni)
return -1;
+ dev_info.abi_version_magic = RTE_KNI_ABI_VERSION_MAGIC;
+
kni_list = RTE_TAILQ_CAST(rte_kni_tailq.head, rte_kni_list);
rte_mcfg_tailq_write_lock();
diff --git a/lib/kni/rte_kni_abi.h b/lib/kni/rte_kni_abi.h
new file mode 100644
index 0000000000..7dde394c72
--- /dev/null
+++ b/lib/kni/rte_kni_abi.h
@@ -0,0 +1,17 @@
+/* SPDX-License-Identifier: (BSD-3-Clause OR LGPL-2.1) */
+/*
+ * Copyright(c) 2007-2014 Intel Corporation.
+ */
+
+#ifndef _RTE_KNI_ABI_H_
+#define _RTE_KNI_ABI_H_
+
+#ifndef ABI_VERSION_MAJOR
+#error Need ABI_VERSION_MAJOR being the major part of dpdk/ABI_VERSION
+#endif
+#define RTE_KNI_ABI_VERSION_MAGIC_MASK 0xAAAA
+#define RTE_KNI_ABI_VERSION_MAGIC (((ABI_VERSION_MAJOR) ^ RTE_KNI_ABI_VERSION_MAGIC_MASK))
+#define RTE_KNI_ABI_VERSION_FROM_MAGIC(__magic) (((__magic) ^ RTE_KNI_ABI_VERSION_MAGIC_MASK))
+
+#endif
+
diff --git a/lib/kni/rte_kni_common.h b/lib/kni/rte_kni_common.h
index 8d3ee0fa4f..f9432b742c 100644
--- a/lib/kni/rte_kni_common.h
+++ b/lib/kni/rte_kni_common.h
@@ -102,6 +102,8 @@ struct rte_kni_mbuf {
*/
struct rte_kni_device_info {
+ uint16_t abi_version_magic;
+
char name[RTE_KNI_NAMESIZE]; /**< Network device name for KNI */
phys_addr_t tx_phys;
@@ -139,6 +141,7 @@ struct rte_kni_device_info {
#define RTE_KNI_IOCTL_TEST _IOWR(0, 1, int)
#define RTE_KNI_IOCTL_CREATE _IOWR(0, 2, struct rte_kni_device_info)
#define RTE_KNI_IOCTL_RELEASE _IOWR(0, 3, struct rte_kni_device_info)
+#define RTE_KNI_IOCTL_ABI_VERSION _IOWR(0, 4, uint16_t)
#ifdef __cplusplus
}
--
2.35.1
^ permalink raw reply [relevance 15%]
* RE: [RFC] eal: add bus cleanup to eal cleanup
2022-04-22 9:18 4% ` Kevin Laatz
@ 2022-04-22 12:14 0% ` Morten Brørup
0 siblings, 0 replies; 200+ results
From: Morten Brørup @ 2022-04-22 12:14 UTC (permalink / raw)
To: Kevin Laatz, dev
> From: Kevin Laatz [mailto:kevin.laatz@intel.com]
> Sent: Friday, 22 April 2022 11.18
>
> On 20/04/2022 07:55, Morten Brørup wrote:
> >> From: Kevin Laatz [mailto:kevin.laatz@intel.com]
> >> Sent: Tuesday, 19 April 2022 18.15
> >>
> >> During EAL init, all buses are probed and the devices found are
> >> initialized. On eal_cleanup(), the inverse does not happen, meaning
> any
> >> allocated memory and other configuration will not be cleaned up
> >> appropriately on exit.
> >>
> >> Currently, in order for device cleanup to take place, applications
> must
> >> call the driver-relevant functions to ensure proper cleanup is done
> >> before
> >> the application exits. Since initialization occurs for all devices
> on
> >> the
> >> bus, not just the devices used by an application, it requires a)
> >> application awareness of all bus devices that could have been probed
> on
> >> the
> >> system, and b) code duplication across applications to ensure
> cleanup
> >> is
> >> performed. An example of this is rte_eth_dev_close() which is
> commonly
> >> used
> >> across the example applications.
> >>
> >> This RFC proposes adding bus cleanup to the eal_cleanup() to make
> EAL's
> >> init/exit more symmetrical, ensuring all bus devices are cleaned up
> >> appropriately without the application needing to be aware of all bus
> >> types
> >> that may have been probed during initialization.
> >>
> >> Contained in this RFC are the changes required to perform cleanup
> for
> >> devices on the PCI bus during eal_cleanup(). This can be expanded in
> >> subsequent versions if these changes are desired. There would be an
> ask
> >> for
> >> bus maintainers to add the relevant cleanup for their buses since
> they
> >> have
> >> the domain expertise.
> >>
> >> Signed-off-by: Kevin Laatz <kevin.laatz@intel.com>
> >> ---
> > [...]
> >
> >> + RTE_LOG(INFO, EAL,
> >> + "Clean up PCI driver: %s (%x:%x) device:
> >> "PCI_PRI_FMT" (socket %i)\n",
> >> + drv->driver.name, dev->id.vendor_id, dev-
> >>> id.device_id,
> >> + loc->domain, loc->bus, loc->devid, loc-
> >>> function,
> >> + dev->device.numa_node);
> > I agree with Stephen, this message might as well be DEBUG level. You
> could argue for symmetry: If the "alloc" message during startup is INFO
> level, it makes sense using INFO level for the "free" message during
> cleanup too. However, the message probably has far lower information
> value during cleanup (because this driver cleanup is expected to
> happen), so I would degrade it to DEBUG level. Symmetry is not always
> the strongest argument. I have no strong preference, so I'll leave it
> up to you, Kevin.
>
> Thanks for the feedback.
>
> +1, will change to debug for v2.
>
>
> >
> > [...]
> >
> >> @@ -263,6 +275,7 @@ struct rte_bus {
> >> const char *name; /**< Name of the bus */
> >> rte_bus_scan_t scan; /**< Scan for devices attached to
> >> bus */
> >> rte_bus_probe_t probe; /**< Probe devices on bus */
> >> + rte_bus_cleanup_t cleanup; /**< Cleanup devices on bus */
> >> rte_bus_find_device_t find_device; /**< Find a device on the bus
> >> */
> >> rte_bus_plug_t plug; /**< Probe single device for drivers
> >> */
> >> rte_bus_unplug_t unplug; /**< Remove single device from
> >> driver */
> > Have you considered if modifying the rte_bus structure in
> /lib/eal/include/rte_bus.h breaks the ABI or not?
>
> I've looked into this and have run test-meson-builds with ABI checks
> enabled.
>
> The output of those checks flagged some potential breaks, however I
> believe these are false positives. The output indicated 2 potential
> breaks (in multiple places, but the root is the same)
>
> 1. Member has been added to the rte_bus struct. This is flagged as a
> sub-type change, however since rte_bus is only ever reference by
> pointer, it is not a break.
>
> 2. Offset of members changes in 'rte_pci_bus' and 'rte_vmbus_bus'
> structs. These structs are only used internally so also do no break
> ABI.
>
Sounds good! Then there should be no more worries. :-)
>
> Since the ABI checks do flag the addition, I will add an entry to the
> abignore for the v2.
>
>
> >
> >
> > Overall, this patch is certainly a good idea!
> >
> > On the condition that modifying the rte_bus structure does not break
> the ABI...
> >
> > Acked-by: Morten Brørup <mb@smartsharesystems.com>
> >
^ permalink raw reply [relevance 0%]
* Re: kni: check abi version between kmod and lib
2022-04-22 8:46 8% ` Ray Kinsella
@ 2022-04-22 10:07 4% ` Stephen Coleman
0 siblings, 0 replies; 200+ results
From: Stephen Coleman @ 2022-04-22 10:07 UTC (permalink / raw)
To: Ray Kinsella; +Cc: Stephen Hemminger, dev, Ferruh Yigit
thanks for your replies
I'm aware that kernel guidelines propose ascending ioctl numbers to
max out compatibility, but this will not work with dpdk, especially
our case here.
If you look into kni_net.c you'll see the module is actually
internally depending on the memory layout of mbuf and a few other
structs, you will need to change ioctl numbers if those change, and
that's very implicit and requires extra effort. Plus the compatibility
is almost impossible to maintain across dpdk releases, as the module
won't know which version of mbuf layout it is working with.
In short, rte_kni.ko is part of dpdk rather than part of kernel, and
different parts of different dpdk releases do not work together -- so
we reject them early in the first before it make a disaster.
p.s. working on v3 to fix code format issues
p.p.s. forgot to 'reply all' last time, sorry for the duplication
>
>
> Stephen Hemminger <stephen@networkplumber.org> writes:
>
> > On Thu, 21 Apr 2022 11:40:00 -0400
> > Ray Kinsella <mdr@ashroe.eu> wrote:
> >
> >> Stephen Hemminger <stephen@networkplumber.org> writes:
> >>
> >> > On Thu, 21 Apr 2022 12:38:26 +0800
> >> > Stephen Coleman <omegacoleman@gmail.com> wrote:
> >> >
> >> >> KNI ioctl functions copy data from userspace lib, and this interface
> >> >> of kmod is not compatible indeed. If the user use incompatible rte_kni.ko
> >> >> bad things happen: sometimes various fields contain garbage value,
> >> >> sometimes it cause a kmod soft lockup.
> >> >>
> >> >> Some common distros ship their own rte_kni.ko, so this is likely to
> >> >> happen.
> >> >>
> >> >> This patch add abi version checking between userland lib and kmod so
> >> >> that:
> >> >>
> >> >> * if kmod ioctl got a wrong abi magic, it refuse to go on
> >> >> * if userland lib, probed a wrong abi version via newly added ioctl, it
> >> >> also refuse to go on
> >> >>
> >> >> Bugzilla ID: 998
> >> >
> >> >
> >> > Kernel API's are supposed to be 99% stable.
> >> > If this driver was playing by the upstream kernel rules this would not
> >> > have happened.
> >>
> >> Well look, it is out-of-tree and never likely to be in-tree, so those
> >> rules don't apply. Making sure the ABI doesn't change during the ABI
> >> stablity period, should be good enough?
> >>
> >
> > I think if KNI changes, it should just add more ioctl numbers and
> > be compatible, it is not that hard.
>
> True, fair point, I am unsure what that buys us though. My thinking was
> that we should be doing the minimal amount of work on KNI, and directing
> people to use upstream alternatives where possible.
>
> For me minimizing means DPDK ABI alignment. However I see your point,
> let KNI maintain it own ABI versioning independent of DPDK, with
> stricter kernel-like guarantees is probably not much more work.
>
> --
> Regards, Ray K
^ permalink raw reply [relevance 4%]
* Re: [RFC] eal: add bus cleanup to eal cleanup
2022-04-20 6:55 4% ` Morten Brørup
@ 2022-04-22 9:18 4% ` Kevin Laatz
2022-04-22 12:14 0% ` Morten Brørup
0 siblings, 1 reply; 200+ results
From: Kevin Laatz @ 2022-04-22 9:18 UTC (permalink / raw)
To: Morten Brørup, dev
On 20/04/2022 07:55, Morten Brørup wrote:
>> From: Kevin Laatz [mailto:kevin.laatz@intel.com]
>> Sent: Tuesday, 19 April 2022 18.15
>>
>> During EAL init, all buses are probed and the devices found are
>> initialized. On eal_cleanup(), the inverse does not happen, meaning any
>> allocated memory and other configuration will not be cleaned up
>> appropriately on exit.
>>
>> Currently, in order for device cleanup to take place, applications must
>> call the driver-relevant functions to ensure proper cleanup is done
>> before
>> the application exits. Since initialization occurs for all devices on
>> the
>> bus, not just the devices used by an application, it requires a)
>> application awareness of all bus devices that could have been probed on
>> the
>> system, and b) code duplication across applications to ensure cleanup
>> is
>> performed. An example of this is rte_eth_dev_close() which is commonly
>> used
>> across the example applications.
>>
>> This RFC proposes adding bus cleanup to the eal_cleanup() to make EAL's
>> init/exit more symmetrical, ensuring all bus devices are cleaned up
>> appropriately without the application needing to be aware of all bus
>> types
>> that may have been probed during initialization.
>>
>> Contained in this RFC are the changes required to perform cleanup for
>> devices on the PCI bus during eal_cleanup(). This can be expanded in
>> subsequent versions if these changes are desired. There would be an ask
>> for
>> bus maintainers to add the relevant cleanup for their buses since they
>> have
>> the domain expertise.
>>
>> Signed-off-by: Kevin Laatz <kevin.laatz@intel.com>
>> ---
> [...]
>
>> + RTE_LOG(INFO, EAL,
>> + "Clean up PCI driver: %s (%x:%x) device:
>> "PCI_PRI_FMT" (socket %i)\n",
>> + drv->driver.name, dev->id.vendor_id, dev-
>>> id.device_id,
>> + loc->domain, loc->bus, loc->devid, loc-
>>> function,
>> + dev->device.numa_node);
> I agree with Stephen, this message might as well be DEBUG level. You could argue for symmetry: If the "alloc" message during startup is INFO level, it makes sense using INFO level for the "free" message during cleanup too. However, the message probably has far lower information value during cleanup (because this driver cleanup is expected to happen), so I would degrade it to DEBUG level. Symmetry is not always the strongest argument. I have no strong preference, so I'll leave it up to you, Kevin.
Thanks for the feedback.
+1, will change to debug for v2.
>
> [...]
>
>> @@ -263,6 +275,7 @@ struct rte_bus {
>> const char *name; /**< Name of the bus */
>> rte_bus_scan_t scan; /**< Scan for devices attached to
>> bus */
>> rte_bus_probe_t probe; /**< Probe devices on bus */
>> + rte_bus_cleanup_t cleanup; /**< Cleanup devices on bus */
>> rte_bus_find_device_t find_device; /**< Find a device on the bus
>> */
>> rte_bus_plug_t plug; /**< Probe single device for drivers
>> */
>> rte_bus_unplug_t unplug; /**< Remove single device from
>> driver */
> Have you considered if modifying the rte_bus structure in /lib/eal/include/rte_bus.h breaks the ABI or not?
I've looked into this and have run test-meson-builds with ABI checks
enabled.
The output of those checks flagged some potential breaks, however I
believe these are false positives. The output indicated 2 potential
breaks (in multiple places, but the root is the same)
1. Member has been added to the rte_bus struct. This is flagged as a
sub-type change, however since rte_bus is only ever reference by
pointer, it is not a break.
2. Offset of members changes in 'rte_pci_bus' and 'rte_vmbus_bus'
structs. These structs are only used internally so also do no break ABI.
Since the ABI checks do flag the addition, I will add an entry to the
abignore for the v2.
>
>
> Overall, this patch is certainly a good idea!
>
> On the condition that modifying the rte_bus structure does not break the ABI...
>
> Acked-by: Morten Brørup <mb@smartsharesystems.com>
>
^ permalink raw reply [relevance 4%]
* Re: kni: check abi version between kmod and lib
2022-04-21 15:50 4% ` Stephen Hemminger
@ 2022-04-22 8:46 8% ` Ray Kinsella
2022-04-22 10:07 4% ` Stephen Coleman
0 siblings, 1 reply; 200+ results
From: Ray Kinsella @ 2022-04-22 8:46 UTC (permalink / raw)
To: Stephen Hemminger; +Cc: Stephen Coleman, dev, Ferruh Yigit
Stephen Hemminger <stephen@networkplumber.org> writes:
> On Thu, 21 Apr 2022 11:40:00 -0400
> Ray Kinsella <mdr@ashroe.eu> wrote:
>
>> Stephen Hemminger <stephen@networkplumber.org> writes:
>>
>> > On Thu, 21 Apr 2022 12:38:26 +0800
>> > Stephen Coleman <omegacoleman@gmail.com> wrote:
>> >
>> >> KNI ioctl functions copy data from userspace lib, and this interface
>> >> of kmod is not compatible indeed. If the user use incompatible rte_kni.ko
>> >> bad things happen: sometimes various fields contain garbage value,
>> >> sometimes it cause a kmod soft lockup.
>> >>
>> >> Some common distros ship their own rte_kni.ko, so this is likely to
>> >> happen.
>> >>
>> >> This patch add abi version checking between userland lib and kmod so
>> >> that:
>> >>
>> >> * if kmod ioctl got a wrong abi magic, it refuse to go on
>> >> * if userland lib, probed a wrong abi version via newly added ioctl, it
>> >> also refuse to go on
>> >>
>> >> Bugzilla ID: 998
>> >
>> >
>> > Kernel API's are supposed to be 99% stable.
>> > If this driver was playing by the upstream kernel rules this would not
>> > have happened.
>>
>> Well look, it is out-of-tree and never likely to be in-tree, so those
>> rules don't apply. Making sure the ABI doesn't change during the ABI
>> stablity period, should be good enough?
>>
>
> I think if KNI changes, it should just add more ioctl numbers and
> be compatible, it is not that hard.
True, fair point, I am unsure what that buys us though. My thinking was
that we should be doing the minimal amount of work on KNI, and directing
people to use upstream alternatives where possible.
For me minimizing means DPDK ABI alignment. However I see your point,
let KNI maintain it own ABI versioning independent of DPDK, with
stricter kernel-like guarantees is probably not much more work.
--
Regards, Ray K
^ permalink raw reply [relevance 8%]
* [dpdk-dev] [PATCH v4] ethdev: mtr: support protocol based input color selection
@ 2022-04-21 18:02 5% ` jerinj
2022-04-26 10:19 0% ` Ray Kinsella
2022-05-01 14:46 5% ` [dpdk-dev] [PATCH v5] " jerinj
0 siblings, 2 replies; 200+ results
From: jerinj @ 2022-04-21 18:02 UTC (permalink / raw)
To: dev, Cristian Dumitrescu, Thomas Monjalon, Ferruh Yigit,
Andrew Rybchenko, Ray Kinsella
Cc: ajit.khaparde, aboyer, beilei.xing, bruce.richardson, chas3,
chenbo.xia, ciara.loftus, dsinghrawat, ed.czeck, evgenys, grive,
g.singh, zhouguoyang, haiyue.wang, hkalra, heinrich.kuhn,
hemant.agrawal, hyonkim, igorch, irusskikh, jgrajcia,
jasvinder.singh, jianwang, jiawenwu, jingjing.wu, johndale,
john.miller, linville, keith.wiles, kirankumark, oulijun, lironh,
longli, mw, spinler, matan, matt.peters, maxime.coquelin, mk,
humin29, pnalla, ndabilpuram, qiming.yang, qi.z.zhang, radhac,
rahul.lakkireddy, rmody, rosen.xu, sachin.saxena, skoteshwar,
shshaikh, shaibran, shepard.siegel, asomalap, somnath.kotur,
sthemmin, steven.webster, skori, mtetsuyah, vburru, viacheslavo,
xiao.w.wang, cloud.wangxiaoyun, yisen.zhuang, yongwang,
xuanziyang2, Jerin Jacob
From: Jerin Jacob <jerinj@marvell.com>
Currently, meter object supports only DSCP based on input color table,
The patch enhance that to support VLAN based input color table,
color table based on inner field for the tunnel use case, and
support for fallback color per meter if packet based on a different field.
All of the above features are exposed through capability and added
additional capability to specify the implementation supports
more than one input color table per ethdev port.
Suggested-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Signed-off-by: Jerin Jacob <jerinj@marvell.com>
---
v4..v3:
- Aligned with community meeting call which is documented in
https://patches.dpdk.org/project/dpdk/patch/20220301085824.1041009-1-skori@marvell.com/
as last message. With following exception,
- Used RTE_MTR_COLOR_IN_*_DSCP instead of RTE_MTR_COLOR_IN_*_IP as
there is already dscp_table and rte_mtr_meter_dscp_table_update() API.
Changing above symbols break existing application for no good.
- Updated 22.07 release notes
- Remove testpmd changes from series to finalize the API spec first and
then we can send testpmd changes.
v3..v2:
- Fix input color flags as a bitmask
- Add definitions for newly added API
v2..v1:
- Fix seperate typo
v1..RFC:
Address the review comments by Cristian at
https://patches.dpdk.org/project/dpdk/patch/20210820082401.3778736-1-jerinj@marvell.com/
- Moved to v22.07 release
- Updated rte_mtr_input_color_method to support all VLAN, DSCP, Inner
cases
- Added input_color_method
- Removed union between vlan_table and dscp_table
- Kept VLAN instead of PCP as HW coloring based on DEI(1bit), PCP(3
bits)
.../traffic_metering_and_policing.rst | 33 ++++
doc/guides/rel_notes/release_22_07.rst | 10 +
lib/ethdev/rte_mtr.c | 23 +++
lib/ethdev/rte_mtr.h | 186 +++++++++++++++++-
lib/ethdev/rte_mtr_driver.h | 19 ++
lib/ethdev/version.map | 4 +
6 files changed, 265 insertions(+), 10 deletions(-)
diff --git a/doc/guides/prog_guide/traffic_metering_and_policing.rst b/doc/guides/prog_guide/traffic_metering_and_policing.rst
index ceb5a96488..75deabbaf1 100644
--- a/doc/guides/prog_guide/traffic_metering_and_policing.rst
+++ b/doc/guides/prog_guide/traffic_metering_and_policing.rst
@@ -21,6 +21,7 @@ The main features are:
* Policer actions (per meter output color): recolor, drop
* Statistics (per policer output color)
* Chaining multiple meter objects
+* Protocol based input color selection
Configuration steps
-------------------
@@ -105,3 +106,35 @@ traffic meter and policing library.
* Adding one (or multiple) actions of the type ``RTE_FLOW_ACTION_TYPE_METER``
to the list of meter actions (``struct rte_mtr_meter_policy_params::actions``)
specified per color as show in :numref:`figure_rte_mtr_chaining`.
+
+Protocol based input color selection
+------------------------------------
+
+The API supports selecting the input color based on the packet content.
+Following is the API usage model for the same.
+
+#. Probe the protocol based input color selection device capabilities using
+ following parameter using ``rte_mtr_capabilities_get()`` API.
+
+ * ``struct rte_mtr_capabilities::input_color_proto_mask;``
+ * ``struct rte_mtr_capabilities::separate_input_color_table_per_port``
+
+#. When creating the meter object using ``rte_mtr_create()``, configure
+ relevant input color selection parameters such as
+
+ * Input color protocols with ``struct rte_mtr_params::input_color_proto_mask``
+
+ * If ``struct rte_mtr_params::input_color_proto_mask`` has multiple bits set then
+ ``rte_mtr_color_in_protocol_priority_set()`` shall be used to set the priority,
+ in the order, in which protocol to be used to find the input color.
+
+ * Fill the tables ``struct rte_mtr_params::dscp_table``,
+ ``struct rte_mtr_params::vlan_table`` based on input color selected.
+
+ * Update the ``struct rte_mtr_params::default_input_color`` to determine
+ the default input color in case the input packet does not match
+ the input color method.
+
+ * If needed, update the input color table at runtime using
+ ``rte_mtr_meter_vlan_table_update()`` and ``rte_mtr_meter_dscp_table_update()``
+ APIs.
diff --git a/doc/guides/rel_notes/release_22_07.rst b/doc/guides/rel_notes/release_22_07.rst
index 42a5f2d990..746622f9b3 100644
--- a/doc/guides/rel_notes/release_22_07.rst
+++ b/doc/guides/rel_notes/release_22_07.rst
@@ -55,6 +55,13 @@ New Features
Also, make sure to start the actual text at the margin.
=======================================================
+* **Added protocol based input color for meter.**
+
+ Added new APIs ``rte_mtr_color_in_protocol_priority_set()``,
+ ``rte_mtr_meter_vlan_table_update()`` and updated ``struct rte_mtr_params``
+ and ``struct rte_mtr_capabilities`` to support protocol based
+ input color for meter.
+
Removed Items
-------------
@@ -102,6 +109,9 @@ ABI Changes
* No ABI change that would break compatibility with 21.11.
+* Experimental structures ``struct rte_mtr_params``
+ and ``struct rte_mtr_capabilities`` updated to support
+ protocol based input color for meter.
Known Issues
------------
diff --git a/lib/ethdev/rte_mtr.c b/lib/ethdev/rte_mtr.c
index e49fcf271c..a112fe65f5 100644
--- a/lib/ethdev/rte_mtr.c
+++ b/lib/ethdev/rte_mtr.c
@@ -207,6 +207,29 @@ rte_mtr_meter_dscp_table_update(uint16_t port_id,
mtr_id, dscp_table, error);
}
+/** MTR object meter VLAN table update */
+int
+rte_mtr_meter_vlan_table_update(uint16_t port_id, uint32_t mtr_id,
+ enum rte_color *vlan_table,
+ struct rte_mtr_error *error)
+{
+ struct rte_eth_dev *dev = &rte_eth_devices[port_id];
+ return RTE_MTR_FUNC(port_id, meter_vlan_table_update)(dev,
+ mtr_id, vlan_table, error);
+}
+
+/** Set the priority for input color protocol on MTR object */
+int
+rte_mtr_color_in_protocol_priority_set(uint16_t port_id, uint32_t mtr_id,
+ enum rte_mtr_color_in_protocol proto,
+ uint32_t priority,
+ struct rte_mtr_error *error)
+{
+ struct rte_eth_dev *dev = &rte_eth_devices[port_id];
+ return RTE_MTR_FUNC(port_id, in_proto_prio_set)(dev,
+ mtr_id, proto, priority, error);
+}
+
/** MTR object enabled stats update */
int
rte_mtr_stats_update(uint16_t port_id,
diff --git a/lib/ethdev/rte_mtr.h b/lib/ethdev/rte_mtr.h
index 40df0888c8..76ffbcf724 100644
--- a/lib/ethdev/rte_mtr.h
+++ b/lib/ethdev/rte_mtr.h
@@ -213,6 +213,52 @@ struct rte_mtr_meter_policy_params {
const struct rte_flow_action *actions[RTE_COLORS];
};
+/**
+ * Input color protocol method
+ */
+enum rte_mtr_color_in_protocol {
+ /**
+ * If the input packet has at least one VLAN label, its input color is
+ * detected by the outermost VLAN DEI(1bit), PCP(3 bits)
+ * indexing into the struct rte_mtr_params::vlan_table.
+ * Otherwise, the *default_input_color* is applied.
+ *
+ * @see struct rte_mtr_params::default_input_color
+ * @see struct rte_mtr_params::vlan_table
+ */
+ RTE_MTR_COLOR_IN_PROTO_OUTER_VLAN = RTE_BIT64(0),
+ /**
+ * If the input packet has at least one VLAN label, its input color is
+ * detected by the innermost VLAN DEI(1bit), PCP(3 bits)
+ * indexing into the struct rte_mtr_params::vlan_table.
+ * Otherwise, the *default_input_color* is applied.
+ *
+ * @see struct rte_mtr_params::default_input_color
+ * @see struct rte_mtr_params::vlan_table
+ */
+ RTE_MTR_COLOR_IN_PROTO_INNER_VLAN = RTE_BIT64(1),
+ /**
+ * If the input packet is IPv4 or IPv6, its input color is detected by
+ * the outermost DSCP field indexing into the
+ * struct rte_mtr_params::dscp_table.
+ * Otherwise, the *default_input_color* is applied.
+ *
+ * @see struct rte_mtr_params::default_input_color
+ * @see struct rte_mtr_params::dscp_table
+ */
+ RTE_MTR_COLOR_IN_PROTO_OUTER_DSCP = RTE_BIT64(2),
+ /**
+ * If the input packet is IPv4 or IPv6, its input color is detected by
+ * the innermost DSCP field indexing into the
+ * struct rte_mtr_params::dscp_table.
+ * Otherwise, the *default_input_color* is applied.
+ *
+ * @see struct rte_mtr_params::default_input_color
+ * @see struct rte_mtr_params::dscp_table
+ */
+ RTE_MTR_COLOR_IN_PROTO_INNER_DSCP = RTE_BIT64(3),
+};
+
/**
* Parameters for each traffic metering & policing object
*
@@ -233,20 +279,58 @@ struct rte_mtr_params {
*/
int use_prev_mtr_color;
- /** Meter input color. When non-NULL: it points to a pre-allocated and
+ /** Meter input color based on IP DSCP protocol field.
+ *
+ * Valid when *input_color_proto_mask* set to any of the following
+ * RTE_MTR_COLOR_IN_PROTO_OUTER_DSCP,
+ * RTE_MTR_COLOR_IN_PROTO_INNER_DSCP
+ *
+ * When non-NULL: it points to a pre-allocated and
* pre-populated table with exactly 64 elements providing the input
* color for each value of the IPv4/IPv6 Differentiated Services Code
- * Point (DSCP) input packet field. When NULL: it is equivalent to
- * setting this parameter to an all-green populated table (i.e. table
- * with all the 64 elements set to green color). The color blind mode
- * is configured by setting *use_prev_mtr_color* to 0 and *dscp_table*
- * to either NULL or to an all-green populated table. When
- * *use_prev_mtr_color* is non-zero value or when *dscp_table* contains
- * at least one yellow or red color element, then the color aware mode
- * is configured.
+ * Point (DSCP) input packet field.
+ *
+ * When NULL: it is equivalent to setting this parameter to an all-green
+ * populated table (i.e. table with all the 64 elements set to green
+ * color). The color blind mode is configured by setting
+ * *use_prev_mtr_color* to 0 and *dscp_table* to either NULL or to an
+ * all-green populated table.
+ *
+ * When *use_prev_mtr_color* is non-zero value or when *dscp_table*
+ * contains at least one yellow or red color element, then the color
+ * aware mode is configured.
+ *
+ * @see enum rte_mtr_color_in_protocol::RTE_MTR_COLOR_IN_PROTO_OUTER_DSCP
+ * @see enum rte_mtr_color_in_protocol::RTE_MTR_COLOR_IN_PROTO_INNER_DSCP
+ * @see struct rte_mtr_params::input_color_proto_mask
*/
enum rte_color *dscp_table;
-
+ /** Meter input color based on VLAN DEI(1bit), PCP(3 bits) protocol
+ * fields.
+ *
+ * Valid when *input_color_proto_mask* set to any of the following
+ * RTE_MTR_COLOR_IN_PROTO_OUTER_VLAN,
+ * RTE_MTR_COLOR_IN_PROTO_INNER_VLAN
+ *
+ * When non-NULL: it points to a pre-allocated and pre-populated
+ * table with exactly 16 elements providing the input color for
+ * each value of the DEI(1bit), PCP(3 bits) input packet field.
+ *
+ * When NULL: it is equivalent to setting this parameter to an
+ * all-green populated table (i.e. table with
+ * all the 16 elements set to green color). The color blind mode
+ * is configured by setting *use_prev_mtr_color* to 0 and
+ * *vlan_table* to either NULL or to an all-green populated table.
+ *
+ * When *use_prev_mtr_color* is non-zero value
+ * or when *vlan_table* contains at least one yellow or
+ * red color element, then the color aware mode is configured.
+ *
+ * @see enum rte_mtr_color_in_protocol::RTE_MTR_COLOR_IN_PROTO_OUTER_VLAN
+ * @see enum rte_mtr_color_in_protocol::RTE_MTR_COLOR_IN_PROTO_INNER_VLAN
+ * @see struct rte_mtr_params::input_color_proto_mask
+ */
+ enum rte_color *vlan_table;
/** Non-zero to enable the meter, zero to disable the meter at the time
* of MTR object creation. Ignored when the meter profile indicated by
* *meter_profile_id* is set to NONE.
@@ -261,6 +345,25 @@ struct rte_mtr_params {
/** Meter policy ID. @see rte_mtr_meter_policy_add() */
uint32_t meter_policy_id;
+
+ /** Set of input color protocols to be enabled.
+ *
+ * Set value to zero to configure as color blind mode.
+ *
+ * When multiple bits set then rte_mtr_color_in_protocol_priority_set()
+ * shall be used to set the priority, in the order, in which protocol
+ * to be used to find the inpput color.
+ *
+ * @see enum rte_mtr_color_in_protocol
+ * @see rte_mtr_color_in_protocol_priority_set()
+ */
+ uint64_t input_color_proto_mask;
+
+ /** Input color to be set for the input packet when none of the
+ * enabled input color methods is applicable to the input packet.
+ * Ignored when this when *input_color_proto_mask* set to zero.
+ */
+ enum rte_color default_input_color;
};
/**
@@ -417,6 +520,16 @@ struct rte_mtr_capabilities {
* @see enum rte_mtr_stats_type
*/
uint64_t stats_mask;
+
+ /** Set of supported input color protocol.
+ * @see enum rte_mtr_color_in_protocol
+ */
+ uint64_t input_color_proto_mask;
+
+ /** When non-zero, it indicates that driver supports separate
+ * input color table for given ethdev port.
+ */
+ int separate_input_color_table_per_port;
};
/**
@@ -832,6 +945,59 @@ rte_mtr_meter_dscp_table_update(uint16_t port_id,
enum rte_color *dscp_table,
struct rte_mtr_error *error);
+/**
+ * MTR object VLAN table update
+ *
+ * @param[in] port_id
+ * The port identifier of the Ethernet device.
+ * @param[in] mtr_id
+ * MTR object ID. Needs to be valid.
+ * @param[in] vlan_table
+ * When non-NULL: it points to a pre-allocated and pre-populated table with
+ * exactly 16 elements providing the input color for each value of the
+ * each value of the DEI(1bit), PCP(3 bits) input packet field.
+ * When NULL: it is equivalent to setting this parameter to an "all-green"
+ * populated table (i.e. table with all the 16 elements set to green color).
+ * @param[out] error
+ * Error details. Filled in only on error, when not NULL.
+ * @return
+ * 0 on success, non-zero error code otherwise.
+ */
+__rte_experimental
+int
+rte_mtr_meter_vlan_table_update(uint16_t port_id, uint32_t mtr_id,
+ enum rte_color *vlan_table,
+ struct rte_mtr_error *error);
+/**
+ * Set the priority for input color protocol
+ *
+ * When multiple bits set in struct rte_mtr_params::input_color_proto_mask
+ * then this API shall be used to set the priority, in the order, in
+ * which protocol to be used to find the input color.
+ *
+ * @param[in] port_id
+ * The port identifier of the Ethernet device.
+ * @param[in] mtr_id
+ * MTR object ID. Needs to be valid.
+ * @param[in] proto
+ * Input color protocol to apply priority.
+ * MTR object's *input_color_proto_mask* should be configured
+ * with proto value.
+ * @param[in] priority
+ * Input color protocol priority. Value zero indicates
+ * the highest priority.
+ * @param[out] error
+ * Error details. Filled in only on error, when not NULL.
+ * @return
+ * 0 on success, non-zero error code otherwise.
+ *
+ * @see rte_mtr_params::input_color_proto_mask
+ */
+__rte_experimental
+int
+rte_mtr_color_in_protocol_priority_set(uint16_t port_id, uint32_t mtr_id,
+ enum rte_mtr_color_in_protocol proto, uint32_t priority,
+ struct rte_mtr_error *error);
/**
* MTR object enabled statistics counters update
*
diff --git a/lib/ethdev/rte_mtr_driver.h b/lib/ethdev/rte_mtr_driver.h
index ee8c6ef7ad..827952adc6 100644
--- a/lib/ethdev/rte_mtr_driver.h
+++ b/lib/ethdev/rte_mtr_driver.h
@@ -97,6 +97,19 @@ typedef int (*rte_mtr_meter_dscp_table_update_t)(struct rte_eth_dev *dev,
enum rte_color *dscp_table,
struct rte_mtr_error *error);
+/** @internal mtr object meter vlan table update. */
+typedef int (*rte_mtr_meter_vlan_table_update_t)(struct rte_eth_dev *dev,
+ uint32_t mtr_id,
+ enum rte_color *vlan_table,
+ struct rte_mtr_error *error);
+
+/** @internal Set the priority for input color protocol on MTR object. */
+typedef int (*rte_mtr_meter_color_in_proto_prio_set_t)(struct rte_eth_dev *dev,
+ uint32_t mtr_id,
+ enum rte_mtr_color_in_protocol proto,
+ uint32_t priority,
+ struct rte_mtr_error *error);
+
/** @internal MTR object enabled stats update. */
typedef int (*rte_mtr_stats_update_t)(struct rte_eth_dev *dev,
uint32_t mtr_id,
@@ -139,6 +152,12 @@ struct rte_mtr_ops {
/** MTR object meter DSCP table update */
rte_mtr_meter_dscp_table_update_t meter_dscp_table_update;
+ /** MTR object meter VLAN table update */
+ rte_mtr_meter_vlan_table_update_t meter_vlan_table_update;
+
+ /** Set the priority for input color protocol on MTR object. */
+ rte_mtr_meter_color_in_proto_prio_set_t in_proto_prio_set;
+
/** MTR object enabled stats update */
rte_mtr_stats_update_t stats_update;
diff --git a/lib/ethdev/version.map b/lib/ethdev/version.map
index 20391ab29e..cccbf6dee5 100644
--- a/lib/ethdev/version.map
+++ b/lib/ethdev/version.map
@@ -279,6 +279,10 @@ EXPERIMENTAL {
rte_flow_async_action_handle_create;
rte_flow_async_action_handle_destroy;
rte_flow_async_action_handle_update;
+
+ # added in 22.07
+ rte_mtr_meter_vlan_table_update;
+ rte_mtr_color_in_protocol_priority_set;
};
INTERNAL {
--
2.36.0
^ permalink raw reply [relevance 5%]
* [PATCH v2] kni: check abi version between kmod and lib
2022-04-21 4:38 16% kni: check abi version between kmod and lib Stephen Coleman
2022-04-21 14:16 4% ` Ray Kinsella
2022-04-21 14:54 4% ` Stephen Hemminger
@ 2022-04-21 16:34 15% ` youcai
2022-04-24 8:51 15% ` [PATCH v3] " youcai
3 siblings, 0 replies; 200+ results
From: youcai @ 2022-04-21 16:34 UTC (permalink / raw)
To: dev; +Cc: Ray Kinsella, Stephen Hemminger, Ferruh Yigit, youcai
KNI ioctl functions copy data from userspace lib, and this interface
of kmod is not compatible indeed. If the user use incompatible rte_kni.ko
bad things happen: sometimes various fields contain garbage value,
sometimes it cause a kmod soft lockup.
Some common distros ship their own rte_kni.ko, so this is likely to
happen.
This patch add abi version checking between userland lib and kmod so
that:
* if kmod ioctl got a wrong abi magic, it refuse to go on
* if userland lib, probed a wrong abi version via newly added ioctl, it
also refuse to go on
Bugzilla ID: 998
Signed-off-by: youcai <omegacoleman@gmail.com>
---
V2: use ABI_VERSION instead of a new magic
V2: fix some indent
---
kernel/linux/kni/kni_misc.c | 40 ++++++++++++++++++++++++++++++++++++
kernel/linux/kni/meson.build | 4 ++--
lib/kni/meson.build | 1 +
lib/kni/rte_kni.c | 17 +++++++++++++++
lib/kni/rte_kni_abi.h | 17 +++++++++++++++
lib/kni/rte_kni_common.h | 3 +++
6 files changed, 80 insertions(+), 2 deletions(-)
create mode 100644 lib/kni/rte_kni_abi.h
diff --git a/kernel/linux/kni/kni_misc.c b/kernel/linux/kni/kni_misc.c
index 780187d8bf..9a1ed22fed 100644
--- a/kernel/linux/kni/kni_misc.c
+++ b/kernel/linux/kni/kni_misc.c
@@ -17,6 +17,7 @@
#include <net/netns/generic.h>
#include <rte_kni_common.h>
+#include <rte_kni_abi.h>
#include "compat.h"
#include "kni_dev.h"
@@ -236,12 +237,24 @@ kni_release(struct inode *inode, struct file *file)
return 0;
}
+static int kni_check_abi_version_magic(uint16_t abi_version_magic) {
+ if (abi_version_magic != RTE_KNI_ABI_VERSION_MAGIC) {
+ pr_err("KNI kmod ABI incompatible with librte_kni -- %u\n",
+ RTE_KNI_ABI_VERSION_FROM_MAGIC(abi_version_magic));
+ return -1;
+ }
+ return 0;
+}
+
static int
kni_check_param(struct kni_dev *kni, struct rte_kni_device_info *dev)
{
if (!kni || !dev)
return -1;
+ if (kni_check_abi_version_magic(dev->abi_version_magic) < 0)
+ return -1;
+
/* Check if network name has been used */
if (!strncmp(kni->name, dev->name, RTE_KNI_NAMESIZE)) {
pr_err("KNI name %s duplicated\n", dev->name);
@@ -301,12 +314,19 @@ kni_ioctl_create(struct net *net, uint32_t ioctl_num,
struct rte_kni_device_info dev_info;
struct net_device *net_dev = NULL;
struct kni_dev *kni, *dev, *n;
+ uint16_t abi_version_magic;
pr_info("Creating kni...\n");
/* Check the buffer size, to avoid warning */
if (_IOC_SIZE(ioctl_num) > sizeof(dev_info))
return -EINVAL;
+ /* perform abi check ahead of copy, to avoid possible violation */
+ if (copy_from_user(&abi_version_magic, (void *)ioctl_param, sizeof(uint16_t)))
+ return -EFAULT;
+ if (kni_check_abi_version_magic(abi_version_magic) < 0)
+ return -EINVAL;
+
/* Copy kni info from user space */
if (copy_from_user(&dev_info, (void *)ioctl_param, sizeof(dev_info)))
return -EFAULT;
@@ -451,10 +471,17 @@ kni_ioctl_release(struct net *net, uint32_t ioctl_num,
int ret = -EINVAL;
struct kni_dev *dev, *n;
struct rte_kni_device_info dev_info;
+ uint16_t abi_version_magic;
if (_IOC_SIZE(ioctl_num) > sizeof(dev_info))
return -EINVAL;
+ /* perform abi check ahead of copy, to avoid possible violation */
+ if (copy_from_user(&abi_version_magic, (void *)ioctl_param, sizeof(uint16_t)))
+ return -EFAULT;
+ if (kni_check_abi_version_magic(abi_version_magic) < 0)
+ return -EINVAL;
+
if (copy_from_user(&dev_info, (void *)ioctl_param, sizeof(dev_info)))
return -EFAULT;
@@ -484,6 +511,16 @@ kni_ioctl_release(struct net *net, uint32_t ioctl_num,
return ret;
}
+static int
+kni_ioctl_abi_version(struct net *net, uint32_t ioctl_num,
+ unsigned long ioctl_param)
+{
+ uint16_t abi_version = ABI_VERSION_MAJOR;
+ if (copy_to_user((void *)ioctl_param, &abi_version, sizeof(uint16_t)))
+ return -EFAULT;
+ return 0;
+}
+
static long
kni_ioctl(struct file *file, unsigned int ioctl_num, unsigned long ioctl_param)
{
@@ -505,6 +542,9 @@ kni_ioctl(struct file *file, unsigned int ioctl_num, unsigned long ioctl_param)
case _IOC_NR(RTE_KNI_IOCTL_RELEASE):
ret = kni_ioctl_release(net, ioctl_num, ioctl_param);
break;
+ case _IOC_NR(RTE_KNI_IOCTL_ABI_VERSION):
+ ret = kni_ioctl_abi_version(net, ioctl_num, ioctl_param);
+ break;
default:
pr_debug("IOCTL default\n");
break;
diff --git a/kernel/linux/kni/meson.build b/kernel/linux/kni/meson.build
index 4c90069e99..c8cd23acd9 100644
--- a/kernel/linux/kni/meson.build
+++ b/kernel/linux/kni/meson.build
@@ -3,12 +3,12 @@
# For SUSE build check function arguments of ndo_tx_timeout API
# Ref: https://jira.devtools.intel.com/browse/DPDK-29263
-kmod_cflags = ''
+kmod_cflags = '-DABI_VERSION_MAJOR=@0@'.format(abi_version.split('.')[0])
file_path = kernel_source_dir + '/include/linux/netdevice.h'
run_cmd = run_command('grep', 'ndo_tx_timeout', file_path, check: false)
if run_cmd.stdout().contains('txqueue') == true
- kmod_cflags = '-DHAVE_ARG_TX_QUEUE'
+ kmod_cflags += ' -DHAVE_ARG_TX_QUEUE'
endif
diff --git a/lib/kni/meson.build b/lib/kni/meson.build
index 8a71d8ba6f..f22a27b15b 100644
--- a/lib/kni/meson.build
+++ b/lib/kni/meson.build
@@ -14,3 +14,4 @@ endif
sources = files('rte_kni.c')
headers = files('rte_kni.h', 'rte_kni_common.h')
deps += ['ethdev', 'pci']
+cflags += ['-DABI_VERSION_MAJOR=@0@'.format(abi_version.split('.')[0])]
diff --git a/lib/kni/rte_kni.c b/lib/kni/rte_kni.c
index 7971c56bb4..1c8a610bd4 100644
--- a/lib/kni/rte_kni.c
+++ b/lib/kni/rte_kni.c
@@ -22,6 +22,7 @@
#include <rte_eal_memconfig.h>
#include <rte_kni_common.h>
#include "rte_kni_fifo.h"
+#include "rte_kni_abi.h"
#define MAX_MBUF_BURST_NUM 32
@@ -113,6 +114,19 @@ rte_kni_init(unsigned int max_kni_ifaces __rte_unused)
}
}
+ uint16_t abi_version;
+ int ret = ioctl(kni_fd, RTE_KNI_IOCTL_ABI_VERSION, &abi_version);
+ if (ret < 0) {
+ RTE_LOG(ERR, KNI, "Cannot verify rte_kni kmod ABI version: ioctl failed\n");
+ return -1;
+ }
+ if (abi_version != ABI_VERSION_MAJOR) {
+ RTE_LOG(ERR, KNI,
+ "rte_kni kmod ABI version mismatch: "
+ "need %" PRIu16 " got %" PRIu16 "\n", ABI_VERSION_MAJOR, abi_version);
+ return -1;
+ }
+
return 0;
}
@@ -255,6 +269,7 @@ rte_kni_alloc(struct rte_mempool *pktmbuf_pool,
kni->ops.port_id = UINT16_MAX;
memset(&dev_info, 0, sizeof(dev_info));
+ dev_info.abi_version_magic = RTE_KNI_ABI_VERSION_MAGIC;
dev_info.core_id = conf->core_id;
dev_info.force_bind = conf->force_bind;
dev_info.group_id = conf->group_id;
@@ -409,6 +424,8 @@ rte_kni_release(struct rte_kni *kni)
if (!kni)
return -1;
+ dev_info.abi_version_magic = RTE_KNI_ABI_VERSION_MAGIC;
+
kni_list = RTE_TAILQ_CAST(rte_kni_tailq.head, rte_kni_list);
rte_mcfg_tailq_write_lock();
diff --git a/lib/kni/rte_kni_abi.h b/lib/kni/rte_kni_abi.h
new file mode 100644
index 0000000000..7dde394c72
--- /dev/null
+++ b/lib/kni/rte_kni_abi.h
@@ -0,0 +1,17 @@
+/* SPDX-License-Identifier: (BSD-3-Clause OR LGPL-2.1) */
+/*
+ * Copyright(c) 2007-2014 Intel Corporation.
+ */
+
+#ifndef _RTE_KNI_ABI_H_
+#define _RTE_KNI_ABI_H_
+
+#ifndef ABI_VERSION_MAJOR
+#error Need ABI_VERSION_MAJOR being the major part of dpdk/ABI_VERSION
+#endif
+#define RTE_KNI_ABI_VERSION_MAGIC_MASK 0xAAAA
+#define RTE_KNI_ABI_VERSION_MAGIC (((ABI_VERSION_MAJOR) ^ RTE_KNI_ABI_VERSION_MAGIC_MASK))
+#define RTE_KNI_ABI_VERSION_FROM_MAGIC(__magic) (((__magic) ^ RTE_KNI_ABI_VERSION_MAGIC_MASK))
+
+#endif
+
diff --git a/lib/kni/rte_kni_common.h b/lib/kni/rte_kni_common.h
index 8d3ee0fa4f..f9432b742c 100644
--- a/lib/kni/rte_kni_common.h
+++ b/lib/kni/rte_kni_common.h
@@ -102,6 +102,8 @@ struct rte_kni_mbuf {
*/
struct rte_kni_device_info {
+ uint16_t abi_version_magic;
+
char name[RTE_KNI_NAMESIZE]; /**< Network device name for KNI */
phys_addr_t tx_phys;
@@ -139,6 +141,7 @@ struct rte_kni_device_info {
#define RTE_KNI_IOCTL_TEST _IOWR(0, 1, int)
#define RTE_KNI_IOCTL_CREATE _IOWR(0, 2, struct rte_kni_device_info)
#define RTE_KNI_IOCTL_RELEASE _IOWR(0, 3, struct rte_kni_device_info)
+#define RTE_KNI_IOCTL_ABI_VERSION _IOWR(0, 4, uint16_t)
#ifdef __cplusplus
}
--
2.35.1
^ permalink raw reply [relevance 15%]
* Re: kni: check abi version between kmod and lib
2022-04-21 15:40 8% ` Ray Kinsella
@ 2022-04-21 15:50 4% ` Stephen Hemminger
2022-04-22 8:46 8% ` Ray Kinsella
0 siblings, 1 reply; 200+ results
From: Stephen Hemminger @ 2022-04-21 15:50 UTC (permalink / raw)
To: Ray Kinsella; +Cc: Stephen Coleman, dev, Ferruh Yigit
On Thu, 21 Apr 2022 11:40:00 -0400
Ray Kinsella <mdr@ashroe.eu> wrote:
> Stephen Hemminger <stephen@networkplumber.org> writes:
>
> > On Thu, 21 Apr 2022 12:38:26 +0800
> > Stephen Coleman <omegacoleman@gmail.com> wrote:
> >
> >> KNI ioctl functions copy data from userspace lib, and this interface
> >> of kmod is not compatible indeed. If the user use incompatible rte_kni.ko
> >> bad things happen: sometimes various fields contain garbage value,
> >> sometimes it cause a kmod soft lockup.
> >>
> >> Some common distros ship their own rte_kni.ko, so this is likely to
> >> happen.
> >>
> >> This patch add abi version checking between userland lib and kmod so
> >> that:
> >>
> >> * if kmod ioctl got a wrong abi magic, it refuse to go on
> >> * if userland lib, probed a wrong abi version via newly added ioctl, it
> >> also refuse to go on
> >>
> >> Bugzilla ID: 998
> >
> >
> > Kernel API's are supposed to be 99% stable.
> > If this driver was playing by the upstream kernel rules this would not
> > have happened.
>
> Well look, it is out-of-tree and never likely to be in-tree, so those
> rules don't apply. Making sure the ABI doesn't change during the ABI
> stablity period, should be good enough?
>
I think if KNI changes, it should just add more ioctl numbers and
be compatible, it is not that hard.
^ permalink raw reply [relevance 4%]
* Re: kni: check abi version between kmod and lib
2022-04-21 14:54 4% ` Stephen Hemminger
@ 2022-04-21 15:40 8% ` Ray Kinsella
2022-04-21 15:50 4% ` Stephen Hemminger
0 siblings, 1 reply; 200+ results
From: Ray Kinsella @ 2022-04-21 15:40 UTC (permalink / raw)
To: Stephen Hemminger; +Cc: Stephen Coleman, dev, Ferruh Yigit
Stephen Hemminger <stephen@networkplumber.org> writes:
> On Thu, 21 Apr 2022 12:38:26 +0800
> Stephen Coleman <omegacoleman@gmail.com> wrote:
>
>> KNI ioctl functions copy data from userspace lib, and this interface
>> of kmod is not compatible indeed. If the user use incompatible rte_kni.ko
>> bad things happen: sometimes various fields contain garbage value,
>> sometimes it cause a kmod soft lockup.
>>
>> Some common distros ship their own rte_kni.ko, so this is likely to
>> happen.
>>
>> This patch add abi version checking between userland lib and kmod so
>> that:
>>
>> * if kmod ioctl got a wrong abi magic, it refuse to go on
>> * if userland lib, probed a wrong abi version via newly added ioctl, it
>> also refuse to go on
>>
>> Bugzilla ID: 998
>
>
> Kernel API's are supposed to be 99% stable.
> If this driver was playing by the upstream kernel rules this would not
> have happened.
Well look, it is out-of-tree and never likely to be in-tree, so those
rules don't apply. Making sure the ABI doesn't change during the ABI
stablity period, should be good enough?
--
Regards, Ray K
^ permalink raw reply [relevance 8%]
* Re: kni: check abi version between kmod and lib
2022-04-21 4:38 16% kni: check abi version between kmod and lib Stephen Coleman
2022-04-21 14:16 4% ` Ray Kinsella
@ 2022-04-21 14:54 4% ` Stephen Hemminger
2022-04-21 15:40 8% ` Ray Kinsella
2022-04-21 16:34 15% ` [PATCH v2] " youcai
2022-04-24 8:51 15% ` [PATCH v3] " youcai
3 siblings, 1 reply; 200+ results
From: Stephen Hemminger @ 2022-04-21 14:54 UTC (permalink / raw)
To: Stephen Coleman; +Cc: dev, Ray Kinsella, Ferruh Yigit
On Thu, 21 Apr 2022 12:38:26 +0800
Stephen Coleman <omegacoleman@gmail.com> wrote:
> KNI ioctl functions copy data from userspace lib, and this interface
> of kmod is not compatible indeed. If the user use incompatible rte_kni.ko
> bad things happen: sometimes various fields contain garbage value,
> sometimes it cause a kmod soft lockup.
>
> Some common distros ship their own rte_kni.ko, so this is likely to
> happen.
>
> This patch add abi version checking between userland lib and kmod so
> that:
>
> * if kmod ioctl got a wrong abi magic, it refuse to go on
> * if userland lib, probed a wrong abi version via newly added ioctl, it
> also refuse to go on
>
> Bugzilla ID: 998
Kernel API's are supposed to be 99% stable.
If this driver was playing by the upstream kernel rules this would not
have happened.
^ permalink raw reply [relevance 4%]
* [PATCH v3 1/7] cryptodev: add APIs to get/set event metadata
2022-04-21 14:37 4% ` [PATCH v3 0/7] Add new cryptodev op for " Akhil Goyal
@ 2022-04-21 14:37 2% ` Akhil Goyal
2022-04-27 15:38 0% ` Zhang, Roy Fan
2022-04-28 14:42 0% ` Gujjar, Abhinandan S
2022-04-27 15:37 0% ` [PATCH v3 0/7] Add new cryptodev op for " Zhang, Roy Fan
` (2 subsequent siblings)
3 siblings, 2 replies; 200+ results
From: Akhil Goyal @ 2022-04-21 14:37 UTC (permalink / raw)
To: dev
Cc: anoobj, jerinj, abhinandan.gujjar, jay.jayatheerthan,
narender.vangati, vfialko, Akhil Goyal
From: Volodymyr Fialko <vfialko@marvell.com>
Currently, crypto session userdata is used to set event crypto
metadata from the application and the driver is dereferencing it
in driver which is not correct. User data is meant to be opaque
to the driver.
To support this, new API is added to get and set event crypto
metadata. The new API, rte_cryptodev_set_session_event_mdata,
allows setting event metadata in session private data which is
filled inside PMD using a new cryptodev op. This operation
can be performed on any of the PMD supported sessions
(sym/asym/security).
For SW abstraction of event crypto adapter to be used by
eventdev library, a new field is added in asymmetric crypto
session for now and for symmetric case, current implementation
of using userdata is used. Symmetric cases cannot be fixed now,
as it will be ABI breakage which will be resolved in DPDK 22.11.
Signed-off-by: Volodymyr Fialko <vfialko@marvell.com>
Signed-off-by: Akhil Goyal <gakhil@marvell.com>
---
lib/cryptodev/cryptodev_pmd.c | 16 ++++++++++++++
lib/cryptodev/cryptodev_pmd.h | 36 ++++++++++++++++++++++++++++++
lib/cryptodev/rte_cryptodev.c | 41 +++++++++++++++++++++++++++++++++++
lib/cryptodev/rte_cryptodev.h | 22 +++++++++++++++++++
lib/cryptodev/version.map | 4 ++++
5 files changed, 119 insertions(+)
diff --git a/lib/cryptodev/cryptodev_pmd.c b/lib/cryptodev/cryptodev_pmd.c
index 739a0b3f34..1903ade388 100644
--- a/lib/cryptodev/cryptodev_pmd.c
+++ b/lib/cryptodev/cryptodev_pmd.c
@@ -227,3 +227,19 @@ cryptodev_fp_ops_set(struct rte_crypto_fp_ops *fp_ops,
fp_ops->qp.enq_cb = dev->enq_cbs;
fp_ops->qp.deq_cb = dev->deq_cbs;
}
+
+void *
+rte_cryptodev_session_event_mdata_get(struct rte_crypto_op *op)
+{
+ if (op->type == RTE_CRYPTO_OP_TYPE_SYMMETRIC &&
+ op->sess_type == RTE_CRYPTO_OP_WITH_SESSION)
+ return rte_cryptodev_sym_session_get_user_data(op->sym->session);
+ else if (op->type == RTE_CRYPTO_OP_TYPE_ASYMMETRIC &&
+ op->sess_type == RTE_CRYPTO_OP_WITH_SESSION)
+ return op->asym->session->event_mdata;
+ else if (op->sess_type == RTE_CRYPTO_OP_SESSIONLESS &&
+ op->private_data_offset)
+ return ((uint8_t *)op + op->private_data_offset);
+ else
+ return NULL;
+}
diff --git a/lib/cryptodev/cryptodev_pmd.h b/lib/cryptodev/cryptodev_pmd.h
index 2b1ce2da2d..7969944b66 100644
--- a/lib/cryptodev/cryptodev_pmd.h
+++ b/lib/cryptodev/cryptodev_pmd.h
@@ -398,6 +398,25 @@ typedef int (*cryptodev_sym_configure_raw_dp_ctx_t)(
enum rte_crypto_op_sess_type sess_type,
union rte_cryptodev_session_ctx session_ctx, uint8_t is_update);
+/**
+ * Typedef that the driver provided to set event crypto meta data.
+ *
+ * @param dev Crypto device pointer.
+ * @param sess Crypto or security session.
+ * @param op_type Operation type.
+ * @param sess_type Session type.
+ * @param ev_mdata Pointer to the event crypto meta data
+ * (aka *union rte_event_crypto_metadata*)
+ * @return
+ * - On success return 0.
+ * - On failure return negative integer.
+ */
+typedef int (*cryptodev_session_event_mdata_set_t)(
+ struct rte_cryptodev *dev, void *sess,
+ enum rte_crypto_op_type op_type,
+ enum rte_crypto_op_sess_type sess_type,
+ void *ev_mdata);
+
/** Crypto device operations function pointer table */
struct rte_cryptodev_ops {
cryptodev_configure_t dev_configure; /**< Configure device. */
@@ -442,6 +461,8 @@ struct rte_cryptodev_ops {
/**< Initialize raw data path context data. */
};
};
+ cryptodev_session_event_mdata_set_t session_ev_mdata_set;
+ /**< Set a Crypto or Security session even meta data. */
};
@@ -603,6 +624,19 @@ void
cryptodev_fp_ops_set(struct rte_crypto_fp_ops *fp_ops,
const struct rte_cryptodev *dev);
+/**
+ * Get session event meta data (aka *union rte_event_crypto_metadata*)
+ *
+ * @param op pointer to *rte_crypto_op* structure.
+ *
+ * @return
+ * - On success, pointer to event crypto metadata
+ * - On failure, a negative value.
+ */
+__rte_internal
+void *
+rte_cryptodev_session_event_mdata_get(struct rte_crypto_op *op);
+
static inline void *
get_sym_session_private_data(const struct rte_cryptodev_sym_session *sess,
uint8_t driver_id) {
@@ -636,6 +670,8 @@ RTE_STD_C11 struct rte_cryptodev_asym_session {
/**< Size of private data used when creating mempool */
uint16_t user_data_sz;
/**< Session user data will be placed after sess_data */
+ void *event_mdata;
+ /**< Event crypto adapter metadata */
uint8_t padding[3];
uint8_t sess_private_data[0];
};
diff --git a/lib/cryptodev/rte_cryptodev.c b/lib/cryptodev/rte_cryptodev.c
index 3500a2d470..a070cb2a00 100644
--- a/lib/cryptodev/rte_cryptodev.c
+++ b/lib/cryptodev/rte_cryptodev.c
@@ -2051,6 +2051,9 @@ rte_cryptodev_asym_session_free(uint8_t dev_id, void *sess)
dev->dev_ops->asym_session_clear(dev, sess);
+ if (((struct rte_cryptodev_asym_session *)sess)->event_mdata)
+ rte_free(((struct rte_cryptodev_asym_session *)sess)->event_mdata);
+
/* Return session to mempool */
sess_mp = rte_mempool_from_obj(sess);
rte_mempool_put(sess_mp, sess);
@@ -2259,6 +2262,44 @@ rte_cryptodev_configure_raw_dp_ctx(uint8_t dev_id, uint16_t qp_id,
sess_type, session_ctx, is_update);
}
+int
+rte_cryptodev_session_event_mdata_set(uint8_t dev_id, void *sess,
+ enum rte_crypto_op_type op_type,
+ enum rte_crypto_op_sess_type sess_type,
+ void *ev_mdata,
+ uint16_t size)
+{
+ struct rte_cryptodev *dev;
+
+ if (!rte_cryptodev_is_valid_dev(dev_id))
+ goto skip_pmd_op;
+
+ dev = rte_cryptodev_pmd_get_dev(dev_id);
+ if (dev->dev_ops->session_ev_mdata_set == NULL)
+ goto skip_pmd_op;
+
+ return (*dev->dev_ops->session_ev_mdata_set)(dev, sess, op_type,
+ sess_type, ev_mdata);
+
+skip_pmd_op:
+ if (op_type == RTE_CRYPTO_OP_TYPE_SYMMETRIC)
+ return rte_cryptodev_sym_session_set_user_data(sess, ev_mdata,
+ size);
+ else if (op_type == RTE_CRYPTO_OP_TYPE_ASYMMETRIC) {
+ struct rte_cryptodev_asym_session *s = sess;
+
+ if (s->event_mdata == NULL) {
+ s->event_mdata = rte_malloc(NULL, size, 0);
+ if (s->event_mdata == NULL)
+ return -ENOMEM;
+ }
+ rte_memcpy(s->event_mdata, ev_mdata, size);
+
+ return 0;
+ } else
+ return -ENOTSUP;
+}
+
uint32_t
rte_cryptodev_raw_enqueue_burst(struct rte_crypto_raw_dp_ctx *ctx,
struct rte_crypto_sym_vec *vec, union rte_crypto_sym_ofs ofs,
diff --git a/lib/cryptodev/rte_cryptodev.h b/lib/cryptodev/rte_cryptodev.h
index 45d33f4a50..2c2c2edeb7 100644
--- a/lib/cryptodev/rte_cryptodev.h
+++ b/lib/cryptodev/rte_cryptodev.h
@@ -1269,6 +1269,28 @@ __rte_experimental
int
rte_cryptodev_get_raw_dp_ctx_size(uint8_t dev_id);
+/**
+ * Set session event meta data
+ *
+ * @param dev_id The device identifier.
+ * @param sess Crypto or security session.
+ * @param op_type Operation type.
+ * @param sess_type Session type.
+ * @param ev_mdata Pointer to the event crypto meta data
+ * (aka *union rte_event_crypto_metadata*)
+ * @param size Size of ev_mdata.
+ *
+ * @return
+ * - On success, zero.
+ * - On failure, a negative value.
+ */
+__rte_experimental
+int
+rte_cryptodev_session_event_mdata_set(uint8_t dev_id, void *sess,
+ enum rte_crypto_op_type op_type,
+ enum rte_crypto_op_sess_type sess_type,
+ void *ev_mdata, uint16_t size);
+
/**
* Union of different crypto session types, including session-less xform
* pointer.
diff --git a/lib/cryptodev/version.map b/lib/cryptodev/version.map
index c7c5aefceb..f0abfaa47d 100644
--- a/lib/cryptodev/version.map
+++ b/lib/cryptodev/version.map
@@ -105,6 +105,9 @@ EXPERIMENTAL {
rte_cryptodev_asym_session_pool_create;
rte_cryptodev_asym_session_set_user_data;
__rte_cryptodev_trace_asym_session_pool_create;
+
+ #added in 22.07
+ rte_cryptodev_session_event_mdata_set;
};
INTERNAL {
@@ -123,5 +126,6 @@ INTERNAL {
rte_cryptodev_pmd_parse_input_args;
rte_cryptodev_pmd_probing_finish;
rte_cryptodev_pmd_release_device;
+ rte_cryptodev_session_event_mdata_get;
rte_cryptodevs;
};
--
2.25.1
^ permalink raw reply [relevance 2%]
* [PATCH v3 0/7] Add new cryptodev op for event metadata
2022-04-18 19:33 4% ` [PATCH v2 0/7] Add new cryptodev op for " Akhil Goyal
2022-04-18 19:33 2% ` [PATCH v2 1/7] cryptodev: add APIs to get/set " Akhil Goyal
@ 2022-04-21 14:37 4% ` Akhil Goyal
2022-04-21 14:37 2% ` [PATCH v3 1/7] cryptodev: add APIs to get/set " Akhil Goyal
` (3 more replies)
1 sibling, 4 replies; 200+ results
From: Akhil Goyal @ 2022-04-21 14:37 UTC (permalink / raw)
To: dev
Cc: anoobj, jerinj, abhinandan.gujjar, jay.jayatheerthan,
narender.vangati, vfialko, Akhil Goyal
For using event crypto metadata, event metadata need to be set
in session. For this session user data was used for symmetric
crypto sessions and no support was present for asymmetric and
security sessions.
The use of userdata to store event metadata (which is dereferenced
in PMD) is not correct as it is meant for the application to use it.
Hence, a new API is created to set and get event crypto metadata which
is scalable to all sessions supported by the crypto PMD.
The application can use the set API to set event metadata and the
PMD may store that inside the session private data and PMD need not
use the get API as it would be internal to the PMD.
For the software event crypto adapter implementation, the eventdev
library can use the get API to get the event metadata stored inside
the session structure.
For Asymmetric sessions, a new field is added inside the session
struct which is internal to library.
For symmetric and security sessions, new field cannot be added as
it would be ABI break. Hence, session userdata is being used to
store that as it was used earlier. In next ABI break release this
would be fixed similar to asymmetric crypto case.
The patchset also add support for asymmetric crypto adapter
in the test applications and the crypto/cnxk implementation of
the new cryptodev op and corresponding changes in the eventdev lib.
Changes in v3:
- fix SW adapter case of memory allocation/free of mdata. mdata is
allocated in set API and freed in session clear/destroy.
- mark rte_cryptodev_session_event_mdata_get as internal API
as it is only needed for the app or the PMD.
changes in v2:
- v1 patchset only fixed security sessions and also caused ABI breakage.
This is fixed in v2.
- added new API for setting event metadata.
- added new cryptodev op which can handle all sessions
Akhil Goyal (5):
crypto/octeontx: use new API for event metadata
test/event: use new API to set event crypto metadata
eventdev: use new API to get event crypto metadata
test/event: add asymmetric cases for crypto adapter
test-eventdev: support asym ops for crypto adapter
Volodymyr Fialko (2):
cryptodev: add APIs to get/set event metadata
crypto/cnxk: add event metadata set operation
app/test-eventdev/evt_common.h | 2 +
app/test-eventdev/evt_options.c | 17 +
app/test-eventdev/evt_options.h | 4 +
app/test-eventdev/test_perf_atq.c | 12 +-
app/test-eventdev/test_perf_common.c | 254 ++++++++--
app/test-eventdev/test_perf_common.h | 45 +-
app/test-eventdev/test_perf_queue.c | 12 +-
app/test/test_event_crypto_adapter.c | 503 +++++++++++++++++++-
doc/guides/tools/testeventdev.rst | 5 +
drivers/crypto/cnxk/cn10k_cryptodev_ops.c | 144 +++++-
drivers/crypto/cnxk/cn10k_ipsec.h | 2 +
drivers/crypto/cnxk/cn9k_cryptodev_ops.c | 138 +++++-
drivers/crypto/cnxk/cn9k_ipsec.h | 2 +
drivers/crypto/cnxk/cnxk_ae.h | 2 +
drivers/crypto/cnxk/cnxk_cryptodev_ops.h | 18 -
drivers/crypto/cnxk/cnxk_se.h | 2 +
drivers/crypto/octeontx/otx_cryptodev_ops.c | 20 +-
lib/cryptodev/cryptodev_pmd.c | 16 +
lib/cryptodev/cryptodev_pmd.h | 36 ++
lib/cryptodev/rte_cryptodev.c | 41 ++
lib/cryptodev/rte_cryptodev.h | 22 +
lib/cryptodev/version.map | 4 +
lib/eventdev/rte_event_crypto_adapter.c | 55 +--
23 files changed, 1168 insertions(+), 188 deletions(-)
--
2.25.1
^ permalink raw reply [relevance 4%]
* Re: kni: check abi version between kmod and lib
2022-04-21 4:38 16% kni: check abi version between kmod and lib Stephen Coleman
@ 2022-04-21 14:16 4% ` Ray Kinsella
2022-04-21 14:54 4% ` Stephen Hemminger
` (2 subsequent siblings)
3 siblings, 0 replies; 200+ results
From: Ray Kinsella @ 2022-04-21 14:16 UTC (permalink / raw)
To: Stephen Coleman; +Cc: dev, Ferruh Yigit
Stephen Coleman <omegacoleman@gmail.com> writes:
> KNI ioctl functions copy data from userspace lib, and this interface
> of kmod is not compatible indeed. If the user use incompatible rte_kni.ko
> bad things happen: sometimes various fields contain garbage value,
> sometimes it cause a kmod soft lockup.
>
> Some common distros ship their own rte_kni.ko, so this is likely to
> happen.
>
> This patch add abi version checking between userland lib and kmod so
> that:
>
> * if kmod ioctl got a wrong abi magic, it refuse to go on
> * if userland lib, probed a wrong abi version via newly added ioctl, it
> also refuse to go on
>
> Bugzilla ID: 998
>
> Signed-off-by: youcai <omegacoleman@gmail.com>
> ---
> kernel/linux/kni/kni_misc.c | 38 +++++++++++++++++++++++++++++++++++++
> lib/kni/rte_kni.c | 16 ++++++++++++++++
> lib/kni/rte_kni_common.h | 11 +++++++++++
> 3 files changed, 65 insertions(+)
>
> diff --git a/kernel/linux/kni/kni_misc.c b/kernel/linux/kni/kni_misc.c
> index 780187d8bf..cd9a05d8c1 100644
> --- a/kernel/linux/kni/kni_misc.c
> +++ b/kernel/linux/kni/kni_misc.c
> @@ -236,12 +236,24 @@ kni_release(struct inode *inode, struct file *file)
> return 0;
> }
>
> +static int kni_check_abi_version_magic(uint16_t abi_version_magic) {
> + if (abi_version_magic != RTE_KNI_ABI_VERSION_MAGIC) {
> + pr_err("KNI kmod ABI incompatible with librte_kni -- %u\n",
> + RTE_KNI_ABI_VERSION_FROM_MAGIC(abi_version_magic));
> + return -1;
> + }
> + return 0;
> +}
> +
> static int
> kni_check_param(struct kni_dev *kni, struct rte_kni_device_info *dev)
> {
> if (!kni || !dev)
> return -1;
>
> + if (kni_check_abi_version_magic(dev->abi_version_magic) < 0)
> + return -1;
> +
> /* Check if network name has been used */
> if (!strncmp(kni->name, dev->name, RTE_KNI_NAMESIZE)) {
> pr_err("KNI name %s duplicated\n", dev->name);
> @@ -301,12 +313,19 @@ kni_ioctl_create(struct net *net, uint32_t ioctl_num,
> struct rte_kni_device_info dev_info;
> struct net_device *net_dev = NULL;
> struct kni_dev *kni, *dev, *n;
> + uint16_t abi_version_magic;
>
> pr_info("Creating kni...\n");
> /* Check the buffer size, to avoid warning */
> if (_IOC_SIZE(ioctl_num) > sizeof(dev_info))
> return -EINVAL;
>
> + /* perform abi check ahead of copy, to avoid possible violation */
> + if (copy_from_user(&abi_version_magic, (void *)ioctl_param,
> sizeof(uint16_t)))
> + return -EFAULT;
> + if (kni_check_abi_version_magic(abi_version_magic) < 0)
> + return -EINVAL;
> +
> /* Copy kni info from user space */
> if (copy_from_user(&dev_info, (void *)ioctl_param, sizeof(dev_info)))
> return -EFAULT;
> @@ -451,10 +470,17 @@ kni_ioctl_release(struct net *net, uint32_t ioctl_num,
> int ret = -EINVAL;
> struct kni_dev *dev, *n;
> struct rte_kni_device_info dev_info;
> + uint16_t abi_version_magic;
>
> if (_IOC_SIZE(ioctl_num) > sizeof(dev_info))
> return -EINVAL;
>
> + /* perform abi check ahead of copy, to avoid possible violation */
> + if (copy_from_user(&abi_version_magic, (void *)ioctl_param,
> sizeof(uint16_t)))
> + return -EFAULT;
> + if (kni_check_abi_version_magic(abi_version_magic) < 0)
> + return -EINVAL;
> +
> if (copy_from_user(&dev_info, (void *)ioctl_param, sizeof(dev_info)))
> return -EFAULT;
>
> @@ -484,6 +510,15 @@ kni_ioctl_release(struct net *net, uint32_t ioctl_num,
> return ret;
> }
>
> +static int
> +kni_ioctl_abi_version(struct net *net, uint32_t ioctl_num,
> + unsigned long ioctl_param)
> +{
> + uint16_t abi_version = RTE_KNI_ABI_VERSION;
> + copy_to_user((void *)ioctl_param, &abi_version, sizeof(uint16_t));
> + return 0;
> +}
> +
> static long
> kni_ioctl(struct file *file, unsigned int ioctl_num, unsigned long ioctl_param)
> {
> @@ -505,6 +540,9 @@ kni_ioctl(struct file *file, unsigned int
> ioctl_num, unsigned long ioctl_param)
> case _IOC_NR(RTE_KNI_IOCTL_RELEASE):
> ret = kni_ioctl_release(net, ioctl_num, ioctl_param);
> break;
> + case _IOC_NR(RTE_KNI_IOCTL_ABI_VERSION):
> + ret = kni_ioctl_abi_version(net, ioctl_num, ioctl_param);
> + break;
> default:
> pr_debug("IOCTL default\n");
> break;
> diff --git a/lib/kni/rte_kni.c b/lib/kni/rte_kni.c
> index 7971c56bb4..d7116e582c 100644
> --- a/lib/kni/rte_kni.c
> +++ b/lib/kni/rte_kni.c
> @@ -113,6 +113,19 @@ rte_kni_init(unsigned int max_kni_ifaces __rte_unused)
> }
> }
>
> + uint16_t abi_version;
> + int ret = ioctl(kni_fd, RTE_KNI_IOCTL_ABI_VERSION, &abi_version);
> + if (ret < 0) {
> + RTE_LOG(ERR, KNI, "Cannot verify rte_kni kmod ABI version:
> ioctl failed\n");
> + return -1;
> + }
> + if (abi_version != RTE_KNI_ABI_VERSION) {
> + RTE_LOG(ERR, KNI,
> + "rte_kni kmod ABI version mismatch: "
> + "need %" PRIu16 " got %" PRIu16 "\n", RTE_KNI_ABI_VERSION,
> abi_version);
> + return -1;
> + }
> +
> return 0;
> }
>
> @@ -255,6 +268,7 @@ rte_kni_alloc(struct rte_mempool *pktmbuf_pool,
> kni->ops.port_id = UINT16_MAX;
>
> memset(&dev_info, 0, sizeof(dev_info));
> + dev_info.abi_version_magic = RTE_KNI_ABI_VERSION_MAGIC;
> dev_info.core_id = conf->core_id;
> dev_info.force_bind = conf->force_bind;
> dev_info.group_id = conf->group_id;
> @@ -409,6 +423,8 @@ rte_kni_release(struct rte_kni *kni)
> if (!kni)
> return -1;
>
> + dev_info.abi_version_magic = RTE_KNI_ABI_VERSION_MAGIC;
> +
> kni_list = RTE_TAILQ_CAST(rte_kni_tailq.head, rte_kni_list);
>
> rte_mcfg_tailq_write_lock();
> diff --git a/lib/kni/rte_kni_common.h b/lib/kni/rte_kni_common.h
> index 8d3ee0fa4f..c353043cb6 100644
> --- a/lib/kni/rte_kni_common.h
> +++ b/lib/kni/rte_kni_common.h
> @@ -26,6 +26,14 @@ extern "C" {
>
> #define RTE_CACHE_LINE_MIN_SIZE 64
>
> +/*
> + * Ascend this number if ABI is altered between kmod and userland lib
> + */
> +#define RTE_KNI_ABI_VERSION 1
Instead of creating a new magic number, could you reference the
ABI_VERSION instead.
> +#define RTE_KNI_ABI_VERSION_MAGIC_MASK 0xAAAA
> +#define RTE_KNI_ABI_VERSION_MAGIC (((RTE_KNI_ABI_VERSION) ^
> RTE_KNI_ABI_VERSION_MAGIC_MASK))
> +#define RTE_KNI_ABI_VERSION_FROM_MAGIC(__magic) (((__magic) ^
> RTE_KNI_ABI_VERSION_MAGIC_MASK))
> +
> /*
> * Request id.
> */
> @@ -102,6 +110,8 @@ struct rte_kni_mbuf {
> */
>
> struct rte_kni_device_info {
> + uint16_t abi_version_magic;
> +
> char name[RTE_KNI_NAMESIZE]; /**< Network device name for KNI */
>
> phys_addr_t tx_phys;
> @@ -139,6 +149,7 @@ struct rte_kni_device_info {
> #define RTE_KNI_IOCTL_TEST _IOWR(0, 1, int)
> #define RTE_KNI_IOCTL_CREATE _IOWR(0, 2, struct rte_kni_device_info)
> #define RTE_KNI_IOCTL_RELEASE _IOWR(0, 3, struct rte_kni_device_info)
> +#define RTE_KNI_IOCTL_ABI_VERSION _IOWR(0, 4, uint16_t)
>
> #ifdef __cplusplus
> }
--
Regards, Ray K
^ permalink raw reply [relevance 4%]
* kni: check abi version between kmod and lib
@ 2022-04-21 4:38 16% Stephen Coleman
2022-04-21 14:16 4% ` Ray Kinsella
` (3 more replies)
0 siblings, 4 replies; 200+ results
From: Stephen Coleman @ 2022-04-21 4:38 UTC (permalink / raw)
To: dev; +Cc: Ray Kinsella, Ferruh Yigit
KNI ioctl functions copy data from userspace lib, and this interface
of kmod is not compatible indeed. If the user use incompatible rte_kni.ko
bad things happen: sometimes various fields contain garbage value,
sometimes it cause a kmod soft lockup.
Some common distros ship their own rte_kni.ko, so this is likely to
happen.
This patch add abi version checking between userland lib and kmod so
that:
* if kmod ioctl got a wrong abi magic, it refuse to go on
* if userland lib, probed a wrong abi version via newly added ioctl, it
also refuse to go on
Bugzilla ID: 998
Signed-off-by: youcai <omegacoleman@gmail.com>
---
kernel/linux/kni/kni_misc.c | 38 +++++++++++++++++++++++++++++++++++++
lib/kni/rte_kni.c | 16 ++++++++++++++++
lib/kni/rte_kni_common.h | 11 +++++++++++
3 files changed, 65 insertions(+)
diff --git a/kernel/linux/kni/kni_misc.c b/kernel/linux/kni/kni_misc.c
index 780187d8bf..cd9a05d8c1 100644
--- a/kernel/linux/kni/kni_misc.c
+++ b/kernel/linux/kni/kni_misc.c
@@ -236,12 +236,24 @@ kni_release(struct inode *inode, struct file *file)
return 0;
}
+static int kni_check_abi_version_magic(uint16_t abi_version_magic) {
+ if (abi_version_magic != RTE_KNI_ABI_VERSION_MAGIC) {
+ pr_err("KNI kmod ABI incompatible with librte_kni -- %u\n",
+ RTE_KNI_ABI_VERSION_FROM_MAGIC(abi_version_magic));
+ return -1;
+ }
+ return 0;
+}
+
static int
kni_check_param(struct kni_dev *kni, struct rte_kni_device_info *dev)
{
if (!kni || !dev)
return -1;
+ if (kni_check_abi_version_magic(dev->abi_version_magic) < 0)
+ return -1;
+
/* Check if network name has been used */
if (!strncmp(kni->name, dev->name, RTE_KNI_NAMESIZE)) {
pr_err("KNI name %s duplicated\n", dev->name);
@@ -301,12 +313,19 @@ kni_ioctl_create(struct net *net, uint32_t ioctl_num,
struct rte_kni_device_info dev_info;
struct net_device *net_dev = NULL;
struct kni_dev *kni, *dev, *n;
+ uint16_t abi_version_magic;
pr_info("Creating kni...\n");
/* Check the buffer size, to avoid warning */
if (_IOC_SIZE(ioctl_num) > sizeof(dev_info))
return -EINVAL;
+ /* perform abi check ahead of copy, to avoid possible violation */
+ if (copy_from_user(&abi_version_magic, (void *)ioctl_param,
sizeof(uint16_t)))
+ return -EFAULT;
+ if (kni_check_abi_version_magic(abi_version_magic) < 0)
+ return -EINVAL;
+
/* Copy kni info from user space */
if (copy_from_user(&dev_info, (void *)ioctl_param, sizeof(dev_info)))
return -EFAULT;
@@ -451,10 +470,17 @@ kni_ioctl_release(struct net *net, uint32_t ioctl_num,
int ret = -EINVAL;
struct kni_dev *dev, *n;
struct rte_kni_device_info dev_info;
+ uint16_t abi_version_magic;
if (_IOC_SIZE(ioctl_num) > sizeof(dev_info))
return -EINVAL;
+ /* perform abi check ahead of copy, to avoid possible violation */
+ if (copy_from_user(&abi_version_magic, (void *)ioctl_param,
sizeof(uint16_t)))
+ return -EFAULT;
+ if (kni_check_abi_version_magic(abi_version_magic) < 0)
+ return -EINVAL;
+
if (copy_from_user(&dev_info, (void *)ioctl_param, sizeof(dev_info)))
return -EFAULT;
@@ -484,6 +510,15 @@ kni_ioctl_release(struct net *net, uint32_t ioctl_num,
return ret;
}
+static int
+kni_ioctl_abi_version(struct net *net, uint32_t ioctl_num,
+ unsigned long ioctl_param)
+{
+ uint16_t abi_version = RTE_KNI_ABI_VERSION;
+ copy_to_user((void *)ioctl_param, &abi_version, sizeof(uint16_t));
+ return 0;
+}
+
static long
kni_ioctl(struct file *file, unsigned int ioctl_num, unsigned long ioctl_param)
{
@@ -505,6 +540,9 @@ kni_ioctl(struct file *file, unsigned int
ioctl_num, unsigned long ioctl_param)
case _IOC_NR(RTE_KNI_IOCTL_RELEASE):
ret = kni_ioctl_release(net, ioctl_num, ioctl_param);
break;
+ case _IOC_NR(RTE_KNI_IOCTL_ABI_VERSION):
+ ret = kni_ioctl_abi_version(net, ioctl_num, ioctl_param);
+ break;
default:
pr_debug("IOCTL default\n");
break;
diff --git a/lib/kni/rte_kni.c b/lib/kni/rte_kni.c
index 7971c56bb4..d7116e582c 100644
--- a/lib/kni/rte_kni.c
+++ b/lib/kni/rte_kni.c
@@ -113,6 +113,19 @@ rte_kni_init(unsigned int max_kni_ifaces __rte_unused)
}
}
+ uint16_t abi_version;
+ int ret = ioctl(kni_fd, RTE_KNI_IOCTL_ABI_VERSION, &abi_version);
+ if (ret < 0) {
+ RTE_LOG(ERR, KNI, "Cannot verify rte_kni kmod ABI version:
ioctl failed\n");
+ return -1;
+ }
+ if (abi_version != RTE_KNI_ABI_VERSION) {
+ RTE_LOG(ERR, KNI,
+ "rte_kni kmod ABI version mismatch: "
+ "need %" PRIu16 " got %" PRIu16 "\n", RTE_KNI_ABI_VERSION,
abi_version);
+ return -1;
+ }
+
return 0;
}
@@ -255,6 +268,7 @@ rte_kni_alloc(struct rte_mempool *pktmbuf_pool,
kni->ops.port_id = UINT16_MAX;
memset(&dev_info, 0, sizeof(dev_info));
+ dev_info.abi_version_magic = RTE_KNI_ABI_VERSION_MAGIC;
dev_info.core_id = conf->core_id;
dev_info.force_bind = conf->force_bind;
dev_info.group_id = conf->group_id;
@@ -409,6 +423,8 @@ rte_kni_release(struct rte_kni *kni)
if (!kni)
return -1;
+ dev_info.abi_version_magic = RTE_KNI_ABI_VERSION_MAGIC;
+
kni_list = RTE_TAILQ_CAST(rte_kni_tailq.head, rte_kni_list);
rte_mcfg_tailq_write_lock();
diff --git a/lib/kni/rte_kni_common.h b/lib/kni/rte_kni_common.h
index 8d3ee0fa4f..c353043cb6 100644
--- a/lib/kni/rte_kni_common.h
+++ b/lib/kni/rte_kni_common.h
@@ -26,6 +26,14 @@ extern "C" {
#define RTE_CACHE_LINE_MIN_SIZE 64
+/*
+ * Ascend this number if ABI is altered between kmod and userland lib
+ */
+#define RTE_KNI_ABI_VERSION 1
+#define RTE_KNI_ABI_VERSION_MAGIC_MASK 0xAAAA
+#define RTE_KNI_ABI_VERSION_MAGIC (((RTE_KNI_ABI_VERSION) ^
RTE_KNI_ABI_VERSION_MAGIC_MASK))
+#define RTE_KNI_ABI_VERSION_FROM_MAGIC(__magic) (((__magic) ^
RTE_KNI_ABI_VERSION_MAGIC_MASK))
+
/*
* Request id.
*/
@@ -102,6 +110,8 @@ struct rte_kni_mbuf {
*/
struct rte_kni_device_info {
+ uint16_t abi_version_magic;
+
char name[RTE_KNI_NAMESIZE]; /**< Network device name for KNI */
phys_addr_t tx_phys;
@@ -139,6 +149,7 @@ struct rte_kni_device_info {
#define RTE_KNI_IOCTL_TEST _IOWR(0, 1, int)
#define RTE_KNI_IOCTL_CREATE _IOWR(0, 2, struct rte_kni_device_info)
#define RTE_KNI_IOCTL_RELEASE _IOWR(0, 3, struct rte_kni_device_info)
+#define RTE_KNI_IOCTL_ABI_VERSION _IOWR(0, 4, uint16_t)
#ifdef __cplusplus
}
--
2.30.1
^ permalink raw reply [relevance 16%]
* RE: [EXT] Re: [PATCH v4 07/10] ethdev: add IPsec SA expiry event subtypes
2022-04-19 15:41 0% ` Ray Kinsella
@ 2022-04-20 13:51 0% ` Akhil Goyal
0 siblings, 0 replies; 200+ results
From: Akhil Goyal @ 2022-04-20 13:51 UTC (permalink / raw)
To: Ray Kinsella
Cc: Thomas Monjalon, dev, david.marchand, hemant.agrawal,
Anoob Joseph, konstantin.ananyev, ciara.power, ferruh.yigit,
andrew.rybchenko, Nithin Kumar Dabilpuram,
Vamsi Krishna Attunuru
Hi Ray,
> >> > > > + RTE_ETH_EVENT_IPSEC_SA_PKT_EXPIRY,
> >> > > > + /** Hard byte expiry of SA */
> >> > > > + RTE_ETH_EVENT_IPSEC_SA_BYTE_HARD_EXPIRY,
> >> > > > + /** Hard packet expiry of SA */
> >> > > > + RTE_ETH_EVENT_IPSEC_SA_PKT_HARD_EXPIRY,
> >> > >
> >> > > Same comment for the 3 events.
> >> > >
> >> > > > /** Max value of this enum */
> >> > > > RTE_ETH_EVENT_IPSEC_MAX
> >> > > > };
> >> > >
> >> > > What is the impact of this "MAX" value on ABI compatibility?
> >> >
> >> > I see no issues reported while running ABI check.
> >> > There is no array being used inside library based on MAX.
> >>
> >> No need of array inside the library, the events are exposed to the app.
> >> I'm surprised libabigail is OK with changing an enum value.
> >>
> > @Ray Can you please check if it is an issue to add more values in this enum?
>
> Well look there is two seperate things going on here.
>
> Why isn't libabigail complaining about the _MAX value changing. I'll
> need to look at libabigail to see what the issue is, so lets put this
> one aside for a moment.
>
> This second issue is it safe for the _MAX value to change?
> We have a lot of back and forth argument on these, and previously
> concluded that we should probably look to remove _MAX values in the
> 22.11 release.
Agreed.
>
> The core issue is that we need look at how a user is likely to use
> rte_eth_event_ipsec_subtype. Take a look at the example below:-
>
> /root/src/dpdk/examples/ipsec-secgw/ipsec-secgw.c:2592:0
>
> For instance, can we guarantee that an application built against DPDK
> 21.11, but running against 22.xx will never recieve one of the new
> values in event_desc->subtype (or by any other means)?
ok we can defer the 7/10, 8/10, 9/10 patch to next release then.
^ permalink raw reply [relevance 0%]
* RE: [RFC] eal: add bus cleanup to eal cleanup
@ 2022-04-20 6:55 4% ` Morten Brørup
2022-04-22 9:18 4% ` Kevin Laatz
1 sibling, 1 reply; 200+ results
From: Morten Brørup @ 2022-04-20 6:55 UTC (permalink / raw)
To: Kevin Laatz, dev
> From: Kevin Laatz [mailto:kevin.laatz@intel.com]
> Sent: Tuesday, 19 April 2022 18.15
>
> During EAL init, all buses are probed and the devices found are
> initialized. On eal_cleanup(), the inverse does not happen, meaning any
> allocated memory and other configuration will not be cleaned up
> appropriately on exit.
>
> Currently, in order for device cleanup to take place, applications must
> call the driver-relevant functions to ensure proper cleanup is done
> before
> the application exits. Since initialization occurs for all devices on
> the
> bus, not just the devices used by an application, it requires a)
> application awareness of all bus devices that could have been probed on
> the
> system, and b) code duplication across applications to ensure cleanup
> is
> performed. An example of this is rte_eth_dev_close() which is commonly
> used
> across the example applications.
>
> This RFC proposes adding bus cleanup to the eal_cleanup() to make EAL's
> init/exit more symmetrical, ensuring all bus devices are cleaned up
> appropriately without the application needing to be aware of all bus
> types
> that may have been probed during initialization.
>
> Contained in this RFC are the changes required to perform cleanup for
> devices on the PCI bus during eal_cleanup(). This can be expanded in
> subsequent versions if these changes are desired. There would be an ask
> for
> bus maintainers to add the relevant cleanup for their buses since they
> have
> the domain expertise.
>
> Signed-off-by: Kevin Laatz <kevin.laatz@intel.com>
> ---
[...]
> + RTE_LOG(INFO, EAL,
> + "Clean up PCI driver: %s (%x:%x) device:
> "PCI_PRI_FMT" (socket %i)\n",
> + drv->driver.name, dev->id.vendor_id, dev-
> >id.device_id,
> + loc->domain, loc->bus, loc->devid, loc-
> >function,
> + dev->device.numa_node);
I agree with Stephen, this message might as well be DEBUG level. You could argue for symmetry: If the "alloc" message during startup is INFO level, it makes sense using INFO level for the "free" message during cleanup too. However, the message probably has far lower information value during cleanup (because this driver cleanup is expected to happen), so I would degrade it to DEBUG level. Symmetry is not always the strongest argument. I have no strong preference, so I'll leave it up to you, Kevin.
[...]
> @@ -263,6 +275,7 @@ struct rte_bus {
> const char *name; /**< Name of the bus */
> rte_bus_scan_t scan; /**< Scan for devices attached to
> bus */
> rte_bus_probe_t probe; /**< Probe devices on bus */
> + rte_bus_cleanup_t cleanup; /**< Cleanup devices on bus */
> rte_bus_find_device_t find_device; /**< Find a device on the bus
> */
> rte_bus_plug_t plug; /**< Probe single device for drivers
> */
> rte_bus_unplug_t unplug; /**< Remove single device from
> driver */
Have you considered if modifying the rte_bus structure in /lib/eal/include/rte_bus.h breaks the ABI or not?
Overall, this patch is certainly a good idea!
On the condition that modifying the rte_bus structure does not break the ABI...
Acked-by: Morten Brørup <mb@smartsharesystems.com>
^ permalink raw reply [relevance 4%]
* Re: 21.11.1 patches review and test
2022-04-01 10:22 2% 21.11.1 patches review and test Kevin Traynor
2022-04-11 3:03 0% ` Pei Zhang
2022-04-11 6:58 0% ` Christian Ehrhardt
@ 2022-04-20 5:50 3% ` Christian Ehrhardt
2022-04-25 13:39 0% ` Kevin Traynor
2 siblings, 1 reply; 200+ results
From: Christian Ehrhardt @ 2022-04-20 5:50 UTC (permalink / raw)
To: Kevin Traynor
Cc: stable, dev, Abhishek Marathe, Ali Alnubani, benjamin.walker,
David Christensen, hariprasad.govindharajan, Hemant Agrawal,
Ian Stokes, Jerin Jacob, John McNamara, Ju-Hyoung Lee,
Luca Boccassi, Pei Zhang, qian.q.xu, Raslan Darawsheh,
Thomas Monjalon, yuan.peng, zhaoyan.chen
On Fri, Apr 1, 2022 at 12:22 PM Kevin Traynor <ktraynor@redhat.com> wrote:
>
> Hi all,
>
> Here is a list of patches targeted for stable release 21.11.1.
>
> Please try and complete validation by April 13th.
>
> Please help with testing and validation of your use cases and report
> any issues/results with reply-all to this mail. For the final release
> the fixes and reported validations will be added to the release notes.
>
> A release candidate tarball can be found at:
>
> https://dpdk.org/browse/dpdk-stable/tag/?id=v21.11.1-rc1
>
> These patches are located at branch 21.11 of dpdk-stable repo:
> https://dpdk.org/browse/dpdk-stable/
Hi Kevin,
now that the ABI change discussion has somewhat settled I have run the
tests ignoring the symbols changes for now.
All LGTM on Ubuntu 22.04 + OVS 2.17 + DPDK 21.11.1-rc1
1.0.0 (11:42:53): phys (BM) tests
1.1.0 (11:42:53): initialize environment
1.1.1 (11:44:54): testpmd => Pass
1.1.2 (11:45:43): check testpmd output => Pass
2.0.0 (11:45:43): prep virtual test environment
1.0.0 (11:48:05): virt tests
1.1.0 (11:48:05): initialize environment
3.0.0 (11:49:30): performance tests
3.1.0 (11:49:30): prep benchmarks
3.2.0 (11:49:51): performance tests
3.2.1 (11:50:02): test guest-openvswitch for OVS-5CPU => Pass
3.2.2 (12:09:30): test guest-dpdk-vhost-user-client-multiq for
OVSDPDK-VUC => Pass
4.0.0 (12:28:54): VUC endurance checks
4.1.0 (12:28:54): prep VUC endurance tests
4.1.1 (12:41:59): start stop guests (client) => Pass
4.1.2 (13:48:30): add/remove ports (client) => Pass
4.2.0 (13:58:11): Final cleanup
The above is kind of a high level test log, for the validation section
of a stable release I usually use:
* Build tests of DPDK & OVS 2.13.3 on Ubuntu 20.04 (meson based)
* Functional and performance tests based on OVS-DPDK on x86_64
* Autopkgtests for DPDK and OpenvSwitch
> Thanks.
>
> Kevin
>
> ---
> Adham Masarwah (2):
> net/mlx5: fix destroying empty matchers list
> app/testpmd: fix show RSS RETA on Windows
>
> Ajit Khaparde (7):
> net/bnxt: fix ring teardown
> net/bnxt: fix PAM4 mask setting
> net/bnxt: fix crash by validating pointer
> net/bnxt: check VF representor pointer before access
> net/bnxt: fix VF resource allocation strategy
> net/bnxt: set HW coalescing parameters
> net/bnxt: fix ring calculation for representors
>
> Alexander Kozyrev (4):
> net/mlx5: fix maximum packet headers size for TSO
> net/mlx5: fix MPRQ WQE size assertion
> net/mlx5: fix committed bucket size
> net/mlx5: fix meter capabilities reporting
>
> Ali Alnubani (1):
> doc: fix typos and punctuation in flow API guide
>
> Anatoly Burakov (1):
> net/qede: fix redundant condition in debug code
>
> Andy Pei (1):
> vdpa/ifc: fix log info mismatch
>
> Ankur Dwivedi (1):
> common/cnxk: fix NPC key extraction validation
>
> Anoob Joseph (4):
> common/cnxk: fix reset of fields
> crypto/cnxk: fix inflight count calculation
> crypto/cnxk: fix extend tail calculation
> crypto/cnxk: fix update of number of descriptors
>
> Arek Kusztal (1):
> cryptodev: fix RSA key type name
>
> Asaf Ravid (1):
> net/cnxk: fix promiscuous mode in multicast enable flow
>
> Ashwin Sekhar T K (1):
> mempool/cnxk: fix batch allocation failure path
>
> Bin Zheng (1):
> net/ixgbe: add vector Rx parameter check
>
> Bing Zhao (5):
> common/mlx5: fix probing failure code
> app/testpmd: fix raw encap of GENEVE option
> net/mlx5: fix matcher priority with ICMP or ICMPv6
> net/mlx5: remove unused reference counter
> net/mlx5: fix configuration without Rx queue
>
> Brian Dooley (13):
> eal: add missing C++ guards
> telemetry: add missing C++ guards
> ethdev: add missing C++ guards
> metrics: add missing C++ guards
> acl: add missing C++ guards
> compressdev: add missing C++ guards
> eventdev: add missing C++ guards
> kni: add missing C++ guards
> vhost: add missing C++ guards
> bpf: add missing C++ guards
> cryptodev: add missing C++ guards
> examples/l2fwd-crypto: fix port mask overflow
> crypto/virtio: fix out-of-bounds access
>
> Bruce Richardson (23):
> doc: remove dependency on findutils on FreeBSD
> dma/idxd: fix burst capacity calculation
> dma/idxd: fix paths to driver sysfs directory
> dma/idxd: fix wrap-around in burst capacity calculation
> build: fix warnings when running external commands
> build: remove deprecated Meson functions
> eal: fix C++ include
> eventdev: fix C++ include
> graph: fix C++ include
> ipsec: fix C++ include
> table: fix C++ include
> vhost: fix C++ include
> ethdev: fix cast for C++ compatibility
> test/dma: fix missing checks for device capacity
> dma/idxd: configure maximum batch size to high value
> doc: improve configuration examples in idxd guide
> distributor: fix potential overflow
> eal/freebsd: add missing C++ include guards
> compressdev: fix missing space in log macro
> cryptodev: fix clang C++ include
> eventdev: fix clang C++ include
> doc: replace characters for (R) symbol in Linux guide
> doc: fix missing note on UIO module in Linux guide
>
> Chandubabu Namburu (1):
> net/axgbe: use PCI root complex device to distinguish device
>
> Chenbo Xia (1):
> vhost: fix queue number check when setting inflight FD
>
> Chengchang Tang (1):
> net/bonding: fix offloading configuration
>
> Chengwen Feng (2):
> net/hns3: delete duplicated RSS type
> dma/hisilicon: use common PCI device naming
>
> Chuanshe Zhang (1):
> examples/flow_classify: fix failure message
>
> Ciara Loftus (2):
> net/af_xdp: fix build with -Wunused-function
> net/af_xdp: ensure socket is deleted on Rx queue setup error
>
> Ciara Power (4):
> crypto/ipsec_mb: fix queue setup null pointer dereference
> crypto/ipsec_mb: fix queue cleanup null pointer dereference
> crypto/ipsec_mb: fix tainted data for session
> crypto/ipsec_mb: remove useless check
>
> Cristian Dumitrescu (2):
> pipeline: fix annotation checks
> pipeline: fix table state memory allocation
>
> Dapeng Yu (2):
> net/ice: track DCF state of PF
> net/i40e: enable maximum frame size at port level
>
> Dariusz Sosnowski (3):
> net/mlx5: fix inline length for multi-segment TSO
> net/mlx5: fix MPLS/GRE Verbs spec ordering
> net/mlx5: fix VLAN push action validation
>
> David Marchand (8):
> devtools: fix comment detection in forbidden token check
> stack: fix stubs header export
> test/mbuf: fix mbuf data content check
> ethdev: fix MAC address in telemetry device info
> net/af_xdp: add missing trailing newline in logs
> devtools: remove event/dlb exception in ABI check
> vhost: fix FD leak with inflight messages
> bpf: fix build with some libpcap version on FreeBSD
>
> Dawid Gorecki (2):
> net/ena: fix reset reason being overwritten
> net/ena: check memory BAR before initializing LLQ
>
> Devendra Singh Rawat (3):
> net/qede: fix Tx completion
> net/qede: fix Rx bulk
> net/qede: fix maximum Rx packet length
>
> Dmitry Kozlyuk (8):
> net/mlx5: fix GCC uninitialized variable warning
> net/mlx5: relax headroom assertion
> app/testpmd: fix external buffer allocation
> common/mlx5: fix MR lookup for non-contiguous mempool
> common/mlx5: add Netlink event helpers
> net/mlx5: fix link status change detection
> net/mlx5: fix initial link status detection
> net/mlx5: fix modify port action validation
>
> Elena Agostini (3):
> gpu/cuda: fix memory list cleanup
> doc: add CUDA driver features
> gpu/cuda: fix dependency loading path
>
> Ferruh Yigit (2):
> net/bonding: fix MTU set for slaves
> ethdev: fix doxygen comments for device info struct
>
> Geoffrey Le Gourriérec (1):
> net/bnxt: restore dependency on kernel modules
>
> Gerry Gribbon (1):
> app/regex: fix number of matches
>
> Gowrishankar Muthukrishnan (6):
> event/cnxk: fix variables casting
> event/cnxk: fix uninitialized local variables
> common/cnxk: add missing checks of return values
> common/cnxk fix unintended sign extension
> common/cnxk: fix uninitialized pointer read
> net/cnxk: fix uninitialized local variable
>
> Gregory Etelson (10):
> net/mlx5: fix RSS expansion with explicit next protocol
> net/mlx5: fix GRE protocol type translation for Verbs
> net/mlx5: fix GRE item translation in Verbs
> net/mlx5: reduce flex item flow handle size
> net/mlx5: fix flex item header length translation
> net/mlx5: fix inet IPIP protocol type
> net/mlx5: fix next protocol RSS expansion
> net/mlx5: fix flex item availability
> app/testpmd: fix GTP header parsing in checksum engine
> app/testpmd: fix flow rule with flex input link
>
> Haiyue Wang (2):
> net/iavf: remove git residue symbol
> doc: fix KNI PMD name typo
>
> Harman Kalra (3):
> common/cnxk: reset stale values on error debug registers
> common/cnxk: always use single interrupt ID with NIX
> common/cnxk: fix mbuf data offset for VF
>
> Harold Huang (2):
> net/virtio-user: fix resource leak on probing failure
> net/kni: fix config initialization
>
> Heinrich Kuhn (1):
> net/nfp: free HW ring memzone on queue release
>
> Hemant Agrawal (1):
> crypto/dpaax_sec: fix auth/cipher xform chain checks
>
> Honnappa Nagarahalli (3):
> examples/distributor: reduce Tx queue number to 1
> examples/l3fwd: share queue size variables
> examples/l3fwd: make Rx and Tx queue size configurable
>
> Huisong Li (10):
> net/hns3: fix mailbox wait time
> net/hns3: fix using enum as boolean
> net/hns3: fix max packet size rollback in PF
> net/hns3: fix insecure way to query MAC statistics
> net/hns3: fix double decrement of secondary count
> net/hns3: fix operating queue when TCAM table is invalid
> kni: fix freeing order in device release
> net/hns3: fix RSS TC mode entry
> net/hns3: fix VF RSS TC mode entry
> net/hns3: increase time waiting for PF reset completion
>
> Ivan Malov (8):
> net/sfc: validate queue span when parsing flow action RSS
> net/sfc: fix lock releases
> net/sfc: do not push fast free offload to default TxQ config
> net/sfc: demand Tx fast free offload on EF10 simple datapath
> common/sfc_efx/base: fix recirculation ID set in outer rules
> common/sfc_efx/base: add missing handler for 1-byte fields
> net/sfc: fix flow tunnel support detection
> net/sfc: reduce log level of tunnel restore info error
>
> Jakub Poczatek (1):
> doc: fix FIPS guide
>
> Jiawei Wang (4):
> net/mlx5: fix NIC egress flow mismatch in switchdev mode
> net/mlx5: fix sample flow action on trusted device
> net/mlx5: fix implicit tag insertion with sample action
> net/mlx5: fix port matching in sample flow rule
>
> Jiawen Wu (8):
> net/ngbe: fix Rx by initializing packet buffer early
> net/ngbe: fix missed link interrupt
> net/ngbe: fix Tx hang on queue disable
> net/ngbe: fix packet statistics
> net/txgbe: fix link up and down
> net/txgbe: fix KR auto-negotiation
> net/ngbe: fix debug logs
> net/txgbe: fix debug logs
>
> Jie Hai (1):
> net/hns3: remove duplicate macro definition
>
> Jie Wang (1):
> net: fix L2TPv2 common header
>
> Jie Zhou (2):
> eal/windows: fix error code for not supported API
> test/mem: fix error check
>
> Josh Soref (1):
> fix spelling in comments and strings
>
> Junfeng Guo (3):
> net/ice: fix pattern check for flow director parser
> net/ice: fix pattern check in flow director
> raw/ntb: clear all valid doorbell bits on init
>
> Junjie Wan (1):
> net/bonding: fix slaves initializing on MTU setting
>
> Junxiao Shi (1):
> net/af_xdp: fix custom program loading with multiple queues
>
> Juraj Linkeš (1):
> config/arm: add values for native armv7
>
> Kai Ji (2):
> test/crypto: fix out-of-place SGL in raw datapath
> crypto/qat: fix GEN4 AEAD job in raw data path
>
> Kalesh AP (15):
> net/bnxt: fix multicast address set
> net/bnxt: fix multicast MAC restore during reset recovery
> net/bnxt: fix queue stop operation
> net/bnxt: restore RSS configuration after reset recovery
> net/bnxt: fix restoring VLAN filtering after recovery
> net/bnxt: cap maximum number of unicast MAC addresses
> net/bnxt: set fast-path pointers only if recovery succeeds
> net/bnxt: add null check for mark table
> net/bnxt: fix flow create when RSS is disabled
> net/bnxt: get maximum supported multicast filters count
> net/bnxt: fix handling of VF configuration change
> net/bnxt: fix xstats query
> net/bnxt: fix check for autoneg enablement
> net/bnxt: handle ring cleanup in case of error
> net/bnxt: fix memzone allocation per VNIC
>
> Karl Bonde Torp (1):
> build: fix build on FreeBSD with Meson 0.61.1
>
> Kathleen Capella (2):
> net/iavf: count continuous DD bits for Arm
> net/iavf: count continuous DD bits for Arm in flex Rx
>
> Kevin Liu (2):
> net/ice: fix Tx checksum offload
> net/ice: fix Tx offload path choice
>
> Kevin Traynor (4):
> maintainers: update for stable branches
> build: suppress rte_crypto_asym_op abi check
> Revert "crypto/ipsec_mb: fix length and offset settings"
> Revert "net/mlx5: fix flex item availability"
>
> Kumara Parameshwaran (2):
> ethdev: add internal function to device struct from name
> net/tap: fix to populate FDs in secondary process
>
> Lance Richardson (2):
> buildtools: fix AVX512 check for Python 3.5
> net/bnxt: fix xstats names query overrun
>
> Leyi Rong (1):
> net/iavf: fix potential out-of-bounds access
>
> Lijun Ou (1):
> net/hns3: fix RSS key with null
>
> Lior Margalit (1):
> net/mlx5: fix assertion on flags set in packet mbuf
>
> Madhuker Mythri (1):
> devargs: fix crash with uninitialized parsing
>
> Martijn Bakker (1):
> pflock: fix header file installation
>
> Martin Spinler (2):
> net/nfb: fix array indexes in deinit functions
> net/nfb: fix multicast/promiscuous mode switching
>
> Marvin Liu (1):
> net/virtio: fix slots number when indirect feature on
>
> Matan Azrad (1):
> vdpa/mlx5: workaround queue stop with traffic
>
> Maxime Coquelin (1):
> vhost: fix unsafe vring addresses modifications
>
> Maxime Gouin (3):
> bus/ifpga: remove useless check while browsing devices
> net/nfp: remove duplicated check when setting MAC address
> net/nfp: remove useless range checks
>
> Megha Ajmera (1):
> examples/qos_sched: fix core mask overflow
>
> Michael Baum (17):
> common/mlx5: add minimum WQE size for striding RQ
> net/mlx5: improve stride parameter names
> net/mlx5: fix MPRQ stride devargs adjustment
> common/mlx5: fix error handling in multi-class probe
> net/mlx5: fix memory socket selection in ASO management
> common/mlx5: fix missing validation in devargs parsing
> net/mlx5: fix sibling device config check
> net/mlx5: fix ineffective metadata argument adjustment
> net/mlx5: fix ASO CT object release
> net/mlx5: fix errno update in shared context creation
> net/mlx5: fix entry in shared Rx queues list
> doc: remove obsolete vector Tx explanations from mlx5 guide
> doc: replace broken links in mlx guides
> doc: correct name of BlueField-2 in mlx5 guide
> net/mlx5: fix shared counter flag in flow validation
> net/mlx5: fix check in count action validation
> common/mlx5: consider local functions as internal
>
> Michal Krawczyk (6):
> net/ena: remove unused enumeration
> net/ena: remove unused offload variables
> net/ena: skip timer if reset is triggered
> net/ena: fix meta descriptor DF flag setup
> net/ena: fix checksum flag for L4
> bus/pci: assign driver pointer before mapping
>
> Michal Wilczynski (1):
> net/ice: fix overwriting of LSE bit by DCF
>
> Min Hu (Connor) (6):
> net/hns3: fix Rx/Tx functions update
> net/hns3: fix vector Rx/Tx when PTP enabled
> net/bonding: fix promiscuous and allmulticast state
> net/bonding: fix reference count on mbufs
> app/testpmd: fix bonding mode set
> app/testpmd: check starting port is not in bonding
>
> Naga Harish K S V (2):
> eventdev/eth_tx: fix queue add error code
> eventdev/eth_rx: fix queue config query
>
> Nicolas Chautru (1):
> baseband/acc100: avoid out-of-bounds access
>
> Nipun Gupta (1):
> examples/l3fwd: fix Rx burst size for event mode
>
> Nithin Dabilpuram (11):
> examples/ipsec-secgw: fix eventdev start sequence
> examples/ipsec-secgw: fix default flow rule creation
> common/cnxk: fix shift offset for TL3 length disable
> common/cnxk: fix byte order of frag sizes and infos
> common/cnxk: fix null pointer dereferences
> common/cnxk: fix uninitialized variables
> examples/ipsec-secgw: fix buffer freeing in vector mode
> net/cnxk: fix inline device RQ tag mask
> net/cnxk: register callback early to handle initial packets
> net/cnxk: fix inline IPsec security error handling
> common/cnxk: fix bitmap usage for TM
>
> Pablo de Lara (9):
> crypto/ipsec_mb: fix buffer overrun
> crypto/ipsec_mb: check missing operation types
> crypto/ipsec_mb: fix ZUC authentication verify
> crypto/ipsec_mb: fix ZUC operation overwrite
> crypto/ipsec_mb: fix length and offset settings
> test/efd: fix sockets mask size
> efd: fix uninitialized structure
> crypto/ipsec_mb: fix length and offset settings
> crypto/ipsec_mb: fix GMAC parameters setting
>
> Pavan Nikhilesh (6):
> eventdev/eth_rx: fix missing internal port checks
> event/cnxk: fix QoS devargs parsing
> common/cnxk: add workaround for vWQE flush
> config: align mempool elements to 128 bytes on CN10K
> event/cnxk: fix sub-event clearing mask length
> event/cnxk: fix Rx adapter config check
>
> Peng Yu (1):
> vhost: fix linker script syntax
>
> Piotr Bronowski (2):
> crypto/ipsec_mb: fix premature dereference
> crypto/ipsec_mb: fix GCM requested digest length
>
> Qi Zhang (2):
> net/ice: fix Tx checksum offload capability
> doc: update matching versions in ice guide
>
> Radu Nicolau (5):
> examples/ipsec-secgw: fix offload flag used for TSO IPv6
> net/iavf: fix segmentation offload condition
> net/iavf: fix segmentation offload buffer size
> net/iavf: support NAT-T / UDP encapsulation
> net/iavf: fix AES-GMAC IV size
>
> Rahul Bhansali (2):
> net/cnxk: fix mbuf data length
> examples/l3fwd: fix buffer overflow in Tx
>
> Rahul Lakkireddy (1):
> net/cxgbe: fix dangling pointer by mailbox access rework
>
> Raja Zidane (8):
> net/mlx5: fix mark enabling for Rx
> app/testpmd: fix GENEVE parsing in checksum mode
> app/compress-perf: fix cycle count operations allocation
> app/compress-perf: optimize operations pool allocation
> compress/mlx5: support out-of-space status
> app/compress-perf: fix socket ID type during init
> app/compress-perf: fix number of queue pairs to setup
> compressdev: fix socket ID type
>
> Rakesh Kudurumalla (2):
> net/cnxk: fix build with GCC 12
> net/cnxk: fix RSS RETA table update
>
> Rashmi Shetty (1):
> doc: fix dlb2 guide
>
> Reshma Pattan (1):
> app/pdump: abort on multi-core capture limit
>
> Rongwei Liu (3):
> net/mlx5: fix shared RSS destroy
> net/mlx5: fix meter creation default state
> net/mlx5: forbid multiple ASO actions in a single rule
>
> Ruifeng Wang (1):
> config: add arch define for Arm
>
> Satheesh Paul (5):
> common/cnxk: fix nibble parsing order when dumping MCAM
> common/cnxk: fix flow deletion
> common/cnxk: fix log level during MCAM allocation
> common/cnxk: fix base rule merge
> net/cnxk: fix Rx/Tx function update
>
> Sean Morrissey (2):
> app/testpmd: fix dereference before null check
> doc: fix telemetry example in cryptodev guide
>
> Shijith Thotton (1):
> crypto/cnxk: enable allocated queues only
>
> Shun Hao (3):
> net/mlx5: fix meter sub-policy creation
> net/mlx5: fix E-Switch manager vport ID
> net/mlx5: fix meter policy creation assert
>
> Simei Su (1):
> net/ice: fix mbuf offload flag for Rx timestamp
>
> Srikanth Yalavarthi (1):
> dma/cnxk: fix installing internal headers
>
> Stephen Douthit (1):
> net/ixgbe: fix FSP check for X550EM devices
>
> Stephen Hemminger (7):
> eal/linux: log hugepage create errors with filename
> net/memif: remove unnecessary Rx interrupt stub
> ipc: end multiprocess thread during cleanup
> vfio: cleanup the multiprocess sync handle
> pcapng: handle failure of link status query
> test/bpf: skip dump if conversion fails
> app/dumpcap: check for failure to set promiscuous
>
> Steve Yang (4):
> app/testpmd: fix stack overflow for EEPROM display
> net/i40e: fix unintentional integer overflow
> eal/linux: fix illegal memory access in uevent handler
> net/iavf: fix function pointer in multi-process
>
> Suanming Mou (3):
> net/mlx5: set flow error for hash list create
> net/mlx5: remove unused function
> net/mlx5: fix indexed pool fetch overlap
>
> Thinh Tran (1):
> net/mlx5: fix CPU socket ID for Rx queue creation
>
> Thomas Monjalon (6):
> doc: replace deprecated distutils version parsing
> dmadev: add missing header include
> app/testpmd: fix build without drivers
> regexdev: fix section attribute of symbols
> build: hide local symbols in shared libraries
> devtools: fix symbols check
>
> Tianfei Zhang (2):
> raw/ifpga/base: fix SPI transaction
> raw/ifpga: fix thread closing
>
> Tianli Lai (1):
> examples/kni: add missing trailing newline in log
>
> Timothy McDaniel (3):
> event/dlb2: update rolling mask used for dequeue
> event/dlb2: poll HW CQ inflights before mapping queue
> event/dlb2: add shift value check in sparse dequeue
>
> Vanshika Shukla (2):
> net/dpaa2: fix unregistering interrupt handler
> net/dpaa2: fix timestamping for IEEE1588
>
> Viacheslav Ovsiienko (4):
> net/mlx5: fix modify field MAC address offset
> app/testpmd: fix Tx scheduling interval
> net/mlx5: fix metadata endianness in modify field action
> doc: fix modify field action description for mlx5
>
> Vladimir Medvedkin (1):
> app/fib: fix division by zero
>
> Wei Huang (5):
> raw/ifpga/base: fix port feature ID
> raw/ifpga: fix variable initialization in probing
> raw/ifpga: fix interrupt handle allocation
> raw/ifpga: fix monitor thread
> raw/ifpga: fix build with optimization
>
> Weiguo Li (14):
> common/cnxk: fix error checking
> net/enic: fix dereference before null check
> net/dpaa2: fix null pointer dereference
> regex/mlx5: fix memory allocation check
> net/memif: remove pointer deference before null check
> net/iavf: fix null pointer dereference
> vdpa/sfc: fix null dereference during config
> vdpa/sfc: fix null dereference during removal
> compress/octeontx: fix null pointer dereference
> eventdev/eth_rx: fix parameters parsing memory leak
> net/sfc: fix memory allocation size for cache
> net/txgbe: fix queue statistics mapping
> sched: remove useless malloc in PIE data init
> net/bnxt: fix null dereference in session cleanup
>
> Wenwu Ma (1):
> examples/vhost: fix launch with physical port
>
> Wenxuan Wu (1):
> eal/linux: fix device monitor stop return
>
> Xiaoyu Min (1):
> net/mlx5: reject jump to root table
>
> Xuan Ding (2):
> vhost: fix field naming in guest page struct
> vhost: fix physical address mapping
>
> Xueming Li (1):
> net/virtio: fix Tx queue 0 overriden by queue 128
>
> Yajun Wu (1):
> common/mlx5: fix queue pair ack timeout configuration
>
> Yiding Zhou (1):
> net/ice: fix build with 16-byte Rx descriptor
>
> Yu Wenjun (1):
> net/bonding: fix RSS with early configure
>
> Yuan Wang (1):
> vhost: fix guest to host physical address mapping
>
> Yunjian Wang (12):
> net/bonding: fix mode type mismatch
> ethdev: fix Rx queue telemetry memory leak on failure
> net/ice: fix link up when starting device
> net/virtio-user: check FD flags getting failure
> net/virtio: fix uninitialized RSS key
> ring: fix error code when creating ring
> net/ixgbe: check filter init failure
> mem: check allocation in dynamic hugepage init
> ethdev: remove unnecessary null check
> net/ixgbe: reset security context pointer on close
> net/txgbe: reset security context pointer on close
> net/iavf: reset security context pointer on stop
>
> Yuying Zhang (1):
> net/ice/base: add profile validation on switch filter
>
> Zhihong Wang (1):
> ring: fix overflow in memory size calculation
>
--
Christian Ehrhardt
Staff Engineer, Ubuntu Server
Canonical Ltd
^ permalink raw reply [relevance 3%]
* Re: [PATCH] doc: fix typos 'depreciated' instead of 'deprecated'
2022-04-19 9:01 15% [PATCH] doc: fix typos 'depreciated' instead of 'deprecated' Stephen Coleman
@ 2022-04-19 15:44 0% ` Ray Kinsella
0 siblings, 0 replies; 200+ results
From: Ray Kinsella @ 2022-04-19 15:44 UTC (permalink / raw)
To: Stephen Coleman; +Cc: dev
Stephen Coleman <omegacoleman@gmail.com> writes:
> From 1871ee6f7b98ef89b7c4893d90b5ea264660c201 Mon Sep 17 00:00:00 2001
> From: youcai <omegacoleman@gmail.com>
> Date: Tue, 19 Apr 2022 14:38:36 +0800
> Subject: [PATCH] doc: fix typos 'depreciated' instead of 'deprecated'
> Cc: Ray Kinsella <mdr@ashroe.eu>
>
> Same issue was fixed in ABI policy in ec5c0f8, but more of this
> misuse persist in comments and docs. 'depreciated' means diminish
> in value over a period of time. It should not appear here.
>
> Signed-off-by: youcai <omegacoleman@gmail.com>
> ---
> doc/guides/contributing/abi_policy.rst | 2 +-
> doc/guides/contributing/abi_versioning.rst | 2 +-
> lib/kni/rte_kni.h | 4 ++--
> 3 files changed, 4 insertions(+), 4 deletions(-)
>
Acked-by: Ray Kinsella <mdr@ashroe.eu>
^ permalink raw reply [relevance 0%]
* Re: [EXT] Re: [PATCH v4 07/10] ethdev: add IPsec SA expiry event subtypes
2022-04-19 12:27 0% ` Akhil Goyal
@ 2022-04-19 15:41 0% ` Ray Kinsella
2022-04-20 13:51 0% ` Akhil Goyal
0 siblings, 1 reply; 200+ results
From: Ray Kinsella @ 2022-04-19 15:41 UTC (permalink / raw)
To: Akhil Goyal
Cc: Thomas Monjalon, dev, david.marchand, hemant.agrawal,
Anoob Joseph, konstantin.ananyev, ciara.power, ferruh.yigit,
andrew.rybchenko, Nithin Kumar Dabilpuram,
Vamsi Krishna Attunuru
Akhil Goyal <gakhil@marvell.com> writes:
>> > Time expiry means after x seconds SA will expire.
>> > Packet expiry means after x packets processing SA will expire.
>> > Byte expiry means after x bytes of packet processing SA will expire.
>>
>> I think you should use the syntax @ref packets_soft_limit
>> so it is clear where the event come from.
>
> OK will update the comments.
>
>>
>>
>> > > > + RTE_ETH_EVENT_IPSEC_SA_PKT_EXPIRY,
>> > > > + /** Hard byte expiry of SA */
>> > > > + RTE_ETH_EVENT_IPSEC_SA_BYTE_HARD_EXPIRY,
>> > > > + /** Hard packet expiry of SA */
>> > > > + RTE_ETH_EVENT_IPSEC_SA_PKT_HARD_EXPIRY,
>> > >
>> > > Same comment for the 3 events.
>> > >
>> > > > /** Max value of this enum */
>> > > > RTE_ETH_EVENT_IPSEC_MAX
>> > > > };
>> > >
>> > > What is the impact of this "MAX" value on ABI compatibility?
>> >
>> > I see no issues reported while running ABI check.
>> > There is no array being used inside library based on MAX.
>>
>> No need of array inside the library, the events are exposed to the app.
>> I'm surprised libabigail is OK with changing an enum value.
>>
> @Ray Can you please check if it is an issue to add more values in this enum?
Well look there is two seperate things going on here.
Why isn't libabigail complaining about the _MAX value changing. I'll
need to look at libabigail to see what the issue is, so lets put this
one aside for a moment.
This second issue is it safe for the _MAX value to change?
We have a lot of back and forth argument on these, and previously
concluded that we should probably look to remove _MAX values in the
22.11 release.
The core issue is that we need look at how a user is likely to use
rte_eth_event_ipsec_subtype. Take a look at the example below:-
/root/src/dpdk/examples/ipsec-secgw/ipsec-secgw.c:2592:0
For instance, can we guarantee that an application built against DPDK
21.11, but running against 22.xx will never recieve one of the new
values in event_desc->subtype (or by any other means)?
--
Regards, Ray K
^ permalink raw reply [relevance 0%]
* RE: [EXT] Re: [PATCH v4 07/10] ethdev: add IPsec SA expiry event subtypes
2022-04-19 10:47 0% ` Thomas Monjalon
@ 2022-04-19 12:27 0% ` Akhil Goyal
2022-04-19 15:41 0% ` Ray Kinsella
0 siblings, 1 reply; 200+ results
From: Akhil Goyal @ 2022-04-19 12:27 UTC (permalink / raw)
To: Thomas Monjalon, mdr
Cc: dev, david.marchand, hemant.agrawal, Anoob Joseph,
konstantin.ananyev, ciara.power, ferruh.yigit, andrew.rybchenko,
Nithin Kumar Dabilpuram, Vamsi Krishna Attunuru
> > Time expiry means after x seconds SA will expire.
> > Packet expiry means after x packets processing SA will expire.
> > Byte expiry means after x bytes of packet processing SA will expire.
>
> I think you should use the syntax @ref packets_soft_limit
> so it is clear where the event come from.
OK will update the comments.
>
>
> > > > + RTE_ETH_EVENT_IPSEC_SA_PKT_EXPIRY,
> > > > + /** Hard byte expiry of SA */
> > > > + RTE_ETH_EVENT_IPSEC_SA_BYTE_HARD_EXPIRY,
> > > > + /** Hard packet expiry of SA */
> > > > + RTE_ETH_EVENT_IPSEC_SA_PKT_HARD_EXPIRY,
> > >
> > > Same comment for the 3 events.
> > >
> > > > /** Max value of this enum */
> > > > RTE_ETH_EVENT_IPSEC_MAX
> > > > };
> > >
> > > What is the impact of this "MAX" value on ABI compatibility?
> >
> > I see no issues reported while running ABI check.
> > There is no array being used inside library based on MAX.
>
> No need of array inside the library, the events are exposed to the app.
> I'm surprised libabigail is OK with changing an enum value.
>
@Ray Can you please check if it is an issue to add more values in this enum?
^ permalink raw reply [relevance 0%]
* Re: [EXT] Re: [PATCH v4 07/10] ethdev: add IPsec SA expiry event subtypes
2022-04-19 10:14 3% ` [EXT] " Akhil Goyal
2022-04-19 10:19 0% ` Anoob Joseph
@ 2022-04-19 10:47 0% ` Thomas Monjalon
2022-04-19 12:27 0% ` Akhil Goyal
1 sibling, 1 reply; 200+ results
From: Thomas Monjalon @ 2022-04-19 10:47 UTC (permalink / raw)
To: Akhil Goyal
Cc: dev, david.marchand, hemant.agrawal, Anoob Joseph,
konstantin.ananyev, ciara.power, ferruh.yigit, andrew.rybchenko,
Nithin Kumar Dabilpuram, Vamsi Krishna Attunuru, mdr
19/04/2022 12:14, Akhil Goyal:
> Hi Thomas,
>
> > 16/04/2022 21:25, Akhil Goyal:
> > > --- a/lib/ethdev/rte_ethdev.h
> > > +++ b/lib/ethdev/rte_ethdev.h
> > > @@ -3828,6 +3828,12 @@ enum rte_eth_event_ipsec_subtype {
> > > RTE_ETH_EVENT_IPSEC_SA_TIME_EXPIRY,
> > > /** Soft byte expiry of SA */
> > > RTE_ETH_EVENT_IPSEC_SA_BYTE_EXPIRY,
> > > + /** Soft packet expiry of SA */
> >
> > Is there a reference explaining what exactly is a "soft packet expiry"?
>
> SA expiry is a very common procedure in case of IPsec.
> And all stacks must support this feature.
> You can refer https://docs.strongswan.org/strongswan-docs/5.9/config/rekeying.html
> For details.
> Time expiry means after x seconds SA will expire.
> Packet expiry means after x packets processing SA will expire.
> Byte expiry means after x bytes of packet processing SA will expire.
I think you should use the syntax @ref packets_soft_limit
so it is clear where the event come from.
> > I think you should also mention what should be done
> > in the event handler.
>
> I believe this is quite obvious as per IPsec specifications.
> Application need to start rekeying or SA need to be created again.
Yes indeed.
> > > + RTE_ETH_EVENT_IPSEC_SA_PKT_EXPIRY,
> > > + /** Hard byte expiry of SA */
> > > + RTE_ETH_EVENT_IPSEC_SA_BYTE_HARD_EXPIRY,
> > > + /** Hard packet expiry of SA */
> > > + RTE_ETH_EVENT_IPSEC_SA_PKT_HARD_EXPIRY,
> >
> > Same comment for the 3 events.
> >
> > > /** Max value of this enum */
> > > RTE_ETH_EVENT_IPSEC_MAX
> > > };
> >
> > What is the impact of this "MAX" value on ABI compatibility?
>
> I see no issues reported while running ABI check.
> There is no array being used inside library based on MAX.
No need of array inside the library, the events are exposed to the app.
I'm surprised libabigail is OK with changing an enum value.
^ permalink raw reply [relevance 0%]
* RE: [EXT] Re: [PATCH v4 07/10] ethdev: add IPsec SA expiry event subtypes
2022-04-19 10:14 3% ` [EXT] " Akhil Goyal
@ 2022-04-19 10:19 0% ` Anoob Joseph
2022-04-19 10:47 0% ` Thomas Monjalon
1 sibling, 0 replies; 200+ results
From: Anoob Joseph @ 2022-04-19 10:19 UTC (permalink / raw)
To: Akhil Goyal, Thomas Monjalon
Cc: dev, david.marchand, hemant.agrawal, konstantin.ananyev,
ciara.power, ferruh.yigit, andrew.rybchenko,
Nithin Kumar Dabilpuram, Vamsi Krishna Attunuru
Hi Thomas, Akhil,
> Is there a reference explaining what exactly is a "soft packet expiry"?
The SA lifetime/expiry is described in security library.
https://elixir.bootlin.com/dpdk/latest/source/lib/security/rte_security.h#L295
Thanks,
Anoob
> -----Original Message-----
> From: Akhil Goyal <gakhil@marvell.com>
> Sent: Tuesday, April 19, 2022 3:44 PM
> To: Thomas Monjalon <thomas@monjalon.net>
> Cc: dev@dpdk.org; david.marchand@redhat.com;
> hemant.agrawal@nxp.com; Anoob Joseph <anoobj@marvell.com>;
> konstantin.ananyev@intel.com; ciara.power@intel.com;
> ferruh.yigit@intel.com; andrew.rybchenko@oktetlabs.ru; Nithin Kumar
> Dabilpuram <ndabilpuram@marvell.com>; Vamsi Krishna Attunuru
> <vattunuru@marvell.com>
> Subject: RE: [EXT] Re: [PATCH v4 07/10] ethdev: add IPsec SA expiry event
> subtypes
>
> Hi Thomas,
>
> > 16/04/2022 21:25, Akhil Goyal:
> > > --- a/lib/ethdev/rte_ethdev.h
> > > +++ b/lib/ethdev/rte_ethdev.h
> > > @@ -3828,6 +3828,12 @@ enum rte_eth_event_ipsec_subtype {
> > > RTE_ETH_EVENT_IPSEC_SA_TIME_EXPIRY,
> > > /** Soft byte expiry of SA */
> > > RTE_ETH_EVENT_IPSEC_SA_BYTE_EXPIRY,
> > > + /** Soft packet expiry of SA */
> >
> > Is there a reference explaining what exactly is a "soft packet expiry"?
>
> SA expiry is a very common procedure in case of IPsec.
> And all stacks must support this feature.
> You can refer https://docs.strongswan.org/strongswan-
> docs/5.9/config/rekeying.html
> For details.
> Time expiry means after x seconds SA will expire.
> Packet expiry means after x packets processing SA will expire.
> Byte expiry means after x bytes of packet processing SA will expire.
>
> > I think you should also mention what should be done in the event
> > handler.
>
> I believe this is quite obvious as per IPsec specifications.
> Application need to start rekeying or SA need to be created again.
>
> >
> > > + RTE_ETH_EVENT_IPSEC_SA_PKT_EXPIRY,
> > > + /** Hard byte expiry of SA */
> > > + RTE_ETH_EVENT_IPSEC_SA_BYTE_HARD_EXPIRY,
> > > + /** Hard packet expiry of SA */
> > > + RTE_ETH_EVENT_IPSEC_SA_PKT_HARD_EXPIRY,
> >
> > Same comment for the 3 events.
> >
> > > /** Max value of this enum */
> > > RTE_ETH_EVENT_IPSEC_MAX
> > > };
> >
> > What is the impact of this "MAX" value on ABI compatibility?
> I see no issues reported while running ABI check.
> There is no array being used inside library based on MAX.
^ permalink raw reply [relevance 0%]
* RE: [EXT] Re: [PATCH v4 07/10] ethdev: add IPsec SA expiry event subtypes
2022-04-19 8:58 3% ` Thomas Monjalon
@ 2022-04-19 10:14 3% ` Akhil Goyal
2022-04-19 10:19 0% ` Anoob Joseph
2022-04-19 10:47 0% ` Thomas Monjalon
0 siblings, 2 replies; 200+ results
From: Akhil Goyal @ 2022-04-19 10:14 UTC (permalink / raw)
To: Thomas Monjalon
Cc: dev, david.marchand, hemant.agrawal, Anoob Joseph,
konstantin.ananyev, ciara.power, ferruh.yigit, andrew.rybchenko,
Nithin Kumar Dabilpuram, Vamsi Krishna Attunuru
Hi Thomas,
> 16/04/2022 21:25, Akhil Goyal:
> > --- a/lib/ethdev/rte_ethdev.h
> > +++ b/lib/ethdev/rte_ethdev.h
> > @@ -3828,6 +3828,12 @@ enum rte_eth_event_ipsec_subtype {
> > RTE_ETH_EVENT_IPSEC_SA_TIME_EXPIRY,
> > /** Soft byte expiry of SA */
> > RTE_ETH_EVENT_IPSEC_SA_BYTE_EXPIRY,
> > + /** Soft packet expiry of SA */
>
> Is there a reference explaining what exactly is a "soft packet expiry"?
SA expiry is a very common procedure in case of IPsec.
And all stacks must support this feature.
You can refer https://docs.strongswan.org/strongswan-docs/5.9/config/rekeying.html
For details.
Time expiry means after x seconds SA will expire.
Packet expiry means after x packets processing SA will expire.
Byte expiry means after x bytes of packet processing SA will expire.
> I think you should also mention what should be done
> in the event handler.
I believe this is quite obvious as per IPsec specifications.
Application need to start rekeying or SA need to be created again.
>
> > + RTE_ETH_EVENT_IPSEC_SA_PKT_EXPIRY,
> > + /** Hard byte expiry of SA */
> > + RTE_ETH_EVENT_IPSEC_SA_BYTE_HARD_EXPIRY,
> > + /** Hard packet expiry of SA */
> > + RTE_ETH_EVENT_IPSEC_SA_PKT_HARD_EXPIRY,
>
> Same comment for the 3 events.
>
> > /** Max value of this enum */
> > RTE_ETH_EVENT_IPSEC_MAX
> > };
>
> What is the impact of this "MAX" value on ABI compatibility?
I see no issues reported while running ABI check.
There is no array being used inside library based on MAX.
^ permalink raw reply [relevance 3%]
* [PATCH] doc: fix typos 'depreciated' instead of 'deprecated'
@ 2022-04-19 9:01 15% Stephen Coleman
2022-04-19 15:44 0% ` Ray Kinsella
0 siblings, 1 reply; 200+ results
From: Stephen Coleman @ 2022-04-19 9:01 UTC (permalink / raw)
To: dev; +Cc: Ray Kinsella
From 1871ee6f7b98ef89b7c4893d90b5ea264660c201 Mon Sep 17 00:00:00 2001
From: youcai <omegacoleman@gmail.com>
Date: Tue, 19 Apr 2022 14:38:36 +0800
Subject: [PATCH] doc: fix typos 'depreciated' instead of 'deprecated'
Cc: Ray Kinsella <mdr@ashroe.eu>
Same issue was fixed in ABI policy in ec5c0f8, but more of this
misuse persist in comments and docs. 'depreciated' means diminish
in value over a period of time. It should not appear here.
Signed-off-by: youcai <omegacoleman@gmail.com>
---
doc/guides/contributing/abi_policy.rst | 2 +-
doc/guides/contributing/abi_versioning.rst | 2 +-
lib/kni/rte_kni.h | 4 ++--
3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/doc/guides/contributing/abi_policy.rst
b/doc/guides/contributing/abi_policy.rst
index 64919b6a2b..5fd4052585 100644
--- a/doc/guides/contributing/abi_policy.rst
+++ b/doc/guides/contributing/abi_policy.rst
@@ -167,7 +167,7 @@ The requirements for changing the ABI are:
API becomes non-experimental, then the old one is marked with
``__rte_deprecated``.
- - The depreciated API should follow the notification process to be removed,
+ - The deprecated API should follow the notification process to be removed,
see :ref:`deprecation_notices`.
- At the declaration of the next major ABI version, those ABI changes then
diff --git a/doc/guides/contributing/abi_versioning.rst
b/doc/guides/contributing/abi_versioning.rst
index dd96527ee5..7afd1c1886 100644
--- a/doc/guides/contributing/abi_versioning.rst
+++ b/doc/guides/contributing/abi_versioning.rst
@@ -94,7 +94,7 @@ that library.
...
However when a new ABI version is declared, for example DPDK ``22``, old
-depreciated functions may be safely removed at this point and the entire old
+deprecated functions may be safely removed at this point and the entire old
major ABI version removed, see the section :ref:`deprecating_entire_abi` on
how this may be done.
diff --git a/lib/kni/rte_kni.h b/lib/kni/rte_kni.h
index b85d3dd32b..f6ef572a82 100644
--- a/lib/kni/rte_kni.h
+++ b/lib/kni/rte_kni.h
@@ -64,8 +64,8 @@ struct rte_kni_conf {
uint32_t core_id; /* Core ID to bind kernel thread on */
uint16_t group_id; /* Group ID */
unsigned mbuf_size; /* mbuf size */
- struct rte_pci_addr addr; /* depreciated */
- struct rte_pci_id id; /* depreciated */
+ struct rte_pci_addr addr; /* deprecated */
+ struct rte_pci_id id; /* deprecated */
__extension__
uint8_t force_bind : 1; /* Flag to bind kernel thread */
--
2.17.1
^ permalink raw reply [relevance 15%]
* Re: [PATCH v4 07/10] ethdev: add IPsec SA expiry event subtypes
@ 2022-04-19 8:58 3% ` Thomas Monjalon
2022-04-19 10:14 3% ` [EXT] " Akhil Goyal
0 siblings, 1 reply; 200+ results
From: Thomas Monjalon @ 2022-04-19 8:58 UTC (permalink / raw)
To: Akhil Goyal
Cc: dev, david.marchand, hemant.agrawal, anoobj, konstantin.ananyev,
ciara.power, ferruh.yigit, andrew.rybchenko, ndabilpuram,
vattunuru
16/04/2022 21:25, Akhil Goyal:
> --- a/lib/ethdev/rte_ethdev.h
> +++ b/lib/ethdev/rte_ethdev.h
> @@ -3828,6 +3828,12 @@ enum rte_eth_event_ipsec_subtype {
> RTE_ETH_EVENT_IPSEC_SA_TIME_EXPIRY,
> /** Soft byte expiry of SA */
> RTE_ETH_EVENT_IPSEC_SA_BYTE_EXPIRY,
> + /** Soft packet expiry of SA */
Is there a reference explaining what exactly is a "soft packet expiry"?
I think you should also mention what should be done
in the event handler.
> + RTE_ETH_EVENT_IPSEC_SA_PKT_EXPIRY,
> + /** Hard byte expiry of SA */
> + RTE_ETH_EVENT_IPSEC_SA_BYTE_HARD_EXPIRY,
> + /** Hard packet expiry of SA */
> + RTE_ETH_EVENT_IPSEC_SA_PKT_HARD_EXPIRY,
Same comment for the 3 events.
> /** Max value of this enum */
> RTE_ETH_EVENT_IPSEC_MAX
> };
What is the impact of this "MAX" value on ABI compatibility?
^ permalink raw reply [relevance 3%]
* RE: [PATCH 1/2] security: introduce per session event metadata
2022-04-13 7:13 3% ` Akhil Goyal
@ 2022-04-18 19:36 0% ` Akhil Goyal
0 siblings, 0 replies; 200+ results
From: Akhil Goyal @ 2022-04-18 19:36 UTC (permalink / raw)
To: Gujjar, Abhinandan S, Volodymyr Fialko, dev, Jayatheerthan, Jay,
Vangati, Narender
Cc: Jerin Jacob Kollanukkaran, Anoob Joseph
Hi Abhinandan and others,
> We may need to stick to the approach introduced in this patch only.
> As if we propose, a new single API for all type of sessions, the driver would need
> to
> Get the event metadata from the session private data. This is not possible with
> Your use case which gets it inside the eventdev library for sw adapter case as it
> cannot
> Get the session private data without knowing the cdev_id.
>
> Hence, we will take this patch as is in next release for security sessions(as it is an
> ABI break)
> And would also introduce a similar change for crypto sessions in next release.
> This way we can get rid of using userdata which is wrong implementation.
On another thought, we have posted a new patchset to use event crypto adapter.
Please review and provide feedback.
Thanks,
Akhil
^ permalink raw reply [relevance 0%]
* [PATCH v2 1/7] cryptodev: add APIs to get/set event metadata
2022-04-18 19:33 4% ` [PATCH v2 0/7] Add new cryptodev op for " Akhil Goyal
@ 2022-04-18 19:33 2% ` Akhil Goyal
2022-04-21 14:37 4% ` [PATCH v3 0/7] Add new cryptodev op for " Akhil Goyal
1 sibling, 0 replies; 200+ results
From: Akhil Goyal @ 2022-04-18 19:33 UTC (permalink / raw)
To: dev
Cc: anoobj, jerinj, abhinandan.gujjar, jay.jayatheerthan,
narender.vangati, vfialko, Akhil Goyal
From: Volodymyr Fialko <vfialko@marvell.com>
Currently, crypto session userdata is used to set event crypto
metadata from the application and the driver is dereferencing it
in driver which is not correct. User data is meant to be opaque
to the driver.
To support this, new API is added to get and set event crypto
metadata. The new API, rte_cryptodev_set_session_event_mdata,
allows setting event metadata in session private data which is
filled inside PMD using a new cryptodev op. This operation
can be performed on any of the PMD supported sessions
(sym/asym/security).
For SW abstraction of event crypto adapter to be used by
eventdev library, a new field is added in asymmetric crypto
session for now and for symmetric case, current implementation
of using userdata is used. Symmetric cases cannot be fixed now,
as it will be ABI breakage which will be resolved in DPDK 22.11.
Signed-off-by: Volodymyr Fialko <vfialko@marvell.com>
Signed-off-by: Akhil Goyal <gakhil@marvell.com>
---
lib/cryptodev/cryptodev_pmd.h | 23 ++++++++++++++++
lib/cryptodev/rte_cryptodev.c | 52 +++++++++++++++++++++++++++++++++++
lib/cryptodev/rte_cryptodev.h | 34 +++++++++++++++++++++++
lib/cryptodev/version.map | 4 +++
4 files changed, 113 insertions(+)
diff --git a/lib/cryptodev/cryptodev_pmd.h b/lib/cryptodev/cryptodev_pmd.h
index 2b1ce2da2d..f374b6c880 100644
--- a/lib/cryptodev/cryptodev_pmd.h
+++ b/lib/cryptodev/cryptodev_pmd.h
@@ -398,6 +398,25 @@ typedef int (*cryptodev_sym_configure_raw_dp_ctx_t)(
enum rte_crypto_op_sess_type sess_type,
union rte_cryptodev_session_ctx session_ctx, uint8_t is_update);
+/**
+ * Typedef that the driver provided to set event crypto meta data.
+ *
+ * @param dev Crypto device pointer.
+ * @param sess Crypto or security session.
+ * @param op_type Operation type.
+ * @param sess_type Session type.
+ * @param ev_mdata Pointer to the event crypto meta data
+ * (aka *union rte_event_crypto_metadata*)
+ * @return
+ * - On success return 0.
+ * - On failure return negative integer.
+ */
+typedef int (*cryptodev_session_event_mdata_set_t)(
+ struct rte_cryptodev *dev, void *sess,
+ enum rte_crypto_op_type op_type,
+ enum rte_crypto_op_sess_type sess_type,
+ void *ev_mdata);
+
/** Crypto device operations function pointer table */
struct rte_cryptodev_ops {
cryptodev_configure_t dev_configure; /**< Configure device. */
@@ -442,6 +461,8 @@ struct rte_cryptodev_ops {
/**< Initialize raw data path context data. */
};
};
+ cryptodev_session_event_mdata_set_t session_ev_mdata_set;
+ /**< Set a Crypto or Security session even meta data. */
};
@@ -636,6 +657,8 @@ RTE_STD_C11 struct rte_cryptodev_asym_session {
/**< Size of private data used when creating mempool */
uint16_t user_data_sz;
/**< Session user data will be placed after sess_data */
+ void *event_mdata;
+ /**< Event crypto adapter metadata */
uint8_t padding[3];
uint8_t sess_private_data[0];
};
diff --git a/lib/cryptodev/rte_cryptodev.c b/lib/cryptodev/rte_cryptodev.c
index 3500a2d470..9ea64bc4f0 100644
--- a/lib/cryptodev/rte_cryptodev.c
+++ b/lib/cryptodev/rte_cryptodev.c
@@ -2259,6 +2259,58 @@ rte_cryptodev_configure_raw_dp_ctx(uint8_t dev_id, uint16_t qp_id,
sess_type, session_ctx, is_update);
}
+int
+rte_cryptodev_session_event_mdata_set(uint8_t dev_id, void *sess,
+ enum rte_crypto_op_type op_type,
+ enum rte_crypto_op_sess_type sess_type,
+ void *ev_mdata)
+{
+ struct rte_cryptodev *dev;
+
+ if (!rte_cryptodev_is_valid_dev(dev_id))
+ goto skip_pmd_op;
+
+ dev = rte_cryptodev_pmd_get_dev(dev_id);
+ if (dev->dev_ops->session_ev_mdata_set == NULL)
+ goto skip_pmd_op;
+
+ return (*dev->dev_ops->session_ev_mdata_set)(dev, sess, op_type,
+ sess_type, ev_mdata);
+
+skip_pmd_op:
+#define EVENT_CRYPTO_MDATA_SZ 16
+/**<
+ * sizeof(union rte_event_crypto_metadata). To be removed when event_mdata is
+ * added in rte_cryptodev_sym_session
+ */
+
+ if (op_type == RTE_CRYPTO_OP_TYPE_SYMMETRIC)
+ return rte_cryptodev_sym_session_set_user_data(sess, ev_mdata,
+ EVENT_CRYPTO_MDATA_SZ);
+ else if (op_type == RTE_CRYPTO_OP_TYPE_ASYMMETRIC) {
+ ((struct rte_cryptodev_asym_session *)sess)->event_mdata =
+ ev_mdata;
+ return 0;
+ } else
+ return -ENOTSUP;
+}
+
+void *
+rte_cryptodev_session_event_mdata_get(struct rte_crypto_op *op)
+{
+ if (op->type == RTE_CRYPTO_OP_TYPE_SYMMETRIC &&
+ op->sess_type == RTE_CRYPTO_OP_WITH_SESSION)
+ return rte_cryptodev_sym_session_get_user_data(op->sym->session);
+ else if (op->type == RTE_CRYPTO_OP_TYPE_ASYMMETRIC &&
+ op->sess_type == RTE_CRYPTO_OP_WITH_SESSION)
+ return op->asym->session->event_mdata;
+ else if (op->sess_type == RTE_CRYPTO_OP_SESSIONLESS &&
+ op->private_data_offset)
+ return ((uint8_t *)op + op->private_data_offset);
+ else
+ return NULL;
+}
+
uint32_t
rte_cryptodev_raw_enqueue_burst(struct rte_crypto_raw_dp_ctx *ctx,
struct rte_crypto_sym_vec *vec, union rte_crypto_sym_ofs ofs,
diff --git a/lib/cryptodev/rte_cryptodev.h b/lib/cryptodev/rte_cryptodev.h
index 45d33f4a50..b3ddc41ab1 100644
--- a/lib/cryptodev/rte_cryptodev.h
+++ b/lib/cryptodev/rte_cryptodev.h
@@ -1269,6 +1269,40 @@ __rte_experimental
int
rte_cryptodev_get_raw_dp_ctx_size(uint8_t dev_id);
+/**
+ * Set session event meta data
+ *
+ * @param dev_id The device identifier.
+ * @param sess Crypto or security session.
+ * @param op_type Operation type.
+ * @param sess_type Session type.
+ * @param ev_mdata Pointer to the event crypto meta data
+ * (aka *union rte_event_crypto_metadata*)
+ *
+ * @return
+ * - On success, zero.
+ * - On failure, a negative value.
+ */
+__rte_experimental
+int
+rte_cryptodev_session_event_mdata_set(uint8_t dev_id, void *sess,
+ enum rte_crypto_op_type op_type,
+ enum rte_crypto_op_sess_type sess_type,
+ void *ev_mdata);
+
+/**
+ * Get session event meta data (aka *union rte_event_crypto_metadata*)
+ *
+ * @param op pointer to *rte_crypto_op* structure.
+ *
+ * @return
+ * - On success, pointer to event crypto metadata
+ * - On failure, a negative value.
+ */
+__rte_experimental
+void *
+rte_cryptodev_session_event_mdata_get(struct rte_crypto_op *op);
+
/**
* Union of different crypto session types, including session-less xform
* pointer.
diff --git a/lib/cryptodev/version.map b/lib/cryptodev/version.map
index c7c5aefceb..b8a23a1791 100644
--- a/lib/cryptodev/version.map
+++ b/lib/cryptodev/version.map
@@ -105,6 +105,10 @@ EXPERIMENTAL {
rte_cryptodev_asym_session_pool_create;
rte_cryptodev_asym_session_set_user_data;
__rte_cryptodev_trace_asym_session_pool_create;
+
+ #added in 22.07
+ rte_cryptodev_session_event_mdata_get;
+ rte_cryptodev_session_event_mdata_set;
};
INTERNAL {
--
2.25.1
^ permalink raw reply [relevance 2%]
* [PATCH v2 0/7] Add new cryptodev op for event metadata
@ 2022-04-18 19:33 4% ` Akhil Goyal
2022-04-18 19:33 2% ` [PATCH v2 1/7] cryptodev: add APIs to get/set " Akhil Goyal
2022-04-21 14:37 4% ` [PATCH v3 0/7] Add new cryptodev op for " Akhil Goyal
1 sibling, 2 replies; 200+ results
From: Akhil Goyal @ 2022-04-18 19:33 UTC (permalink / raw)
To: dev
Cc: anoobj, jerinj, abhinandan.gujjar, jay.jayatheerthan,
narender.vangati, vfialko, Akhil Goyal
For using event crypto metadata, event metadata need to be set
in session. For this session user data was used for symmetric
crypto sessions and no support was present for asymmetric and
security sessions.
The use of userdata to store event metadata (which is dereferenced
in PMD) is not correct as it is meant for the application to use it.
Hence, a new API is created to set and get event crypto metadata which
is scalable to all sessions supported by the crypto PMD.
The application can use the set API to set event metadata and the
PMD may store that inside the session private data and PMD need not
use the get API as it would be internal to the PMD.
For the software event crypto adapter implementation, the eventdev
library can use the get API to get the event metadata stored inside
the session structure.
For Asymmetric sessions, a new field is added inside the session
struct which is internal to library.
For symmetric and security sessions, new field cannot be added as
it would be ABI break. Hence, session userdata is being used to
store that as it was used earlier. In next ABI break release this
would be fixed similar to asymmetric crypto case.
The patchset also add support for asymmetric crypto adapter
in the test applications and the crypto/cnxk implementation of
the new cryptodev op and corresponding changes in the eventdev lib.
changes in v2:
- v1 patchset only fixed security sessions and also caused ABI breakage.
This is fixed in v2.
- added new API for setting event metadata.
- added new cryptodev op which can handle all sessions
Akhil Goyal (5):
crypto/octeontx: use new API for event metadata
test/event: use new API to set event crypto metadata
eventdev: use new API to get event crypto metadata
test/event: add asymmetric cases for crypto adapter
test-eventdev: support asym ops for crypto adapter
Volodymyr Fialko (2):
cryptodev: add APIs to get/set event metadata
crypto/cnxk: add event metadata set operation
app/test-eventdev/evt_common.h | 2 +
app/test-eventdev/evt_options.c | 17 +
app/test-eventdev/evt_options.h | 4 +
app/test-eventdev/test_perf_atq.c | 12 +-
app/test-eventdev/test_perf_common.c | 254 ++++++++--
app/test-eventdev/test_perf_common.h | 45 +-
app/test-eventdev/test_perf_queue.c | 12 +-
app/test/test_event_crypto_adapter.c | 503 +++++++++++++++++++-
doc/guides/tools/testeventdev.rst | 5 +
drivers/crypto/cnxk/cn10k_cryptodev_ops.c | 144 +++++-
drivers/crypto/cnxk/cn10k_ipsec.h | 2 +
drivers/crypto/cnxk/cn9k_cryptodev_ops.c | 138 +++++-
drivers/crypto/cnxk/cn9k_ipsec.h | 2 +
drivers/crypto/cnxk/cnxk_ae.h | 2 +
drivers/crypto/cnxk/cnxk_cryptodev_ops.h | 18 -
drivers/crypto/cnxk/cnxk_se.h | 2 +
drivers/crypto/octeontx/otx_cryptodev_ops.c | 20 +-
lib/cryptodev/cryptodev_pmd.h | 23 +
lib/cryptodev/rte_cryptodev.c | 52 ++
lib/cryptodev/rte_cryptodev.h | 34 ++
lib/cryptodev/version.map | 4 +
lib/eventdev/rte_event_crypto_adapter.c | 55 +--
22 files changed, 1162 insertions(+), 188 deletions(-)
--
2.25.1
^ permalink raw reply [relevance 4%]
* RE: [DPDK v3] net/ixgbe: promote MDIO API
2022-04-15 14:36 4% ` Ray Kinsella
@ 2022-04-18 6:41 0% ` Yang, Qiming
0 siblings, 0 replies; 200+ results
From: Yang, Qiming @ 2022-04-18 6:41 UTC (permalink / raw)
To: Ray Kinsella, Zeng, ZhichaoX; +Cc: dev, Wang, Haiyue, David Marchand
> -----Original Message-----
> From: Ray Kinsella <mdr@ashroe.eu>
> Sent: 2022年4月15日 22:36
> To: Zeng, ZhichaoX <zhichaox.zeng@intel.com>
> Cc: dev@dpdk.org; Wang, Haiyue <haiyue.wang@intel.com>; David
> Marchand <david.marchand@redhat.com>
> Subject: Re: [DPDK v3] net/ixgbe: promote MDIO API
>
>
> zhichaox.zeng@intel.com writes:
>
> > From: zhichao zeng <zhichaox.zeng@intel.com>
> >
> > Promote the MDIO APIs to be stable.
> >
> > Signed-off-by: zhichao zeng <zhichaox.zeng@intel.com>
Your sign off should be Zhichao Zeng, upper case.
> > ---
> > drivers/net/ixgbe/rte_pmd_ixgbe.h | 5 -----
> > drivers/net/ixgbe/version.map | 10 +++++-----
> > 2 files changed, 5 insertions(+), 10 deletions(-)
> >
> > diff --git a/drivers/net/ixgbe/rte_pmd_ixgbe.h
> > b/drivers/net/ixgbe/rte_pmd_ixgbe.h
> > index eef6f6661c..426fe5845b 100644
> > --- a/drivers/net/ixgbe/rte_pmd_ixgbe.h
> > +++ b/drivers/net/ixgbe/rte_pmd_ixgbe.h
> > @@ -586,7 +586,6 @@ int rte_pmd_ixgbe_bypass_wd_reset(uint16_t
> port);
> > * - (-ENODEV) if *port* invalid.
> > * - (IXGBE_ERR_SWFW_SYNC) If sw/fw semaphore acquisition failed
> > */
> > -__rte_experimental
> > int
> > rte_pmd_ixgbe_mdio_lock(uint16_t port);
> >
> > @@ -600,7 +599,6 @@ rte_pmd_ixgbe_mdio_lock(uint16_t port);
> > * - (-ENOTSUP) if hardware doesn't support.
> > * - (-ENODEV) if *port* invalid.
> > */
> > -__rte_experimental
> > int
> > rte_pmd_ixgbe_mdio_unlock(uint16_t port);
> >
> > @@ -622,7 +620,6 @@ rte_pmd_ixgbe_mdio_unlock(uint16_t port);
> > * - (-ENODEV) if *port* invalid.
> > * - (IXGBE_ERR_PHY) If PHY read command failed
> > */
> > -__rte_experimental
> > int
> > rte_pmd_ixgbe_mdio_unlocked_read(uint16_t port, uint32_t reg_addr,
> > uint32_t dev_type, uint16_t *phy_data);
> @@ -646,7 +643,6 @@
> > rte_pmd_ixgbe_mdio_unlocked_read(uint16_t port, uint32_t reg_addr,
> > * - (-ENODEV) if *port* invalid.
> > * - (IXGBE_ERR_PHY) If PHY read command failed
> > */
> > -__rte_experimental
> > int
> > rte_pmd_ixgbe_mdio_unlocked_write(uint16_t port, uint32_t reg_addr,
> > uint32_t dev_type, uint16_t phy_data);
> @@ -725,7 +721,6 @@ enum
> > {
> > * - (-ENODEV) if *port* invalid.
> > * - (-ENOTSUP) if hardware doesn't support this feature.
> > */
> > -__rte_experimental
> > int
> > rte_pmd_ixgbe_upd_fctrl_sbp(uint16_t port, int enable);
> >
> > diff --git a/drivers/net/ixgbe/version.map
> > b/drivers/net/ixgbe/version.map index bca5cc5826..f0f29d8749 100644
> > --- a/drivers/net/ixgbe/version.map
> > +++ b/drivers/net/ixgbe/version.map
> > @@ -16,6 +16,10 @@ DPDK_22 {
> > rte_pmd_ixgbe_macsec_enable;
> > rte_pmd_ixgbe_macsec_select_rxsa;
> > rte_pmd_ixgbe_macsec_select_txsa;
>
> Promoted APIs should be part of the DPDK_23 ABI, not DPDK_22.
>
> David - I just did some checking and noted that we have been promoting
> directly from experimental to DPDK 22, and that we did the same for DPDK
> 21. However in the DPDK_20 we (rightly) promoted to DPDK_21, new APIs
> are promoted to being stable in the next ABI release.
>
> Was that I conscious decision? I don't thinking there is impact by the error /
> change, beyond house keeping.
>
>
> > + rte_pmd_ixgbe_mdio_lock;
> > + rte_pmd_ixgbe_mdio_unlock;
> > + rte_pmd_ixgbe_mdio_unlocked_read;
> > + rte_pmd_ixgbe_mdio_unlocked_write;
> > rte_pmd_ixgbe_ping_vf;
> > rte_pmd_ixgbe_set_all_queues_drop_en;
> > rte_pmd_ixgbe_set_tc_bw_alloc;
> > @@ -31,6 +35,7 @@ DPDK_22 {
> > rte_pmd_ixgbe_set_vf_vlan_filter;
> > rte_pmd_ixgbe_set_vf_vlan_insert;
> > rte_pmd_ixgbe_set_vf_vlan_stripq;
> > + rte_pmd_ixgbe_upd_fctrl_sbp;
> >
> > local: *;
> > };
> > @@ -40,9 +45,4 @@ EXPERIMENTAL {
> >
> > rte_pmd_ixgbe_get_fdir_info;
> > rte_pmd_ixgbe_get_fdir_stats;
> > - rte_pmd_ixgbe_mdio_lock;
> > - rte_pmd_ixgbe_mdio_unlock;
> > - rte_pmd_ixgbe_mdio_unlocked_read;
> > - rte_pmd_ixgbe_mdio_unlocked_write;
> > - rte_pmd_ixgbe_upd_fctrl_sbp;
> > };
>
>
> --
> Regards, Ray K
^ permalink raw reply [relevance 0%]
* [PATCH 3/3] ci: build some job with ASan
@ 2022-04-15 17:31 3% ` David Marchand
1 sibling, 0 replies; 200+ results
From: David Marchand @ 2022-04-15 17:31 UTC (permalink / raw)
To: dev; +Cc: john.mcnamara, dmitry.kozliuk, Aaron Conole, Michael Santana
Enable ASan, this can greatly help identify leaks and buffer overflows.
Running all unit tests is not possible at the moment: skip unit tests
who have known issues with ASan.
Signed-off-by: David Marchand <david.marchand@redhat.com>
---
.ci/linux-build.sh | 8 ++
.github/workflows/build.yml | 3 +-
app/test/meson.build | 208 +++++++++++++++++++-----------------
3 files changed, 118 insertions(+), 101 deletions(-)
diff --git a/.ci/linux-build.sh b/.ci/linux-build.sh
index 774a1441bf..93706c0131 100755
--- a/.ci/linux-build.sh
+++ b/.ci/linux-build.sh
@@ -95,6 +95,14 @@ if [ "$MINI" = "true" ]; then
OPTS="$OPTS -Denable_drivers=net/null"
OPTS="$OPTS -Ddisable_libs=*"
fi
+
+if [ "$ASAN" = "true" ]; then
+ OPTS="$OPTS -Db_sanitize=address"
+ if [ "${CC%%clang}" != "$CC" ]; then
+ OPTS="$OPTS -Db_lundef=false"
+ fi
+fi
+
meson build --werror $OPTS
ninja -C build
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 22daaabb91..45871e76ed 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -16,6 +16,7 @@ jobs:
env:
AARCH64: ${{ matrix.config.cross == 'aarch64' }}
ABI_CHECKS: ${{ contains(matrix.config.checks, 'abi') }}
+ ASAN: ${{ contains(matrix.config.checks, 'asan') }}
BUILD_32BIT: ${{ matrix.config.cross == 'i386' }}
BUILD_DOCS: ${{ contains(matrix.config.checks, 'doc') }}
CC: ccache ${{ matrix.config.compiler }}
@@ -47,7 +48,7 @@ jobs:
- os: ubuntu-18.04
compiler: clang
library: shared
- checks: doc+tests
+ checks: asan+doc+tests
- os: ubuntu-18.04
compiler: gcc
library: static
diff --git a/app/test/meson.build b/app/test/meson.build
index 5fc1dd1b7b..4622b5c010 100644
--- a/app/test/meson.build
+++ b/app/test/meson.build
@@ -149,96 +149,97 @@ test_deps = enabled_libs
# as well as libs, the pci and vdev bus drivers are needed for a lot of tests
test_deps += ['bus_pci', 'bus_vdev']
-# Each test is marked with flag true/false
-# to indicate whether it can run in no-huge mode.
+# Each test is marked with flags:
+# - the first flag indicates whether the test can run in no-huge mode,
+# - the second flag indicates whether the test can run with ASan enabled,
fast_tests = [
- ['acl_autotest', true],
- ['atomic_autotest', false],
- ['bitmap_autotest', true],
- ['bpf_autotest', true],
- ['bpf_convert_autotest', true],
- ['bitops_autotest', true],
- ['byteorder_autotest', true],
- ['cksum_autotest', true],
- ['cmdline_autotest', true],
- ['common_autotest', true],
- ['cpuflags_autotest', true],
- ['debug_autotest', true],
- ['devargs_autotest', true],
- ['eal_flags_c_opt_autotest', false],
- ['eal_flags_main_opt_autotest', false],
- ['eal_flags_n_opt_autotest', false],
- ['eal_flags_hpet_autotest', false],
- ['eal_flags_no_huge_autotest', false],
- ['eal_flags_a_opt_autotest', false],
- ['eal_flags_b_opt_autotest', false],
- ['eal_flags_vdev_opt_autotest', false],
- ['eal_flags_r_opt_autotest', false],
- ['eal_flags_mem_autotest', false],
- ['eal_flags_file_prefix_autotest', false],
- ['eal_flags_misc_autotest', false],
- ['eal_fs_autotest', true],
- ['errno_autotest', true],
- ['ethdev_link_status', true],
- ['event_ring_autotest', true],
- ['fib_autotest', true],
- ['fib6_autotest', true],
- ['func_reentrancy_autotest', false],
- ['hash_autotest', true],
- ['interrupt_autotest', true],
- ['ipfrag_autotest', false],
- ['lcores_autotest', true],
- ['logs_autotest', true],
- ['lpm_autotest', true],
- ['lpm6_autotest', true],
- ['malloc_autotest', false],
- ['mbuf_autotest', false],
- ['mcslock_autotest', false],
- ['memcpy_autotest', true],
- ['memory_autotest', false],
- ['mempool_autotest', false],
- ['memzone_autotest', false],
- ['meter_autotest', true],
- ['multiprocess_autotest', false],
- ['per_lcore_autotest', true],
- ['pflock_autotest', true],
- ['prefetch_autotest', true],
- ['rcu_qsbr_autotest', true],
- ['pie_autotest', true],
- ['rib_autotest', true],
- ['rib6_autotest', true],
- ['ring_autotest', true],
- ['rwlock_test1_autotest', true],
- ['rwlock_rda_autotest', true],
- ['rwlock_rds_wrm_autotest', true],
- ['rwlock_rde_wro_autotest', true],
- ['sched_autotest', true],
- ['security_autotest', false],
- ['spinlock_autotest', true],
- ['stack_autotest', false],
- ['stack_lf_autotest', false],
- ['string_autotest', true],
- ['tailq_autotest', true],
- ['ticketlock_autotest', true],
- ['timer_autotest', false],
- ['user_delay_us', true],
- ['version_autotest', true],
- ['crc_autotest', true],
- ['distributor_autotest', false],
- ['eventdev_common_autotest', true],
- ['fbarray_autotest', true],
- ['hash_readwrite_func_autotest', false],
- ['ipsec_autotest', true],
- ['kni_autotest', false],
- ['kvargs_autotest', true],
- ['member_autotest', true],
- ['power_cpufreq_autotest', false],
- ['power_autotest', true],
- ['power_kvm_vm_autotest', false],
- ['reorder_autotest', true],
- ['service_autotest', true],
- ['thash_autotest', true],
- ['trace_autotest', true],
+ ['acl_autotest', true, true],
+ ['atomic_autotest', false, true],
+ ['bitmap_autotest', true, true],
+ ['bpf_autotest', true, true],
+ ['bpf_convert_autotest', true, true],
+ ['bitops_autotest', true, true],
+ ['byteorder_autotest', true, true],
+ ['cksum_autotest', true, true],
+ ['cmdline_autotest', true, true],
+ ['common_autotest', true, true],
+ ['cpuflags_autotest', true, true],
+ ['debug_autotest', true, true],
+ ['devargs_autotest', true, true],
+ ['eal_flags_c_opt_autotest', false, false],
+ ['eal_flags_main_opt_autotest', false, false],
+ ['eal_flags_n_opt_autotest', false, false],
+ ['eal_flags_hpet_autotest', false, false],
+ ['eal_flags_no_huge_autotest', false, false],
+ ['eal_flags_a_opt_autotest', false, false],
+ ['eal_flags_b_opt_autotest', false, false],
+ ['eal_flags_vdev_opt_autotest', false, false],
+ ['eal_flags_r_opt_autotest', false, false],
+ ['eal_flags_mem_autotest', false, false],
+ ['eal_flags_file_prefix_autotest', false, false],
+ ['eal_flags_misc_autotest', false, false],
+ ['eal_fs_autotest', true, true],
+ ['errno_autotest', true, true],
+ ['ethdev_link_status', true, true],
+ ['event_ring_autotest', true, true],
+ ['fib_autotest', true, true],
+ ['fib6_autotest', true, true],
+ ['func_reentrancy_autotest', false, true],
+ ['hash_autotest', true, true],
+ ['interrupt_autotest', true, true],
+ ['ipfrag_autotest', false, true],
+ ['lcores_autotest', true, true],
+ ['logs_autotest', true, true],
+ ['lpm_autotest', true, true],
+ ['lpm6_autotest', true, true],
+ ['malloc_autotest', false, true],
+ ['mbuf_autotest', false, true],
+ ['mcslock_autotest', false, true],
+ ['memcpy_autotest', true, true],
+ ['memory_autotest', false, true],
+ ['mempool_autotest', false, true],
+ ['memzone_autotest', false, true],
+ ['meter_autotest', true, true],
+ ['multiprocess_autotest', false, false],
+ ['per_lcore_autotest', true, true],
+ ['pflock_autotest', true, true],
+ ['prefetch_autotest', true, true],
+ ['rcu_qsbr_autotest', true, true],
+ ['pie_autotest', true, true],
+ ['rib_autotest', true, true],
+ ['rib6_autotest', true, true],
+ ['ring_autotest', true, true],
+ ['rwlock_test1_autotest', true, true],
+ ['rwlock_rda_autotest', true, true],
+ ['rwlock_rds_wrm_autotest', true, true],
+ ['rwlock_rde_wro_autotest', true, true],
+ ['sched_autotest', true, true],
+ ['security_autotest', false, true],
+ ['spinlock_autotest', true, true],
+ ['stack_autotest', false, true],
+ ['stack_lf_autotest', false, true],
+ ['string_autotest', true, true],
+ ['tailq_autotest', true, true],
+ ['ticketlock_autotest', true, true],
+ ['timer_autotest', false, true],
+ ['user_delay_us', true, true],
+ ['version_autotest', true, true],
+ ['crc_autotest', true, true],
+ ['distributor_autotest', false, true],
+ ['eventdev_common_autotest', true, true],
+ ['fbarray_autotest', true, true],
+ ['hash_readwrite_func_autotest', false, true],
+ ['ipsec_autotest', true, true],
+ ['kni_autotest', false, true],
+ ['kvargs_autotest', true, true],
+ ['member_autotest', true, true],
+ ['power_cpufreq_autotest', false, true],
+ ['power_autotest', true, true],
+ ['power_kvm_vm_autotest', false, true],
+ ['reorder_autotest', true, true],
+ ['service_autotest', true, true],
+ ['thash_autotest', true, true],
+ ['trace_autotest', true, true],
]
# Tests known to have issues or which don't belong in other tests lists.
@@ -345,15 +346,16 @@ endif
if dpdk_conf.has('RTE_LIB_FLOW_CLASSIFY')
test_sources += 'test_flow_classify.c'
- fast_tests += [['flow_classify_autotest', false]]
+ fast_tests += [['flow_classify_autotest', false, true]]
endif
if dpdk_conf.has('RTE_LIB_METRICS')
test_sources += ['test_metrics.c']
- fast_tests += [['metrics_autotest', true]]
+ fast_tests += [['metrics_autotest', true, true]]
endif
if not is_windows and dpdk_conf.has('RTE_LIB_TELEMETRY')
test_sources += ['test_telemetry_json.c', 'test_telemetry_data.c']
- fast_tests += [['telemetry_json_autotest', true], ['telemetry_data_autotest', true]]
+ fast_tests += [['telemetry_json_autotest', true, true]]
+ fast_tests += [['telemetry_data_autotest', true, true]]
endif
if dpdk_conf.has('RTE_LIB_PIPELINE')
# pipeline lib depends on port and table libs, so those must be present
@@ -366,7 +368,7 @@ if dpdk_conf.has('RTE_LIB_PIPELINE')
'test_table_ports.c',
'test_table_tables.c',
]
- fast_tests += [['table_autotest', true]]
+ fast_tests += [['table_autotest', true, false]] # https://bugs.dpdk.org/show_bug.cgi?id=820
endif
# The following linkages of drivers are required because
@@ -386,26 +388,26 @@ if dpdk_conf.has('RTE_NET_RING')
test_sources += 'test_pmd_ring.c'
test_sources += 'test_event_eth_tx_adapter.c'
test_sources += 'sample_packet_forward.c'
- fast_tests += [['ring_pmd_autotest', true]]
+ fast_tests += [['ring_pmd_autotest', true, true]]
perf_test_names += 'ring_pmd_perf_autotest'
- fast_tests += [['event_eth_tx_adapter_autotest', false]]
+ fast_tests += [['event_eth_tx_adapter_autotest', false, true]]
if dpdk_conf.has('RTE_LIB_BITRATESTATS')
test_sources += 'test_bitratestats.c'
- fast_tests += [['bitratestats_autotest', true]]
+ fast_tests += [['bitratestats_autotest', true, true]]
endif
if dpdk_conf.has('RTE_LIB_LATENCYSTATS')
test_sources += 'test_latencystats.c'
- fast_tests += [['latencystats_autotest', true]]
+ fast_tests += [['latencystats_autotest', true, true]]
endif
if dpdk_conf.has('RTE_LIB_PDUMP')
test_sources += 'test_pdump.c'
- fast_tests += [['pdump_autotest', true]]
+ fast_tests += [['pdump_autotest', true, false]]
endif
endif
if dpdk_conf.has('RTE_NET_NULL')
test_deps += 'net_null'
test_sources += 'test_vdev.c'
- fast_tests += [['vdev_autotest', true]]
+ fast_tests += [['vdev_autotest', true, true]]
endif
if dpdk_conf.has('RTE_HAS_LIBPCAP')
@@ -431,7 +433,7 @@ if dpdk_conf.has('RTE_LIB_COMPRESSDEV')
if compress_test_dep.found()
test_dep_objs += compress_test_dep
test_sources += 'test_compressdev.c'
- fast_tests += [['compressdev_autotest', false]]
+ fast_tests += [['compressdev_autotest', false, true]]
endif
endif
@@ -478,6 +480,12 @@ foreach arg : fast_tests
endif
endif
+ if get_option('b_sanitize') == 'address' or get_option('b_sanitize') == 'address,undefined'
+ if not arg[2]
+ run_test = false
+ endif
+ endif
+
if (get_option('default_library') == 'shared' and
arg[0] == 'event_eth_tx_adapter_autotest')
foreach drv:dpdk_drivers
--
2.23.0
^ permalink raw reply [relevance 3%]
* Re: [PATCH v2 2/2] build: hide local symbols in shared libraries
@ 2022-04-15 14:56 0% ` Ray Kinsella
0 siblings, 0 replies; 200+ results
From: Ray Kinsella @ 2022-04-15 14:56 UTC (permalink / raw)
To: Thomas Monjalon
Cc: dev, david.marchand, stable, Parav Pandit, Xueming Li,
Elena Agostini, Ori Kam, Andrew Rybchenko
Thomas Monjalon <thomas@monjalon.net> writes:
> The symbols which are not listed in the version script
> are exported by default.
> Adding a local section with a wildcard make non-listed functions
> and variables as hidden, as it should be in all version.map files.
>
> These are the changes done in the shared libraries:
> - DF .text Base auxiliary_add_device
> - DF .text Base auxiliary_dev_exists
> - DF .text Base auxiliary_dev_iterate
> - DF .text Base auxiliary_insert_device
> - DF .text Base auxiliary_is_ignored_device
> - DF .text Base auxiliary_match
> - DF .text Base auxiliary_on_scan
> - DF .text Base auxiliary_scan
> - DO .bss Base auxiliary_bus_logtype
> - DO .data Base auxiliary_bus
> - DO .bss Base gpu_logtype
>
> There is no impact on regexdev library.
>
> Because these local symbols were exported as non-internal
> in DPDK 21.11, any change in these functions would break the ABI.
> Exception rules are added for these experimental libraries,
> so the ABI check will skip them until the next ABI version.
>
> A check is added to avoid such miss in future.
>
> Fixes: 1afce3086cf4 ("bus/auxiliary: introduce auxiliary bus")
> Fixes: 8b8036a66e3d ("gpudev: introduce GPU device class library")
> Cc: stable@dpdk.org
Good catch, I see you fixed a few of these recently.
>
> Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
> ---
> devtools/check-symbol-maps.sh | 7 +++++++
> devtools/libabigail.abignore | 8 ++++++++
> drivers/bus/auxiliary/version.map | 2 ++
> lib/gpudev/version.map | 2 ++
> lib/regexdev/version.map | 2 ++
> 5 files changed, 21 insertions(+)
>
> diff --git a/devtools/check-symbol-maps.sh b/devtools/check-symbol-maps.sh
> index 5bd290ac97..8266fdf9ea 100755
> --- a/devtools/check-symbol-maps.sh
> +++ b/devtools/check-symbol-maps.sh
> @@ -53,4 +53,11 @@ if [ -n "$duplicate_symbols" ] ; then
> ret=1
> fi
>
> +local_miss_maps=$(grep -L 'local: \*;' $@)
> +if [ -n "$local_miss_maps" ] ; then
> + echo "Found maps without local catch-all:"
> + echo "$local_miss_maps"
> + ret=1
> +fi
> +
> exit $ret
> diff --git a/devtools/libabigail.abignore b/devtools/libabigail.abignore
> index 18c11c80c6..c618f20032 100644
> --- a/devtools/libabigail.abignore
> +++ b/devtools/libabigail.abignore
> @@ -32,3 +32,11 @@
> ; Ignore changes in common mlx5 driver, should be all internal
> [suppress_file]
> soname_regexp = ^librte_common_mlx5\.
> +
> +; Ignore visibility fix of local functions in experimental auxiliary driver
> +[suppress_file]
> + soname_regexp = ^librte_bus_auxiliary\.
> +
> +; Ignore visibility fix of local functions in experimental gpudev library
> +[suppress_file]
> + soname_regexp = ^librte_gpudev\.
> diff --git a/drivers/bus/auxiliary/version.map b/drivers/bus/auxiliary/version.map
> index a52260657c..dc993e84ff 100644
> --- a/drivers/bus/auxiliary/version.map
> +++ b/drivers/bus/auxiliary/version.map
> @@ -4,4 +4,6 @@ EXPERIMENTAL {
> # added in 21.08
> rte_auxiliary_register;
> rte_auxiliary_unregister;
> +
> + local: *;
> };
> diff --git a/lib/gpudev/version.map b/lib/gpudev/version.map
> index b23e3fd6eb..a2c8ce5759 100644
> --- a/lib/gpudev/version.map
> +++ b/lib/gpudev/version.map
> @@ -39,4 +39,6 @@ INTERNAL {
> rte_gpu_get_by_name;
> rte_gpu_notify;
> rte_gpu_release;
> +
> + local: *;
> };
> diff --git a/lib/regexdev/version.map b/lib/regexdev/version.map
> index 988b909638..3c6e9fffa1 100644
> --- a/lib/regexdev/version.map
> +++ b/lib/regexdev/version.map
> @@ -26,6 +26,8 @@ EXPERIMENTAL {
> rte_regexdev_xstats_get;
> rte_regexdev_xstats_names_get;
> rte_regexdev_xstats_reset;
> +
> + local: *;
> };
>
> INTERNAL {
--
Regards, Ray K
^ permalink raw reply [relevance 0%]
* Re: [DPDK v3] net/ixgbe: promote MDIO API
@ 2022-04-15 14:36 4% ` Ray Kinsella
2022-04-18 6:41 0% ` Yang, Qiming
0 siblings, 1 reply; 200+ results
From: Ray Kinsella @ 2022-04-15 14:36 UTC (permalink / raw)
To: zhichaox.zeng; +Cc: dev, Haiyue Wang, David Marchand
zhichaox.zeng@intel.com writes:
> From: zhichao zeng <zhichaox.zeng@intel.com>
>
> Promote the MDIO APIs to be stable.
>
> Signed-off-by: zhichao zeng <zhichaox.zeng@intel.com>
> ---
> drivers/net/ixgbe/rte_pmd_ixgbe.h | 5 -----
> drivers/net/ixgbe/version.map | 10 +++++-----
> 2 files changed, 5 insertions(+), 10 deletions(-)
>
> diff --git a/drivers/net/ixgbe/rte_pmd_ixgbe.h b/drivers/net/ixgbe/rte_pmd_ixgbe.h
> index eef6f6661c..426fe5845b 100644
> --- a/drivers/net/ixgbe/rte_pmd_ixgbe.h
> +++ b/drivers/net/ixgbe/rte_pmd_ixgbe.h
> @@ -586,7 +586,6 @@ int rte_pmd_ixgbe_bypass_wd_reset(uint16_t port);
> * - (-ENODEV) if *port* invalid.
> * - (IXGBE_ERR_SWFW_SYNC) If sw/fw semaphore acquisition failed
> */
> -__rte_experimental
> int
> rte_pmd_ixgbe_mdio_lock(uint16_t port);
>
> @@ -600,7 +599,6 @@ rte_pmd_ixgbe_mdio_lock(uint16_t port);
> * - (-ENOTSUP) if hardware doesn't support.
> * - (-ENODEV) if *port* invalid.
> */
> -__rte_experimental
> int
> rte_pmd_ixgbe_mdio_unlock(uint16_t port);
>
> @@ -622,7 +620,6 @@ rte_pmd_ixgbe_mdio_unlock(uint16_t port);
> * - (-ENODEV) if *port* invalid.
> * - (IXGBE_ERR_PHY) If PHY read command failed
> */
> -__rte_experimental
> int
> rte_pmd_ixgbe_mdio_unlocked_read(uint16_t port, uint32_t reg_addr,
> uint32_t dev_type, uint16_t *phy_data);
> @@ -646,7 +643,6 @@ rte_pmd_ixgbe_mdio_unlocked_read(uint16_t port, uint32_t reg_addr,
> * - (-ENODEV) if *port* invalid.
> * - (IXGBE_ERR_PHY) If PHY read command failed
> */
> -__rte_experimental
> int
> rte_pmd_ixgbe_mdio_unlocked_write(uint16_t port, uint32_t reg_addr,
> uint32_t dev_type, uint16_t phy_data);
> @@ -725,7 +721,6 @@ enum {
> * - (-ENODEV) if *port* invalid.
> * - (-ENOTSUP) if hardware doesn't support this feature.
> */
> -__rte_experimental
> int
> rte_pmd_ixgbe_upd_fctrl_sbp(uint16_t port, int enable);
>
> diff --git a/drivers/net/ixgbe/version.map b/drivers/net/ixgbe/version.map
> index bca5cc5826..f0f29d8749 100644
> --- a/drivers/net/ixgbe/version.map
> +++ b/drivers/net/ixgbe/version.map
> @@ -16,6 +16,10 @@ DPDK_22 {
> rte_pmd_ixgbe_macsec_enable;
> rte_pmd_ixgbe_macsec_select_rxsa;
> rte_pmd_ixgbe_macsec_select_txsa;
Promoted APIs should be part of the DPDK_23 ABI, not DPDK_22.
David - I just did some checking and noted that we have been promoting
directly from experimental to DPDK 22, and that we did the same for DPDK
21. However in the DPDK_20 we (rightly) promoted to DPDK_21, new APIs
are promoted to being stable in the next ABI release.
Was that I conscious decision? I don't thinking there is impact by the
error / change, beyond house keeping.
> + rte_pmd_ixgbe_mdio_lock;
> + rte_pmd_ixgbe_mdio_unlock;
> + rte_pmd_ixgbe_mdio_unlocked_read;
> + rte_pmd_ixgbe_mdio_unlocked_write;
> rte_pmd_ixgbe_ping_vf;
> rte_pmd_ixgbe_set_all_queues_drop_en;
> rte_pmd_ixgbe_set_tc_bw_alloc;
> @@ -31,6 +35,7 @@ DPDK_22 {
> rte_pmd_ixgbe_set_vf_vlan_filter;
> rte_pmd_ixgbe_set_vf_vlan_insert;
> rte_pmd_ixgbe_set_vf_vlan_stripq;
> + rte_pmd_ixgbe_upd_fctrl_sbp;
>
> local: *;
> };
> @@ -40,9 +45,4 @@ EXPERIMENTAL {
>
> rte_pmd_ixgbe_get_fdir_info;
> rte_pmd_ixgbe_get_fdir_stats;
> - rte_pmd_ixgbe_mdio_lock;
> - rte_pmd_ixgbe_mdio_unlock;
> - rte_pmd_ixgbe_mdio_unlocked_read;
> - rte_pmd_ixgbe_mdio_unlocked_write;
> - rte_pmd_ixgbe_upd_fctrl_sbp;
> };
--
Regards, Ray K
^ permalink raw reply [relevance 4%]
* Re: [PATCH v3 2/2] eal: factorize lcore main loop
2022-04-05 16:34 2% ` [PATCH v3 2/2] eal: factorize lcore main loop David Marchand
@ 2022-04-14 11:48 0% ` David Marchand
0 siblings, 0 replies; 200+ results
From: David Marchand @ 2022-04-14 11:48 UTC (permalink / raw)
To: David Marchand
Cc: dev, Thomas Monjalon, Morten Brørup, Tyler Retzlaff,
Ray Kinsella, Bruce Richardson, Dmitry Kozlyuk,
Narcisa Ana Maria Vasile, Dmitry Malloy, Pallavi Kadam
On Tue, Apr 5, 2022 at 6:37 PM David Marchand <david.marchand@redhat.com> wrote:
>
> All OS implementations provide the same main loop.
> Introduce helpers (shared for Linux and FreeBSD) to handle synchronisation
> between main and threads and factorize the rest as common code.
> Thread id are now logged as string in a common format across OS.
>
> Note: libabigail flags this change as breaking ABI in clang builds:
>
> 1 function with some indirect sub-type change:
>
> [C] 'function int rte_eal_remote_launch(int (void*)*, void*, unsigned
> int)' at eal_common_launch.c:35:1 has some indirect sub-type
> changes:
> parameter 1 of type 'int (void*)*' changed:
> in pointed to type 'function type int (void*)' at rte_launch.h:31:1:
> entity changed from 'function type int (void*)' to 'typedef
> lcore_function_t' at rte_launch.h:31:1
> type size hasn't changed
>
> This is being investigated on libabigail side.
> For now, we don't have much choice but to waive reports on this symbol.
>
> Signed-off-by: David Marchand <david.marchand@redhat.com>
> Acked-by: Morten Brørup <mb@smartsharesystems.com>
> Acked-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
Added a note in the commitlog about Windows EAL threads affinity (from
a parallel discussion with Tyler), and applied.
Thanks.
--
David Marchand
^ permalink raw reply [relevance 0%]
* Re: 21.11.1 patches review and test
2022-04-14 5:52 0% ` Christian Ehrhardt
@ 2022-04-14 9:08 4% ` Kevin Traynor
0 siblings, 0 replies; 200+ results
From: Kevin Traynor @ 2022-04-14 9:08 UTC (permalink / raw)
To: Christian Ehrhardt
Cc: Thomas Monjalon, Ori Kam, stable, dev, Abhishek Marathe,
Ali Alnubani, benjamin.walker, David Christensen, Hemant Agrawal,
Ian Stokes, Jerin Jacob, John McNamara, Ju-Hyoung Lee,
Luca Boccassi, Pei Zhang, qian.q.xu, Raslan Darawsheh, yuan.peng,
zhaoyan.chen
On 14/04/2022 06:52, Christian Ehrhardt wrote:
> On Wed, Apr 13, 2022 at 12:06 PM Kevin Traynor <ktraynor@redhat.com> wrote:
>>
>> Hi Christian/Thomas/Ori,
>>
>> On 11/04/2022 07:58, Christian Ehrhardt wrote:
>>> On Fri, Apr 1, 2022 at 12:22 PM Kevin Traynor<ktraynor@redhat.com> wrote:
>>>> Hi all,
>>>>
>>>> Here is a list of patches targeted for stable release 21.11.1.
>>> Hi Kevin,
>>> this breaks on me at build time due to symbol changes.
>>> It is a wild mix of Base->Internal/Experimental, a few new symbols,
>>> and even just removed ones (in gpu which is experimental, but still
>>> would that need a minor soname bump?).
>>> They might be intentional, but it felt too much to me without at least
>>> discussing it.
>>> Could you have a look if you think that they are all intentional, save
>>> and correct for an LTS release?
>>>
>>
>> Thanks for the report. I've looked through these. Comments below.
>>
>>> dpkg-gensymbols: warning: some new symbols appeared in the symbols
>>> file: see diff output below
>>> dpkg-gensymbols: warning: debian/librte-common-cnxk22/DEBIAN/symbols
>>> doesn't match completely debian/librte-common-cnxk22.symbols
>>> --- debian/librte-common-cnxk22.symbols
>>> (librte-common-cnxk22_21.11.1~rc1-0ubuntu1~jammyppa2_amd64)
>>> +++ dpkg-gensymbolsUuRb8d 2022-04-11 06:46:22.276766813 +0000
>>> @@ -197,6 +197,7 @@
>>> roc_nix_ptp_clock_read@INTERNAL 21.08
>>> roc_nix_ptp_info_cb_register@INTERNAL 21.08
>>> roc_nix_ptp_info_cb_unregister@INTERNAL 21.08
>>> + roc_nix_ptp_is_enable@INTERNAL 21.11.1~rc1-0ubuntu1~jammyppa2
>>> roc_nix_ptp_rx_ena_dis@INTERNAL 21.08
>>> roc_nix_ptp_sync_time_adjust@INTERNAL 21.08
>>> roc_nix_ptp_tx_ena_dis@INTERNAL 21.08
>>>
>>
>> This is a new internal from:
>> commit 28acfe550dcb12b0908df754a4307b8b4d1fe5b0
>> Author: Harman Kalra <hkalra@marvell.com>
>> Date: Thu Mar 3 12:30:42 2022 +0530
>>
>> common/cnxk: fix mbuf data offset for VF
>>
>> [ upstream commit 8f98e3ecc55e02234f8bec7213b0b6a69c086949 ]
>>
>> Looks ok to me.
>>
>>> dpkg-gensymbols: warning: some new symbols appeared in the symbols
>>> file: see diff output below
>>> dpkg-gensymbols: warning: debian/librte-ethdev22/DEBIAN/symbols
>>> doesn't match completely debian/librte-ethdev22.symbols
>>> --- debian/librte-ethdev22.symbols
>>> (librte-ethdev22_21.11.1~rc1-0ubuntu1~jammyppa2_amd64)
>>> +++ dpkg-gensymbolskEnokB 2022-04-11 06:46:25.252795157 +0000
>>> @@ -37,6 +37,7 @@
>>> rte_eth_dev_flow_ctrl_get@DPDK_22 21.11
>>> rte_eth_dev_flow_ctrl_set@DPDK_22 21.11
>>> rte_eth_dev_fw_version_get@DPDK_22 21.11
>>> + rte_eth_dev_get_by_name@INTERNAL 21.11.1~rc1-0ubuntu1~jammyppa2
>>> rte_eth_dev_get_dcb_info@DPDK_22 21.11
>>> rte_eth_dev_get_eeprom@DPDK_22 21.11
>>> rte_eth_dev_get_eeprom_length@DPDK_22 21.11
>>>
>>
>> This is a new internal
>> Added by:
>> commit 721d0bbd1668d2a4b617a4a4de0b93dd60283d58
>> Author: Kumara Parameshwaran <kparameshwar@vmware.com>
>> Date: Mon Jan 31 20:02:33 2022 +0530
>>
>> ethdev: add internal function to device struct from name
>>
>> [ upstream commit 961fb4029b8c52c0e8230d34993c354d70e10e14 ]
>>
>> Used by:
>> commit ac180f4d2662503ecd18a2e94689a229104d3d61
>> Author: Kumara Parameshwaran <kparameshwar@vmware.com>
>> Date: Mon Jan 31 20:02:34 2022 +0530
>>
>> net/tap: fix to populate FDs in secondary process
>>
>> [ upstream commit c36ce7099c2187926cd62cff7ebd479823554929 ]
>>
>> Looks ok to me.
>>
>>> dpkg-gensymbols: warning: some new symbols appeared in the symbols
>>> file: see diff output below
>>> dpkg-gensymbols: error: some symbols or patterns disappeared in the
>>> symbols file: see diff output below
>>> dpkg-gensymbols: warning: debian/librte-regexdev22/DEBIAN/symbols
>>> doesn't match completely debian/librte-regexdev22.symbols
>>> --- debian/librte-regexdev22.symbols
>>> (librte-regexdev22_21.11.1~rc1-0ubuntu1~jammyppa2_amd64)
>>> +++ dpkg-gensymbolsPD0Ygo 2022-04-11 06:46:33.368872490 +0000
>>> @@ -1,6 +1,8 @@
>>> librte_regexdev.so.22 librte-regexdev22 #MINVER#
>>> EXPERIMENTAL@EXPERIMENTAL 20.11
>>> - rte_regex_devices@Base 20.11
>>> + INTERNAL@INTERNAL 21.11.1~rc1-0ubuntu1~jammyppa2
>>> + rte_regex_devices@EXPERIMENTAL 21.11.1~rc1-0ubuntu1~jammyppa2
>>> rte_regexdev_attr_get@EXPERIMENTAL 20.11
>>> rte_regexdev_attr_set@EXPERIMENTAL 20.11
>>> rte_regexdev_close@EXPERIMENTAL 20.11
>>> @@ -8,12 +10,16 @@
>>> rte_regexdev_count@EXPERIMENTAL 20.11
>>> rte_regexdev_dump@EXPERIMENTAL 20.11
>>> rte_regexdev_get_dev_id@EXPERIMENTAL 20.11
>>> - rte_regexdev_get_device_by_name@Base 20.11
>>> + rte_regexdev_get_device_by_name@INTERNAL 21.11.1~rc1-0ubuntu1~jammyppa2
>>> rte_regexdev_info_get@EXPERIMENTAL 20.11
>>> - rte_regexdev_is_valid_dev@Base 20.11
>>> - rte_regexdev_logtype@Base 20.11
>>> + rte_regexdev_is_valid_dev@EXPERIMENTAL 21.11.1~rc1-0ubuntu1~jammyppa2
>>> + rte_regexdev_logtype@EXPERIMENTAL 21.11.1~rc1-0ubuntu1~jammyppa2
>>> rte_regexdev_queue_pair_setup@EXPERIMENTAL 20.11
>>> - rte_regexdev_register@Base 20.11
>>> + rte_regexdev_register@INTERNAL 21.11.1~rc1-0ubuntu1~jammyppa2
>>> rte_regexdev_rule_db_compile_activate@EXPERIMENTAL 20.11
>>> rte_regexdev_rule_db_export@EXPERIMENTAL 20.11
>>> rte_regexdev_rule_db_import@EXPERIMENTAL 20.11
>>> @@ -21,7 +27,8 @@
>>> rte_regexdev_selftest@EXPERIMENTAL 20.11
>>> rte_regexdev_start@EXPERIMENTAL 20.11
>>> rte_regexdev_stop@EXPERIMENTAL 20.11
>>> - rte_regexdev_unregister@Base 20.11
>>> + rte_regexdev_unregister@INTERNAL 21.11.1~rc1-0ubuntu1~jammyppa2
>>> rte_regexdev_xstats_by_name_get@EXPERIMENTAL 20.11
>>> rte_regexdev_xstats_get@EXPERIMENTAL 20.11
>>> rte_regexdev_xstats_names_get@EXPERIMENTAL 20.11
>>>
>>
>> +cc Ori, regex maintainer.
>>
>> Regex library is an experimental API so everything should have been
>> experimental or internal. This is fixing that issue.
>>
>> It is fixed with
>> commit 6e7f8939f23c2c8ed80602bc0d62990eebe52013
>> Author: Thomas Monjalon <thomas@monjalon.net>
>> Date: Sun Mar 6 10:20:22 2022 +0100
>>
>> regexdev: fix section attribute of symbols
>>
>> [ upstream commit 89e290eb8ca99af9f7cfc3292d93860f8e672708 ]
>>
>> and
>>
>> commit 026470bafaa02cba0d46ed7b7e835262399a009a
>> Author: Thomas Monjalon <thomas@monjalon.net>
>> Date: Sun Mar 6 10:20:23 2022 +0100
>>
>> build: hide local symbols in shared libraries
>>
>> [ upstream commit b403498e14229ee903c8fff9baefcb72894062f3 ]
>>
>>
>> The fact that they are redesignated to correctly be
>> experimental/internal seems ok to me.
>>
>>> dpkg-gensymbols: error: some symbols or patterns disappeared in the
>>> symbols file: see diff output below
>>> dpkg-gensymbols: warning: debian/librte-gpudev22/DEBIAN/symbols
>>> doesn't match completely debian/librte-gpudev22.symbols
>>> --- debian/librte-gpudev22.symbols
>>> (librte-gpudev22_21.11.1~rc1-0ubuntu1~jammyppa2_amd64)
>>> +++ dpkg-gensymbols4qkXdt 2022-04-11 06:46:34.552883776 +0000
>>> @@ -1,7 +1,7 @@
>>> librte_gpudev.so.22 librte-gpudev22 #MINVER#
>>> EXPERIMENTAL@EXPERIMENTAL 21.11
>>> INTERNAL@INTERNAL 21.11
>>> - gpu_logtype@Base 21.11
>>> rte_gpu_add_child@EXPERIMENTAL 21.11
>>> rte_gpu_allocate@INTERNAL 21.11
>>> rte_gpu_attach@INTERNAL 21.11
>>>
>>
>> The missing wildcard meant this symbol escaped in 21.11.
>>
>> It is fixed by:
>> commit 026470bafaa02cba0d46ed7b7e835262399a009a
>> Author: Thomas Monjalon <thomas@monjalon.net>
>> Date: Sun Mar 6 10:20:23 2022 +0100
>>
>> build: hide local symbols in shared libraries
>>
>> [ upstream commit b403498e14229ee903c8fff9baefcb72894062f3 ]
>>
>> In this case the symbol is not redesignated but removed, but it doesn't
>> look to have any use to a user, so I think it can be safe to remove.
>
> I'm 100% with all others, thanks for having a look.
> On this one I can easily follow the argument of the fix for the newest release.
> But for stable we can never really know if there are users.
> In theory for anything that shipped in a Distribution someone might
> have coded and linked something against it - we would not know.
> The meant to be "stable" update will then break them the hard way.
>
> In this case gladly the function wasn't anything that one would
> consider useful for use from outside, so I think it is ok.
>
> But still I wanted to make the point that in general a symbol:
> 1. once released might be used and we can not never be sure if no one uses them
The same argument can also be made for 22.03/22.07 which is ABI
compatible with 22.11. I accept there will be exception cases where it
makes sense to change in main because it is enabling some future work,
which are not similarly valid for stable. So the bar should be a bit
higher in stable.
> 2. even being EXPERIMENTAL, touching them too much in stable updates
> means not-stable. Should we at least try to minimize the impact to
> stable releases?
>
APIs marked experimental are not part of the ABI version, but I agree it
is a good goal to minimize changes for these in stable where possible.
> For now I'm adapting my checkers and will continue testing ...
>
Thanks for raising Christian.
(P.S. on PTO, so won't be able to continue discussion for now)
>> There are updates to the libabigail.ignore for regex and gpu_dev to
>> ignore ABI changes for these fixes.
>>
>> --
>>
>> I'm ok with changes above for 21.11.1, what do others think?
>>
>> Kevin.
>>
>>>
>>> Full log:
>>> https://launchpadlibrarian.net/596047842/buildlog_ubuntu-jammy-amd64.dpdk_21.11.1~rc1-0ubuntu1~jammyppa2_BUILDING.txt.gz
>>>
>>
>
>
^ permalink raw reply [relevance 4%]
* Re: 21.11.1 patches review and test
2022-04-13 10:06 3% ` Kevin Traynor
@ 2022-04-14 5:52 0% ` Christian Ehrhardt
2022-04-14 9:08 4% ` Kevin Traynor
0 siblings, 1 reply; 200+ results
From: Christian Ehrhardt @ 2022-04-14 5:52 UTC (permalink / raw)
To: Kevin Traynor
Cc: Thomas Monjalon, Ori Kam, stable, dev, Abhishek Marathe,
Ali Alnubani, benjamin.walker, David Christensen, Hemant Agrawal,
Ian Stokes, Jerin Jacob, John McNamara, Ju-Hyoung Lee,
Luca Boccassi, Pei Zhang, qian.q.xu, Raslan Darawsheh, yuan.peng,
zhaoyan.chen
On Wed, Apr 13, 2022 at 12:06 PM Kevin Traynor <ktraynor@redhat.com> wrote:
>
> Hi Christian/Thomas/Ori,
>
> On 11/04/2022 07:58, Christian Ehrhardt wrote:
> > On Fri, Apr 1, 2022 at 12:22 PM Kevin Traynor<ktraynor@redhat.com> wrote:
> >> Hi all,
> >>
> >> Here is a list of patches targeted for stable release 21.11.1.
> > Hi Kevin,
> > this breaks on me at build time due to symbol changes.
> > It is a wild mix of Base->Internal/Experimental, a few new symbols,
> > and even just removed ones (in gpu which is experimental, but still
> > would that need a minor soname bump?).
> > They might be intentional, but it felt too much to me without at least
> > discussing it.
> > Could you have a look if you think that they are all intentional, save
> > and correct for an LTS release?
> >
>
> Thanks for the report. I've looked through these. Comments below.
>
> > dpkg-gensymbols: warning: some new symbols appeared in the symbols
> > file: see diff output below
> > dpkg-gensymbols: warning: debian/librte-common-cnxk22/DEBIAN/symbols
> > doesn't match completely debian/librte-common-cnxk22.symbols
> > --- debian/librte-common-cnxk22.symbols
> > (librte-common-cnxk22_21.11.1~rc1-0ubuntu1~jammyppa2_amd64)
> > +++ dpkg-gensymbolsUuRb8d 2022-04-11 06:46:22.276766813 +0000
> > @@ -197,6 +197,7 @@
> > roc_nix_ptp_clock_read@INTERNAL 21.08
> > roc_nix_ptp_info_cb_register@INTERNAL 21.08
> > roc_nix_ptp_info_cb_unregister@INTERNAL 21.08
> > + roc_nix_ptp_is_enable@INTERNAL 21.11.1~rc1-0ubuntu1~jammyppa2
> > roc_nix_ptp_rx_ena_dis@INTERNAL 21.08
> > roc_nix_ptp_sync_time_adjust@INTERNAL 21.08
> > roc_nix_ptp_tx_ena_dis@INTERNAL 21.08
> >
>
> This is a new internal from:
> commit 28acfe550dcb12b0908df754a4307b8b4d1fe5b0
> Author: Harman Kalra <hkalra@marvell.com>
> Date: Thu Mar 3 12:30:42 2022 +0530
>
> common/cnxk: fix mbuf data offset for VF
>
> [ upstream commit 8f98e3ecc55e02234f8bec7213b0b6a69c086949 ]
>
> Looks ok to me.
>
> > dpkg-gensymbols: warning: some new symbols appeared in the symbols
> > file: see diff output below
> > dpkg-gensymbols: warning: debian/librte-ethdev22/DEBIAN/symbols
> > doesn't match completely debian/librte-ethdev22.symbols
> > --- debian/librte-ethdev22.symbols
> > (librte-ethdev22_21.11.1~rc1-0ubuntu1~jammyppa2_amd64)
> > +++ dpkg-gensymbolskEnokB 2022-04-11 06:46:25.252795157 +0000
> > @@ -37,6 +37,7 @@
> > rte_eth_dev_flow_ctrl_get@DPDK_22 21.11
> > rte_eth_dev_flow_ctrl_set@DPDK_22 21.11
> > rte_eth_dev_fw_version_get@DPDK_22 21.11
> > + rte_eth_dev_get_by_name@INTERNAL 21.11.1~rc1-0ubuntu1~jammyppa2
> > rte_eth_dev_get_dcb_info@DPDK_22 21.11
> > rte_eth_dev_get_eeprom@DPDK_22 21.11
> > rte_eth_dev_get_eeprom_length@DPDK_22 21.11
> >
>
> This is a new internal
> Added by:
> commit 721d0bbd1668d2a4b617a4a4de0b93dd60283d58
> Author: Kumara Parameshwaran <kparameshwar@vmware.com>
> Date: Mon Jan 31 20:02:33 2022 +0530
>
> ethdev: add internal function to device struct from name
>
> [ upstream commit 961fb4029b8c52c0e8230d34993c354d70e10e14 ]
>
> Used by:
> commit ac180f4d2662503ecd18a2e94689a229104d3d61
> Author: Kumara Parameshwaran <kparameshwar@vmware.com>
> Date: Mon Jan 31 20:02:34 2022 +0530
>
> net/tap: fix to populate FDs in secondary process
>
> [ upstream commit c36ce7099c2187926cd62cff7ebd479823554929 ]
>
> Looks ok to me.
>
> > dpkg-gensymbols: warning: some new symbols appeared in the symbols
> > file: see diff output below
> > dpkg-gensymbols: error: some symbols or patterns disappeared in the
> > symbols file: see diff output below
> > dpkg-gensymbols: warning: debian/librte-regexdev22/DEBIAN/symbols
> > doesn't match completely debian/librte-regexdev22.symbols
> > --- debian/librte-regexdev22.symbols
> > (librte-regexdev22_21.11.1~rc1-0ubuntu1~jammyppa2_amd64)
> > +++ dpkg-gensymbolsPD0Ygo 2022-04-11 06:46:33.368872490 +0000
> > @@ -1,6 +1,8 @@
> > librte_regexdev.so.22 librte-regexdev22 #MINVER#
> > EXPERIMENTAL@EXPERIMENTAL 20.11
> > - rte_regex_devices@Base 20.11
> > + INTERNAL@INTERNAL 21.11.1~rc1-0ubuntu1~jammyppa2
> > + rte_regex_devices@EXPERIMENTAL 21.11.1~rc1-0ubuntu1~jammyppa2
> > rte_regexdev_attr_get@EXPERIMENTAL 20.11
> > rte_regexdev_attr_set@EXPERIMENTAL 20.11
> > rte_regexdev_close@EXPERIMENTAL 20.11
> > @@ -8,12 +10,16 @@
> > rte_regexdev_count@EXPERIMENTAL 20.11
> > rte_regexdev_dump@EXPERIMENTAL 20.11
> > rte_regexdev_get_dev_id@EXPERIMENTAL 20.11
> > - rte_regexdev_get_device_by_name@Base 20.11
> > + rte_regexdev_get_device_by_name@INTERNAL 21.11.1~rc1-0ubuntu1~jammyppa2
> > rte_regexdev_info_get@EXPERIMENTAL 20.11
> > - rte_regexdev_is_valid_dev@Base 20.11
> > - rte_regexdev_logtype@Base 20.11
> > + rte_regexdev_is_valid_dev@EXPERIMENTAL 21.11.1~rc1-0ubuntu1~jammyppa2
> > + rte_regexdev_logtype@EXPERIMENTAL 21.11.1~rc1-0ubuntu1~jammyppa2
> > rte_regexdev_queue_pair_setup@EXPERIMENTAL 20.11
> > - rte_regexdev_register@Base 20.11
> > + rte_regexdev_register@INTERNAL 21.11.1~rc1-0ubuntu1~jammyppa2
> > rte_regexdev_rule_db_compile_activate@EXPERIMENTAL 20.11
> > rte_regexdev_rule_db_export@EXPERIMENTAL 20.11
> > rte_regexdev_rule_db_import@EXPERIMENTAL 20.11
> > @@ -21,7 +27,8 @@
> > rte_regexdev_selftest@EXPERIMENTAL 20.11
> > rte_regexdev_start@EXPERIMENTAL 20.11
> > rte_regexdev_stop@EXPERIMENTAL 20.11
> > - rte_regexdev_unregister@Base 20.11
> > + rte_regexdev_unregister@INTERNAL 21.11.1~rc1-0ubuntu1~jammyppa2
> > rte_regexdev_xstats_by_name_get@EXPERIMENTAL 20.11
> > rte_regexdev_xstats_get@EXPERIMENTAL 20.11
> > rte_regexdev_xstats_names_get@EXPERIMENTAL 20.11
> >
>
> +cc Ori, regex maintainer.
>
> Regex library is an experimental API so everything should have been
> experimental or internal. This is fixing that issue.
>
> It is fixed with
> commit 6e7f8939f23c2c8ed80602bc0d62990eebe52013
> Author: Thomas Monjalon <thomas@monjalon.net>
> Date: Sun Mar 6 10:20:22 2022 +0100
>
> regexdev: fix section attribute of symbols
>
> [ upstream commit 89e290eb8ca99af9f7cfc3292d93860f8e672708 ]
>
> and
>
> commit 026470bafaa02cba0d46ed7b7e835262399a009a
> Author: Thomas Monjalon <thomas@monjalon.net>
> Date: Sun Mar 6 10:20:23 2022 +0100
>
> build: hide local symbols in shared libraries
>
> [ upstream commit b403498e14229ee903c8fff9baefcb72894062f3 ]
>
>
> The fact that they are redesignated to correctly be
> experimental/internal seems ok to me.
>
> > dpkg-gensymbols: error: some symbols or patterns disappeared in the
> > symbols file: see diff output below
> > dpkg-gensymbols: warning: debian/librte-gpudev22/DEBIAN/symbols
> > doesn't match completely debian/librte-gpudev22.symbols
> > --- debian/librte-gpudev22.symbols
> > (librte-gpudev22_21.11.1~rc1-0ubuntu1~jammyppa2_amd64)
> > +++ dpkg-gensymbols4qkXdt 2022-04-11 06:46:34.552883776 +0000
> > @@ -1,7 +1,7 @@
> > librte_gpudev.so.22 librte-gpudev22 #MINVER#
> > EXPERIMENTAL@EXPERIMENTAL 21.11
> > INTERNAL@INTERNAL 21.11
> > - gpu_logtype@Base 21.11
> > rte_gpu_add_child@EXPERIMENTAL 21.11
> > rte_gpu_allocate@INTERNAL 21.11
> > rte_gpu_attach@INTERNAL 21.11
> >
>
> The missing wildcard meant this symbol escaped in 21.11.
>
> It is fixed by:
> commit 026470bafaa02cba0d46ed7b7e835262399a009a
> Author: Thomas Monjalon <thomas@monjalon.net>
> Date: Sun Mar 6 10:20:23 2022 +0100
>
> build: hide local symbols in shared libraries
>
> [ upstream commit b403498e14229ee903c8fff9baefcb72894062f3 ]
>
> In this case the symbol is not redesignated but removed, but it doesn't
> look to have any use to a user, so I think it can be safe to remove.
I'm 100% with all others, thanks for having a look.
On this one I can easily follow the argument of the fix for the newest release.
But for stable we can never really know if there are users.
In theory for anything that shipped in a Distribution someone might
have coded and linked something against it - we would not know.
The meant to be "stable" update will then break them the hard way.
In this case gladly the function wasn't anything that one would
consider useful for use from outside, so I think it is ok.
But still I wanted to make the point that in general a symbol:
1. once released might be used and we can not never be sure if no one uses them
2. even being EXPERIMENTAL, touching them too much in stable updates
means not-stable. Should we at least try to minimize the impact to
stable releases?
For now I'm adapting my checkers and will continue testing ...
> There are updates to the libabigail.ignore for regex and gpu_dev to
> ignore ABI changes for these fixes.
>
> --
>
> I'm ok with changes above for 21.11.1, what do others think?
>
> Kevin.
>
> >
> > Full log:
> > https://launchpadlibrarian.net/596047842/buildlog_ubuntu-jammy-amd64.dpdk_21.11.1~rc1-0ubuntu1~jammyppa2_BUILDING.txt.gz
> >
>
--
Christian Ehrhardt
Staff Engineer, Ubuntu Server
Canonical Ltd
^ permalink raw reply [relevance 0%]
* Re: 21.11.1 patches review and test
2022-04-11 6:58 0% ` Christian Ehrhardt
2022-04-13 7:26 0% ` Christian Ehrhardt
@ 2022-04-13 10:06 3% ` Kevin Traynor
2022-04-14 5:52 0% ` Christian Ehrhardt
1 sibling, 1 reply; 200+ results
From: Kevin Traynor @ 2022-04-13 10:06 UTC (permalink / raw)
To: Christian Ehrhardt, Thomas Monjalon, Ori Kam
Cc: stable, dev, Abhishek Marathe, Ali Alnubani, benjamin.walker,
David Christensen, Hemant Agrawal, Ian Stokes, Jerin Jacob,
John McNamara, Ju-Hyoung Lee, Luca Boccassi, Pei Zhang,
qian.q.xu, Raslan Darawsheh, yuan.peng, zhaoyan.chen
Hi Christian/Thomas/Ori,
On 11/04/2022 07:58, Christian Ehrhardt wrote:
> On Fri, Apr 1, 2022 at 12:22 PM Kevin Traynor<ktraynor@redhat.com> wrote:
>> Hi all,
>>
>> Here is a list of patches targeted for stable release 21.11.1.
> Hi Kevin,
> this breaks on me at build time due to symbol changes.
> It is a wild mix of Base->Internal/Experimental, a few new symbols,
> and even just removed ones (in gpu which is experimental, but still
> would that need a minor soname bump?).
> They might be intentional, but it felt too much to me without at least
> discussing it.
> Could you have a look if you think that they are all intentional, save
> and correct for an LTS release?
>
Thanks for the report. I've looked through these. Comments below.
> dpkg-gensymbols: warning: some new symbols appeared in the symbols
> file: see diff output below
> dpkg-gensymbols: warning: debian/librte-common-cnxk22/DEBIAN/symbols
> doesn't match completely debian/librte-common-cnxk22.symbols
> --- debian/librte-common-cnxk22.symbols
> (librte-common-cnxk22_21.11.1~rc1-0ubuntu1~jammyppa2_amd64)
> +++ dpkg-gensymbolsUuRb8d 2022-04-11 06:46:22.276766813 +0000
> @@ -197,6 +197,7 @@
> roc_nix_ptp_clock_read@INTERNAL 21.08
> roc_nix_ptp_info_cb_register@INTERNAL 21.08
> roc_nix_ptp_info_cb_unregister@INTERNAL 21.08
> + roc_nix_ptp_is_enable@INTERNAL 21.11.1~rc1-0ubuntu1~jammyppa2
> roc_nix_ptp_rx_ena_dis@INTERNAL 21.08
> roc_nix_ptp_sync_time_adjust@INTERNAL 21.08
> roc_nix_ptp_tx_ena_dis@INTERNAL 21.08
>
This is a new internal from:
commit 28acfe550dcb12b0908df754a4307b8b4d1fe5b0
Author: Harman Kalra <hkalra@marvell.com>
Date: Thu Mar 3 12:30:42 2022 +0530
common/cnxk: fix mbuf data offset for VF
[ upstream commit 8f98e3ecc55e02234f8bec7213b0b6a69c086949 ]
Looks ok to me.
> dpkg-gensymbols: warning: some new symbols appeared in the symbols
> file: see diff output below
> dpkg-gensymbols: warning: debian/librte-ethdev22/DEBIAN/symbols
> doesn't match completely debian/librte-ethdev22.symbols
> --- debian/librte-ethdev22.symbols
> (librte-ethdev22_21.11.1~rc1-0ubuntu1~jammyppa2_amd64)
> +++ dpkg-gensymbolskEnokB 2022-04-11 06:46:25.252795157 +0000
> @@ -37,6 +37,7 @@
> rte_eth_dev_flow_ctrl_get@DPDK_22 21.11
> rte_eth_dev_flow_ctrl_set@DPDK_22 21.11
> rte_eth_dev_fw_version_get@DPDK_22 21.11
> + rte_eth_dev_get_by_name@INTERNAL 21.11.1~rc1-0ubuntu1~jammyppa2
> rte_eth_dev_get_dcb_info@DPDK_22 21.11
> rte_eth_dev_get_eeprom@DPDK_22 21.11
> rte_eth_dev_get_eeprom_length@DPDK_22 21.11
>
This is a new internal
Added by:
commit 721d0bbd1668d2a4b617a4a4de0b93dd60283d58
Author: Kumara Parameshwaran <kparameshwar@vmware.com>
Date: Mon Jan 31 20:02:33 2022 +0530
ethdev: add internal function to device struct from name
[ upstream commit 961fb4029b8c52c0e8230d34993c354d70e10e14 ]
Used by:
commit ac180f4d2662503ecd18a2e94689a229104d3d61
Author: Kumara Parameshwaran <kparameshwar@vmware.com>
Date: Mon Jan 31 20:02:34 2022 +0530
net/tap: fix to populate FDs in secondary process
[ upstream commit c36ce7099c2187926cd62cff7ebd479823554929 ]
Looks ok to me.
> dpkg-gensymbols: warning: some new symbols appeared in the symbols
> file: see diff output below
> dpkg-gensymbols: error: some symbols or patterns disappeared in the
> symbols file: see diff output below
> dpkg-gensymbols: warning: debian/librte-regexdev22/DEBIAN/symbols
> doesn't match completely debian/librte-regexdev22.symbols
> --- debian/librte-regexdev22.symbols
> (librte-regexdev22_21.11.1~rc1-0ubuntu1~jammyppa2_amd64)
> +++ dpkg-gensymbolsPD0Ygo 2022-04-11 06:46:33.368872490 +0000
> @@ -1,6 +1,8 @@
> librte_regexdev.so.22 librte-regexdev22 #MINVER#
> EXPERIMENTAL@EXPERIMENTAL 20.11
> - rte_regex_devices@Base 20.11
> + INTERNAL@INTERNAL 21.11.1~rc1-0ubuntu1~jammyppa2
> + rte_regex_devices@EXPERIMENTAL 21.11.1~rc1-0ubuntu1~jammyppa2
> rte_regexdev_attr_get@EXPERIMENTAL 20.11
> rte_regexdev_attr_set@EXPERIMENTAL 20.11
> rte_regexdev_close@EXPERIMENTAL 20.11
> @@ -8,12 +10,16 @@
> rte_regexdev_count@EXPERIMENTAL 20.11
> rte_regexdev_dump@EXPERIMENTAL 20.11
> rte_regexdev_get_dev_id@EXPERIMENTAL 20.11
> - rte_regexdev_get_device_by_name@Base 20.11
> + rte_regexdev_get_device_by_name@INTERNAL 21.11.1~rc1-0ubuntu1~jammyppa2
> rte_regexdev_info_get@EXPERIMENTAL 20.11
> - rte_regexdev_is_valid_dev@Base 20.11
> - rte_regexdev_logtype@Base 20.11
> + rte_regexdev_is_valid_dev@EXPERIMENTAL 21.11.1~rc1-0ubuntu1~jammyppa2
> + rte_regexdev_logtype@EXPERIMENTAL 21.11.1~rc1-0ubuntu1~jammyppa2
> rte_regexdev_queue_pair_setup@EXPERIMENTAL 20.11
> - rte_regexdev_register@Base 20.11
> + rte_regexdev_register@INTERNAL 21.11.1~rc1-0ubuntu1~jammyppa2
> rte_regexdev_rule_db_compile_activate@EXPERIMENTAL 20.11
> rte_regexdev_rule_db_export@EXPERIMENTAL 20.11
> rte_regexdev_rule_db_import@EXPERIMENTAL 20.11
> @@ -21,7 +27,8 @@
> rte_regexdev_selftest@EXPERIMENTAL 20.11
> rte_regexdev_start@EXPERIMENTAL 20.11
> rte_regexdev_stop@EXPERIMENTAL 20.11
> - rte_regexdev_unregister@Base 20.11
> + rte_regexdev_unregister@INTERNAL 21.11.1~rc1-0ubuntu1~jammyppa2
> rte_regexdev_xstats_by_name_get@EXPERIMENTAL 20.11
> rte_regexdev_xstats_get@EXPERIMENTAL 20.11
> rte_regexdev_xstats_names_get@EXPERIMENTAL 20.11
>
+cc Ori, regex maintainer.
Regex library is an experimental API so everything should have been
experimental or internal. This is fixing that issue.
It is fixed with
commit 6e7f8939f23c2c8ed80602bc0d62990eebe52013
Author: Thomas Monjalon <thomas@monjalon.net>
Date: Sun Mar 6 10:20:22 2022 +0100
regexdev: fix section attribute of symbols
[ upstream commit 89e290eb8ca99af9f7cfc3292d93860f8e672708 ]
and
commit 026470bafaa02cba0d46ed7b7e835262399a009a
Author: Thomas Monjalon <thomas@monjalon.net>
Date: Sun Mar 6 10:20:23 2022 +0100
build: hide local symbols in shared libraries
[ upstream commit b403498e14229ee903c8fff9baefcb72894062f3 ]
The fact that they are redesignated to correctly be
experimental/internal seems ok to me.
> dpkg-gensymbols: error: some symbols or patterns disappeared in the
> symbols file: see diff output below
> dpkg-gensymbols: warning: debian/librte-gpudev22/DEBIAN/symbols
> doesn't match completely debian/librte-gpudev22.symbols
> --- debian/librte-gpudev22.symbols
> (librte-gpudev22_21.11.1~rc1-0ubuntu1~jammyppa2_amd64)
> +++ dpkg-gensymbols4qkXdt 2022-04-11 06:46:34.552883776 +0000
> @@ -1,7 +1,7 @@
> librte_gpudev.so.22 librte-gpudev22 #MINVER#
> EXPERIMENTAL@EXPERIMENTAL 21.11
> INTERNAL@INTERNAL 21.11
> - gpu_logtype@Base 21.11
> rte_gpu_add_child@EXPERIMENTAL 21.11
> rte_gpu_allocate@INTERNAL 21.11
> rte_gpu_attach@INTERNAL 21.11
>
The missing wildcard meant this symbol escaped in 21.11.
It is fixed by:
commit 026470bafaa02cba0d46ed7b7e835262399a009a
Author: Thomas Monjalon <thomas@monjalon.net>
Date: Sun Mar 6 10:20:23 2022 +0100
build: hide local symbols in shared libraries
[ upstream commit b403498e14229ee903c8fff9baefcb72894062f3 ]
In this case the symbol is not redesignated but removed, but it doesn't
look to have any use to a user, so I think it can be safe to remove.
There are updates to the libabigail.ignore for regex and gpu_dev to
ignore ABI changes for these fixes.
--
I'm ok with changes above for 21.11.1, what do others think?
Kevin.
>
> Full log:
> https://launchpadlibrarian.net/596047842/buildlog_ubuntu-jammy-amd64.dpdk_21.11.1~rc1-0ubuntu1~jammyppa2_BUILDING.txt.gz
>
^ permalink raw reply [relevance 3%]
* Re: 21.11.1 patches review and test
2022-04-11 6:58 0% ` Christian Ehrhardt
@ 2022-04-13 7:26 0% ` Christian Ehrhardt
2022-04-13 10:06 3% ` Kevin Traynor
1 sibling, 0 replies; 200+ results
From: Christian Ehrhardt @ 2022-04-13 7:26 UTC (permalink / raw)
To: Kevin Traynor
Cc: stable, dev, Abhishek Marathe, Ali Alnubani, benjamin.walker,
David Christensen, hariprasad.govindharajan, Hemant Agrawal,
Ian Stokes, Jerin Jacob, John McNamara, Ju-Hyoung Lee,
Luca Boccassi, Pei Zhang, qian.q.xu, Raslan Darawsheh,
Thomas Monjalon, yuan.peng, zhaoyan.chen
On Mon, Apr 11, 2022 at 8:58 AM Christian Ehrhardt
<christian.ehrhardt@canonical.com> wrote:
>
> On Fri, Apr 1, 2022 at 12:22 PM Kevin Traynor <ktraynor@redhat.com> wrote:
> >
> > Hi all,
> >
> > Here is a list of patches targeted for stable release 21.11.1.
>
> Hi Kevin,
> this breaks on me at build time due to symbol changes.
> It is a wild mix of Base->Internal/Experimental, a few new symbols,
> and even just removed ones (in gpu which is experimental, but still
> would that need a minor soname bump?).
> They might be intentional, but it felt too much to me without at least
> discussing it.
> Could you have a look if you think that they are all intentional, save
> and correct for an LTS release?
ping ^^ ?
> dpkg-gensymbols: warning: some new symbols appeared in the symbols
> file: see diff output below
> dpkg-gensymbols: warning: debian/librte-common-cnxk22/DEBIAN/symbols
> doesn't match completely debian/librte-common-cnxk22.symbols
> --- debian/librte-common-cnxk22.symbols
> (librte-common-cnxk22_21.11.1~rc1-0ubuntu1~jammyppa2_amd64)
> +++ dpkg-gensymbolsUuRb8d 2022-04-11 06:46:22.276766813 +0000
> @@ -197,6 +197,7 @@
> roc_nix_ptp_clock_read@INTERNAL 21.08
> roc_nix_ptp_info_cb_register@INTERNAL 21.08
> roc_nix_ptp_info_cb_unregister@INTERNAL 21.08
> + roc_nix_ptp_is_enable@INTERNAL 21.11.1~rc1-0ubuntu1~jammyppa2
> roc_nix_ptp_rx_ena_dis@INTERNAL 21.08
> roc_nix_ptp_sync_time_adjust@INTERNAL 21.08
> roc_nix_ptp_tx_ena_dis@INTERNAL 21.08
>
> dpkg-gensymbols: warning: some new symbols appeared in the symbols
> file: see diff output below
> dpkg-gensymbols: warning: debian/librte-ethdev22/DEBIAN/symbols
> doesn't match completely debian/librte-ethdev22.symbols
> --- debian/librte-ethdev22.symbols
> (librte-ethdev22_21.11.1~rc1-0ubuntu1~jammyppa2_amd64)
> +++ dpkg-gensymbolskEnokB 2022-04-11 06:46:25.252795157 +0000
> @@ -37,6 +37,7 @@
> rte_eth_dev_flow_ctrl_get@DPDK_22 21.11
> rte_eth_dev_flow_ctrl_set@DPDK_22 21.11
> rte_eth_dev_fw_version_get@DPDK_22 21.11
> + rte_eth_dev_get_by_name@INTERNAL 21.11.1~rc1-0ubuntu1~jammyppa2
> rte_eth_dev_get_dcb_info@DPDK_22 21.11
> rte_eth_dev_get_eeprom@DPDK_22 21.11
> rte_eth_dev_get_eeprom_length@DPDK_22 21.11
>
> dpkg-gensymbols: warning: some new symbols appeared in the symbols
> file: see diff output below
> dpkg-gensymbols: error: some symbols or patterns disappeared in the
> symbols file: see diff output below
> dpkg-gensymbols: warning: debian/librte-regexdev22/DEBIAN/symbols
> doesn't match completely debian/librte-regexdev22.symbols
> --- debian/librte-regexdev22.symbols
> (librte-regexdev22_21.11.1~rc1-0ubuntu1~jammyppa2_amd64)
> +++ dpkg-gensymbolsPD0Ygo 2022-04-11 06:46:33.368872490 +0000
> @@ -1,6 +1,8 @@
> librte_regexdev.so.22 librte-regexdev22 #MINVER#
> EXPERIMENTAL@EXPERIMENTAL 20.11
> - rte_regex_devices@Base 20.11
> + INTERNAL@INTERNAL 21.11.1~rc1-0ubuntu1~jammyppa2
> + rte_regex_devices@EXPERIMENTAL 21.11.1~rc1-0ubuntu1~jammyppa2
> rte_regexdev_attr_get@EXPERIMENTAL 20.11
> rte_regexdev_attr_set@EXPERIMENTAL 20.11
> rte_regexdev_close@EXPERIMENTAL 20.11
> @@ -8,12 +10,16 @@
> rte_regexdev_count@EXPERIMENTAL 20.11
> rte_regexdev_dump@EXPERIMENTAL 20.11
> rte_regexdev_get_dev_id@EXPERIMENTAL 20.11
> - rte_regexdev_get_device_by_name@Base 20.11
> + rte_regexdev_get_device_by_name@INTERNAL 21.11.1~rc1-0ubuntu1~jammyppa2
> rte_regexdev_info_get@EXPERIMENTAL 20.11
> - rte_regexdev_is_valid_dev@Base 20.11
> - rte_regexdev_logtype@Base 20.11
> + rte_regexdev_is_valid_dev@EXPERIMENTAL 21.11.1~rc1-0ubuntu1~jammyppa2
> + rte_regexdev_logtype@EXPERIMENTAL 21.11.1~rc1-0ubuntu1~jammyppa2
> rte_regexdev_queue_pair_setup@EXPERIMENTAL 20.11
> - rte_regexdev_register@Base 20.11
> + rte_regexdev_register@INTERNAL 21.11.1~rc1-0ubuntu1~jammyppa2
> rte_regexdev_rule_db_compile_activate@EXPERIMENTAL 20.11
> rte_regexdev_rule_db_export@EXPERIMENTAL 20.11
> rte_regexdev_rule_db_import@EXPERIMENTAL 20.11
> @@ -21,7 +27,8 @@
> rte_regexdev_selftest@EXPERIMENTAL 20.11
> rte_regexdev_start@EXPERIMENTAL 20.11
> rte_regexdev_stop@EXPERIMENTAL 20.11
> - rte_regexdev_unregister@Base 20.11
> + rte_regexdev_unregister@INTERNAL 21.11.1~rc1-0ubuntu1~jammyppa2
> rte_regexdev_xstats_by_name_get@EXPERIMENTAL 20.11
> rte_regexdev_xstats_get@EXPERIMENTAL 20.11
> rte_regexdev_xstats_names_get@EXPERIMENTAL 20.11
>
> dpkg-gensymbols: error: some symbols or patterns disappeared in the
> symbols file: see diff output below
> dpkg-gensymbols: warning: debian/librte-gpudev22/DEBIAN/symbols
> doesn't match completely debian/librte-gpudev22.symbols
> --- debian/librte-gpudev22.symbols
> (librte-gpudev22_21.11.1~rc1-0ubuntu1~jammyppa2_amd64)
> +++ dpkg-gensymbols4qkXdt 2022-04-11 06:46:34.552883776 +0000
> @@ -1,7 +1,7 @@
> librte_gpudev.so.22 librte-gpudev22 #MINVER#
> EXPERIMENTAL@EXPERIMENTAL 21.11
> INTERNAL@INTERNAL 21.11
> - gpu_logtype@Base 21.11
> rte_gpu_add_child@EXPERIMENTAL 21.11
> rte_gpu_allocate@INTERNAL 21.11
> rte_gpu_attach@INTERNAL 21.11
>
>
> Full log:
> https://launchpadlibrarian.net/596047842/buildlog_ubuntu-jammy-amd64.dpdk_21.11.1~rc1-0ubuntu1~jammyppa2_BUILDING.txt.gz
>
> > Please try and complete validation by April 13th.
> >
> > Please help with testing and validation of your use cases and report
> > any issues/results with reply-all to this mail. For the final release
> > the fixes and reported validations will be added to the release notes.
> >
> > A release candidate tarball can be found at:
> >
> > https://dpdk.org/browse/dpdk-stable/tag/?id=v21.11.1-rc1
> >
> > These patches are located at branch 21.11 of dpdk-stable repo:
> > https://dpdk.org/browse/dpdk-stable/
> >
> > Thanks.
> >
> > Kevin
> >
> > ---
> > Adham Masarwah (2):
> > net/mlx5: fix destroying empty matchers list
> > app/testpmd: fix show RSS RETA on Windows
> >
> > Ajit Khaparde (7):
> > net/bnxt: fix ring teardown
> > net/bnxt: fix PAM4 mask setting
> > net/bnxt: fix crash by validating pointer
> > net/bnxt: check VF representor pointer before access
> > net/bnxt: fix VF resource allocation strategy
> > net/bnxt: set HW coalescing parameters
> > net/bnxt: fix ring calculation for representors
> >
> > Alexander Kozyrev (4):
> > net/mlx5: fix maximum packet headers size for TSO
> > net/mlx5: fix MPRQ WQE size assertion
> > net/mlx5: fix committed bucket size
> > net/mlx5: fix meter capabilities reporting
> >
> > Ali Alnubani (1):
> > doc: fix typos and punctuation in flow API guide
> >
> > Anatoly Burakov (1):
> > net/qede: fix redundant condition in debug code
> >
> > Andy Pei (1):
> > vdpa/ifc: fix log info mismatch
> >
> > Ankur Dwivedi (1):
> > common/cnxk: fix NPC key extraction validation
> >
> > Anoob Joseph (4):
> > common/cnxk: fix reset of fields
> > crypto/cnxk: fix inflight count calculation
> > crypto/cnxk: fix extend tail calculation
> > crypto/cnxk: fix update of number of descriptors
> >
> > Arek Kusztal (1):
> > cryptodev: fix RSA key type name
> >
> > Asaf Ravid (1):
> > net/cnxk: fix promiscuous mode in multicast enable flow
> >
> > Ashwin Sekhar T K (1):
> > mempool/cnxk: fix batch allocation failure path
> >
> > Bin Zheng (1):
> > net/ixgbe: add vector Rx parameter check
> >
> > Bing Zhao (5):
> > common/mlx5: fix probing failure code
> > app/testpmd: fix raw encap of GENEVE option
> > net/mlx5: fix matcher priority with ICMP or ICMPv6
> > net/mlx5: remove unused reference counter
> > net/mlx5: fix configuration without Rx queue
> >
> > Brian Dooley (13):
> > eal: add missing C++ guards
> > telemetry: add missing C++ guards
> > ethdev: add missing C++ guards
> > metrics: add missing C++ guards
> > acl: add missing C++ guards
> > compressdev: add missing C++ guards
> > eventdev: add missing C++ guards
> > kni: add missing C++ guards
> > vhost: add missing C++ guards
> > bpf: add missing C++ guards
> > cryptodev: add missing C++ guards
> > examples/l2fwd-crypto: fix port mask overflow
> > crypto/virtio: fix out-of-bounds access
> >
> > Bruce Richardson (23):
> > doc: remove dependency on findutils on FreeBSD
> > dma/idxd: fix burst capacity calculation
> > dma/idxd: fix paths to driver sysfs directory
> > dma/idxd: fix wrap-around in burst capacity calculation
> > build: fix warnings when running external commands
> > build: remove deprecated Meson functions
> > eal: fix C++ include
> > eventdev: fix C++ include
> > graph: fix C++ include
> > ipsec: fix C++ include
> > table: fix C++ include
> > vhost: fix C++ include
> > ethdev: fix cast for C++ compatibility
> > test/dma: fix missing checks for device capacity
> > dma/idxd: configure maximum batch size to high value
> > doc: improve configuration examples in idxd guide
> > distributor: fix potential overflow
> > eal/freebsd: add missing C++ include guards
> > compressdev: fix missing space in log macro
> > cryptodev: fix clang C++ include
> > eventdev: fix clang C++ include
> > doc: replace characters for (R) symbol in Linux guide
> > doc: fix missing note on UIO module in Linux guide
> >
> > Chandubabu Namburu (1):
> > net/axgbe: use PCI root complex device to distinguish device
> >
> > Chenbo Xia (1):
> > vhost: fix queue number check when setting inflight FD
> >
> > Chengchang Tang (1):
> > net/bonding: fix offloading configuration
> >
> > Chengwen Feng (2):
> > net/hns3: delete duplicated RSS type
> > dma/hisilicon: use common PCI device naming
> >
> > Chuanshe Zhang (1):
> > examples/flow_classify: fix failure message
> >
> > Ciara Loftus (2):
> > net/af_xdp: fix build with -Wunused-function
> > net/af_xdp: ensure socket is deleted on Rx queue setup error
> >
> > Ciara Power (4):
> > crypto/ipsec_mb: fix queue setup null pointer dereference
> > crypto/ipsec_mb: fix queue cleanup null pointer dereference
> > crypto/ipsec_mb: fix tainted data for session
> > crypto/ipsec_mb: remove useless check
> >
> > Cristian Dumitrescu (2):
> > pipeline: fix annotation checks
> > pipeline: fix table state memory allocation
> >
> > Dapeng Yu (2):
> > net/ice: track DCF state of PF
> > net/i40e: enable maximum frame size at port level
> >
> > Dariusz Sosnowski (3):
> > net/mlx5: fix inline length for multi-segment TSO
> > net/mlx5: fix MPLS/GRE Verbs spec ordering
> > net/mlx5: fix VLAN push action validation
> >
> > David Marchand (8):
> > devtools: fix comment detection in forbidden token check
> > stack: fix stubs header export
> > test/mbuf: fix mbuf data content check
> > ethdev: fix MAC address in telemetry device info
> > net/af_xdp: add missing trailing newline in logs
> > devtools: remove event/dlb exception in ABI check
> > vhost: fix FD leak with inflight messages
> > bpf: fix build with some libpcap version on FreeBSD
> >
> > Dawid Gorecki (2):
> > net/ena: fix reset reason being overwritten
> > net/ena: check memory BAR before initializing LLQ
> >
> > Devendra Singh Rawat (3):
> > net/qede: fix Tx completion
> > net/qede: fix Rx bulk
> > net/qede: fix maximum Rx packet length
> >
> > Dmitry Kozlyuk (8):
> > net/mlx5: fix GCC uninitialized variable warning
> > net/mlx5: relax headroom assertion
> > app/testpmd: fix external buffer allocation
> > common/mlx5: fix MR lookup for non-contiguous mempool
> > common/mlx5: add Netlink event helpers
> > net/mlx5: fix link status change detection
> > net/mlx5: fix initial link status detection
> > net/mlx5: fix modify port action validation
> >
> > Elena Agostini (3):
> > gpu/cuda: fix memory list cleanup
> > doc: add CUDA driver features
> > gpu/cuda: fix dependency loading path
> >
> > Ferruh Yigit (2):
> > net/bonding: fix MTU set for slaves
> > ethdev: fix doxygen comments for device info struct
> >
> > Geoffrey Le Gourriérec (1):
> > net/bnxt: restore dependency on kernel modules
> >
> > Gerry Gribbon (1):
> > app/regex: fix number of matches
> >
> > Gowrishankar Muthukrishnan (6):
> > event/cnxk: fix variables casting
> > event/cnxk: fix uninitialized local variables
> > common/cnxk: add missing checks of return values
> > common/cnxk fix unintended sign extension
> > common/cnxk: fix uninitialized pointer read
> > net/cnxk: fix uninitialized local variable
> >
> > Gregory Etelson (10):
> > net/mlx5: fix RSS expansion with explicit next protocol
> > net/mlx5: fix GRE protocol type translation for Verbs
> > net/mlx5: fix GRE item translation in Verbs
> > net/mlx5: reduce flex item flow handle size
> > net/mlx5: fix flex item header length translation
> > net/mlx5: fix inet IPIP protocol type
> > net/mlx5: fix next protocol RSS expansion
> > net/mlx5: fix flex item availability
> > app/testpmd: fix GTP header parsing in checksum engine
> > app/testpmd: fix flow rule with flex input link
> >
> > Haiyue Wang (2):
> > net/iavf: remove git residue symbol
> > doc: fix KNI PMD name typo
> >
> > Harman Kalra (3):
> > common/cnxk: reset stale values on error debug registers
> > common/cnxk: always use single interrupt ID with NIX
> > common/cnxk: fix mbuf data offset for VF
> >
> > Harold Huang (2):
> > net/virtio-user: fix resource leak on probing failure
> > net/kni: fix config initialization
> >
> > Heinrich Kuhn (1):
> > net/nfp: free HW ring memzone on queue release
> >
> > Hemant Agrawal (1):
> > crypto/dpaax_sec: fix auth/cipher xform chain checks
> >
> > Honnappa Nagarahalli (3):
> > examples/distributor: reduce Tx queue number to 1
> > examples/l3fwd: share queue size variables
> > examples/l3fwd: make Rx and Tx queue size configurable
> >
> > Huisong Li (10):
> > net/hns3: fix mailbox wait time
> > net/hns3: fix using enum as boolean
> > net/hns3: fix max packet size rollback in PF
> > net/hns3: fix insecure way to query MAC statistics
> > net/hns3: fix double decrement of secondary count
> > net/hns3: fix operating queue when TCAM table is invalid
> > kni: fix freeing order in device release
> > net/hns3: fix RSS TC mode entry
> > net/hns3: fix VF RSS TC mode entry
> > net/hns3: increase time waiting for PF reset completion
> >
> > Ivan Malov (8):
> > net/sfc: validate queue span when parsing flow action RSS
> > net/sfc: fix lock releases
> > net/sfc: do not push fast free offload to default TxQ config
> > net/sfc: demand Tx fast free offload on EF10 simple datapath
> > common/sfc_efx/base: fix recirculation ID set in outer rules
> > common/sfc_efx/base: add missing handler for 1-byte fields
> > net/sfc: fix flow tunnel support detection
> > net/sfc: reduce log level of tunnel restore info error
> >
> > Jakub Poczatek (1):
> > doc: fix FIPS guide
> >
> > Jiawei Wang (4):
> > net/mlx5: fix NIC egress flow mismatch in switchdev mode
> > net/mlx5: fix sample flow action on trusted device
> > net/mlx5: fix implicit tag insertion with sample action
> > net/mlx5: fix port matching in sample flow rule
> >
> > Jiawen Wu (8):
> > net/ngbe: fix Rx by initializing packet buffer early
> > net/ngbe: fix missed link interrupt
> > net/ngbe: fix Tx hang on queue disable
> > net/ngbe: fix packet statistics
> > net/txgbe: fix link up and down
> > net/txgbe: fix KR auto-negotiation
> > net/ngbe: fix debug logs
> > net/txgbe: fix debug logs
> >
> > Jie Hai (1):
> > net/hns3: remove duplicate macro definition
> >
> > Jie Wang (1):
> > net: fix L2TPv2 common header
> >
> > Jie Zhou (2):
> > eal/windows: fix error code for not supported API
> > test/mem: fix error check
> >
> > Josh Soref (1):
> > fix spelling in comments and strings
> >
> > Junfeng Guo (3):
> > net/ice: fix pattern check for flow director parser
> > net/ice: fix pattern check in flow director
> > raw/ntb: clear all valid doorbell bits on init
> >
> > Junjie Wan (1):
> > net/bonding: fix slaves initializing on MTU setting
> >
> > Junxiao Shi (1):
> > net/af_xdp: fix custom program loading with multiple queues
> >
> > Juraj Linkeš (1):
> > config/arm: add values for native armv7
> >
> > Kai Ji (2):
> > test/crypto: fix out-of-place SGL in raw datapath
> > crypto/qat: fix GEN4 AEAD job in raw data path
> >
> > Kalesh AP (15):
> > net/bnxt: fix multicast address set
> > net/bnxt: fix multicast MAC restore during reset recovery
> > net/bnxt: fix queue stop operation
> > net/bnxt: restore RSS configuration after reset recovery
> > net/bnxt: fix restoring VLAN filtering after recovery
> > net/bnxt: cap maximum number of unicast MAC addresses
> > net/bnxt: set fast-path pointers only if recovery succeeds
> > net/bnxt: add null check for mark table
> > net/bnxt: fix flow create when RSS is disabled
> > net/bnxt: get maximum supported multicast filters count
> > net/bnxt: fix handling of VF configuration change
> > net/bnxt: fix xstats query
> > net/bnxt: fix check for autoneg enablement
> > net/bnxt: handle ring cleanup in case of error
> > net/bnxt: fix memzone allocation per VNIC
> >
> > Karl Bonde Torp (1):
> > build: fix build on FreeBSD with Meson 0.61.1
> >
> > Kathleen Capella (2):
> > net/iavf: count continuous DD bits for Arm
> > net/iavf: count continuous DD bits for Arm in flex Rx
> >
> > Kevin Liu (2):
> > net/ice: fix Tx checksum offload
> > net/ice: fix Tx offload path choice
> >
> > Kevin Traynor (4):
> > maintainers: update for stable branches
> > build: suppress rte_crypto_asym_op abi check
> > Revert "crypto/ipsec_mb: fix length and offset settings"
> > Revert "net/mlx5: fix flex item availability"
> >
> > Kumara Parameshwaran (2):
> > ethdev: add internal function to device struct from name
> > net/tap: fix to populate FDs in secondary process
> >
> > Lance Richardson (2):
> > buildtools: fix AVX512 check for Python 3.5
> > net/bnxt: fix xstats names query overrun
> >
> > Leyi Rong (1):
> > net/iavf: fix potential out-of-bounds access
> >
> > Lijun Ou (1):
> > net/hns3: fix RSS key with null
> >
> > Lior Margalit (1):
> > net/mlx5: fix assertion on flags set in packet mbuf
> >
> > Madhuker Mythri (1):
> > devargs: fix crash with uninitialized parsing
> >
> > Martijn Bakker (1):
> > pflock: fix header file installation
> >
> > Martin Spinler (2):
> > net/nfb: fix array indexes in deinit functions
> > net/nfb: fix multicast/promiscuous mode switching
> >
> > Marvin Liu (1):
> > net/virtio: fix slots number when indirect feature on
> >
> > Matan Azrad (1):
> > vdpa/mlx5: workaround queue stop with traffic
> >
> > Maxime Coquelin (1):
> > vhost: fix unsafe vring addresses modifications
> >
> > Maxime Gouin (3):
> > bus/ifpga: remove useless check while browsing devices
> > net/nfp: remove duplicated check when setting MAC address
> > net/nfp: remove useless range checks
> >
> > Megha Ajmera (1):
> > examples/qos_sched: fix core mask overflow
> >
> > Michael Baum (17):
> > common/mlx5: add minimum WQE size for striding RQ
> > net/mlx5: improve stride parameter names
> > net/mlx5: fix MPRQ stride devargs adjustment
> > common/mlx5: fix error handling in multi-class probe
> > net/mlx5: fix memory socket selection in ASO management
> > common/mlx5: fix missing validation in devargs parsing
> > net/mlx5: fix sibling device config check
> > net/mlx5: fix ineffective metadata argument adjustment
> > net/mlx5: fix ASO CT object release
> > net/mlx5: fix errno update in shared context creation
> > net/mlx5: fix entry in shared Rx queues list
> > doc: remove obsolete vector Tx explanations from mlx5 guide
> > doc: replace broken links in mlx guides
> > doc: correct name of BlueField-2 in mlx5 guide
> > net/mlx5: fix shared counter flag in flow validation
> > net/mlx5: fix check in count action validation
> > common/mlx5: consider local functions as internal
> >
> > Michal Krawczyk (6):
> > net/ena: remove unused enumeration
> > net/ena: remove unused offload variables
> > net/ena: skip timer if reset is triggered
> > net/ena: fix meta descriptor DF flag setup
> > net/ena: fix checksum flag for L4
> > bus/pci: assign driver pointer before mapping
> >
> > Michal Wilczynski (1):
> > net/ice: fix overwriting of LSE bit by DCF
> >
> > Min Hu (Connor) (6):
> > net/hns3: fix Rx/Tx functions update
> > net/hns3: fix vector Rx/Tx when PTP enabled
> > net/bonding: fix promiscuous and allmulticast state
> > net/bonding: fix reference count on mbufs
> > app/testpmd: fix bonding mode set
> > app/testpmd: check starting port is not in bonding
> >
> > Naga Harish K S V (2):
> > eventdev/eth_tx: fix queue add error code
> > eventdev/eth_rx: fix queue config query
> >
> > Nicolas Chautru (1):
> > baseband/acc100: avoid out-of-bounds access
> >
> > Nipun Gupta (1):
> > examples/l3fwd: fix Rx burst size for event mode
> >
> > Nithin Dabilpuram (11):
> > examples/ipsec-secgw: fix eventdev start sequence
> > examples/ipsec-secgw: fix default flow rule creation
> > common/cnxk: fix shift offset for TL3 length disable
> > common/cnxk: fix byte order of frag sizes and infos
> > common/cnxk: fix null pointer dereferences
> > common/cnxk: fix uninitialized variables
> > examples/ipsec-secgw: fix buffer freeing in vector mode
> > net/cnxk: fix inline device RQ tag mask
> > net/cnxk: register callback early to handle initial packets
> > net/cnxk: fix inline IPsec security error handling
> > common/cnxk: fix bitmap usage for TM
> >
> > Pablo de Lara (9):
> > crypto/ipsec_mb: fix buffer overrun
> > crypto/ipsec_mb: check missing operation types
> > crypto/ipsec_mb: fix ZUC authentication verify
> > crypto/ipsec_mb: fix ZUC operation overwrite
> > crypto/ipsec_mb: fix length and offset settings
> > test/efd: fix sockets mask size
> > efd: fix uninitialized structure
> > crypto/ipsec_mb: fix length and offset settings
> > crypto/ipsec_mb: fix GMAC parameters setting
> >
> > Pavan Nikhilesh (6):
> > eventdev/eth_rx: fix missing internal port checks
> > event/cnxk: fix QoS devargs parsing
> > common/cnxk: add workaround for vWQE flush
> > config: align mempool elements to 128 bytes on CN10K
> > event/cnxk: fix sub-event clearing mask length
> > event/cnxk: fix Rx adapter config check
> >
> > Peng Yu (1):
> > vhost: fix linker script syntax
> >
> > Piotr Bronowski (2):
> > crypto/ipsec_mb: fix premature dereference
> > crypto/ipsec_mb: fix GCM requested digest length
> >
> > Qi Zhang (2):
> > net/ice: fix Tx checksum offload capability
> > doc: update matching versions in ice guide
> >
> > Radu Nicolau (5):
> > examples/ipsec-secgw: fix offload flag used for TSO IPv6
> > net/iavf: fix segmentation offload condition
> > net/iavf: fix segmentation offload buffer size
> > net/iavf: support NAT-T / UDP encapsulation
> > net/iavf: fix AES-GMAC IV size
> >
> > Rahul Bhansali (2):
> > net/cnxk: fix mbuf data length
> > examples/l3fwd: fix buffer overflow in Tx
> >
> > Rahul Lakkireddy (1):
> > net/cxgbe: fix dangling pointer by mailbox access rework
> >
> > Raja Zidane (8):
> > net/mlx5: fix mark enabling for Rx
> > app/testpmd: fix GENEVE parsing in checksum mode
> > app/compress-perf: fix cycle count operations allocation
> > app/compress-perf: optimize operations pool allocation
> > compress/mlx5: support out-of-space status
> > app/compress-perf: fix socket ID type during init
> > app/compress-perf: fix number of queue pairs to setup
> > compressdev: fix socket ID type
> >
> > Rakesh Kudurumalla (2):
> > net/cnxk: fix build with GCC 12
> > net/cnxk: fix RSS RETA table update
> >
> > Rashmi Shetty (1):
> > doc: fix dlb2 guide
> >
> > Reshma Pattan (1):
> > app/pdump: abort on multi-core capture limit
> >
> > Rongwei Liu (3):
> > net/mlx5: fix shared RSS destroy
> > net/mlx5: fix meter creation default state
> > net/mlx5: forbid multiple ASO actions in a single rule
> >
> > Ruifeng Wang (1):
> > config: add arch define for Arm
> >
> > Satheesh Paul (5):
> > common/cnxk: fix nibble parsing order when dumping MCAM
> > common/cnxk: fix flow deletion
> > common/cnxk: fix log level during MCAM allocation
> > common/cnxk: fix base rule merge
> > net/cnxk: fix Rx/Tx function update
> >
> > Sean Morrissey (2):
> > app/testpmd: fix dereference before null check
> > doc: fix telemetry example in cryptodev guide
> >
> > Shijith Thotton (1):
> > crypto/cnxk: enable allocated queues only
> >
> > Shun Hao (3):
> > net/mlx5: fix meter sub-policy creation
> > net/mlx5: fix E-Switch manager vport ID
> > net/mlx5: fix meter policy creation assert
> >
> > Simei Su (1):
> > net/ice: fix mbuf offload flag for Rx timestamp
> >
> > Srikanth Yalavarthi (1):
> > dma/cnxk: fix installing internal headers
> >
> > Stephen Douthit (1):
> > net/ixgbe: fix FSP check for X550EM devices
> >
> > Stephen Hemminger (7):
> > eal/linux: log hugepage create errors with filename
> > net/memif: remove unnecessary Rx interrupt stub
> > ipc: end multiprocess thread during cleanup
> > vfio: cleanup the multiprocess sync handle
> > pcapng: handle failure of link status query
> > test/bpf: skip dump if conversion fails
> > app/dumpcap: check for failure to set promiscuous
> >
> > Steve Yang (4):
> > app/testpmd: fix stack overflow for EEPROM display
> > net/i40e: fix unintentional integer overflow
> > eal/linux: fix illegal memory access in uevent handler
> > net/iavf: fix function pointer in multi-process
> >
> > Suanming Mou (3):
> > net/mlx5: set flow error for hash list create
> > net/mlx5: remove unused function
> > net/mlx5: fix indexed pool fetch overlap
> >
> > Thinh Tran (1):
> > net/mlx5: fix CPU socket ID for Rx queue creation
> >
> > Thomas Monjalon (6):
> > doc: replace deprecated distutils version parsing
> > dmadev: add missing header include
> > app/testpmd: fix build without drivers
> > regexdev: fix section attribute of symbols
> > build: hide local symbols in shared libraries
> > devtools: fix symbols check
> >
> > Tianfei Zhang (2):
> > raw/ifpga/base: fix SPI transaction
> > raw/ifpga: fix thread closing
> >
> > Tianli Lai (1):
> > examples/kni: add missing trailing newline in log
> >
> > Timothy McDaniel (3):
> > event/dlb2: update rolling mask used for dequeue
> > event/dlb2: poll HW CQ inflights before mapping queue
> > event/dlb2: add shift value check in sparse dequeue
> >
> > Vanshika Shukla (2):
> > net/dpaa2: fix unregistering interrupt handler
> > net/dpaa2: fix timestamping for IEEE1588
> >
> > Viacheslav Ovsiienko (4):
> > net/mlx5: fix modify field MAC address offset
> > app/testpmd: fix Tx scheduling interval
> > net/mlx5: fix metadata endianness in modify field action
> > doc: fix modify field action description for mlx5
> >
> > Vladimir Medvedkin (1):
> > app/fib: fix division by zero
> >
> > Wei Huang (5):
> > raw/ifpga/base: fix port feature ID
> > raw/ifpga: fix variable initialization in probing
> > raw/ifpga: fix interrupt handle allocation
> > raw/ifpga: fix monitor thread
> > raw/ifpga: fix build with optimization
> >
> > Weiguo Li (14):
> > common/cnxk: fix error checking
> > net/enic: fix dereference before null check
> > net/dpaa2: fix null pointer dereference
> > regex/mlx5: fix memory allocation check
> > net/memif: remove pointer deference before null check
> > net/iavf: fix null pointer dereference
> > vdpa/sfc: fix null dereference during config
> > vdpa/sfc: fix null dereference during removal
> > compress/octeontx: fix null pointer dereference
> > eventdev/eth_rx: fix parameters parsing memory leak
> > net/sfc: fix memory allocation size for cache
> > net/txgbe: fix queue statistics mapping
> > sched: remove useless malloc in PIE data init
> > net/bnxt: fix null dereference in session cleanup
> >
> > Wenwu Ma (1):
> > examples/vhost: fix launch with physical port
> >
> > Wenxuan Wu (1):
> > eal/linux: fix device monitor stop return
> >
> > Xiaoyu Min (1):
> > net/mlx5: reject jump to root table
> >
> > Xuan Ding (2):
> > vhost: fix field naming in guest page struct
> > vhost: fix physical address mapping
> >
> > Xueming Li (1):
> > net/virtio: fix Tx queue 0 overriden by queue 128
> >
> > Yajun Wu (1):
> > common/mlx5: fix queue pair ack timeout configuration
> >
> > Yiding Zhou (1):
> > net/ice: fix build with 16-byte Rx descriptor
> >
> > Yu Wenjun (1):
> > net/bonding: fix RSS with early configure
> >
> > Yuan Wang (1):
> > vhost: fix guest to host physical address mapping
> >
> > Yunjian Wang (12):
> > net/bonding: fix mode type mismatch
> > ethdev: fix Rx queue telemetry memory leak on failure
> > net/ice: fix link up when starting device
> > net/virtio-user: check FD flags getting failure
> > net/virtio: fix uninitialized RSS key
> > ring: fix error code when creating ring
> > net/ixgbe: check filter init failure
> > mem: check allocation in dynamic hugepage init
> > ethdev: remove unnecessary null check
> > net/ixgbe: reset security context pointer on close
> > net/txgbe: reset security context pointer on close
> > net/iavf: reset security context pointer on stop
> >
> > Yuying Zhang (1):
> > net/ice/base: add profile validation on switch filter
> >
> > Zhihong Wang (1):
> > ring: fix overflow in memory size calculation
> >
>
>
> --
> Christian Ehrhardt
> Staff Engineer, Ubuntu Server
> Canonical Ltd
--
Christian Ehrhardt
Staff Engineer, Ubuntu Server
Canonical Ltd
^ permalink raw reply [relevance 0%]
* RE: [PATCH 1/2] security: introduce per session event metadata
2022-04-04 10:42 0% ` Gujjar, Abhinandan S
@ 2022-04-13 7:13 3% ` Akhil Goyal
2022-04-18 19:36 0% ` Akhil Goyal
0 siblings, 1 reply; 200+ results
From: Akhil Goyal @ 2022-04-13 7:13 UTC (permalink / raw)
To: Gujjar, Abhinandan S, Volodymyr Fialko, dev, Jayatheerthan, Jay,
Vangati, Narender
Cc: Jerin Jacob Kollanukkaran, Anoob Joseph
Hi Abhinandan and others,
> + @Jayatheerthan, Jay & @Vangati, Narender
>
> > This change would be an ABI breakage. So to avoid that, we are planning to
> > Propose a better solution compared to this patch.
> > We plan to add a new cryptodev op to set the event metadata. A single API
> > which can be used in all cases - sym/asym/security sessions.
> >
> > As currently in case of sym crypto, userdata is being used for storing the event
> > Metadata and it is then dereferenced in the PMD which is wrong.
> > User data is meant only for user to use and PMD should not dereference it.
> >
> > Hence a new cryptodev op can be used to set session event metadata explicitly
> > if event mode is enabled.
> >
> > I will be sending the proposal soon. Would need your help in testing the Intel
> > usecases.
> >
We may need to stick to the approach introduced in this patch only.
As if we propose, a new single API for all type of sessions, the driver would need to
Get the event metadata from the session private data. This is not possible with
Your use case which gets it inside the eventdev library for sw adapter case as it cannot
Get the session private data without knowing the cdev_id.
Hence, we will take this patch as is in next release for security sessions(as it is an ABI break)
And would also introduce a similar change for crypto sessions in next release.
This way we can get rid of using userdata which is wrong implementation.
Regards,
Akhil
^ permalink raw reply [relevance 3%]
* Re: 21.11.1 patches review and test
2022-04-11 3:03 0% ` Pei Zhang
@ 2022-04-13 4:06 0% ` YangHang Liu
0 siblings, 0 replies; 200+ results
From: YangHang Liu @ 2022-04-13 4:06 UTC (permalink / raw)
To: Kevin Traynor
Cc: stable, dev, Abhishek Marathe, Ali Alnubani, Walker, Benjamin,
David Christensen, Govindharajan, Hariprasad, Hemant Agrawal,
Ian Stokes, Jerin Jacob, John McNamara, Ju-Hyoung Lee,
Luca Boccassi, xu, qian, Raslan Darawsheh, Thomas Monjalon, Peng,
Yuan, Chen, Zhaoyan, Pei Zhang
[-- Attachment #1: Type: text/plain, Size: 27842 bytes --]
Hi Kevin,
The dpdk 21.11.1-rc1 test result from Red Hat looks good.
We tested below 17 scenarios and all got PASS on RHEL8:
- Guest with device assignment(PF) throughput testing(1G hugepage size):
PASS
- Guest with device assignment(PF) throughput testing(2M hugepage size)
: PASS
- Guest with device assignment(VF) throughput testing: PASS
- PVP (host dpdk testpmd as vswitch) 1Q: throughput testing: PASS
- PVP vhost-user 2Q throughput testing: PASS
- PVP vhost-user 1Q - cross numa node throughput testing: PASS
- Guest with vhost-user 2 queues throughput testing: PASS
- vhost-user reconnect with dpdk-client, qemu-server: qemu reconnect:
PASS
- vhost-user reconnect with dpdk-client, qemu-server: ovs reconnect: PASS
- PVP 1Q live migration testing: PASS
- PVP 1Q cross numa node live migration testing: PASS
- Guest with ovs+dpdk+vhost-user 1Q live migration testing: PASS
- Guest with ovs+dpdk+vhost-user 1Q live migration testing (2M): PASS
- Guest with ovs+dpdk+vhost-user 2Q live migration testing: PASS
- Guest with ovs+dpdk+vhost-user 4Q live migration testing: PASS
- Host PF + DPDK testing: PASS
- Host VF + DPDK testing: PASS
Versions:
- kernel 4.18
- qemu 6.2
- dpdk: git://dpdk.org/dpdk-stable branch: 21.11
- # git log
...
Author: Kevin Traynor <ktraynor@redhat.com>
Date: Fri Apr 1 10:16:46 2022 +0100
version: 21.11.1-rc1
Signed-off-by: Kevin Traynor <ktraynor@redhat.com>
- NICs: X540-AT2 NIC(ixgbe, 10G)
Best Regards,
YangHang Liu
On Mon, Apr 11, 2022 at 11:03 AM Pei Zhang <pezhang@redhat.com> wrote:
> cc Yanghang Liu from RedHat, he will do this testing soon :)
>
> Best regards,
>
> Pei
>
> On Fri, Apr 1, 2022 at 6:22 PM Kevin Traynor <ktraynor@redhat.com> wrote:
>
>> Hi all,
>>
>> Here is a list of patches targeted for stable release 21.11.1.
>>
>> Please try and complete validation by April 13th.
>>
>> Please help with testing and validation of your use cases and report
>> any issues/results with reply-all to this mail. For the final release
>> the fixes and reported validations will be added to the release notes.
>>
>> A release candidate tarball can be found at:
>>
>> https://dpdk.org/browse/dpdk-stable/tag/?id=v21.11.1-rc1
>>
>> These patches are located at branch 21.11 of dpdk-stable repo:
>> https://dpdk.org/browse/dpdk-stable/
>>
>> Thanks.
>>
>> Kevin
>>
>> ---
>> Adham Masarwah (2):
>> net/mlx5: fix destroying empty matchers list
>> app/testpmd: fix show RSS RETA on Windows
>>
>> Ajit Khaparde (7):
>> net/bnxt: fix ring teardown
>> net/bnxt: fix PAM4 mask setting
>> net/bnxt: fix crash by validating pointer
>> net/bnxt: check VF representor pointer before access
>> net/bnxt: fix VF resource allocation strategy
>> net/bnxt: set HW coalescing parameters
>> net/bnxt: fix ring calculation for representors
>>
>> Alexander Kozyrev (4):
>> net/mlx5: fix maximum packet headers size for TSO
>> net/mlx5: fix MPRQ WQE size assertion
>> net/mlx5: fix committed bucket size
>> net/mlx5: fix meter capabilities reporting
>>
>> Ali Alnubani (1):
>> doc: fix typos and punctuation in flow API guide
>>
>> Anatoly Burakov (1):
>> net/qede: fix redundant condition in debug code
>>
>> Andy Pei (1):
>> vdpa/ifc: fix log info mismatch
>>
>> Ankur Dwivedi (1):
>> common/cnxk: fix NPC key extraction validation
>>
>> Anoob Joseph (4):
>> common/cnxk: fix reset of fields
>> crypto/cnxk: fix inflight count calculation
>> crypto/cnxk: fix extend tail calculation
>> crypto/cnxk: fix update of number of descriptors
>>
>> Arek Kusztal (1):
>> cryptodev: fix RSA key type name
>>
>> Asaf Ravid (1):
>> net/cnxk: fix promiscuous mode in multicast enable flow
>>
>> Ashwin Sekhar T K (1):
>> mempool/cnxk: fix batch allocation failure path
>>
>> Bin Zheng (1):
>> net/ixgbe: add vector Rx parameter check
>>
>> Bing Zhao (5):
>> common/mlx5: fix probing failure code
>> app/testpmd: fix raw encap of GENEVE option
>> net/mlx5: fix matcher priority with ICMP or ICMPv6
>> net/mlx5: remove unused reference counter
>> net/mlx5: fix configuration without Rx queue
>>
>> Brian Dooley (13):
>> eal: add missing C++ guards
>> telemetry: add missing C++ guards
>> ethdev: add missing C++ guards
>> metrics: add missing C++ guards
>> acl: add missing C++ guards
>> compressdev: add missing C++ guards
>> eventdev: add missing C++ guards
>> kni: add missing C++ guards
>> vhost: add missing C++ guards
>> bpf: add missing C++ guards
>> cryptodev: add missing C++ guards
>> examples/l2fwd-crypto: fix port mask overflow
>> crypto/virtio: fix out-of-bounds access
>>
>> Bruce Richardson (23):
>> doc: remove dependency on findutils on FreeBSD
>> dma/idxd: fix burst capacity calculation
>> dma/idxd: fix paths to driver sysfs directory
>> dma/idxd: fix wrap-around in burst capacity calculation
>> build: fix warnings when running external commands
>> build: remove deprecated Meson functions
>> eal: fix C++ include
>> eventdev: fix C++ include
>> graph: fix C++ include
>> ipsec: fix C++ include
>> table: fix C++ include
>> vhost: fix C++ include
>> ethdev: fix cast for C++ compatibility
>> test/dma: fix missing checks for device capacity
>> dma/idxd: configure maximum batch size to high value
>> doc: improve configuration examples in idxd guide
>> distributor: fix potential overflow
>> eal/freebsd: add missing C++ include guards
>> compressdev: fix missing space in log macro
>> cryptodev: fix clang C++ include
>> eventdev: fix clang C++ include
>> doc: replace characters for (R) symbol in Linux guide
>> doc: fix missing note on UIO module in Linux guide
>>
>> Chandubabu Namburu (1):
>> net/axgbe: use PCI root complex device to distinguish device
>>
>> Chenbo Xia (1):
>> vhost: fix queue number check when setting inflight FD
>>
>> Chengchang Tang (1):
>> net/bonding: fix offloading configuration
>>
>> Chengwen Feng (2):
>> net/hns3: delete duplicated RSS type
>> dma/hisilicon: use common PCI device naming
>>
>> Chuanshe Zhang (1):
>> examples/flow_classify: fix failure message
>>
>> Ciara Loftus (2):
>> net/af_xdp: fix build with -Wunused-function
>> net/af_xdp: ensure socket is deleted on Rx queue setup error
>>
>> Ciara Power (4):
>> crypto/ipsec_mb: fix queue setup null pointer dereference
>> crypto/ipsec_mb: fix queue cleanup null pointer dereference
>> crypto/ipsec_mb: fix tainted data for session
>> crypto/ipsec_mb: remove useless check
>>
>> Cristian Dumitrescu (2):
>> pipeline: fix annotation checks
>> pipeline: fix table state memory allocation
>>
>> Dapeng Yu (2):
>> net/ice: track DCF state of PF
>> net/i40e: enable maximum frame size at port level
>>
>> Dariusz Sosnowski (3):
>> net/mlx5: fix inline length for multi-segment TSO
>> net/mlx5: fix MPLS/GRE Verbs spec ordering
>> net/mlx5: fix VLAN push action validation
>>
>> David Marchand (8):
>> devtools: fix comment detection in forbidden token check
>> stack: fix stubs header export
>> test/mbuf: fix mbuf data content check
>> ethdev: fix MAC address in telemetry device info
>> net/af_xdp: add missing trailing newline in logs
>> devtools: remove event/dlb exception in ABI check
>> vhost: fix FD leak with inflight messages
>> bpf: fix build with some libpcap version on FreeBSD
>>
>> Dawid Gorecki (2):
>> net/ena: fix reset reason being overwritten
>> net/ena: check memory BAR before initializing LLQ
>>
>> Devendra Singh Rawat (3):
>> net/qede: fix Tx completion
>> net/qede: fix Rx bulk
>> net/qede: fix maximum Rx packet length
>>
>> Dmitry Kozlyuk (8):
>> net/mlx5: fix GCC uninitialized variable warning
>> net/mlx5: relax headroom assertion
>> app/testpmd: fix external buffer allocation
>> common/mlx5: fix MR lookup for non-contiguous mempool
>> common/mlx5: add Netlink event helpers
>> net/mlx5: fix link status change detection
>> net/mlx5: fix initial link status detection
>> net/mlx5: fix modify port action validation
>>
>> Elena Agostini (3):
>> gpu/cuda: fix memory list cleanup
>> doc: add CUDA driver features
>> gpu/cuda: fix dependency loading path
>>
>> Ferruh Yigit (2):
>> net/bonding: fix MTU set for slaves
>> ethdev: fix doxygen comments for device info struct
>>
>> Geoffrey Le Gourriérec (1):
>> net/bnxt: restore dependency on kernel modules
>>
>> Gerry Gribbon (1):
>> app/regex: fix number of matches
>>
>> Gowrishankar Muthukrishnan (6):
>> event/cnxk: fix variables casting
>> event/cnxk: fix uninitialized local variables
>> common/cnxk: add missing checks of return values
>> common/cnxk fix unintended sign extension
>> common/cnxk: fix uninitialized pointer read
>> net/cnxk: fix uninitialized local variable
>>
>> Gregory Etelson (10):
>> net/mlx5: fix RSS expansion with explicit next protocol
>> net/mlx5: fix GRE protocol type translation for Verbs
>> net/mlx5: fix GRE item translation in Verbs
>> net/mlx5: reduce flex item flow handle size
>> net/mlx5: fix flex item header length translation
>> net/mlx5: fix inet IPIP protocol type
>> net/mlx5: fix next protocol RSS expansion
>> net/mlx5: fix flex item availability
>> app/testpmd: fix GTP header parsing in checksum engine
>> app/testpmd: fix flow rule with flex input link
>>
>> Haiyue Wang (2):
>> net/iavf: remove git residue symbol
>> doc: fix KNI PMD name typo
>>
>> Harman Kalra (3):
>> common/cnxk: reset stale values on error debug registers
>> common/cnxk: always use single interrupt ID with NIX
>> common/cnxk: fix mbuf data offset for VF
>>
>> Harold Huang (2):
>> net/virtio-user: fix resource leak on probing failure
>> net/kni: fix config initialization
>>
>> Heinrich Kuhn (1):
>> net/nfp: free HW ring memzone on queue release
>>
>> Hemant Agrawal (1):
>> crypto/dpaax_sec: fix auth/cipher xform chain checks
>>
>> Honnappa Nagarahalli (3):
>> examples/distributor: reduce Tx queue number to 1
>> examples/l3fwd: share queue size variables
>> examples/l3fwd: make Rx and Tx queue size configurable
>>
>> Huisong Li (10):
>> net/hns3: fix mailbox wait time
>> net/hns3: fix using enum as boolean
>> net/hns3: fix max packet size rollback in PF
>> net/hns3: fix insecure way to query MAC statistics
>> net/hns3: fix double decrement of secondary count
>> net/hns3: fix operating queue when TCAM table is invalid
>> kni: fix freeing order in device release
>> net/hns3: fix RSS TC mode entry
>> net/hns3: fix VF RSS TC mode entry
>> net/hns3: increase time waiting for PF reset completion
>>
>> Ivan Malov (8):
>> net/sfc: validate queue span when parsing flow action RSS
>> net/sfc: fix lock releases
>> net/sfc: do not push fast free offload to default TxQ config
>> net/sfc: demand Tx fast free offload on EF10 simple datapath
>> common/sfc_efx/base: fix recirculation ID set in outer rules
>> common/sfc_efx/base: add missing handler for 1-byte fields
>> net/sfc: fix flow tunnel support detection
>> net/sfc: reduce log level of tunnel restore info error
>>
>> Jakub Poczatek (1):
>> doc: fix FIPS guide
>>
>> Jiawei Wang (4):
>> net/mlx5: fix NIC egress flow mismatch in switchdev mode
>> net/mlx5: fix sample flow action on trusted device
>> net/mlx5: fix implicit tag insertion with sample action
>> net/mlx5: fix port matching in sample flow rule
>>
>> Jiawen Wu (8):
>> net/ngbe: fix Rx by initializing packet buffer early
>> net/ngbe: fix missed link interrupt
>> net/ngbe: fix Tx hang on queue disable
>> net/ngbe: fix packet statistics
>> net/txgbe: fix link up and down
>> net/txgbe: fix KR auto-negotiation
>> net/ngbe: fix debug logs
>> net/txgbe: fix debug logs
>>
>> Jie Hai (1):
>> net/hns3: remove duplicate macro definition
>>
>> Jie Wang (1):
>> net: fix L2TPv2 common header
>>
>> Jie Zhou (2):
>> eal/windows: fix error code for not supported API
>> test/mem: fix error check
>>
>> Josh Soref (1):
>> fix spelling in comments and strings
>>
>> Junfeng Guo (3):
>> net/ice: fix pattern check for flow director parser
>> net/ice: fix pattern check in flow director
>> raw/ntb: clear all valid doorbell bits on init
>>
>> Junjie Wan (1):
>> net/bonding: fix slaves initializing on MTU setting
>>
>> Junxiao Shi (1):
>> net/af_xdp: fix custom program loading with multiple queues
>>
>> Juraj Linkeš (1):
>> config/arm: add values for native armv7
>>
>> Kai Ji (2):
>> test/crypto: fix out-of-place SGL in raw datapath
>> crypto/qat: fix GEN4 AEAD job in raw data path
>>
>> Kalesh AP (15):
>> net/bnxt: fix multicast address set
>> net/bnxt: fix multicast MAC restore during reset recovery
>> net/bnxt: fix queue stop operation
>> net/bnxt: restore RSS configuration after reset recovery
>> net/bnxt: fix restoring VLAN filtering after recovery
>> net/bnxt: cap maximum number of unicast MAC addresses
>> net/bnxt: set fast-path pointers only if recovery succeeds
>> net/bnxt: add null check for mark table
>> net/bnxt: fix flow create when RSS is disabled
>> net/bnxt: get maximum supported multicast filters count
>> net/bnxt: fix handling of VF configuration change
>> net/bnxt: fix xstats query
>> net/bnxt: fix check for autoneg enablement
>> net/bnxt: handle ring cleanup in case of error
>> net/bnxt: fix memzone allocation per VNIC
>>
>> Karl Bonde Torp (1):
>> build: fix build on FreeBSD with Meson 0.61.1
>>
>> Kathleen Capella (2):
>> net/iavf: count continuous DD bits for Arm
>> net/iavf: count continuous DD bits for Arm in flex Rx
>>
>> Kevin Liu (2):
>> net/ice: fix Tx checksum offload
>> net/ice: fix Tx offload path choice
>>
>> Kevin Traynor (4):
>> maintainers: update for stable branches
>> build: suppress rte_crypto_asym_op abi check
>> Revert "crypto/ipsec_mb: fix length and offset settings"
>> Revert "net/mlx5: fix flex item availability"
>>
>> Kumara Parameshwaran (2):
>> ethdev: add internal function to device struct from name
>> net/tap: fix to populate FDs in secondary process
>>
>> Lance Richardson (2):
>> buildtools: fix AVX512 check for Python 3.5
>> net/bnxt: fix xstats names query overrun
>>
>> Leyi Rong (1):
>> net/iavf: fix potential out-of-bounds access
>>
>> Lijun Ou (1):
>> net/hns3: fix RSS key with null
>>
>> Lior Margalit (1):
>> net/mlx5: fix assertion on flags set in packet mbuf
>>
>> Madhuker Mythri (1):
>> devargs: fix crash with uninitialized parsing
>>
>> Martijn Bakker (1):
>> pflock: fix header file installation
>>
>> Martin Spinler (2):
>> net/nfb: fix array indexes in deinit functions
>> net/nfb: fix multicast/promiscuous mode switching
>>
>> Marvin Liu (1):
>> net/virtio: fix slots number when indirect feature on
>>
>> Matan Azrad (1):
>> vdpa/mlx5: workaround queue stop with traffic
>>
>> Maxime Coquelin (1):
>> vhost: fix unsafe vring addresses modifications
>>
>> Maxime Gouin (3):
>> bus/ifpga: remove useless check while browsing devices
>> net/nfp: remove duplicated check when setting MAC address
>> net/nfp: remove useless range checks
>>
>> Megha Ajmera (1):
>> examples/qos_sched: fix core mask overflow
>>
>> Michael Baum (17):
>> common/mlx5: add minimum WQE size for striding RQ
>> net/mlx5: improve stride parameter names
>> net/mlx5: fix MPRQ stride devargs adjustment
>> common/mlx5: fix error handling in multi-class probe
>> net/mlx5: fix memory socket selection in ASO management
>> common/mlx5: fix missing validation in devargs parsing
>> net/mlx5: fix sibling device config check
>> net/mlx5: fix ineffective metadata argument adjustment
>> net/mlx5: fix ASO CT object release
>> net/mlx5: fix errno update in shared context creation
>> net/mlx5: fix entry in shared Rx queues list
>> doc: remove obsolete vector Tx explanations from mlx5 guide
>> doc: replace broken links in mlx guides
>> doc: correct name of BlueField-2 in mlx5 guide
>> net/mlx5: fix shared counter flag in flow validation
>> net/mlx5: fix check in count action validation
>> common/mlx5: consider local functions as internal
>>
>> Michal Krawczyk (6):
>> net/ena: remove unused enumeration
>> net/ena: remove unused offload variables
>> net/ena: skip timer if reset is triggered
>> net/ena: fix meta descriptor DF flag setup
>> net/ena: fix checksum flag for L4
>> bus/pci: assign driver pointer before mapping
>>
>> Michal Wilczynski (1):
>> net/ice: fix overwriting of LSE bit by DCF
>>
>> Min Hu (Connor) (6):
>> net/hns3: fix Rx/Tx functions update
>> net/hns3: fix vector Rx/Tx when PTP enabled
>> net/bonding: fix promiscuous and allmulticast state
>> net/bonding: fix reference count on mbufs
>> app/testpmd: fix bonding mode set
>> app/testpmd: check starting port is not in bonding
>>
>> Naga Harish K S V (2):
>> eventdev/eth_tx: fix queue add error code
>> eventdev/eth_rx: fix queue config query
>>
>> Nicolas Chautru (1):
>> baseband/acc100: avoid out-of-bounds access
>>
>> Nipun Gupta (1):
>> examples/l3fwd: fix Rx burst size for event mode
>>
>> Nithin Dabilpuram (11):
>> examples/ipsec-secgw: fix eventdev start sequence
>> examples/ipsec-secgw: fix default flow rule creation
>> common/cnxk: fix shift offset for TL3 length disable
>> common/cnxk: fix byte order of frag sizes and infos
>> common/cnxk: fix null pointer dereferences
>> common/cnxk: fix uninitialized variables
>> examples/ipsec-secgw: fix buffer freeing in vector mode
>> net/cnxk: fix inline device RQ tag mask
>> net/cnxk: register callback early to handle initial packets
>> net/cnxk: fix inline IPsec security error handling
>> common/cnxk: fix bitmap usage for TM
>>
>> Pablo de Lara (9):
>> crypto/ipsec_mb: fix buffer overrun
>> crypto/ipsec_mb: check missing operation types
>> crypto/ipsec_mb: fix ZUC authentication verify
>> crypto/ipsec_mb: fix ZUC operation overwrite
>> crypto/ipsec_mb: fix length and offset settings
>> test/efd: fix sockets mask size
>> efd: fix uninitialized structure
>> crypto/ipsec_mb: fix length and offset settings
>> crypto/ipsec_mb: fix GMAC parameters setting
>>
>> Pavan Nikhilesh (6):
>> eventdev/eth_rx: fix missing internal port checks
>> event/cnxk: fix QoS devargs parsing
>> common/cnxk: add workaround for vWQE flush
>> config: align mempool elements to 128 bytes on CN10K
>> event/cnxk: fix sub-event clearing mask length
>> event/cnxk: fix Rx adapter config check
>>
>> Peng Yu (1):
>> vhost: fix linker script syntax
>>
>> Piotr Bronowski (2):
>> crypto/ipsec_mb: fix premature dereference
>> crypto/ipsec_mb: fix GCM requested digest length
>>
>> Qi Zhang (2):
>> net/ice: fix Tx checksum offload capability
>> doc: update matching versions in ice guide
>>
>> Radu Nicolau (5):
>> examples/ipsec-secgw: fix offload flag used for TSO IPv6
>> net/iavf: fix segmentation offload condition
>> net/iavf: fix segmentation offload buffer size
>> net/iavf: support NAT-T / UDP encapsulation
>> net/iavf: fix AES-GMAC IV size
>>
>> Rahul Bhansali (2):
>> net/cnxk: fix mbuf data length
>> examples/l3fwd: fix buffer overflow in Tx
>>
>> Rahul Lakkireddy (1):
>> net/cxgbe: fix dangling pointer by mailbox access rework
>>
>> Raja Zidane (8):
>> net/mlx5: fix mark enabling for Rx
>> app/testpmd: fix GENEVE parsing in checksum mode
>> app/compress-perf: fix cycle count operations allocation
>> app/compress-perf: optimize operations pool allocation
>> compress/mlx5: support out-of-space status
>> app/compress-perf: fix socket ID type during init
>> app/compress-perf: fix number of queue pairs to setup
>> compressdev: fix socket ID type
>>
>> Rakesh Kudurumalla (2):
>> net/cnxk: fix build with GCC 12
>> net/cnxk: fix RSS RETA table update
>>
>> Rashmi Shetty (1):
>> doc: fix dlb2 guide
>>
>> Reshma Pattan (1):
>> app/pdump: abort on multi-core capture limit
>>
>> Rongwei Liu (3):
>> net/mlx5: fix shared RSS destroy
>> net/mlx5: fix meter creation default state
>> net/mlx5: forbid multiple ASO actions in a single rule
>>
>> Ruifeng Wang (1):
>> config: add arch define for Arm
>>
>> Satheesh Paul (5):
>> common/cnxk: fix nibble parsing order when dumping MCAM
>> common/cnxk: fix flow deletion
>> common/cnxk: fix log level during MCAM allocation
>> common/cnxk: fix base rule merge
>> net/cnxk: fix Rx/Tx function update
>>
>> Sean Morrissey (2):
>> app/testpmd: fix dereference before null check
>> doc: fix telemetry example in cryptodev guide
>>
>> Shijith Thotton (1):
>> crypto/cnxk: enable allocated queues only
>>
>> Shun Hao (3):
>> net/mlx5: fix meter sub-policy creation
>> net/mlx5: fix E-Switch manager vport ID
>> net/mlx5: fix meter policy creation assert
>>
>> Simei Su (1):
>> net/ice: fix mbuf offload flag for Rx timestamp
>>
>> Srikanth Yalavarthi (1):
>> dma/cnxk: fix installing internal headers
>>
>> Stephen Douthit (1):
>> net/ixgbe: fix FSP check for X550EM devices
>>
>> Stephen Hemminger (7):
>> eal/linux: log hugepage create errors with filename
>> net/memif: remove unnecessary Rx interrupt stub
>> ipc: end multiprocess thread during cleanup
>> vfio: cleanup the multiprocess sync handle
>> pcapng: handle failure of link status query
>> test/bpf: skip dump if conversion fails
>> app/dumpcap: check for failure to set promiscuous
>>
>> Steve Yang (4):
>> app/testpmd: fix stack overflow for EEPROM display
>> net/i40e: fix unintentional integer overflow
>> eal/linux: fix illegal memory access in uevent handler
>> net/iavf: fix function pointer in multi-process
>>
>> Suanming Mou (3):
>> net/mlx5: set flow error for hash list create
>> net/mlx5: remove unused function
>> net/mlx5: fix indexed pool fetch overlap
>>
>> Thinh Tran (1):
>> net/mlx5: fix CPU socket ID for Rx queue creation
>>
>> Thomas Monjalon (6):
>> doc: replace deprecated distutils version parsing
>> dmadev: add missing header include
>> app/testpmd: fix build without drivers
>> regexdev: fix section attribute of symbols
>> build: hide local symbols in shared libraries
>> devtools: fix symbols check
>>
>> Tianfei Zhang (2):
>> raw/ifpga/base: fix SPI transaction
>> raw/ifpga: fix thread closing
>>
>> Tianli Lai (1):
>> examples/kni: add missing trailing newline in log
>>
>> Timothy McDaniel (3):
>> event/dlb2: update rolling mask used for dequeue
>> event/dlb2: poll HW CQ inflights before mapping queue
>> event/dlb2: add shift value check in sparse dequeue
>>
>> Vanshika Shukla (2):
>> net/dpaa2: fix unregistering interrupt handler
>> net/dpaa2: fix timestamping for IEEE1588
>>
>> Viacheslav Ovsiienko (4):
>> net/mlx5: fix modify field MAC address offset
>> app/testpmd: fix Tx scheduling interval
>> net/mlx5: fix metadata endianness in modify field action
>> doc: fix modify field action description for mlx5
>>
>> Vladimir Medvedkin (1):
>> app/fib: fix division by zero
>>
>> Wei Huang (5):
>> raw/ifpga/base: fix port feature ID
>> raw/ifpga: fix variable initialization in probing
>> raw/ifpga: fix interrupt handle allocation
>> raw/ifpga: fix monitor thread
>> raw/ifpga: fix build with optimization
>>
>> Weiguo Li (14):
>> common/cnxk: fix error checking
>> net/enic: fix dereference before null check
>> net/dpaa2: fix null pointer dereference
>> regex/mlx5: fix memory allocation check
>> net/memif: remove pointer deference before null check
>> net/iavf: fix null pointer dereference
>> vdpa/sfc: fix null dereference during config
>> vdpa/sfc: fix null dereference during removal
>> compress/octeontx: fix null pointer dereference
>> eventdev/eth_rx: fix parameters parsing memory leak
>> net/sfc: fix memory allocation size for cache
>> net/txgbe: fix queue statistics mapping
>> sched: remove useless malloc in PIE data init
>> net/bnxt: fix null dereference in session cleanup
>>
>> Wenwu Ma (1):
>> examples/vhost: fix launch with physical port
>>
>> Wenxuan Wu (1):
>> eal/linux: fix device monitor stop return
>>
>> Xiaoyu Min (1):
>> net/mlx5: reject jump to root table
>>
>> Xuan Ding (2):
>> vhost: fix field naming in guest page struct
>> vhost: fix physical address mapping
>>
>> Xueming Li (1):
>> net/virtio: fix Tx queue 0 overriden by queue 128
>>
>> Yajun Wu (1):
>> common/mlx5: fix queue pair ack timeout configuration
>>
>> Yiding Zhou (1):
>> net/ice: fix build with 16-byte Rx descriptor
>>
>> Yu Wenjun (1):
>> net/bonding: fix RSS with early configure
>>
>> Yuan Wang (1):
>> vhost: fix guest to host physical address mapping
>>
>> Yunjian Wang (12):
>> net/bonding: fix mode type mismatch
>> ethdev: fix Rx queue telemetry memory leak on failure
>> net/ice: fix link up when starting device
>> net/virtio-user: check FD flags getting failure
>> net/virtio: fix uninitialized RSS key
>> ring: fix error code when creating ring
>> net/ixgbe: check filter init failure
>> mem: check allocation in dynamic hugepage init
>> ethdev: remove unnecessary null check
>> net/ixgbe: reset security context pointer on close
>> net/txgbe: reset security context pointer on close
>> net/iavf: reset security context pointer on stop
>>
>> Yuying Zhang (1):
>> net/ice/base: add profile validation on switch filter
>>
>> Zhihong Wang (1):
>> ring: fix overflow in memory size calculation
>>
>>
[-- Attachment #2: Type: text/html, Size: 31086 bytes --]
^ permalink raw reply [relevance 0%]
* Re: [PATCH v2 0/6] Extend and set event queue attributes at runtime
2022-04-05 5:40 3% ` [PATCH v2 " Shijith Thotton
2022-04-05 5:40 3% ` [PATCH v2 2/6] eventdev: add weight and affinity to queue attributes Shijith Thotton
@ 2022-04-11 11:07 3% ` Shijith Thotton
2022-05-15 9:53 3% ` [PATCH v3 0/5] " Shijith Thotton
2 siblings, 0 replies; 200+ results
From: Shijith Thotton @ 2022-04-11 11:07 UTC (permalink / raw)
To: dev, Jerin Jacob Kollanukkaran
Cc: Pavan Nikhilesh Bhagavatula, harry.van.haaren, mattias.ronnblom
[-- Attachment #1: Type: text/plain, Size: 2623 bytes --]
Please review and let me know if any comments.
________________________________
From: Shijith Thotton <sthotton@marvell.com>
Sent: Tuesday, April 5, 2022 11:10 AM
To: dev@dpdk.org <dev@dpdk.org>; Jerin Jacob Kollanukkaran <jerinj@marvell.com>
Cc: Shijith Thotton <sthotton@marvell.com>; Pavan Nikhilesh Bhagavatula <pbhagavatula@marvell.com>; harry.van.haaren@intel.com <harry.van.haaren@intel.com>; mattias.ronnblom@ericsson.com <mattias.ronnblom@ericsson.com>
Subject: [PATCH v2 0/6] Extend and set event queue attributes at runtime
This series adds support for setting event queue attributes at runtime
and adds two new event queue attributes weight and affinity. Eventdev
capability RTE_EVENT_DEV_CAP_RUNTIME_QUEUE_ATTR is added to expose the
capability to set attributes at runtime and rte_event_queue_attr_set()
API is used to set the attributes.
Attributes weight and affinity are not yet added to rte_event_queue_conf
structure to avoid ABI break and will be added in 22.11. Till then, PMDs
using the new attributes are expected to manage them.
Test application changes and example implementation are added as last
three patches.
v2:
* Modified attr_value type from u32 to u64 for set().
* Removed RTE_EVENT_QUEUE_ATTR_MAX macro.
* Fixed return value in implementation.
Pavan Nikhilesh (1):
common/cnxk: use lock when accessing mbox of SSO
Shijith Thotton (5):
eventdev: support to set queue attributes at runtime
eventdev: add weight and affinity to queue attributes
doc: announce change in event queue conf structure
test/event: test cases to test runtime queue attribute
event/cnxk: support to set runtime queue attributes
app/test/test_eventdev.c | 149 ++++++++++++++++++
doc/guides/eventdevs/features/cnxk.ini | 1 +
doc/guides/eventdevs/features/default.ini | 1 +
doc/guides/rel_notes/deprecation.rst | 3 +
drivers/common/cnxk/roc_sso.c | 174 ++++++++++++++++------
drivers/common/cnxk/roc_sso_priv.h | 1 +
drivers/common/cnxk/roc_tim.c | 134 +++++++++++------
drivers/event/cnxk/cn10k_eventdev.c | 4 +
drivers/event/cnxk/cn9k_eventdev.c | 4 +
drivers/event/cnxk/cnxk_eventdev.c | 91 ++++++++++-
drivers/event/cnxk/cnxk_eventdev.h | 16 ++
lib/eventdev/eventdev_pmd.h | 44 ++++++
lib/eventdev/rte_eventdev.c | 38 +++++
lib/eventdev/rte_eventdev.h | 71 ++++++++-
lib/eventdev/version.map | 3 +
15 files changed, 631 insertions(+), 103 deletions(-)
--
2.25.1
[-- Attachment #2: Type: text/html, Size: 4484 bytes --]
^ permalink raw reply [relevance 3%]
* Re: 21.11.1 patches review and test
2022-04-01 10:22 2% 21.11.1 patches review and test Kevin Traynor
2022-04-11 3:03 0% ` Pei Zhang
@ 2022-04-11 6:58 0% ` Christian Ehrhardt
2022-04-13 7:26 0% ` Christian Ehrhardt
2022-04-13 10:06 3% ` Kevin Traynor
2022-04-20 5:50 3% ` Christian Ehrhardt
2 siblings, 2 replies; 200+ results
From: Christian Ehrhardt @ 2022-04-11 6:58 UTC (permalink / raw)
To: Kevin Traynor
Cc: stable, dev, Abhishek Marathe, Ali Alnubani, benjamin.walker,
David Christensen, hariprasad.govindharajan, Hemant Agrawal,
Ian Stokes, Jerin Jacob, John McNamara, Ju-Hyoung Lee,
Luca Boccassi, Pei Zhang, qian.q.xu, Raslan Darawsheh,
Thomas Monjalon, yuan.peng, zhaoyan.chen
On Fri, Apr 1, 2022 at 12:22 PM Kevin Traynor <ktraynor@redhat.com> wrote:
>
> Hi all,
>
> Here is a list of patches targeted for stable release 21.11.1.
Hi Kevin,
this breaks on me at build time due to symbol changes.
It is a wild mix of Base->Internal/Experimental, a few new symbols,
and even just removed ones (in gpu which is experimental, but still
would that need a minor soname bump?).
They might be intentional, but it felt too much to me without at least
discussing it.
Could you have a look if you think that they are all intentional, save
and correct for an LTS release?
dpkg-gensymbols: warning: some new symbols appeared in the symbols
file: see diff output below
dpkg-gensymbols: warning: debian/librte-common-cnxk22/DEBIAN/symbols
doesn't match completely debian/librte-common-cnxk22.symbols
--- debian/librte-common-cnxk22.symbols
(librte-common-cnxk22_21.11.1~rc1-0ubuntu1~jammyppa2_amd64)
+++ dpkg-gensymbolsUuRb8d 2022-04-11 06:46:22.276766813 +0000
@@ -197,6 +197,7 @@
roc_nix_ptp_clock_read@INTERNAL 21.08
roc_nix_ptp_info_cb_register@INTERNAL 21.08
roc_nix_ptp_info_cb_unregister@INTERNAL 21.08
+ roc_nix_ptp_is_enable@INTERNAL 21.11.1~rc1-0ubuntu1~jammyppa2
roc_nix_ptp_rx_ena_dis@INTERNAL 21.08
roc_nix_ptp_sync_time_adjust@INTERNAL 21.08
roc_nix_ptp_tx_ena_dis@INTERNAL 21.08
dpkg-gensymbols: warning: some new symbols appeared in the symbols
file: see diff output below
dpkg-gensymbols: warning: debian/librte-ethdev22/DEBIAN/symbols
doesn't match completely debian/librte-ethdev22.symbols
--- debian/librte-ethdev22.symbols
(librte-ethdev22_21.11.1~rc1-0ubuntu1~jammyppa2_amd64)
+++ dpkg-gensymbolskEnokB 2022-04-11 06:46:25.252795157 +0000
@@ -37,6 +37,7 @@
rte_eth_dev_flow_ctrl_get@DPDK_22 21.11
rte_eth_dev_flow_ctrl_set@DPDK_22 21.11
rte_eth_dev_fw_version_get@DPDK_22 21.11
+ rte_eth_dev_get_by_name@INTERNAL 21.11.1~rc1-0ubuntu1~jammyppa2
rte_eth_dev_get_dcb_info@DPDK_22 21.11
rte_eth_dev_get_eeprom@DPDK_22 21.11
rte_eth_dev_get_eeprom_length@DPDK_22 21.11
dpkg-gensymbols: warning: some new symbols appeared in the symbols
file: see diff output below
dpkg-gensymbols: error: some symbols or patterns disappeared in the
symbols file: see diff output below
dpkg-gensymbols: warning: debian/librte-regexdev22/DEBIAN/symbols
doesn't match completely debian/librte-regexdev22.symbols
--- debian/librte-regexdev22.symbols
(librte-regexdev22_21.11.1~rc1-0ubuntu1~jammyppa2_amd64)
+++ dpkg-gensymbolsPD0Ygo 2022-04-11 06:46:33.368872490 +0000
@@ -1,6 +1,8 @@
librte_regexdev.so.22 librte-regexdev22 #MINVER#
EXPERIMENTAL@EXPERIMENTAL 20.11
- rte_regex_devices@Base 20.11
+ INTERNAL@INTERNAL 21.11.1~rc1-0ubuntu1~jammyppa2
+ rte_regex_devices@EXPERIMENTAL 21.11.1~rc1-0ubuntu1~jammyppa2
rte_regexdev_attr_get@EXPERIMENTAL 20.11
rte_regexdev_attr_set@EXPERIMENTAL 20.11
rte_regexdev_close@EXPERIMENTAL 20.11
@@ -8,12 +10,16 @@
rte_regexdev_count@EXPERIMENTAL 20.11
rte_regexdev_dump@EXPERIMENTAL 20.11
rte_regexdev_get_dev_id@EXPERIMENTAL 20.11
- rte_regexdev_get_device_by_name@Base 20.11
+ rte_regexdev_get_device_by_name@INTERNAL 21.11.1~rc1-0ubuntu1~jammyppa2
rte_regexdev_info_get@EXPERIMENTAL 20.11
- rte_regexdev_is_valid_dev@Base 20.11
- rte_regexdev_logtype@Base 20.11
+ rte_regexdev_is_valid_dev@EXPERIMENTAL 21.11.1~rc1-0ubuntu1~jammyppa2
+ rte_regexdev_logtype@EXPERIMENTAL 21.11.1~rc1-0ubuntu1~jammyppa2
rte_regexdev_queue_pair_setup@EXPERIMENTAL 20.11
- rte_regexdev_register@Base 20.11
+ rte_regexdev_register@INTERNAL 21.11.1~rc1-0ubuntu1~jammyppa2
rte_regexdev_rule_db_compile_activate@EXPERIMENTAL 20.11
rte_regexdev_rule_db_export@EXPERIMENTAL 20.11
rte_regexdev_rule_db_import@EXPERIMENTAL 20.11
@@ -21,7 +27,8 @@
rte_regexdev_selftest@EXPERIMENTAL 20.11
rte_regexdev_start@EXPERIMENTAL 20.11
rte_regexdev_stop@EXPERIMENTAL 20.11
- rte_regexdev_unregister@Base 20.11
+ rte_regexdev_unregister@INTERNAL 21.11.1~rc1-0ubuntu1~jammyppa2
rte_regexdev_xstats_by_name_get@EXPERIMENTAL 20.11
rte_regexdev_xstats_get@EXPERIMENTAL 20.11
rte_regexdev_xstats_names_get@EXPERIMENTAL 20.11
dpkg-gensymbols: error: some symbols or patterns disappeared in the
symbols file: see diff output below
dpkg-gensymbols: warning: debian/librte-gpudev22/DEBIAN/symbols
doesn't match completely debian/librte-gpudev22.symbols
--- debian/librte-gpudev22.symbols
(librte-gpudev22_21.11.1~rc1-0ubuntu1~jammyppa2_amd64)
+++ dpkg-gensymbols4qkXdt 2022-04-11 06:46:34.552883776 +0000
@@ -1,7 +1,7 @@
librte_gpudev.so.22 librte-gpudev22 #MINVER#
EXPERIMENTAL@EXPERIMENTAL 21.11
INTERNAL@INTERNAL 21.11
- gpu_logtype@Base 21.11
rte_gpu_add_child@EXPERIMENTAL 21.11
rte_gpu_allocate@INTERNAL 21.11
rte_gpu_attach@INTERNAL 21.11
Full log:
https://launchpadlibrarian.net/596047842/buildlog_ubuntu-jammy-amd64.dpdk_21.11.1~rc1-0ubuntu1~jammyppa2_BUILDING.txt.gz
> Please try and complete validation by April 13th.
>
> Please help with testing and validation of your use cases and report
> any issues/results with reply-all to this mail. For the final release
> the fixes and reported validations will be added to the release notes.
>
> A release candidate tarball can be found at:
>
> https://dpdk.org/browse/dpdk-stable/tag/?id=v21.11.1-rc1
>
> These patches are located at branch 21.11 of dpdk-stable repo:
> https://dpdk.org/browse/dpdk-stable/
>
> Thanks.
>
> Kevin
>
> ---
> Adham Masarwah (2):
> net/mlx5: fix destroying empty matchers list
> app/testpmd: fix show RSS RETA on Windows
>
> Ajit Khaparde (7):
> net/bnxt: fix ring teardown
> net/bnxt: fix PAM4 mask setting
> net/bnxt: fix crash by validating pointer
> net/bnxt: check VF representor pointer before access
> net/bnxt: fix VF resource allocation strategy
> net/bnxt: set HW coalescing parameters
> net/bnxt: fix ring calculation for representors
>
> Alexander Kozyrev (4):
> net/mlx5: fix maximum packet headers size for TSO
> net/mlx5: fix MPRQ WQE size assertion
> net/mlx5: fix committed bucket size
> net/mlx5: fix meter capabilities reporting
>
> Ali Alnubani (1):
> doc: fix typos and punctuation in flow API guide
>
> Anatoly Burakov (1):
> net/qede: fix redundant condition in debug code
>
> Andy Pei (1):
> vdpa/ifc: fix log info mismatch
>
> Ankur Dwivedi (1):
> common/cnxk: fix NPC key extraction validation
>
> Anoob Joseph (4):
> common/cnxk: fix reset of fields
> crypto/cnxk: fix inflight count calculation
> crypto/cnxk: fix extend tail calculation
> crypto/cnxk: fix update of number of descriptors
>
> Arek Kusztal (1):
> cryptodev: fix RSA key type name
>
> Asaf Ravid (1):
> net/cnxk: fix promiscuous mode in multicast enable flow
>
> Ashwin Sekhar T K (1):
> mempool/cnxk: fix batch allocation failure path
>
> Bin Zheng (1):
> net/ixgbe: add vector Rx parameter check
>
> Bing Zhao (5):
> common/mlx5: fix probing failure code
> app/testpmd: fix raw encap of GENEVE option
> net/mlx5: fix matcher priority with ICMP or ICMPv6
> net/mlx5: remove unused reference counter
> net/mlx5: fix configuration without Rx queue
>
> Brian Dooley (13):
> eal: add missing C++ guards
> telemetry: add missing C++ guards
> ethdev: add missing C++ guards
> metrics: add missing C++ guards
> acl: add missing C++ guards
> compressdev: add missing C++ guards
> eventdev: add missing C++ guards
> kni: add missing C++ guards
> vhost: add missing C++ guards
> bpf: add missing C++ guards
> cryptodev: add missing C++ guards
> examples/l2fwd-crypto: fix port mask overflow
> crypto/virtio: fix out-of-bounds access
>
> Bruce Richardson (23):
> doc: remove dependency on findutils on FreeBSD
> dma/idxd: fix burst capacity calculation
> dma/idxd: fix paths to driver sysfs directory
> dma/idxd: fix wrap-around in burst capacity calculation
> build: fix warnings when running external commands
> build: remove deprecated Meson functions
> eal: fix C++ include
> eventdev: fix C++ include
> graph: fix C++ include
> ipsec: fix C++ include
> table: fix C++ include
> vhost: fix C++ include
> ethdev: fix cast for C++ compatibility
> test/dma: fix missing checks for device capacity
> dma/idxd: configure maximum batch size to high value
> doc: improve configuration examples in idxd guide
> distributor: fix potential overflow
> eal/freebsd: add missing C++ include guards
> compressdev: fix missing space in log macro
> cryptodev: fix clang C++ include
> eventdev: fix clang C++ include
> doc: replace characters for (R) symbol in Linux guide
> doc: fix missing note on UIO module in Linux guide
>
> Chandubabu Namburu (1):
> net/axgbe: use PCI root complex device to distinguish device
>
> Chenbo Xia (1):
> vhost: fix queue number check when setting inflight FD
>
> Chengchang Tang (1):
> net/bonding: fix offloading configuration
>
> Chengwen Feng (2):
> net/hns3: delete duplicated RSS type
> dma/hisilicon: use common PCI device naming
>
> Chuanshe Zhang (1):
> examples/flow_classify: fix failure message
>
> Ciara Loftus (2):
> net/af_xdp: fix build with -Wunused-function
> net/af_xdp: ensure socket is deleted on Rx queue setup error
>
> Ciara Power (4):
> crypto/ipsec_mb: fix queue setup null pointer dereference
> crypto/ipsec_mb: fix queue cleanup null pointer dereference
> crypto/ipsec_mb: fix tainted data for session
> crypto/ipsec_mb: remove useless check
>
> Cristian Dumitrescu (2):
> pipeline: fix annotation checks
> pipeline: fix table state memory allocation
>
> Dapeng Yu (2):
> net/ice: track DCF state of PF
> net/i40e: enable maximum frame size at port level
>
> Dariusz Sosnowski (3):
> net/mlx5: fix inline length for multi-segment TSO
> net/mlx5: fix MPLS/GRE Verbs spec ordering
> net/mlx5: fix VLAN push action validation
>
> David Marchand (8):
> devtools: fix comment detection in forbidden token check
> stack: fix stubs header export
> test/mbuf: fix mbuf data content check
> ethdev: fix MAC address in telemetry device info
> net/af_xdp: add missing trailing newline in logs
> devtools: remove event/dlb exception in ABI check
> vhost: fix FD leak with inflight messages
> bpf: fix build with some libpcap version on FreeBSD
>
> Dawid Gorecki (2):
> net/ena: fix reset reason being overwritten
> net/ena: check memory BAR before initializing LLQ
>
> Devendra Singh Rawat (3):
> net/qede: fix Tx completion
> net/qede: fix Rx bulk
> net/qede: fix maximum Rx packet length
>
> Dmitry Kozlyuk (8):
> net/mlx5: fix GCC uninitialized variable warning
> net/mlx5: relax headroom assertion
> app/testpmd: fix external buffer allocation
> common/mlx5: fix MR lookup for non-contiguous mempool
> common/mlx5: add Netlink event helpers
> net/mlx5: fix link status change detection
> net/mlx5: fix initial link status detection
> net/mlx5: fix modify port action validation
>
> Elena Agostini (3):
> gpu/cuda: fix memory list cleanup
> doc: add CUDA driver features
> gpu/cuda: fix dependency loading path
>
> Ferruh Yigit (2):
> net/bonding: fix MTU set for slaves
> ethdev: fix doxygen comments for device info struct
>
> Geoffrey Le Gourriérec (1):
> net/bnxt: restore dependency on kernel modules
>
> Gerry Gribbon (1):
> app/regex: fix number of matches
>
> Gowrishankar Muthukrishnan (6):
> event/cnxk: fix variables casting
> event/cnxk: fix uninitialized local variables
> common/cnxk: add missing checks of return values
> common/cnxk fix unintended sign extension
> common/cnxk: fix uninitialized pointer read
> net/cnxk: fix uninitialized local variable
>
> Gregory Etelson (10):
> net/mlx5: fix RSS expansion with explicit next protocol
> net/mlx5: fix GRE protocol type translation for Verbs
> net/mlx5: fix GRE item translation in Verbs
> net/mlx5: reduce flex item flow handle size
> net/mlx5: fix flex item header length translation
> net/mlx5: fix inet IPIP protocol type
> net/mlx5: fix next protocol RSS expansion
> net/mlx5: fix flex item availability
> app/testpmd: fix GTP header parsing in checksum engine
> app/testpmd: fix flow rule with flex input link
>
> Haiyue Wang (2):
> net/iavf: remove git residue symbol
> doc: fix KNI PMD name typo
>
> Harman Kalra (3):
> common/cnxk: reset stale values on error debug registers
> common/cnxk: always use single interrupt ID with NIX
> common/cnxk: fix mbuf data offset for VF
>
> Harold Huang (2):
> net/virtio-user: fix resource leak on probing failure
> net/kni: fix config initialization
>
> Heinrich Kuhn (1):
> net/nfp: free HW ring memzone on queue release
>
> Hemant Agrawal (1):
> crypto/dpaax_sec: fix auth/cipher xform chain checks
>
> Honnappa Nagarahalli (3):
> examples/distributor: reduce Tx queue number to 1
> examples/l3fwd: share queue size variables
> examples/l3fwd: make Rx and Tx queue size configurable
>
> Huisong Li (10):
> net/hns3: fix mailbox wait time
> net/hns3: fix using enum as boolean
> net/hns3: fix max packet size rollback in PF
> net/hns3: fix insecure way to query MAC statistics
> net/hns3: fix double decrement of secondary count
> net/hns3: fix operating queue when TCAM table is invalid
> kni: fix freeing order in device release
> net/hns3: fix RSS TC mode entry
> net/hns3: fix VF RSS TC mode entry
> net/hns3: increase time waiting for PF reset completion
>
> Ivan Malov (8):
> net/sfc: validate queue span when parsing flow action RSS
> net/sfc: fix lock releases
> net/sfc: do not push fast free offload to default TxQ config
> net/sfc: demand Tx fast free offload on EF10 simple datapath
> common/sfc_efx/base: fix recirculation ID set in outer rules
> common/sfc_efx/base: add missing handler for 1-byte fields
> net/sfc: fix flow tunnel support detection
> net/sfc: reduce log level of tunnel restore info error
>
> Jakub Poczatek (1):
> doc: fix FIPS guide
>
> Jiawei Wang (4):
> net/mlx5: fix NIC egress flow mismatch in switchdev mode
> net/mlx5: fix sample flow action on trusted device
> net/mlx5: fix implicit tag insertion with sample action
> net/mlx5: fix port matching in sample flow rule
>
> Jiawen Wu (8):
> net/ngbe: fix Rx by initializing packet buffer early
> net/ngbe: fix missed link interrupt
> net/ngbe: fix Tx hang on queue disable
> net/ngbe: fix packet statistics
> net/txgbe: fix link up and down
> net/txgbe: fix KR auto-negotiation
> net/ngbe: fix debug logs
> net/txgbe: fix debug logs
>
> Jie Hai (1):
> net/hns3: remove duplicate macro definition
>
> Jie Wang (1):
> net: fix L2TPv2 common header
>
> Jie Zhou (2):
> eal/windows: fix error code for not supported API
> test/mem: fix error check
>
> Josh Soref (1):
> fix spelling in comments and strings
>
> Junfeng Guo (3):
> net/ice: fix pattern check for flow director parser
> net/ice: fix pattern check in flow director
> raw/ntb: clear all valid doorbell bits on init
>
> Junjie Wan (1):
> net/bonding: fix slaves initializing on MTU setting
>
> Junxiao Shi (1):
> net/af_xdp: fix custom program loading with multiple queues
>
> Juraj Linkeš (1):
> config/arm: add values for native armv7
>
> Kai Ji (2):
> test/crypto: fix out-of-place SGL in raw datapath
> crypto/qat: fix GEN4 AEAD job in raw data path
>
> Kalesh AP (15):
> net/bnxt: fix multicast address set
> net/bnxt: fix multicast MAC restore during reset recovery
> net/bnxt: fix queue stop operation
> net/bnxt: restore RSS configuration after reset recovery
> net/bnxt: fix restoring VLAN filtering after recovery
> net/bnxt: cap maximum number of unicast MAC addresses
> net/bnxt: set fast-path pointers only if recovery succeeds
> net/bnxt: add null check for mark table
> net/bnxt: fix flow create when RSS is disabled
> net/bnxt: get maximum supported multicast filters count
> net/bnxt: fix handling of VF configuration change
> net/bnxt: fix xstats query
> net/bnxt: fix check for autoneg enablement
> net/bnxt: handle ring cleanup in case of error
> net/bnxt: fix memzone allocation per VNIC
>
> Karl Bonde Torp (1):
> build: fix build on FreeBSD with Meson 0.61.1
>
> Kathleen Capella (2):
> net/iavf: count continuous DD bits for Arm
> net/iavf: count continuous DD bits for Arm in flex Rx
>
> Kevin Liu (2):
> net/ice: fix Tx checksum offload
> net/ice: fix Tx offload path choice
>
> Kevin Traynor (4):
> maintainers: update for stable branches
> build: suppress rte_crypto_asym_op abi check
> Revert "crypto/ipsec_mb: fix length and offset settings"
> Revert "net/mlx5: fix flex item availability"
>
> Kumara Parameshwaran (2):
> ethdev: add internal function to device struct from name
> net/tap: fix to populate FDs in secondary process
>
> Lance Richardson (2):
> buildtools: fix AVX512 check for Python 3.5
> net/bnxt: fix xstats names query overrun
>
> Leyi Rong (1):
> net/iavf: fix potential out-of-bounds access
>
> Lijun Ou (1):
> net/hns3: fix RSS key with null
>
> Lior Margalit (1):
> net/mlx5: fix assertion on flags set in packet mbuf
>
> Madhuker Mythri (1):
> devargs: fix crash with uninitialized parsing
>
> Martijn Bakker (1):
> pflock: fix header file installation
>
> Martin Spinler (2):
> net/nfb: fix array indexes in deinit functions
> net/nfb: fix multicast/promiscuous mode switching
>
> Marvin Liu (1):
> net/virtio: fix slots number when indirect feature on
>
> Matan Azrad (1):
> vdpa/mlx5: workaround queue stop with traffic
>
> Maxime Coquelin (1):
> vhost: fix unsafe vring addresses modifications
>
> Maxime Gouin (3):
> bus/ifpga: remove useless check while browsing devices
> net/nfp: remove duplicated check when setting MAC address
> net/nfp: remove useless range checks
>
> Megha Ajmera (1):
> examples/qos_sched: fix core mask overflow
>
> Michael Baum (17):
> common/mlx5: add minimum WQE size for striding RQ
> net/mlx5: improve stride parameter names
> net/mlx5: fix MPRQ stride devargs adjustment
> common/mlx5: fix error handling in multi-class probe
> net/mlx5: fix memory socket selection in ASO management
> common/mlx5: fix missing validation in devargs parsing
> net/mlx5: fix sibling device config check
> net/mlx5: fix ineffective metadata argument adjustment
> net/mlx5: fix ASO CT object release
> net/mlx5: fix errno update in shared context creation
> net/mlx5: fix entry in shared Rx queues list
> doc: remove obsolete vector Tx explanations from mlx5 guide
> doc: replace broken links in mlx guides
> doc: correct name of BlueField-2 in mlx5 guide
> net/mlx5: fix shared counter flag in flow validation
> net/mlx5: fix check in count action validation
> common/mlx5: consider local functions as internal
>
> Michal Krawczyk (6):
> net/ena: remove unused enumeration
> net/ena: remove unused offload variables
> net/ena: skip timer if reset is triggered
> net/ena: fix meta descriptor DF flag setup
> net/ena: fix checksum flag for L4
> bus/pci: assign driver pointer before mapping
>
> Michal Wilczynski (1):
> net/ice: fix overwriting of LSE bit by DCF
>
> Min Hu (Connor) (6):
> net/hns3: fix Rx/Tx functions update
> net/hns3: fix vector Rx/Tx when PTP enabled
> net/bonding: fix promiscuous and allmulticast state
> net/bonding: fix reference count on mbufs
> app/testpmd: fix bonding mode set
> app/testpmd: check starting port is not in bonding
>
> Naga Harish K S V (2):
> eventdev/eth_tx: fix queue add error code
> eventdev/eth_rx: fix queue config query
>
> Nicolas Chautru (1):
> baseband/acc100: avoid out-of-bounds access
>
> Nipun Gupta (1):
> examples/l3fwd: fix Rx burst size for event mode
>
> Nithin Dabilpuram (11):
> examples/ipsec-secgw: fix eventdev start sequence
> examples/ipsec-secgw: fix default flow rule creation
> common/cnxk: fix shift offset for TL3 length disable
> common/cnxk: fix byte order of frag sizes and infos
> common/cnxk: fix null pointer dereferences
> common/cnxk: fix uninitialized variables
> examples/ipsec-secgw: fix buffer freeing in vector mode
> net/cnxk: fix inline device RQ tag mask
> net/cnxk: register callback early to handle initial packets
> net/cnxk: fix inline IPsec security error handling
> common/cnxk: fix bitmap usage for TM
>
> Pablo de Lara (9):
> crypto/ipsec_mb: fix buffer overrun
> crypto/ipsec_mb: check missing operation types
> crypto/ipsec_mb: fix ZUC authentication verify
> crypto/ipsec_mb: fix ZUC operation overwrite
> crypto/ipsec_mb: fix length and offset settings
> test/efd: fix sockets mask size
> efd: fix uninitialized structure
> crypto/ipsec_mb: fix length and offset settings
> crypto/ipsec_mb: fix GMAC parameters setting
>
> Pavan Nikhilesh (6):
> eventdev/eth_rx: fix missing internal port checks
> event/cnxk: fix QoS devargs parsing
> common/cnxk: add workaround for vWQE flush
> config: align mempool elements to 128 bytes on CN10K
> event/cnxk: fix sub-event clearing mask length
> event/cnxk: fix Rx adapter config check
>
> Peng Yu (1):
> vhost: fix linker script syntax
>
> Piotr Bronowski (2):
> crypto/ipsec_mb: fix premature dereference
> crypto/ipsec_mb: fix GCM requested digest length
>
> Qi Zhang (2):
> net/ice: fix Tx checksum offload capability
> doc: update matching versions in ice guide
>
> Radu Nicolau (5):
> examples/ipsec-secgw: fix offload flag used for TSO IPv6
> net/iavf: fix segmentation offload condition
> net/iavf: fix segmentation offload buffer size
> net/iavf: support NAT-T / UDP encapsulation
> net/iavf: fix AES-GMAC IV size
>
> Rahul Bhansali (2):
> net/cnxk: fix mbuf data length
> examples/l3fwd: fix buffer overflow in Tx
>
> Rahul Lakkireddy (1):
> net/cxgbe: fix dangling pointer by mailbox access rework
>
> Raja Zidane (8):
> net/mlx5: fix mark enabling for Rx
> app/testpmd: fix GENEVE parsing in checksum mode
> app/compress-perf: fix cycle count operations allocation
> app/compress-perf: optimize operations pool allocation
> compress/mlx5: support out-of-space status
> app/compress-perf: fix socket ID type during init
> app/compress-perf: fix number of queue pairs to setup
> compressdev: fix socket ID type
>
> Rakesh Kudurumalla (2):
> net/cnxk: fix build with GCC 12
> net/cnxk: fix RSS RETA table update
>
> Rashmi Shetty (1):
> doc: fix dlb2 guide
>
> Reshma Pattan (1):
> app/pdump: abort on multi-core capture limit
>
> Rongwei Liu (3):
> net/mlx5: fix shared RSS destroy
> net/mlx5: fix meter creation default state
> net/mlx5: forbid multiple ASO actions in a single rule
>
> Ruifeng Wang (1):
> config: add arch define for Arm
>
> Satheesh Paul (5):
> common/cnxk: fix nibble parsing order when dumping MCAM
> common/cnxk: fix flow deletion
> common/cnxk: fix log level during MCAM allocation
> common/cnxk: fix base rule merge
> net/cnxk: fix Rx/Tx function update
>
> Sean Morrissey (2):
> app/testpmd: fix dereference before null check
> doc: fix telemetry example in cryptodev guide
>
> Shijith Thotton (1):
> crypto/cnxk: enable allocated queues only
>
> Shun Hao (3):
> net/mlx5: fix meter sub-policy creation
> net/mlx5: fix E-Switch manager vport ID
> net/mlx5: fix meter policy creation assert
>
> Simei Su (1):
> net/ice: fix mbuf offload flag for Rx timestamp
>
> Srikanth Yalavarthi (1):
> dma/cnxk: fix installing internal headers
>
> Stephen Douthit (1):
> net/ixgbe: fix FSP check for X550EM devices
>
> Stephen Hemminger (7):
> eal/linux: log hugepage create errors with filename
> net/memif: remove unnecessary Rx interrupt stub
> ipc: end multiprocess thread during cleanup
> vfio: cleanup the multiprocess sync handle
> pcapng: handle failure of link status query
> test/bpf: skip dump if conversion fails
> app/dumpcap: check for failure to set promiscuous
>
> Steve Yang (4):
> app/testpmd: fix stack overflow for EEPROM display
> net/i40e: fix unintentional integer overflow
> eal/linux: fix illegal memory access in uevent handler
> net/iavf: fix function pointer in multi-process
>
> Suanming Mou (3):
> net/mlx5: set flow error for hash list create
> net/mlx5: remove unused function
> net/mlx5: fix indexed pool fetch overlap
>
> Thinh Tran (1):
> net/mlx5: fix CPU socket ID for Rx queue creation
>
> Thomas Monjalon (6):
> doc: replace deprecated distutils version parsing
> dmadev: add missing header include
> app/testpmd: fix build without drivers
> regexdev: fix section attribute of symbols
> build: hide local symbols in shared libraries
> devtools: fix symbols check
>
> Tianfei Zhang (2):
> raw/ifpga/base: fix SPI transaction
> raw/ifpga: fix thread closing
>
> Tianli Lai (1):
> examples/kni: add missing trailing newline in log
>
> Timothy McDaniel (3):
> event/dlb2: update rolling mask used for dequeue
> event/dlb2: poll HW CQ inflights before mapping queue
> event/dlb2: add shift value check in sparse dequeue
>
> Vanshika Shukla (2):
> net/dpaa2: fix unregistering interrupt handler
> net/dpaa2: fix timestamping for IEEE1588
>
> Viacheslav Ovsiienko (4):
> net/mlx5: fix modify field MAC address offset
> app/testpmd: fix Tx scheduling interval
> net/mlx5: fix metadata endianness in modify field action
> doc: fix modify field action description for mlx5
>
> Vladimir Medvedkin (1):
> app/fib: fix division by zero
>
> Wei Huang (5):
> raw/ifpga/base: fix port feature ID
> raw/ifpga: fix variable initialization in probing
> raw/ifpga: fix interrupt handle allocation
> raw/ifpga: fix monitor thread
> raw/ifpga: fix build with optimization
>
> Weiguo Li (14):
> common/cnxk: fix error checking
> net/enic: fix dereference before null check
> net/dpaa2: fix null pointer dereference
> regex/mlx5: fix memory allocation check
> net/memif: remove pointer deference before null check
> net/iavf: fix null pointer dereference
> vdpa/sfc: fix null dereference during config
> vdpa/sfc: fix null dereference during removal
> compress/octeontx: fix null pointer dereference
> eventdev/eth_rx: fix parameters parsing memory leak
> net/sfc: fix memory allocation size for cache
> net/txgbe: fix queue statistics mapping
> sched: remove useless malloc in PIE data init
> net/bnxt: fix null dereference in session cleanup
>
> Wenwu Ma (1):
> examples/vhost: fix launch with physical port
>
> Wenxuan Wu (1):
> eal/linux: fix device monitor stop return
>
> Xiaoyu Min (1):
> net/mlx5: reject jump to root table
>
> Xuan Ding (2):
> vhost: fix field naming in guest page struct
> vhost: fix physical address mapping
>
> Xueming Li (1):
> net/virtio: fix Tx queue 0 overriden by queue 128
>
> Yajun Wu (1):
> common/mlx5: fix queue pair ack timeout configuration
>
> Yiding Zhou (1):
> net/ice: fix build with 16-byte Rx descriptor
>
> Yu Wenjun (1):
> net/bonding: fix RSS with early configure
>
> Yuan Wang (1):
> vhost: fix guest to host physical address mapping
>
> Yunjian Wang (12):
> net/bonding: fix mode type mismatch
> ethdev: fix Rx queue telemetry memory leak on failure
> net/ice: fix link up when starting device
> net/virtio-user: check FD flags getting failure
> net/virtio: fix uninitialized RSS key
> ring: fix error code when creating ring
> net/ixgbe: check filter init failure
> mem: check allocation in dynamic hugepage init
> ethdev: remove unnecessary null check
> net/ixgbe: reset security context pointer on close
> net/txgbe: reset security context pointer on close
> net/iavf: reset security context pointer on stop
>
> Yuying Zhang (1):
> net/ice/base: add profile validation on switch filter
>
> Zhihong Wang (1):
> ring: fix overflow in memory size calculation
>
--
Christian Ehrhardt
Staff Engineer, Ubuntu Server
Canonical Ltd
^ permalink raw reply [relevance 0%]
* Re: 21.11.1 patches review and test
2022-04-01 10:22 2% 21.11.1 patches review and test Kevin Traynor
@ 2022-04-11 3:03 0% ` Pei Zhang
2022-04-13 4:06 0% ` YangHang Liu
2022-04-11 6:58 0% ` Christian Ehrhardt
2022-04-20 5:50 3% ` Christian Ehrhardt
2 siblings, 1 reply; 200+ results
From: Pei Zhang @ 2022-04-11 3:03 UTC (permalink / raw)
To: Kevin Traynor
Cc: stable, dev, Abhishek Marathe, Ali Alnubani, Walker, Benjamin,
David Christensen, Govindharajan, Hariprasad, Hemant Agrawal,
Ian Stokes, Jerin Jacob, John McNamara, Ju-Hyoung Lee,
Luca Boccassi, xu, qian, Raslan Darawsheh, Thomas Monjalon, Peng,
Yuan, Chen, Zhaoyan, YangHang Liu
[-- Attachment #1: Type: text/plain, Size: 25440 bytes --]
cc Yanghang Liu from RedHat, he will do this testing soon :)
Best regards,
Pei
On Fri, Apr 1, 2022 at 6:22 PM Kevin Traynor <ktraynor@redhat.com> wrote:
> Hi all,
>
> Here is a list of patches targeted for stable release 21.11.1.
>
> Please try and complete validation by April 13th.
>
> Please help with testing and validation of your use cases and report
> any issues/results with reply-all to this mail. For the final release
> the fixes and reported validations will be added to the release notes.
>
> A release candidate tarball can be found at:
>
> https://dpdk.org/browse/dpdk-stable/tag/?id=v21.11.1-rc1
>
> These patches are located at branch 21.11 of dpdk-stable repo:
> https://dpdk.org/browse/dpdk-stable/
>
> Thanks.
>
> Kevin
>
> ---
> Adham Masarwah (2):
> net/mlx5: fix destroying empty matchers list
> app/testpmd: fix show RSS RETA on Windows
>
> Ajit Khaparde (7):
> net/bnxt: fix ring teardown
> net/bnxt: fix PAM4 mask setting
> net/bnxt: fix crash by validating pointer
> net/bnxt: check VF representor pointer before access
> net/bnxt: fix VF resource allocation strategy
> net/bnxt: set HW coalescing parameters
> net/bnxt: fix ring calculation for representors
>
> Alexander Kozyrev (4):
> net/mlx5: fix maximum packet headers size for TSO
> net/mlx5: fix MPRQ WQE size assertion
> net/mlx5: fix committed bucket size
> net/mlx5: fix meter capabilities reporting
>
> Ali Alnubani (1):
> doc: fix typos and punctuation in flow API guide
>
> Anatoly Burakov (1):
> net/qede: fix redundant condition in debug code
>
> Andy Pei (1):
> vdpa/ifc: fix log info mismatch
>
> Ankur Dwivedi (1):
> common/cnxk: fix NPC key extraction validation
>
> Anoob Joseph (4):
> common/cnxk: fix reset of fields
> crypto/cnxk: fix inflight count calculation
> crypto/cnxk: fix extend tail calculation
> crypto/cnxk: fix update of number of descriptors
>
> Arek Kusztal (1):
> cryptodev: fix RSA key type name
>
> Asaf Ravid (1):
> net/cnxk: fix promiscuous mode in multicast enable flow
>
> Ashwin Sekhar T K (1):
> mempool/cnxk: fix batch allocation failure path
>
> Bin Zheng (1):
> net/ixgbe: add vector Rx parameter check
>
> Bing Zhao (5):
> common/mlx5: fix probing failure code
> app/testpmd: fix raw encap of GENEVE option
> net/mlx5: fix matcher priority with ICMP or ICMPv6
> net/mlx5: remove unused reference counter
> net/mlx5: fix configuration without Rx queue
>
> Brian Dooley (13):
> eal: add missing C++ guards
> telemetry: add missing C++ guards
> ethdev: add missing C++ guards
> metrics: add missing C++ guards
> acl: add missing C++ guards
> compressdev: add missing C++ guards
> eventdev: add missing C++ guards
> kni: add missing C++ guards
> vhost: add missing C++ guards
> bpf: add missing C++ guards
> cryptodev: add missing C++ guards
> examples/l2fwd-crypto: fix port mask overflow
> crypto/virtio: fix out-of-bounds access
>
> Bruce Richardson (23):
> doc: remove dependency on findutils on FreeBSD
> dma/idxd: fix burst capacity calculation
> dma/idxd: fix paths to driver sysfs directory
> dma/idxd: fix wrap-around in burst capacity calculation
> build: fix warnings when running external commands
> build: remove deprecated Meson functions
> eal: fix C++ include
> eventdev: fix C++ include
> graph: fix C++ include
> ipsec: fix C++ include
> table: fix C++ include
> vhost: fix C++ include
> ethdev: fix cast for C++ compatibility
> test/dma: fix missing checks for device capacity
> dma/idxd: configure maximum batch size to high value
> doc: improve configuration examples in idxd guide
> distributor: fix potential overflow
> eal/freebsd: add missing C++ include guards
> compressdev: fix missing space in log macro
> cryptodev: fix clang C++ include
> eventdev: fix clang C++ include
> doc: replace characters for (R) symbol in Linux guide
> doc: fix missing note on UIO module in Linux guide
>
> Chandubabu Namburu (1):
> net/axgbe: use PCI root complex device to distinguish device
>
> Chenbo Xia (1):
> vhost: fix queue number check when setting inflight FD
>
> Chengchang Tang (1):
> net/bonding: fix offloading configuration
>
> Chengwen Feng (2):
> net/hns3: delete duplicated RSS type
> dma/hisilicon: use common PCI device naming
>
> Chuanshe Zhang (1):
> examples/flow_classify: fix failure message
>
> Ciara Loftus (2):
> net/af_xdp: fix build with -Wunused-function
> net/af_xdp: ensure socket is deleted on Rx queue setup error
>
> Ciara Power (4):
> crypto/ipsec_mb: fix queue setup null pointer dereference
> crypto/ipsec_mb: fix queue cleanup null pointer dereference
> crypto/ipsec_mb: fix tainted data for session
> crypto/ipsec_mb: remove useless check
>
> Cristian Dumitrescu (2):
> pipeline: fix annotation checks
> pipeline: fix table state memory allocation
>
> Dapeng Yu (2):
> net/ice: track DCF state of PF
> net/i40e: enable maximum frame size at port level
>
> Dariusz Sosnowski (3):
> net/mlx5: fix inline length for multi-segment TSO
> net/mlx5: fix MPLS/GRE Verbs spec ordering
> net/mlx5: fix VLAN push action validation
>
> David Marchand (8):
> devtools: fix comment detection in forbidden token check
> stack: fix stubs header export
> test/mbuf: fix mbuf data content check
> ethdev: fix MAC address in telemetry device info
> net/af_xdp: add missing trailing newline in logs
> devtools: remove event/dlb exception in ABI check
> vhost: fix FD leak with inflight messages
> bpf: fix build with some libpcap version on FreeBSD
>
> Dawid Gorecki (2):
> net/ena: fix reset reason being overwritten
> net/ena: check memory BAR before initializing LLQ
>
> Devendra Singh Rawat (3):
> net/qede: fix Tx completion
> net/qede: fix Rx bulk
> net/qede: fix maximum Rx packet length
>
> Dmitry Kozlyuk (8):
> net/mlx5: fix GCC uninitialized variable warning
> net/mlx5: relax headroom assertion
> app/testpmd: fix external buffer allocation
> common/mlx5: fix MR lookup for non-contiguous mempool
> common/mlx5: add Netlink event helpers
> net/mlx5: fix link status change detection
> net/mlx5: fix initial link status detection
> net/mlx5: fix modify port action validation
>
> Elena Agostini (3):
> gpu/cuda: fix memory list cleanup
> doc: add CUDA driver features
> gpu/cuda: fix dependency loading path
>
> Ferruh Yigit (2):
> net/bonding: fix MTU set for slaves
> ethdev: fix doxygen comments for device info struct
>
> Geoffrey Le Gourriérec (1):
> net/bnxt: restore dependency on kernel modules
>
> Gerry Gribbon (1):
> app/regex: fix number of matches
>
> Gowrishankar Muthukrishnan (6):
> event/cnxk: fix variables casting
> event/cnxk: fix uninitialized local variables
> common/cnxk: add missing checks of return values
> common/cnxk fix unintended sign extension
> common/cnxk: fix uninitialized pointer read
> net/cnxk: fix uninitialized local variable
>
> Gregory Etelson (10):
> net/mlx5: fix RSS expansion with explicit next protocol
> net/mlx5: fix GRE protocol type translation for Verbs
> net/mlx5: fix GRE item translation in Verbs
> net/mlx5: reduce flex item flow handle size
> net/mlx5: fix flex item header length translation
> net/mlx5: fix inet IPIP protocol type
> net/mlx5: fix next protocol RSS expansion
> net/mlx5: fix flex item availability
> app/testpmd: fix GTP header parsing in checksum engine
> app/testpmd: fix flow rule with flex input link
>
> Haiyue Wang (2):
> net/iavf: remove git residue symbol
> doc: fix KNI PMD name typo
>
> Harman Kalra (3):
> common/cnxk: reset stale values on error debug registers
> common/cnxk: always use single interrupt ID with NIX
> common/cnxk: fix mbuf data offset for VF
>
> Harold Huang (2):
> net/virtio-user: fix resource leak on probing failure
> net/kni: fix config initialization
>
> Heinrich Kuhn (1):
> net/nfp: free HW ring memzone on queue release
>
> Hemant Agrawal (1):
> crypto/dpaax_sec: fix auth/cipher xform chain checks
>
> Honnappa Nagarahalli (3):
> examples/distributor: reduce Tx queue number to 1
> examples/l3fwd: share queue size variables
> examples/l3fwd: make Rx and Tx queue size configurable
>
> Huisong Li (10):
> net/hns3: fix mailbox wait time
> net/hns3: fix using enum as boolean
> net/hns3: fix max packet size rollback in PF
> net/hns3: fix insecure way to query MAC statistics
> net/hns3: fix double decrement of secondary count
> net/hns3: fix operating queue when TCAM table is invalid
> kni: fix freeing order in device release
> net/hns3: fix RSS TC mode entry
> net/hns3: fix VF RSS TC mode entry
> net/hns3: increase time waiting for PF reset completion
>
> Ivan Malov (8):
> net/sfc: validate queue span when parsing flow action RSS
> net/sfc: fix lock releases
> net/sfc: do not push fast free offload to default TxQ config
> net/sfc: demand Tx fast free offload on EF10 simple datapath
> common/sfc_efx/base: fix recirculation ID set in outer rules
> common/sfc_efx/base: add missing handler for 1-byte fields
> net/sfc: fix flow tunnel support detection
> net/sfc: reduce log level of tunnel restore info error
>
> Jakub Poczatek (1):
> doc: fix FIPS guide
>
> Jiawei Wang (4):
> net/mlx5: fix NIC egress flow mismatch in switchdev mode
> net/mlx5: fix sample flow action on trusted device
> net/mlx5: fix implicit tag insertion with sample action
> net/mlx5: fix port matching in sample flow rule
>
> Jiawen Wu (8):
> net/ngbe: fix Rx by initializing packet buffer early
> net/ngbe: fix missed link interrupt
> net/ngbe: fix Tx hang on queue disable
> net/ngbe: fix packet statistics
> net/txgbe: fix link up and down
> net/txgbe: fix KR auto-negotiation
> net/ngbe: fix debug logs
> net/txgbe: fix debug logs
>
> Jie Hai (1):
> net/hns3: remove duplicate macro definition
>
> Jie Wang (1):
> net: fix L2TPv2 common header
>
> Jie Zhou (2):
> eal/windows: fix error code for not supported API
> test/mem: fix error check
>
> Josh Soref (1):
> fix spelling in comments and strings
>
> Junfeng Guo (3):
> net/ice: fix pattern check for flow director parser
> net/ice: fix pattern check in flow director
> raw/ntb: clear all valid doorbell bits on init
>
> Junjie Wan (1):
> net/bonding: fix slaves initializing on MTU setting
>
> Junxiao Shi (1):
> net/af_xdp: fix custom program loading with multiple queues
>
> Juraj Linkeš (1):
> config/arm: add values for native armv7
>
> Kai Ji (2):
> test/crypto: fix out-of-place SGL in raw datapath
> crypto/qat: fix GEN4 AEAD job in raw data path
>
> Kalesh AP (15):
> net/bnxt: fix multicast address set
> net/bnxt: fix multicast MAC restore during reset recovery
> net/bnxt: fix queue stop operation
> net/bnxt: restore RSS configuration after reset recovery
> net/bnxt: fix restoring VLAN filtering after recovery
> net/bnxt: cap maximum number of unicast MAC addresses
> net/bnxt: set fast-path pointers only if recovery succeeds
> net/bnxt: add null check for mark table
> net/bnxt: fix flow create when RSS is disabled
> net/bnxt: get maximum supported multicast filters count
> net/bnxt: fix handling of VF configuration change
> net/bnxt: fix xstats query
> net/bnxt: fix check for autoneg enablement
> net/bnxt: handle ring cleanup in case of error
> net/bnxt: fix memzone allocation per VNIC
>
> Karl Bonde Torp (1):
> build: fix build on FreeBSD with Meson 0.61.1
>
> Kathleen Capella (2):
> net/iavf: count continuous DD bits for Arm
> net/iavf: count continuous DD bits for Arm in flex Rx
>
> Kevin Liu (2):
> net/ice: fix Tx checksum offload
> net/ice: fix Tx offload path choice
>
> Kevin Traynor (4):
> maintainers: update for stable branches
> build: suppress rte_crypto_asym_op abi check
> Revert "crypto/ipsec_mb: fix length and offset settings"
> Revert "net/mlx5: fix flex item availability"
>
> Kumara Parameshwaran (2):
> ethdev: add internal function to device struct from name
> net/tap: fix to populate FDs in secondary process
>
> Lance Richardson (2):
> buildtools: fix AVX512 check for Python 3.5
> net/bnxt: fix xstats names query overrun
>
> Leyi Rong (1):
> net/iavf: fix potential out-of-bounds access
>
> Lijun Ou (1):
> net/hns3: fix RSS key with null
>
> Lior Margalit (1):
> net/mlx5: fix assertion on flags set in packet mbuf
>
> Madhuker Mythri (1):
> devargs: fix crash with uninitialized parsing
>
> Martijn Bakker (1):
> pflock: fix header file installation
>
> Martin Spinler (2):
> net/nfb: fix array indexes in deinit functions
> net/nfb: fix multicast/promiscuous mode switching
>
> Marvin Liu (1):
> net/virtio: fix slots number when indirect feature on
>
> Matan Azrad (1):
> vdpa/mlx5: workaround queue stop with traffic
>
> Maxime Coquelin (1):
> vhost: fix unsafe vring addresses modifications
>
> Maxime Gouin (3):
> bus/ifpga: remove useless check while browsing devices
> net/nfp: remove duplicated check when setting MAC address
> net/nfp: remove useless range checks
>
> Megha Ajmera (1):
> examples/qos_sched: fix core mask overflow
>
> Michael Baum (17):
> common/mlx5: add minimum WQE size for striding RQ
> net/mlx5: improve stride parameter names
> net/mlx5: fix MPRQ stride devargs adjustment
> common/mlx5: fix error handling in multi-class probe
> net/mlx5: fix memory socket selection in ASO management
> common/mlx5: fix missing validation in devargs parsing
> net/mlx5: fix sibling device config check
> net/mlx5: fix ineffective metadata argument adjustment
> net/mlx5: fix ASO CT object release
> net/mlx5: fix errno update in shared context creation
> net/mlx5: fix entry in shared Rx queues list
> doc: remove obsolete vector Tx explanations from mlx5 guide
> doc: replace broken links in mlx guides
> doc: correct name of BlueField-2 in mlx5 guide
> net/mlx5: fix shared counter flag in flow validation
> net/mlx5: fix check in count action validation
> common/mlx5: consider local functions as internal
>
> Michal Krawczyk (6):
> net/ena: remove unused enumeration
> net/ena: remove unused offload variables
> net/ena: skip timer if reset is triggered
> net/ena: fix meta descriptor DF flag setup
> net/ena: fix checksum flag for L4
> bus/pci: assign driver pointer before mapping
>
> Michal Wilczynski (1):
> net/ice: fix overwriting of LSE bit by DCF
>
> Min Hu (Connor) (6):
> net/hns3: fix Rx/Tx functions update
> net/hns3: fix vector Rx/Tx when PTP enabled
> net/bonding: fix promiscuous and allmulticast state
> net/bonding: fix reference count on mbufs
> app/testpmd: fix bonding mode set
> app/testpmd: check starting port is not in bonding
>
> Naga Harish K S V (2):
> eventdev/eth_tx: fix queue add error code
> eventdev/eth_rx: fix queue config query
>
> Nicolas Chautru (1):
> baseband/acc100: avoid out-of-bounds access
>
> Nipun Gupta (1):
> examples/l3fwd: fix Rx burst size for event mode
>
> Nithin Dabilpuram (11):
> examples/ipsec-secgw: fix eventdev start sequence
> examples/ipsec-secgw: fix default flow rule creation
> common/cnxk: fix shift offset for TL3 length disable
> common/cnxk: fix byte order of frag sizes and infos
> common/cnxk: fix null pointer dereferences
> common/cnxk: fix uninitialized variables
> examples/ipsec-secgw: fix buffer freeing in vector mode
> net/cnxk: fix inline device RQ tag mask
> net/cnxk: register callback early to handle initial packets
> net/cnxk: fix inline IPsec security error handling
> common/cnxk: fix bitmap usage for TM
>
> Pablo de Lara (9):
> crypto/ipsec_mb: fix buffer overrun
> crypto/ipsec_mb: check missing operation types
> crypto/ipsec_mb: fix ZUC authentication verify
> crypto/ipsec_mb: fix ZUC operation overwrite
> crypto/ipsec_mb: fix length and offset settings
> test/efd: fix sockets mask size
> efd: fix uninitialized structure
> crypto/ipsec_mb: fix length and offset settings
> crypto/ipsec_mb: fix GMAC parameters setting
>
> Pavan Nikhilesh (6):
> eventdev/eth_rx: fix missing internal port checks
> event/cnxk: fix QoS devargs parsing
> common/cnxk: add workaround for vWQE flush
> config: align mempool elements to 128 bytes on CN10K
> event/cnxk: fix sub-event clearing mask length
> event/cnxk: fix Rx adapter config check
>
> Peng Yu (1):
> vhost: fix linker script syntax
>
> Piotr Bronowski (2):
> crypto/ipsec_mb: fix premature dereference
> crypto/ipsec_mb: fix GCM requested digest length
>
> Qi Zhang (2):
> net/ice: fix Tx checksum offload capability
> doc: update matching versions in ice guide
>
> Radu Nicolau (5):
> examples/ipsec-secgw: fix offload flag used for TSO IPv6
> net/iavf: fix segmentation offload condition
> net/iavf: fix segmentation offload buffer size
> net/iavf: support NAT-T / UDP encapsulation
> net/iavf: fix AES-GMAC IV size
>
> Rahul Bhansali (2):
> net/cnxk: fix mbuf data length
> examples/l3fwd: fix buffer overflow in Tx
>
> Rahul Lakkireddy (1):
> net/cxgbe: fix dangling pointer by mailbox access rework
>
> Raja Zidane (8):
> net/mlx5: fix mark enabling for Rx
> app/testpmd: fix GENEVE parsing in checksum mode
> app/compress-perf: fix cycle count operations allocation
> app/compress-perf: optimize operations pool allocation
> compress/mlx5: support out-of-space status
> app/compress-perf: fix socket ID type during init
> app/compress-perf: fix number of queue pairs to setup
> compressdev: fix socket ID type
>
> Rakesh Kudurumalla (2):
> net/cnxk: fix build with GCC 12
> net/cnxk: fix RSS RETA table update
>
> Rashmi Shetty (1):
> doc: fix dlb2 guide
>
> Reshma Pattan (1):
> app/pdump: abort on multi-core capture limit
>
> Rongwei Liu (3):
> net/mlx5: fix shared RSS destroy
> net/mlx5: fix meter creation default state
> net/mlx5: forbid multiple ASO actions in a single rule
>
> Ruifeng Wang (1):
> config: add arch define for Arm
>
> Satheesh Paul (5):
> common/cnxk: fix nibble parsing order when dumping MCAM
> common/cnxk: fix flow deletion
> common/cnxk: fix log level during MCAM allocation
> common/cnxk: fix base rule merge
> net/cnxk: fix Rx/Tx function update
>
> Sean Morrissey (2):
> app/testpmd: fix dereference before null check
> doc: fix telemetry example in cryptodev guide
>
> Shijith Thotton (1):
> crypto/cnxk: enable allocated queues only
>
> Shun Hao (3):
> net/mlx5: fix meter sub-policy creation
> net/mlx5: fix E-Switch manager vport ID
> net/mlx5: fix meter policy creation assert
>
> Simei Su (1):
> net/ice: fix mbuf offload flag for Rx timestamp
>
> Srikanth Yalavarthi (1):
> dma/cnxk: fix installing internal headers
>
> Stephen Douthit (1):
> net/ixgbe: fix FSP check for X550EM devices
>
> Stephen Hemminger (7):
> eal/linux: log hugepage create errors with filename
> net/memif: remove unnecessary Rx interrupt stub
> ipc: end multiprocess thread during cleanup
> vfio: cleanup the multiprocess sync handle
> pcapng: handle failure of link status query
> test/bpf: skip dump if conversion fails
> app/dumpcap: check for failure to set promiscuous
>
> Steve Yang (4):
> app/testpmd: fix stack overflow for EEPROM display
> net/i40e: fix unintentional integer overflow
> eal/linux: fix illegal memory access in uevent handler
> net/iavf: fix function pointer in multi-process
>
> Suanming Mou (3):
> net/mlx5: set flow error for hash list create
> net/mlx5: remove unused function
> net/mlx5: fix indexed pool fetch overlap
>
> Thinh Tran (1):
> net/mlx5: fix CPU socket ID for Rx queue creation
>
> Thomas Monjalon (6):
> doc: replace deprecated distutils version parsing
> dmadev: add missing header include
> app/testpmd: fix build without drivers
> regexdev: fix section attribute of symbols
> build: hide local symbols in shared libraries
> devtools: fix symbols check
>
> Tianfei Zhang (2):
> raw/ifpga/base: fix SPI transaction
> raw/ifpga: fix thread closing
>
> Tianli Lai (1):
> examples/kni: add missing trailing newline in log
>
> Timothy McDaniel (3):
> event/dlb2: update rolling mask used for dequeue
> event/dlb2: poll HW CQ inflights before mapping queue
> event/dlb2: add shift value check in sparse dequeue
>
> Vanshika Shukla (2):
> net/dpaa2: fix unregistering interrupt handler
> net/dpaa2: fix timestamping for IEEE1588
>
> Viacheslav Ovsiienko (4):
> net/mlx5: fix modify field MAC address offset
> app/testpmd: fix Tx scheduling interval
> net/mlx5: fix metadata endianness in modify field action
> doc: fix modify field action description for mlx5
>
> Vladimir Medvedkin (1):
> app/fib: fix division by zero
>
> Wei Huang (5):
> raw/ifpga/base: fix port feature ID
> raw/ifpga: fix variable initialization in probing
> raw/ifpga: fix interrupt handle allocation
> raw/ifpga: fix monitor thread
> raw/ifpga: fix build with optimization
>
> Weiguo Li (14):
> common/cnxk: fix error checking
> net/enic: fix dereference before null check
> net/dpaa2: fix null pointer dereference
> regex/mlx5: fix memory allocation check
> net/memif: remove pointer deference before null check
> net/iavf: fix null pointer dereference
> vdpa/sfc: fix null dereference during config
> vdpa/sfc: fix null dereference during removal
> compress/octeontx: fix null pointer dereference
> eventdev/eth_rx: fix parameters parsing memory leak
> net/sfc: fix memory allocation size for cache
> net/txgbe: fix queue statistics mapping
> sched: remove useless malloc in PIE data init
> net/bnxt: fix null dereference in session cleanup
>
> Wenwu Ma (1):
> examples/vhost: fix launch with physical port
>
> Wenxuan Wu (1):
> eal/linux: fix device monitor stop return
>
> Xiaoyu Min (1):
> net/mlx5: reject jump to root table
>
> Xuan Ding (2):
> vhost: fix field naming in guest page struct
> vhost: fix physical address mapping
>
> Xueming Li (1):
> net/virtio: fix Tx queue 0 overriden by queue 128
>
> Yajun Wu (1):
> common/mlx5: fix queue pair ack timeout configuration
>
> Yiding Zhou (1):
> net/ice: fix build with 16-byte Rx descriptor
>
> Yu Wenjun (1):
> net/bonding: fix RSS with early configure
>
> Yuan Wang (1):
> vhost: fix guest to host physical address mapping
>
> Yunjian Wang (12):
> net/bonding: fix mode type mismatch
> ethdev: fix Rx queue telemetry memory leak on failure
> net/ice: fix link up when starting device
> net/virtio-user: check FD flags getting failure
> net/virtio: fix uninitialized RSS key
> ring: fix error code when creating ring
> net/ixgbe: check filter init failure
> mem: check allocation in dynamic hugepage init
> ethdev: remove unnecessary null check
> net/ixgbe: reset security context pointer on close
> net/txgbe: reset security context pointer on close
> net/iavf: reset security context pointer on stop
>
> Yuying Zhang (1):
> net/ice/base: add profile validation on switch filter
>
> Zhihong Wang (1):
> ring: fix overflow in memory size calculation
>
>
[-- Attachment #2: Type: text/html, Size: 28710 bytes --]
^ permalink raw reply [relevance 0%]
* Re: [RFC 1/2] ethdev: port flags for pre-configuration flow hints
2022-04-07 15:04 3% ` Stephen Hemminger
@ 2022-04-08 2:35 4% ` Jack Min
0 siblings, 0 replies; 200+ results
From: Jack Min @ 2022-04-08 2:35 UTC (permalink / raw)
To: Stephen Hemminger
Cc: Ori Kam, Thomas Monjalon, Ferruh Yigit, Andrew Rybchenko, dev
[-- Attachment #1: Type: text/plain, Size: 769 bytes --]
On 4/7/22 23:04, Stephen Hemminger wrote:
> On Thu, 7 Apr 2022 13:30:46 +0800
> Xiaoyu Min<jackmin@nvidia.com> wrote:
>
>> * @b EXPERIMENTAL: this API may change without prior notice.
>> @@ -4972,6 +4983,11 @@ struct rte_flow_port_attr {
>> * @see RTE_FLOW_ACTION_TYPE_METER
>> */
>> uint32_t nb_meters;
>> + /**
>> + * Port flags.
>> + * @see enum rte_flow_port_flag
>> + */
>> + enum rte_flow_port_flag flags;
> This would have to wait until 22.11 because it is ABI breakage.
> Also, how would this work with old users of API?
I'm not familiar with DPKD API/ABI policy,
But as my understanding this one is marked as _experimental_ and also
all related APIs
The experimental is not considered as part of ABI, and we can change
them anytime, no?
[-- Attachment #2: Type: text/html, Size: 1373 bytes --]
^ permalink raw reply [relevance 4%]
* Re: [RFC 1/2] ethdev: port flags for pre-configuration flow hints
@ 2022-04-07 15:04 3% ` Stephen Hemminger
2022-04-08 2:35 4% ` Jack Min
0 siblings, 1 reply; 200+ results
From: Stephen Hemminger @ 2022-04-07 15:04 UTC (permalink / raw)
To: Xiaoyu Min; +Cc: Ori Kam, Thomas Monjalon, Ferruh Yigit, Andrew Rybchenko, dev
On Thu, 7 Apr 2022 13:30:46 +0800
Xiaoyu Min <jackmin@nvidia.com> wrote:
> * @b EXPERIMENTAL: this API may change without prior notice.
> @@ -4972,6 +4983,11 @@ struct rte_flow_port_attr {
> * @see RTE_FLOW_ACTION_TYPE_METER
> */
> uint32_t nb_meters;
> + /**
> + * Port flags.
> + * @see enum rte_flow_port_flag
> + */
> + enum rte_flow_port_flag flags;
This would have to wait until 22.11 because it is ABI breakage.
Also, how would this work with old users of API?
^ permalink raw reply [relevance 3%]
* [PATCH v2 2/3] doc: fix API index Markdown syntax
@ 2022-04-06 17:10 6% ` Dmitry Kozlyuk
0 siblings, 0 replies; 200+ results
From: Dmitry Kozlyuk @ 2022-04-06 17:10 UTC (permalink / raw)
To: dev
Cc: Vipin Varghese, Dmitry Kozlyuk, Thomas Monjalon, Olivier Matz,
David Marchand
API documentation index had spaces between link caption and URL,
which may be unsupported by some Markdown implementations.
That is, "[caption](URL)" is valid but "[caption] (URL)" is not.
The problematic behavior is observed with Doxygen on Windows.
Remove the spaces.
Unfortunately, Markdown syntax is not formally specified.
Fixes: 9bf486e606b0 ("doc: generate HTML for API with doxygen")
Signed-off-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
---
doc/api/doxy-api-index.md | 366 +++++++++++++++++++-------------------
1 file changed, 183 insertions(+), 183 deletions(-)
diff --git a/doc/api/doxy-api-index.md b/doc/api/doxy-api-index.md
index 4245b9635c..baecb2e52e 100644
--- a/doc/api/doxy-api-index.md
+++ b/doc/api/doxy-api-index.md
@@ -9,222 +9,222 @@ API
The public API headers are grouped by topics:
- **device**:
- [dev] (@ref rte_dev.h),
- [ethdev] (@ref rte_ethdev.h),
- [ethctrl] (@ref rte_eth_ctrl.h),
- [rte_flow] (@ref rte_flow.h),
- [rte_tm] (@ref rte_tm.h),
- [rte_mtr] (@ref rte_mtr.h),
- [bbdev] (@ref rte_bbdev.h),
- [cryptodev] (@ref rte_cryptodev.h),
- [security] (@ref rte_security.h),
- [compressdev] (@ref rte_compressdev.h),
- [compress] (@ref rte_comp.h),
- [regexdev] (@ref rte_regexdev.h),
- [dmadev] (@ref rte_dmadev.h),
- [eventdev] (@ref rte_eventdev.h),
- [event_eth_rx_adapter] (@ref rte_event_eth_rx_adapter.h),
- [event_eth_tx_adapter] (@ref rte_event_eth_tx_adapter.h),
- [event_timer_adapter] (@ref rte_event_timer_adapter.h),
- [event_crypto_adapter] (@ref rte_event_crypto_adapter.h),
- [rawdev] (@ref rte_rawdev.h),
- [metrics] (@ref rte_metrics.h),
- [bitrate] (@ref rte_bitrate.h),
- [latency] (@ref rte_latencystats.h),
- [devargs] (@ref rte_devargs.h),
- [PCI] (@ref rte_pci.h),
- [vdev] (@ref rte_bus_vdev.h),
- [vfio] (@ref rte_vfio.h)
+ [dev](@ref rte_dev.h),
+ [ethdev](@ref rte_ethdev.h),
+ [ethctrl](@ref rte_eth_ctrl.h),
+ [rte_flow](@ref rte_flow.h),
+ [rte_tm](@ref rte_tm.h),
+ [rte_mtr](@ref rte_mtr.h),
+ [bbdev](@ref rte_bbdev.h),
+ [cryptodev](@ref rte_cryptodev.h),
+ [security](@ref rte_security.h),
+ [compressdev](@ref rte_compressdev.h),
+ [compress](@ref rte_comp.h),
+ [regexdev](@ref rte_regexdev.h),
+ [dmadev](@ref rte_dmadev.h),
+ [eventdev](@ref rte_eventdev.h),
+ [event_eth_rx_adapter](@ref rte_event_eth_rx_adapter.h),
+ [event_eth_tx_adapter](@ref rte_event_eth_tx_adapter.h),
+ [event_timer_adapter](@ref rte_event_timer_adapter.h),
+ [event_crypto_adapter](@ref rte_event_crypto_adapter.h),
+ [rawdev](@ref rte_rawdev.h),
+ [metrics](@ref rte_metrics.h),
+ [bitrate](@ref rte_bitrate.h),
+ [latency](@ref rte_latencystats.h),
+ [devargs](@ref rte_devargs.h),
+ [PCI](@ref rte_pci.h),
+ [vdev](@ref rte_bus_vdev.h),
+ [vfio](@ref rte_vfio.h)
- **device specific**:
- [softnic] (@ref rte_eth_softnic.h),
- [bond] (@ref rte_eth_bond.h),
- [vhost] (@ref rte_vhost.h),
- [vdpa] (@ref rte_vdpa.h),
- [KNI] (@ref rte_kni.h),
- [ixgbe] (@ref rte_pmd_ixgbe.h),
- [i40e] (@ref rte_pmd_i40e.h),
- [ice] (@ref rte_pmd_ice.h),
- [iavf] (@ref rte_pmd_iavf.h),
- [ioat] (@ref rte_ioat_rawdev.h),
- [bnxt] (@ref rte_pmd_bnxt.h),
- [dpaa] (@ref rte_pmd_dpaa.h),
- [dpaa2] (@ref rte_pmd_dpaa2.h),
- [mlx5] (@ref rte_pmd_mlx5.h),
- [dpaa2_mempool] (@ref rte_dpaa2_mempool.h),
- [dpaa2_cmdif] (@ref rte_pmd_dpaa2_cmdif.h),
- [dpaa2_qdma] (@ref rte_pmd_dpaa2_qdma.h),
- [crypto_scheduler] (@ref rte_cryptodev_scheduler.h),
- [dlb2] (@ref rte_pmd_dlb2.h),
- [ifpga] (@ref rte_pmd_ifpga.h)
+ [softnic](@ref rte_eth_softnic.h),
+ [bond](@ref rte_eth_bond.h),
+ [vhost](@ref rte_vhost.h),
+ [vdpa](@ref rte_vdpa.h),
+ [KNI](@ref rte_kni.h),
+ [ixgbe](@ref rte_pmd_ixgbe.h),
+ [i40e](@ref rte_pmd_i40e.h),
+ [ice](@ref rte_pmd_ice.h),
+ [iavf](@ref rte_pmd_iavf.h),
+ [ioat](@ref rte_ioat_rawdev.h),
+ [bnxt](@ref rte_pmd_bnxt.h),
+ [dpaa](@ref rte_pmd_dpaa.h),
+ [dpaa2](@ref rte_pmd_dpaa2.h),
+ [mlx5](@ref rte_pmd_mlx5.h),
+ [dpaa2_mempool](@ref rte_dpaa2_mempool.h),
+ [dpaa2_cmdif](@ref rte_pmd_dpaa2_cmdif.h),
+ [dpaa2_qdma](@ref rte_pmd_dpaa2_qdma.h),
+ [crypto_scheduler](@ref rte_cryptodev_scheduler.h),
+ [dlb2](@ref rte_pmd_dlb2.h),
+ [ifpga](@ref rte_pmd_ifpga.h)
- **memory**:
- [memseg] (@ref rte_memory.h),
- [memzone] (@ref rte_memzone.h),
- [mempool] (@ref rte_mempool.h),
- [malloc] (@ref rte_malloc.h),
- [memcpy] (@ref rte_memcpy.h)
+ [memseg](@ref rte_memory.h),
+ [memzone](@ref rte_memzone.h),
+ [mempool](@ref rte_mempool.h),
+ [malloc](@ref rte_malloc.h),
+ [memcpy](@ref rte_memcpy.h)
- **timers**:
- [cycles] (@ref rte_cycles.h),
- [timer] (@ref rte_timer.h),
- [alarm] (@ref rte_alarm.h)
+ [cycles](@ref rte_cycles.h),
+ [timer](@ref rte_timer.h),
+ [alarm](@ref rte_alarm.h)
- **locks**:
- [atomic] (@ref rte_atomic.h),
- [mcslock] (@ref rte_mcslock.h),
- [pflock] (@ref rte_pflock.h),
- [rwlock] (@ref rte_rwlock.h),
- [spinlock] (@ref rte_spinlock.h),
- [ticketlock] (@ref rte_ticketlock.h),
- [RCU] (@ref rte_rcu_qsbr.h)
+ [atomic](@ref rte_atomic.h),
+ [mcslock](@ref rte_mcslock.h),
+ [pflock](@ref rte_pflock.h),
+ [rwlock](@ref rte_rwlock.h),
+ [spinlock](@ref rte_spinlock.h),
+ [ticketlock](@ref rte_ticketlock.h),
+ [RCU](@ref rte_rcu_qsbr.h)
- **CPU arch**:
- [branch prediction] (@ref rte_branch_prediction.h),
- [cache prefetch] (@ref rte_prefetch.h),
- [SIMD] (@ref rte_vect.h),
- [byte order] (@ref rte_byteorder.h),
- [CPU flags] (@ref rte_cpuflags.h),
- [CPU pause] (@ref rte_pause.h),
- [I/O access] (@ref rte_io.h),
- [power management] (@ref rte_power_intrinsics.h)
+ [branch prediction](@ref rte_branch_prediction.h),
+ [cache prefetch](@ref rte_prefetch.h),
+ [SIMD](@ref rte_vect.h),
+ [byte order](@ref rte_byteorder.h),
+ [CPU flags](@ref rte_cpuflags.h),
+ [CPU pause](@ref rte_pause.h),
+ [I/O access](@ref rte_io.h),
+ [power management](@ref rte_power_intrinsics.h)
- **CPU multicore**:
- [interrupts] (@ref rte_interrupts.h),
- [launch] (@ref rte_launch.h),
- [lcore] (@ref rte_lcore.h),
- [per-lcore] (@ref rte_per_lcore.h),
- [service cores] (@ref rte_service.h),
- [keepalive] (@ref rte_keepalive.h),
- [power/freq] (@ref rte_power.h),
- [PMD power] (@ref rte_power_pmd_mgmt.h)
+ [interrupts](@ref rte_interrupts.h),
+ [launch](@ref rte_launch.h),
+ [lcore](@ref rte_lcore.h),
+ [per-lcore](@ref rte_per_lcore.h),
+ [service cores](@ref rte_service.h),
+ [keepalive](@ref rte_keepalive.h),
+ [power/freq](@ref rte_power.h),
+ [PMD power](@ref rte_power_pmd_mgmt.h)
- **layers**:
- [ethernet] (@ref rte_ether.h),
- [ARP] (@ref rte_arp.h),
- [HIGIG] (@ref rte_higig.h),
- [ICMP] (@ref rte_icmp.h),
- [ESP] (@ref rte_esp.h),
- [IPsec] (@ref rte_ipsec.h),
- [IPsec group] (@ref rte_ipsec_group.h),
- [IPsec SA] (@ref rte_ipsec_sa.h),
- [IPsec SAD] (@ref rte_ipsec_sad.h),
- [IP] (@ref rte_ip.h),
- [frag/reass] (@ref rte_ip_frag.h),
- [SCTP] (@ref rte_sctp.h),
- [TCP] (@ref rte_tcp.h),
- [UDP] (@ref rte_udp.h),
- [GTP] (@ref rte_gtp.h),
- [GRO] (@ref rte_gro.h),
- [GSO] (@ref rte_gso.h),
- [GRE] (@ref rte_gre.h),
- [MPLS] (@ref rte_mpls.h),
- [VXLAN] (@ref rte_vxlan.h),
- [Geneve] (@ref rte_geneve.h),
- [eCPRI] (@ref rte_ecpri.h),
- [L2TPv2] (@ref rte_l2tpv2.h),
- [PPP] (@ref rte_ppp.h)
+ [ethernet](@ref rte_ether.h),
+ [ARP](@ref rte_arp.h),
+ [HIGIG](@ref rte_higig.h),
+ [ICMP](@ref rte_icmp.h),
+ [ESP](@ref rte_esp.h),
+ [IPsec](@ref rte_ipsec.h),
+ [IPsec group](@ref rte_ipsec_group.h),
+ [IPsec SA](@ref rte_ipsec_sa.h),
+ [IPsec SAD](@ref rte_ipsec_sad.h),
+ [IP](@ref rte_ip.h),
+ [frag/reass](@ref rte_ip_frag.h),
+ [SCTP](@ref rte_sctp.h),
+ [TCP](@ref rte_tcp.h),
+ [UDP](@ref rte_udp.h),
+ [GTP](@ref rte_gtp.h),
+ [GRO](@ref rte_gro.h),
+ [GSO](@ref rte_gso.h),
+ [GRE](@ref rte_gre.h),
+ [MPLS](@ref rte_mpls.h),
+ [VXLAN](@ref rte_vxlan.h),
+ [Geneve](@ref rte_geneve.h),
+ [eCPRI](@ref rte_ecpri.h),
+ [L2TPv2](@ref rte_l2tpv2.h),
+ [PPP](@ref rte_ppp.h)
- **QoS**:
- [metering] (@ref rte_meter.h),
- [scheduler] (@ref rte_sched.h),
- [RED congestion] (@ref rte_red.h)
+ [metering](@ref rte_meter.h),
+ [scheduler](@ref rte_sched.h),
+ [RED congestion](@ref rte_red.h)
- **routing**:
- [LPM IPv4 route] (@ref rte_lpm.h),
- [LPM IPv6 route] (@ref rte_lpm6.h),
- [RIB IPv4] (@ref rte_rib.h),
- [RIB IPv6] (@ref rte_rib6.h),
- [FIB IPv4] (@ref rte_fib.h),
- [FIB IPv6] (@ref rte_fib6.h)
+ [LPM IPv4 route](@ref rte_lpm.h),
+ [LPM IPv6 route](@ref rte_lpm6.h),
+ [RIB IPv4](@ref rte_rib.h),
+ [RIB IPv6](@ref rte_rib6.h),
+ [FIB IPv4](@ref rte_fib.h),
+ [FIB IPv6](@ref rte_fib6.h)
- **hashes**:
- [hash] (@ref rte_hash.h),
- [jhash] (@ref rte_jhash.h),
- [thash] (@ref rte_thash.h),
- [thash_gfni] (@ref rte_thash_gfni.h),
- [FBK hash] (@ref rte_fbk_hash.h),
- [CRC hash] (@ref rte_hash_crc.h)
+ [hash](@ref rte_hash.h),
+ [jhash](@ref rte_jhash.h),
+ [thash](@ref rte_thash.h),
+ [thash_gfni](@ref rte_thash_gfni.h),
+ [FBK hash](@ref rte_fbk_hash.h),
+ [CRC hash](@ref rte_hash_crc.h)
- **classification**
- [reorder] (@ref rte_reorder.h),
- [distributor] (@ref rte_distributor.h),
- [EFD] (@ref rte_efd.h),
- [ACL] (@ref rte_acl.h),
- [member] (@ref rte_member.h),
- [flow classify] (@ref rte_flow_classify.h),
- [BPF] (@ref rte_bpf.h)
+ [reorder](@ref rte_reorder.h),
+ [distributor](@ref rte_distributor.h),
+ [EFD](@ref rte_efd.h),
+ [ACL](@ref rte_acl.h),
+ [member](@ref rte_member.h),
+ [flow classify](@ref rte_flow_classify.h),
+ [BPF](@ref rte_bpf.h)
- **containers**:
- [mbuf] (@ref rte_mbuf.h),
- [mbuf pool ops] (@ref rte_mbuf_pool_ops.h),
- [ring] (@ref rte_ring.h),
- [stack] (@ref rte_stack.h),
- [tailq] (@ref rte_tailq.h),
- [bitmap] (@ref rte_bitmap.h)
+ [mbuf](@ref rte_mbuf.h),
+ [mbuf pool ops](@ref rte_mbuf_pool_ops.h),
+ [ring](@ref rte_ring.h),
+ [stack](@ref rte_stack.h),
+ [tailq](@ref rte_tailq.h),
+ [bitmap](@ref rte_bitmap.h)
- **packet framework**:
- * [port] (@ref rte_port.h):
- [ethdev] (@ref rte_port_ethdev.h),
- [ring] (@ref rte_port_ring.h),
- [frag] (@ref rte_port_frag.h),
- [reass] (@ref rte_port_ras.h),
- [sched] (@ref rte_port_sched.h),
- [kni] (@ref rte_port_kni.h),
- [src/sink] (@ref rte_port_source_sink.h)
- * [table] (@ref rte_table.h):
- [lpm IPv4] (@ref rte_table_lpm.h),
- [lpm IPv6] (@ref rte_table_lpm_ipv6.h),
- [ACL] (@ref rte_table_acl.h),
- [hash] (@ref rte_table_hash.h),
- [array] (@ref rte_table_array.h),
- [stub] (@ref rte_table_stub.h)
- * [pipeline] (@ref rte_pipeline.h)
- [port_in_action] (@ref rte_port_in_action.h)
- [table_action] (@ref rte_table_action.h)
+ * [port](@ref rte_port.h):
+ [ethdev](@ref rte_port_ethdev.h),
+ [ring](@ref rte_port_ring.h),
+ [frag](@ref rte_port_frag.h),
+ [reass](@ref rte_port_ras.h),
+ [sched](@ref rte_port_sched.h),
+ [kni](@ref rte_port_kni.h),
+ [src/sink](@ref rte_port_source_sink.h)
+ * [table](@ref rte_table.h):
+ [lpm IPv4](@ref rte_table_lpm.h),
+ [lpm IPv6](@ref rte_table_lpm_ipv6.h),
+ [ACL](@ref rte_table_acl.h),
+ [hash](@ref rte_table_hash.h),
+ [array](@ref rte_table_array.h),
+ [stub](@ref rte_table_stub.h)
+ * [pipeline](@ref rte_pipeline.h)
+ [port_in_action](@ref rte_port_in_action.h)
+ [table_action](@ref rte_table_action.h)
* SWX pipeline:
- [control] (@ref rte_swx_ctl.h),
- [extern] (@ref rte_swx_extern.h),
- [pipeline] (@ref rte_swx_pipeline.h)
+ [control](@ref rte_swx_ctl.h),
+ [extern](@ref rte_swx_extern.h),
+ [pipeline](@ref rte_swx_pipeline.h)
* SWX port:
- [port] (@ref rte_swx_port.h),
- [ethdev] (@ref rte_swx_port_ethdev.h),
- [fd] (@ref rte_swx_port_fd.h),
- [ring] (@ref rte_swx_port_ring.h),
- [src/sink] (@ref rte_swx_port_source_sink.h)
+ [port](@ref rte_swx_port.h),
+ [ethdev](@ref rte_swx_port_ethdev.h),
+ [fd](@ref rte_swx_port_fd.h),
+ [ring](@ref rte_swx_port_ring.h),
+ [src/sink](@ref rte_swx_port_source_sink.h)
* SWX table:
- [table] (@ref rte_swx_table.h),
- [table_em] (@ref rte_swx_table_em.h)
- [table_wm] (@ref rte_swx_table_wm.h)
- * [graph] (@ref rte_graph.h):
- [graph_worker] (@ref rte_graph_worker.h)
+ [table](@ref rte_swx_table.h),
+ [table_em](@ref rte_swx_table_em.h)
+ [table_wm](@ref rte_swx_table_wm.h)
+ * [graph](@ref rte_graph.h):
+ [graph_worker](@ref rte_graph_worker.h)
* graph_nodes:
- [eth_node] (@ref rte_node_eth_api.h),
- [ip4_node] (@ref rte_node_ip4_api.h)
+ [eth_node](@ref rte_node_eth_api.h),
+ [ip4_node](@ref rte_node_ip4_api.h)
- **basic**:
- [bitops] (@ref rte_bitops.h),
- [approx fraction] (@ref rte_approx.h),
- [random] (@ref rte_random.h),
- [config file] (@ref rte_cfgfile.h),
- [key/value args] (@ref rte_kvargs.h),
- [string] (@ref rte_string_fns.h)
+ [bitops](@ref rte_bitops.h),
+ [approx fraction](@ref rte_approx.h),
+ [random](@ref rte_random.h),
+ [config file](@ref rte_cfgfile.h),
+ [key/value args](@ref rte_kvargs.h),
+ [string](@ref rte_string_fns.h)
- **debug**:
- [jobstats] (@ref rte_jobstats.h),
- [telemetry] (@ref rte_telemetry.h),
- [pcapng] (@ref rte_pcapng.h),
- [pdump] (@ref rte_pdump.h),
- [hexdump] (@ref rte_hexdump.h),
- [debug] (@ref rte_debug.h),
- [log] (@ref rte_log.h),
- [errno] (@ref rte_errno.h),
- [trace] (@ref rte_trace.h),
- [trace_point] (@ref rte_trace_point.h)
+ [jobstats](@ref rte_jobstats.h),
+ [telemetry](@ref rte_telemetry.h),
+ [pcapng](@ref rte_pcapng.h),
+ [pdump](@ref rte_pdump.h),
+ [hexdump](@ref rte_hexdump.h),
+ [debug](@ref rte_debug.h),
+ [log](@ref rte_log.h),
+ [errno](@ref rte_errno.h),
+ [trace](@ref rte_trace.h),
+ [trace_point](@ref rte_trace_point.h)
- **misc**:
- [EAL config] (@ref rte_eal.h),
- [common] (@ref rte_common.h),
- [experimental APIs] (@ref rte_compat.h),
- [ABI versioning] (@ref rte_function_versioning.h),
- [version] (@ref rte_version.h)
+ [EAL config](@ref rte_eal.h),
+ [common](@ref rte_common.h),
+ [experimental APIs](@ref rte_compat.h),
+ [ABI versioning](@ref rte_function_versioning.h),
+ [version](@ref rte_version.h)
--
2.29.3
^ permalink raw reply [relevance 6%]
* [RFC PATCH v1 02/18] dts: merge DTS framework/dut.py to DPDK
@ 2022-04-06 15:04 1% ` Juraj Linkeš
0 siblings, 0 replies; 200+ results
From: Juraj Linkeš @ 2022-04-06 15:04 UTC (permalink / raw)
To: thomas, david.marchand, Honnappa.Nagarahalli, ohilyard, lijuan.tu
Cc: dev, Juraj Linkeš
---
dts/framework/dut.py | 1727 ++++++++++++++++++++++++++++++++++++++++++
1 file changed, 1727 insertions(+)
create mode 100644 dts/framework/dut.py
diff --git a/dts/framework/dut.py b/dts/framework/dut.py
new file mode 100644
index 0000000000..a2a9373448
--- /dev/null
+++ b/dts/framework/dut.py
@@ -0,0 +1,1727 @@
+# BSD LICENSE
+#
+# Copyright(c) 2010-2014 Intel Corporation. All rights reserved.
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+#
+# * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in
+# the documentation and/or other materials provided with the
+# distribution.
+# * Neither the name of Intel Corporation nor the names of its
+# contributors may be used to endorse or promote products derived
+# from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+import os
+import re
+import threading
+import time
+from typing import Dict, List, Optional, Union
+from uuid import uuid4
+
+import framework.settings as settings
+from nics.net_device import GetNicObj
+
+from .config import AppNameConf, PortConf
+from .crb import Crb
+from .exception import ParameterInvalidException
+from .settings import LOG_NAME_SEP, NICS
+from .ssh_connection import SSHConnection
+from .test_result import ResultTable
+from .utils import RED, remove_old_rsa_key
+from .virt_resource import VirtResource
+
+
+class Dut(Crb):
+
+ """
+ A connection to the CRB under test.
+ This class sends commands to the CRB and validates the responses. It is
+ implemented using either ssh for linuxapp or the terminal server for
+ baremetal.
+ All operations are in fact delegated to an instance of either CRBLinuxApp
+ or CRBBareMetal.
+ """
+
+ PORT_MAP_CACHE_KEY = "dut_port_map"
+ PORT_INFO_CACHE_KEY = "dut_port_info"
+ NUMBER_CORES_CACHE_KEY = "dut_number_cores"
+ CORE_LIST_CACHE_KEY = "dut_core_list"
+ PCI_DEV_CACHE_KEY = "dut_pci_dev_info"
+
+ def __init__(self, crb, serializer, dut_id=0, name=None, alt_session=True):
+ if not name:
+ name = "dut" + LOG_NAME_SEP + "%s" % crb["My IP"]
+ self.NAME = name
+ super(Dut, self).__init__(crb, serializer, dut_id, name, alt_session)
+ self.host_init_flag = False
+ self.number_of_cores = 0
+ self.tester = None
+ self.cores = []
+ self.architecture = None
+ self.conf = PortConf()
+ self.ports_map = []
+ self.virt_pool = None
+ # hypervisor pid list, used for cleanup
+ self.virt_pids = []
+ self.prefix_subfix = (
+ str(os.getpid()) + "_" + time.strftime("%Y%m%d%H%M%S", time.localtime())
+ )
+ self.hugepage_path = None
+ self.apps_name_conf = {}
+ self.apps_name = {}
+ self.dpdk_version = ""
+ self.nic = None
+
+ def filter_cores_from_crb_cfg(self):
+ # get core list from crbs.cfg
+ core_list = []
+ all_core_list = [str(core["core"]) for core in self.cores]
+ core_list_str = self.crb["dut_cores"]
+ if core_list_str == "":
+ core_list = all_core_list
+ split_by_comma = core_list_str.split(",")
+ range_cores = []
+ for item in split_by_comma:
+ if "-" in item:
+ tmp = item.split("-")
+ range_cores.extend(
+ [str(i) for i in range(int(tmp[0]), int(tmp[1]) + 1)]
+ )
+ else:
+ core_list.append(item)
+ core_list.extend(range_cores)
+
+ abnormal_core_list = []
+ for core in core_list:
+ if core not in all_core_list:
+ abnormal_core_list.append(core)
+
+ if abnormal_core_list:
+ self.logger.info(
+ "those %s cores are out of range system, all core list of system are %s"
+ % (abnormal_core_list, all_core_list)
+ )
+ raise Exception("configured cores out of range system")
+
+ core_list = [core for core in self.cores if str(core["core"]) in core_list]
+ self.cores = core_list
+ self.number_of_cores = len(self.cores)
+
+ def create_eal_parameters(
+ self,
+ fixed_prefix: bool = False,
+ socket: Optional[int] = None,
+ cores: Union[str, List[int], List[str]] = "default",
+ ports: Union[List[str], List[int]] = None,
+ port_options: Dict[Union[str, int], str] = None,
+ prefix: str = "",
+ no_pci: bool = False,
+ b_ports: Union[List[str], List[int]] = None,
+ vdevs: List[str] = None,
+ other_eal_param: str = "",
+ ) -> str:
+ """
+ generate eal parameters character string;
+ :param fixed_prefix: use fixed file-prefix or not, when it is true,
+ the file-prefix will not be added a timestamp
+ :param socket: the physical CPU socket index, -1 means no care cpu socket;
+ :param cores: set the core info, eg:
+ cores=[0,1,2,3],
+ cores=['0', '1', '2', '3'],
+ cores='default',
+ cores='1S/4C/1T',
+ cores='all';
+ :param ports: set PCI allow list, eg:
+ ports=['0000:1a:00.0', '0000:1a:00.1'],
+ ports=[0, 1];
+ :param port_options: set options of port, eg:
+ port_options={'0000:1a:00.0': "proto_xtr=vlan"},
+ port_options={0: "cap=dcf"};
+ :param prefix: set file prefix string, eg:
+ prefix='vf';
+ :param no_pci: switch of disable PCI bus eg:
+ no_pci=True;
+ :param b_ports: skip probing a PCI device to prevent EAL from using it, eg:
+ b_ports=['0000:1a:00.0'],
+ b_ports=[0];
+ :param vdevs: virtual device list, eg:
+ vdevs=['net_ring0', 'net_ring1'];
+ :param other_eal_param: user defined DPDK eal parameters, eg:
+ other_eal_param='--single-file-segments';
+ :return: eal param string, eg:
+ '-c 0xf -a 0000:88:00.0 --file-prefix=dpdk_1112_20190809143420';
+ if DPDK version < 20.11-rc4, eal_str eg:
+ '-c 0xf -w 0000:88:00.0 --file-prefix=dpdk_1112_20190809143420';
+ """
+ if ports is None:
+ ports = []
+
+ if port_options is None:
+ port_options = {}
+
+ if b_ports is None:
+ b_ports = []
+
+ if vdevs is None:
+ vdevs = []
+
+ if socket is None:
+ socket = -1
+
+ config = {
+ "cores": cores,
+ "ports": ports,
+ "port_options": port_options,
+ "prefix": prefix,
+ "no_pci": no_pci,
+ "b_ports": b_ports,
+ "vdevs": vdevs,
+ "other_eal_param": other_eal_param,
+ }
+
+ eal_parameter_creator = _EalParameter(
+ dut=self, fixed_prefix=fixed_prefix, socket=socket, **config
+ )
+ eal_str = eal_parameter_creator.make_eal_param()
+
+ return eal_str
+
+ def get_eal_of_prefix(self, prefix=None):
+
+ if prefix:
+ file_prefix = [
+ prefix_name for prefix_name in self.prefix_list if prefix in prefix_name
+ ]
+ else:
+ file_prefix = "dpdk" + "_" + self.prefix_subfix
+
+ return file_prefix
+
+ def init_host_session(self, vm_name):
+ """
+ Create session for each VM, session will be handled by VM instance
+ """
+ self.host_session = SSHConnection(
+ self.get_ip_address(),
+ vm_name + "_host",
+ self.get_username(),
+ self.get_password(),
+ )
+ self.host_session.init_log(self.logger)
+ self.logger.info(
+ "[%s] create new session for VM" % (threading.current_thread().name)
+ )
+
+ def new_session(self, suite=""):
+ """
+ Create new session for dut instance. Session name will be unique.
+ """
+ if len(suite):
+ session_name = self.NAME + "_" + suite
+ else:
+ session_name = self.NAME + "_" + str(uuid4())
+ session = self.create_session(name=session_name)
+ if suite != "":
+ session.logger.config_suite(suite, self.NAME)
+ else:
+ session.logger.config_execution(self.NAME)
+
+ if getattr(self, "base_dir", None):
+ session.send_expect("cd %s" % self.base_dir, "# ")
+
+ return session
+
+ def close_session(self, session):
+ """
+ close new session in dut instance
+ """
+ self.destroy_session(session)
+
+ def change_config_option(self, target, parameter, value):
+ """
+ This function change option in the config file
+ """
+ self.send_expect(
+ "sed -i 's/%s=.*$/%s=%s/' config/defconfig_%s"
+ % (parameter, parameter, value, target),
+ "# ",
+ )
+
+ def set_nic_type(self, nic_type):
+ """
+ Set CRB NICS ready to validated.
+ """
+ self.nic_type = nic_type
+ if "cfg" in nic_type:
+ self.conf.load_ports_config(self.get_ip_address())
+
+ def set_toolchain(self, target):
+ """
+ This looks at the current target and instantiates an attribute to
+ be either a CRBLinuxApp or CRBBareMetal object. These latter two
+ classes are private and should not be used directly by client code.
+ """
+ self.kill_all()
+ self.target = target
+ [arch, _, _, toolchain] = target.split("-")
+
+ if toolchain == "icc":
+ icc_vars = os.getenv("ICC_VARS", "/opt/intel/composer_xe_2013/bin/")
+ icc_vars += "compilervars.sh"
+
+ if arch == "x86_64":
+ icc_arch = "intel64"
+ elif arch == "i686":
+ icc_arch = "ia32"
+ self.send_expect("source " + icc_vars + " " + icc_arch, "# ")
+
+ self.architecture = arch
+
+ def mount_procfs(self):
+ """
+ Mount proc file system.
+ """
+ mount_procfs = getattr(self, "mount_procfs_%s" % self.get_os_type())
+ mount_procfs()
+
+ def mount_procfs_linux(self):
+ pass
+
+ def mount_procfs_freebsd(self):
+ """
+ Mount proc file system in Freebsd.
+ """
+ self.send_expect("mount -t procfs proc /proc", "# ")
+
+ def get_ip_address(self):
+ """
+ Get DUT's ip address.
+ """
+ return self.crb["IP"]
+
+ def get_password(self):
+ """
+ Get DUT's login password.
+ """
+ return self.crb["pass"]
+
+ def get_username(self):
+ """
+ Get DUT's login username.
+ """
+ return self.crb["user"]
+
+ def dut_prerequisites(self):
+ """
+ Prerequest function should be called before execute any test case.
+ Will call function to scan all lcore's information which on DUT.
+ Then call pci scan function to collect nic device information.
+ At last setup DUT' environment for validation.
+ """
+ out = self.send_expect("cd %s" % self.base_dir, "# ")
+ assert "No such file or directory" not in out, "Can't switch to dpdk folder!!!"
+ out = self.send_expect("cat VERSION", "# ")
+ if "No such file or directory" in out:
+ self.logger.error("Can't get DPDK version due to VERSION not exist!!!")
+ else:
+ self.dpdk_version = out
+ self.send_expect("alias ls='ls --color=none'", "#")
+
+ if self.get_os_type() == "freebsd":
+ self.send_expect("alias make=gmake", "# ")
+ self.send_expect("alias sed=gsed", "# ")
+
+ self.init_core_list()
+ self.filter_cores_from_crb_cfg()
+ self.pci_devices_information()
+ # make sure ipv6 enable before scan
+ self.enable_tester_ipv6()
+ # scan ports before restore interface
+ self.scan_ports()
+ # restore dut ports to kernel
+ self.restore_interfaces()
+ # rescan ports after interface up
+ self.rescan_ports()
+ # load port information from config file
+ self.load_portconf()
+ self.mount_procfs()
+ # auto detect network topology
+ self.map_available_ports()
+ # disable tester port ipv6
+ self.disable_tester_ipv6()
+ self.get_nic_configurations()
+
+ # print latest ports_info
+ for port_info in self.ports_info:
+ self.logger.info(port_info)
+
+ if self.ports_map is None or len(self.ports_map) == 0:
+ self.logger.warning("ports_map should not be empty, please check all links")
+
+ # initialize virtualization resource pool
+ self.virt_pool = VirtResource(self)
+
+ # load app name conf
+ name_cfg = AppNameConf()
+ self.apps_name_conf = name_cfg.load_app_name_conf()
+
+ def get_nic_configurations(self):
+ retry_times = 3
+ if self.ports_info:
+ self.nic = self.ports_info[0]["port"]
+ self.nic.get_driver_firmware()
+ if self.nic.default_driver == "ice":
+ self.get_nic_pkg(retry_times)
+
+ def get_nic_pkg(self, retry_times=3):
+ self.nic.pkg = self.nic.get_nic_pkg()
+ while not self.nic.pkg.get("type") and retry_times > 0:
+ self.restore_interfaces()
+ self.nic.pkg = self.nic.get_nic_pkg()
+ retry_times = retry_times - 1
+ self.logger.info("pkg: {}".format(self.nic.pkg))
+ if not self.nic.pkg:
+ raise Exception("Get nic pkg failed")
+
+ def restore_interfaces(self):
+ """
+ Restore all ports's interfaces.
+ """
+ # no need to restore for all info has been recorded
+ if self.read_cache:
+ return
+
+ restore_interfaces = getattr(self, "restore_interfaces_%s" % self.get_os_type())
+ return restore_interfaces()
+
+ def restore_interfaces_freebsd(self):
+ """
+ Restore FreeBSD interfaces.
+ """
+ self.send_expect("kldunload nic_uio.ko", "#")
+ self.send_expect("kldunload contigmem.ko", "#")
+ self.send_expect("kldload if_ixgbe.ko", "#", 20)
+
+ def stop_ports(self):
+ """
+ After all execution done, the nic should be stop
+ """
+ for (pci_bus, pci_id) in self.pci_devices_info:
+ driver = settings.get_nic_driver(pci_id)
+ if driver is not None:
+ # unbind device driver
+ addr_array = pci_bus.split(":")
+ domain_id = addr_array[0]
+ bus_id = addr_array[1]
+ devfun_id = addr_array[2]
+ port = GetNicObj(self, domain_id, bus_id, devfun_id)
+ port.stop()
+
+ def restore_interfaces_linux(self):
+ """
+ Restore Linux interfaces.
+ """
+ for port in self.ports_info:
+ pci_bus = port["pci"]
+ pci_id = port["type"]
+ # get device driver
+ driver = settings.get_nic_driver(pci_id)
+ if driver is not None:
+ # unbind device driver
+ addr_array = pci_bus.split(":")
+ domain_id = addr_array[0]
+ bus_id = addr_array[1]
+ devfun_id = addr_array[2]
+
+ port = GetNicObj(self, domain_id, bus_id, devfun_id)
+
+ self.send_expect(
+ "echo %s > /sys/bus/pci/devices/%s\:%s\:%s/driver/unbind"
+ % (pci_bus, domain_id, bus_id, devfun_id),
+ "# ",
+ timeout=30,
+ )
+ # bind to linux kernel driver
+ self.send_expect("modprobe %s" % driver, "# ")
+ self.send_expect(
+ "echo %s > /sys/bus/pci/drivers/%s/bind" % (pci_bus, driver), "# "
+ )
+ pull_retries = 5
+ itf = "N/A"
+ while pull_retries > 0:
+ itf = port.get_interface_name()
+ if not itf or itf == "N/A":
+ time.sleep(1)
+ pull_retries -= 1
+ else:
+ break
+ else:
+ # try to bind nic with iavf
+ if driver == "iavf":
+ self.send_expect("modprobe %s" % driver, "# ")
+ self.send_expect(
+ "echo %s > /sys/bus/pci/drivers/%s/bind"
+ % (pci_bus, driver),
+ "# ",
+ )
+ pull_retries = 5
+ itf = "N/A"
+ while pull_retries > 0:
+ itf = port.get_interface_name()
+ if not itf or itf == "N/A":
+ time.sleep(1)
+ pull_retries -= 1
+ else:
+ break
+ if itf == "N/A":
+ self.logger.warning("Fail to bind the device with the linux driver")
+ else:
+ self.send_expect("ifconfig %s up" % itf, "# ")
+ else:
+ self.logger.info(
+ "NOT FOUND DRIVER FOR PORT (%s|%s)!!!" % (pci_bus, pci_id)
+ )
+
+ def setup_memory(self, hugepages=-1):
+ """
+ Setup hugepage on DUT.
+ """
+ try:
+ function_name = "setup_memory_%s" % self.get_os_type()
+ setup_memory = getattr(self, function_name)
+ setup_memory(hugepages)
+ except AttributeError:
+ self.logger.error("%s is not implemented" % function_name)
+
+ def get_def_rte_config(self, config):
+ """
+ Get RTE configuration from config/defconfig_*.
+ """
+ out = self.send_expect(
+ "cat config/defconfig_%s | sed '/^#/d' | sed '/^\s*$/d'" % self.target, "# "
+ )
+
+ def_rte_config = re.findall(config + "=(\S+)", out)
+ if def_rte_config:
+ return def_rte_config[0]
+ else:
+ return None
+
+ def setup_memory_linux(self, hugepages=-1):
+ """
+ Setup Linux hugepages.
+ """
+ if self.virttype == "XEN":
+ return
+ hugepages_size = self.send_expect(
+ "awk '/Hugepagesize/ {print $2}' /proc/meminfo", "# "
+ )
+ total_huge_pages = self.get_total_huge_pages()
+ numa_nodes = self.send_expect("ls /sys/devices/system/node | grep node*", "# ")
+ if not numa_nodes:
+ total_numa_nodes = -1
+ else:
+ numa_nodes = numa_nodes.splitlines()
+ total_numa_nodes = len(numa_nodes)
+ self.logger.info(numa_nodes)
+
+ force_socket = False
+
+ if int(hugepages_size) < (1024 * 1024):
+ if self.architecture == "x86_64":
+ arch_huge_pages = hugepages if hugepages > 0 else 4096
+ elif self.architecture == "i686":
+ arch_huge_pages = hugepages if hugepages > 0 else 512
+ force_socket = True
+ # set huge pagesize for x86_x32 abi target
+ elif self.architecture == "x86_x32":
+ arch_huge_pages = hugepages if hugepages > 0 else 256
+ force_socket = True
+ elif self.architecture == "ppc_64":
+ arch_huge_pages = hugepages if hugepages > 0 else 512
+ elif self.architecture == "arm64":
+ if int(hugepages_size) >= (512 * 1024):
+ arch_huge_pages = hugepages if hugepages > 0 else 8
+ else:
+ arch_huge_pages = hugepages if hugepages > 0 else 2048
+
+ if total_huge_pages != arch_huge_pages:
+ if total_numa_nodes == -1:
+ self.set_huge_pages(arch_huge_pages)
+ else:
+ # before all hugepage average distribution by all socket,
+ # but sometimes create mbuf pool on socket 0 failed when
+ # setup testpmd, so set all huge page on first socket
+ if force_socket:
+ self.set_huge_pages(arch_huge_pages, numa_nodes[0])
+ self.logger.info("force_socket on %s" % numa_nodes[0])
+ else:
+ numa_service_num = self.get_def_rte_config(
+ "CONFIG_RTE_MAX_NUMA_NODES"
+ )
+ if numa_service_num is not None:
+ total_numa_nodes = min(
+ total_numa_nodes, int(numa_service_num)
+ )
+
+ # set huge pages to configured total_numa_nodes
+ for numa_node in numa_nodes[:total_numa_nodes]:
+ self.set_huge_pages(arch_huge_pages, numa_node)
+
+ self.mount_huge_pages()
+ self.hugepage_path = self.strip_hugepage_path()
+
+ def setup_memory_freebsd(self, hugepages=-1):
+ """
+ Setup Freebsd hugepages.
+ """
+ if hugepages == -1:
+ hugepages = 4096
+
+ num_buffers = hugepages / 1024
+ if num_buffers:
+ self.send_expect("kenv hw.contigmem.num_buffers=%d" % num_buffers, "#")
+
+ self.send_expect("kldunload contigmem.ko", "#")
+ self.send_expect("kldload ./%s/kmod/contigmem.ko" % self.target, "#")
+
+ def taskset(self, core):
+ if self.get_os_type() != "linux":
+ return ""
+
+ return "taskset %s " % core
+
+ def is_ssh_session_port(self, pci_bus):
+ """
+ Check if the pci device is the dut SSH session port.
+ """
+ port = None
+ for port_info in self.ports_info:
+ if pci_bus == port_info["pci"]:
+ port = port_info["port"]
+ break
+ if port and port.get_ipv4_addr() == self.get_ip_address().strip():
+ return True
+ else:
+ return False
+
+ def get_dpdk_bind_script(self):
+ op = self.send_expect("ls", "#")
+ if "usertools" in op:
+ res = "usertools/dpdk-devbind.py"
+ else:
+ op = self.send_expect("ls tools", "#")
+ if "dpdk_nic_bind.py" in op:
+ res = "tools/dpdk_nic_bind.py"
+ else:
+ res = "tools/dpdk-devbind.py"
+ return res
+
+ def bind_interfaces_linux(self, driver="igb_uio", nics_to_bind=None):
+ """
+ Bind the interfaces to the selected driver. nics_to_bind can be None
+ to bind all interfaces or an array with the port indexes
+ """
+
+ binding_list = "--bind=%s " % driver
+
+ current_nic = 0
+ for (pci_bus, pci_id) in self.pci_devices_info:
+ if settings.accepted_nic(pci_id):
+ if self.is_ssh_session_port(pci_bus):
+ continue
+
+ if nics_to_bind is None or current_nic in nics_to_bind:
+ binding_list += "%s " % (pci_bus)
+
+ current_nic += 1
+ if current_nic == 0:
+ self.logger.info("Not nic need bind driver: %s" % driver)
+ return
+ bind_script_path = self.get_dpdk_bind_script()
+ self.send_expect("%s --force %s" % (bind_script_path, binding_list), "# ")
+
+ def unbind_interfaces_linux(self, nics_to_bind=None):
+ """
+ Unbind the interfaces.
+ """
+
+ binding_list = "-u "
+
+ current_nic = 0
+ for (pci_bus, pci_id) in self.pci_devices_info:
+ if settings.accepted_nic(pci_id):
+ if self.is_ssh_session_port(pci_bus):
+ continue
+
+ if nics_to_bind is None or current_nic in nics_to_bind:
+ binding_list += "%s " % (pci_bus)
+
+ current_nic += 1
+
+ if current_nic == 0:
+ self.logger.info("Not nic need unbind driver")
+ return
+
+ bind_script_path = self.get_dpdk_bind_script()
+ self.send_expect("%s --force %s" % (bind_script_path, binding_list), "# ")
+
+ def bind_eventdev_port(self, driver="vfio-pci", port_to_bind=None):
+ """
+ Bind the eventdev interfaces to the selected driver. port_to_bind set to default, can be
+ changed at run time
+ """
+
+ binding_list = "--bind=%s %s" % (driver, port_to_bind)
+ bind_script_path = self.get_dpdk_bind_script()
+ self.send_expect("%s --force %s" % (bind_script_path, binding_list), "# ")
+
+ def set_eventdev_port_limits(self, device_id, port):
+ """
+ Setting the eventdev port SSO and SS0W limits.
+ """
+
+ bind_script_path = self.get_dpdk_bind_script()
+ eventdev_ports = self.send_expect(
+ '%s -s |grep -e %s | cut -d " " -f1' % (bind_script_path, device_id), "#"
+ )
+ eventdev_ports = eventdev_ports.split("\r\n")
+ for eventdev_port in eventdev_ports:
+ self.send_expect(
+ "echo 0 > /sys/bus/pci/devices/%s/limits/sso" % (eventdev_port), "#"
+ )
+ self.send_expect(
+ "echo 0 > /sys/bus/pci/devices/%s/limits/ssow" % (eventdev_port), "#"
+ )
+ for eventdev_port in eventdev_ports:
+ if eventdev_port == port:
+ self.send_expect(
+ "echo 1 > /sys/bus/pci/devices/%s/limits/tim" % (eventdev_port),
+ "#",
+ )
+ self.send_expect(
+ "echo 1 > /sys/bus/pci/devices/%s/limits/npa" % (eventdev_port),
+ "#",
+ )
+ self.send_expect(
+ "echo 10 > /sys/bus/pci/devices/%s/limits/sso" % (eventdev_port),
+ "#",
+ )
+ self.send_expect(
+ "echo 32 > /sys/bus/pci/devices/%s/limits/ssow" % (eventdev_port),
+ "#",
+ )
+
+ def unbind_eventdev_port(self, port_to_unbind=None):
+ """
+ Unbind the eventdev interfaces to the selected driver. port_to_unbind set to None, can be
+ changed at run time
+ """
+
+ binding_list = "-u %s" % (port_to_unbind)
+ bind_script_path = self.get_dpdk_bind_script()
+ self.send_expect("%s %s" % (bind_script_path, binding_list), "# ")
+
+ def get_ports(self, nic_type="any", perf=None, socket=None):
+ """
+ Return DUT port list with the filter of NIC type, whether run IXIA
+ performance test, whether request specified socket.
+ """
+ ports = []
+ candidates = []
+
+ nictypes = []
+ if nic_type == "any":
+ for portid in range(len(self.ports_info)):
+ ports.append(portid)
+ return ports
+ elif nic_type == "cfg":
+ for portid in range(len(self.ports_info)):
+ if self.ports_info[portid]["source"] == "cfg":
+ if (
+ socket is None
+ or self.ports_info[portid]["numa"] == -1
+ or socket == self.ports_info[portid]["numa"]
+ ):
+ ports.append(portid)
+ return ports
+ else:
+ for portid in range(len(self.ports_info)):
+ port_info = self.ports_info[portid]
+ # match nic type
+ if port_info["type"] == NICS[nic_type]:
+ # match numa or none numa awareness
+ if (
+ socket is None
+ or port_info["numa"] == -1
+ or socket == port_info["numa"]
+ ):
+ # port has link,
+ if self.tester.get_local_port(portid) != -1:
+ ports.append(portid)
+ return ports
+
+ def get_ports_performance(
+ self,
+ nic_type="any",
+ perf=None,
+ socket=None,
+ force_same_socket=True,
+ force_different_nic=True,
+ ):
+ """
+ Return the maximum available number of ports meeting the parameters.
+ Focuses on getting ports with same/different NUMA node and/or
+ same/different NIC.
+ """
+
+ available_ports = self.get_ports(nic_type, perf, socket)
+ accepted_sets = []
+
+ while len(available_ports) > 0:
+ accepted_ports = []
+ # first available port is the reference port
+ accepted_ports.append(available_ports[0])
+
+ # check from second port according to parameter
+ for port in available_ports[1:]:
+
+ if force_same_socket and socket is None:
+ if (
+ self.ports_info[port]["numa"]
+ != self.ports_info[accepted_ports[0]]["numa"]
+ ):
+ continue
+ if force_different_nic:
+ if (
+ self.ports_info[port]["pci"][:-1]
+ == self.ports_info[accepted_ports[0]]["pci"][:-1]
+ ):
+ continue
+
+ accepted_ports.append(port)
+
+ for port in accepted_ports:
+ available_ports.remove(port)
+
+ accepted_sets.append(accepted_ports)
+
+ biggest_set = max(accepted_sets, key=lambda s: len(s))
+
+ return biggest_set
+
+ def get_peer_pci(self, port_num):
+ """
+ return the peer pci address of dut port
+ """
+ if "peer" not in self.ports_info[port_num]:
+ return None
+ else:
+ return self.ports_info[port_num]["peer"]
+
+ def get_mac_address(self, port_num):
+ """
+ return the port mac on dut
+ """
+ return self.ports_info[port_num]["mac"]
+
+ def get_ipv6_address(self, port_num):
+ """
+ return the IPv6 address on dut
+ """
+ return self.ports_info[port_num]["ipv6"]
+
+ def get_numa_id(self, port_num):
+ """
+ return the Numa Id of port
+ """
+ if self.ports_info[port_num]["numa"] == -1:
+ self.logger.warning("NUMA not supported")
+
+ return self.ports_info[port_num]["numa"]
+
+ def lcore_table_print(self, horizontal=False):
+ if not horizontal:
+ result_table = ResultTable(["Socket", "Core", "Thread"])
+
+ for lcore in self.cores:
+ result_table.add_row([lcore["socket"], lcore["core"], lcore["thread"]])
+ result_table.table_print()
+ else:
+ result_table = ResultTable(["X"] + [""] * len(self.cores))
+ result_table.add_row(["Thread"] + [n["thread"] for n in self.cores])
+ result_table.add_row(["Core"] + [n["core"] for n in self.cores])
+ result_table.add_row(["Socket"] + [n["socket"] for n in self.cores])
+ result_table.table_print()
+
+ def get_memory_channels(self):
+ n = self.crb["memory channels"]
+ if n is not None and n > 0:
+ return n
+ else:
+ return 1
+
+ def check_ports_available(self, pci_bus, pci_id):
+ """
+ Check that whether auto scanned ports ready to use
+ """
+ pci_addr = "%s:%s" % (pci_bus, pci_id)
+ if self.nic_type == "any":
+ return True
+ elif self.nic_type == "cfg":
+ if self.conf.check_port_available(pci_bus) is True:
+ return True
+ elif self.nic_type not in list(NICS.keys()):
+ self.logger.warning("NOT SUPPORTED NIC TYPE: %s" % self.nic_type)
+ else:
+ codename = NICS[self.nic_type]
+ if pci_id == codename:
+ return True
+
+ return False
+
+ def rescan_ports(self):
+ """
+ Rescan ports information
+ """
+ if self.read_cache:
+ return
+
+ if self.ports_info:
+ self.rescan_ports_uncached()
+ self.save_serializer_ports()
+
+ def rescan_ports_uncached(self):
+ """
+ rescan ports and update port's mac address, intf, ipv6 address.
+ """
+ rescan_ports_uncached = getattr(
+ self, "rescan_ports_uncached_%s" % self.get_os_type()
+ )
+ return rescan_ports_uncached()
+
+ def rescan_ports_uncached_linux(self):
+ unknow_interface = RED("Skipped: unknow_interface")
+
+ for port_info in self.ports_info:
+ port = port_info["port"]
+ intf = port.get_interface_name()
+ port_info["intf"] = intf
+ out = self.send_expect("ip link show %s" % intf, "# ")
+ if "DOWN" in out:
+ self.send_expect("ip link set %s up" % intf, "# ")
+ time.sleep(5)
+ port_info["mac"] = port.get_mac_addr()
+ out = self.send_expect(
+ "ip -family inet6 address show dev %s | awk '/inet6/ { print $2 }'"
+ % intf,
+ "# ",
+ )
+ ipv6 = out.split("/")[0]
+ # Unconnected ports don't have IPv6
+ if ":" not in ipv6:
+ ipv6 = "Not connected"
+
+ out = self.send_expect(
+ "ip -family inet address show dev %s | awk '/inet/ { print $2 }'"
+ % intf,
+ "# ",
+ )
+ ipv4 = out.split("/")[0]
+
+ port_info["ipv6"] = ipv6
+ port_info["ipv4"] = ipv4
+
+ def rescan_ports_uncached_freebsd(self):
+ unknow_interface = RED("Skipped: unknow_interface")
+
+ for port_info in self.ports_info:
+ port = port_info["port"]
+ intf = port.get_interface_name()
+ if "No such file" in intf:
+ self.logger.info("DUT: [%s] %s" % (port_info["pci"], unknow_interface))
+ continue
+ self.send_expect("ifconfig %s up" % intf, "# ")
+ time.sleep(5)
+ macaddr = port.get_mac_addr()
+ ipv6 = port.get_ipv6_addr()
+ # Unconnected ports don't have IPv6
+ if ipv6 is None:
+ ipv6 = "Not connected"
+
+ port_info["mac"] = macaddr
+ port_info["intf"] = intf
+ port_info["ipv6"] = ipv6
+
+ def load_serializer_ports(self):
+ cached_ports_info = self.serializer.load(self.PORT_INFO_CACHE_KEY)
+ if cached_ports_info is None:
+ return None
+
+ self.ports_info = cached_ports_info
+
+ def save_serializer_ports(self):
+ cached_ports_info = []
+ for port in self.ports_info:
+ port_info = {}
+ for key in list(port.keys()):
+ if type(port[key]) is str:
+ port_info[key] = port[key]
+ cached_ports_info.append(port_info)
+ self.serializer.save(self.PORT_INFO_CACHE_KEY, cached_ports_info)
+
+ def scan_ports(self):
+ """
+ Scan ports information or just read it from cache file.
+ """
+ if self.read_cache:
+ self.load_serializer_ports()
+ self.scan_ports_cached()
+
+ if not self.read_cache or self.ports_info is None:
+ self.scan_ports_uncached()
+
+ def scan_ports_cached(self):
+ """
+ Scan cached ports, instantiate tester port
+ """
+ scan_ports_cached = getattr(self, "scan_ports_cached_%s" % self.get_os_type())
+ return scan_ports_cached()
+
+ def scan_ports_cached_linux(self):
+ """
+ Scan Linux ports and instantiate tester port
+ """
+ if self.ports_info is None:
+ return
+
+ for port_info in self.ports_info:
+ addr_array = port_info["pci"].split(":")
+ domain_id = addr_array[0]
+ bus_id = addr_array[1]
+ devfun_id = addr_array[2]
+
+ port = GetNicObj(self, domain_id, bus_id, devfun_id)
+ port_info["port"] = port
+
+ self.logger.info(
+ "DUT cached: [%s %s] %s"
+ % (port_info["pci"], port_info["type"], port_info["intf"])
+ )
+
+ def scan_ports_uncached(self):
+ """
+ Scan ports and collect port's pci id, mac address, ipv6 address.
+ """
+ scan_ports_uncached = getattr(
+ self, "scan_ports_uncached_%s" % self.get_os_type()
+ )
+ return scan_ports_uncached()
+
+ def scan_ports_uncached_linux(self):
+ """
+ Scan Linux ports and collect port's pci id, mac address, ipv6 address.
+ """
+ self.ports_info = []
+
+ skipped = RED("Skipped: Unknown/not selected")
+ unknow_interface = RED("Skipped: unknow_interface")
+
+ for (pci_bus, pci_id) in self.pci_devices_info:
+ if self.check_ports_available(pci_bus, pci_id) is False:
+ self.logger.info("DUT: [%s %s] %s" % (pci_bus, pci_id, skipped))
+ continue
+
+ addr_array = pci_bus.split(":")
+ domain_id = addr_array[0]
+ bus_id = addr_array[1]
+ devfun_id = addr_array[2]
+
+ port = GetNicObj(self, domain_id, bus_id, devfun_id)
+ intf = port.get_interface_name()
+ if "No such file" in intf:
+ self.logger.info("DUT: [%s] %s" % (pci_bus, unknow_interface))
+ continue
+
+ macaddr = port.get_mac_addr()
+ if "No such file" in intf:
+ self.logger.info("DUT: [%s] %s" % (pci_bus, unknow_interface))
+ continue
+
+ numa = port.socket
+ # store the port info to port mapping
+ self.ports_info.append(
+ {
+ "port": port,
+ "pci": pci_bus,
+ "type": pci_id,
+ "numa": numa,
+ "intf": intf,
+ "mac": macaddr,
+ }
+ )
+
+ if not port.get_interface2_name():
+ continue
+
+ intf = port.get_interface2_name()
+ macaddr = port.get_intf2_mac_addr()
+ numa = port.socket
+ # store the port info to port mapping
+ self.ports_info.append(
+ {
+ "port": port,
+ "pci": pci_bus,
+ "type": pci_id,
+ "numa": numa,
+ "intf": intf,
+ "mac": macaddr,
+ }
+ )
+
+ def scan_ports_uncached_freebsd(self):
+ """
+ Scan Freebsd ports and collect port's pci id, mac address, ipv6 address.
+ """
+ self.ports_info = []
+
+ skipped = RED("Skipped: Unknown/not selected")
+
+ for (pci_bus, pci_id) in self.pci_devices_info:
+
+ if not settings.accepted_nic(pci_id):
+ self.logger.info("DUT: [%s %s] %s" % (pci_bus, pci_id, skipped))
+ continue
+ addr_array = pci_bus.split(":")
+ domain_id = addr_array[0]
+ bus_id = addr_array[1]
+ devfun_id = addr_array[2]
+ port = GetNicObj(self, domain_id, bus_id, devfun_id)
+ port.pci_id = pci_id
+ port.name = settings.get_nic_name(pci_id)
+ port.default_driver = settings.get_nic_driver(pci_id)
+ intf = port.get_interface_name()
+
+ macaddr = port.get_mac_addr()
+ ipv6 = port.get_ipv6_addr()
+
+ if ipv6 is None:
+ ipv6 = "Not available"
+
+ self.logger.warning("NUMA not available on FreeBSD")
+
+ self.logger.info("DUT: [%s %s] %s %s" % (pci_bus, pci_id, intf, ipv6))
+
+ # convert bsd format to linux format
+ pci_split = pci_bus.split(":")
+ pci_bus_id = hex(int(pci_split[0]))[2:]
+ if len(pci_split[1]) == 1:
+ pci_dev_str = "0" + pci_split[1]
+ else:
+ pci_dev_str = pci_split[1]
+
+ pci_str = "%s:%s.%s" % (pci_bus_id, pci_dev_str, pci_split[2])
+
+ # store the port info to port mapping
+ self.ports_info.append(
+ {
+ "port": port,
+ "pci": pci_str,
+ "type": pci_id,
+ "intf": intf,
+ "mac": macaddr,
+ "ipv6": ipv6,
+ "numa": -1,
+ }
+ )
+
+ def setup_virtenv(self, virttype):
+ """
+ Setup current virtualization hypervisor type and remove elder VM ssh keys
+ """
+ self.virttype = virttype
+ # remove VM rsa keys from tester
+ remove_old_rsa_key(self.tester, self.crb["My IP"])
+
+ def generate_sriov_vfs_by_port(self, port_id, vf_num, driver="default"):
+ """
+ Generate SRIOV VFs with default driver it is bound now or specified driver.
+ """
+ port = self.ports_info[port_id]["port"]
+ port_driver = port.get_nic_driver()
+
+ if driver == "default":
+ if not port_driver:
+ self.logger.info(
+ "No driver on specified port, can not generate SRIOV VF."
+ )
+ return None
+ else:
+ if port_driver != driver:
+ port.bind_driver(driver)
+ port.generate_sriov_vfs(vf_num)
+
+ # append the VF PCIs into the ports_info
+ sriov_vfs_pci = port.get_sriov_vfs_pci()
+ self.ports_info[port_id]["sriov_vfs_pci"] = sriov_vfs_pci
+
+ # instantiate the VF
+ vfs_port = []
+ for vf_pci in sriov_vfs_pci:
+ addr_array = vf_pci.split(":")
+ domain_id = addr_array[0]
+ bus_id = addr_array[1]
+ devfun_id = addr_array[2]
+ vf_port = GetNicObj(self, domain_id, bus_id, devfun_id)
+ vfs_port.append(vf_port)
+ self.ports_info[port_id]["vfs_port"] = vfs_port
+
+ pci = self.ports_info[port_id]["pci"]
+ self.virt_pool.add_vf_on_pf(pf_pci=pci, vflist=sriov_vfs_pci)
+
+ def destroy_sriov_vfs_by_port(self, port_id):
+ port = self.ports_info[port_id]["port"]
+ vflist = []
+ port_driver = port.get_nic_driver()
+ if (
+ "sriov_vfs_pci" in self.ports_info[port_id]
+ and self.ports_info[port_id]["sriov_vfs_pci"]
+ ):
+ vflist = self.ports_info[port_id]["sriov_vfs_pci"]
+ else:
+ if not port.get_sriov_vfs_pci():
+ return
+
+ if not port_driver:
+ self.logger.info("No driver on specified port, skip destroy SRIOV VF.")
+ else:
+ sriov_vfs_pci = port.destroy_sriov_vfs()
+ self.ports_info[port_id]["sriov_vfs_pci"] = []
+ self.ports_info[port_id]["vfs_port"] = []
+
+ pci = self.ports_info[port_id]["pci"]
+ self.virt_pool.del_vf_on_pf(pf_pci=pci, vflist=vflist)
+
+ def destroy_all_sriov_vfs(self):
+
+ if self.ports_info == None:
+ return
+ for port_id in range(len(self.ports_info)):
+ self.destroy_sriov_vfs_by_port(port_id)
+
+ def load_portconf(self):
+ """
+ Load port configurations for ports_info. If manually configured info
+ not same as auto scanned, still use information in configuration file.
+ """
+ for port in self.ports_info:
+ pci_bus = port["pci"]
+ ports_cfg = self.conf.get_ports_config()
+ if pci_bus in ports_cfg:
+ port_cfg = ports_cfg[pci_bus]
+ port_cfg["source"] = "cfg"
+ else:
+ port_cfg = {}
+
+ for key in ["intf", "mac", "peer", "source"]:
+ if key in port_cfg:
+ if key in port and port_cfg[key].lower() != port[key].lower():
+ self.logger.warning(
+ "CONFIGURED %s NOT SAME AS SCANNED!!!" % (key.upper())
+ )
+ port[key] = port_cfg[key].lower()
+ if "numa" in port_cfg:
+ if port_cfg["numa"] != port["numa"]:
+ self.logger.warning("CONFIGURED NUMA NOT SAME AS SCANNED!!!")
+ port["numa"] = port_cfg["numa"]
+
+ def map_available_ports(self):
+ """
+ Load or generate network connection mapping list.
+ """
+ if self.read_cache:
+ self.ports_map = self.serializer.load(self.PORT_MAP_CACHE_KEY)
+
+ if not self.read_cache or self.ports_map is None:
+ self.map_available_ports_uncached()
+ self.serializer.save(self.PORT_MAP_CACHE_KEY, self.ports_map)
+
+ self.logger.warning("DUT PORT MAP: " + str(self.ports_map))
+
+ def map_available_ports_uncached(self):
+ """
+ Generate network connection mapping list.
+ """
+ nrPorts = len(self.ports_info)
+ if nrPorts == 0:
+ return
+
+ remove = []
+ self.ports_map = [-1] * nrPorts
+
+ hits = [False] * len(self.tester.ports_info)
+
+ for dutPort in range(nrPorts):
+ peer = self.get_peer_pci(dutPort)
+ dutpci = self.ports_info[dutPort]["pci"]
+ if peer is not None:
+ for remotePort in range(len(self.tester.ports_info)):
+ if self.tester.ports_info[remotePort]["type"].lower() == "trex":
+ if (
+ self.tester.ports_info[remotePort]["intf"].lower()
+ == peer.lower()
+ or self.tester.ports_info[remotePort]["pci"].lower()
+ == peer.lower()
+ ):
+ hits[remotePort] = True
+ self.ports_map[dutPort] = remotePort
+ break
+ elif (
+ self.tester.ports_info[remotePort]["pci"].lower()
+ == peer.lower()
+ ):
+ hits[remotePort] = True
+ self.ports_map[dutPort] = remotePort
+ break
+ if self.ports_map[dutPort] == -1:
+ self.logger.error("CONFIGURED TESTER PORT CANNOT BE FOUND!!!")
+ else:
+ continue # skip ping6 map
+
+ for remotePort in range(len(self.tester.ports_info)):
+ if hits[remotePort]:
+ continue
+
+ # skip ping self port
+ remotepci = self.tester.ports_info[remotePort]["pci"]
+ if (self.crb["IP"] == self.crb["tester IP"]) and (dutpci == remotepci):
+ continue
+
+ # skip ping those not connected port
+ ipv6 = self.get_ipv6_address(dutPort)
+ if ipv6 == "Not connected":
+ if "ipv4" in self.tester.ports_info[remotePort]:
+ out = self.tester.send_ping(
+ dutPort,
+ self.tester.ports_info[remotePort]["ipv4"],
+ self.get_mac_address(dutPort),
+ )
+ else:
+ continue
+ else:
+ if getattr(self, "send_ping6", None):
+ out = self.send_ping6(
+ dutPort,
+ self.tester.ports_info[remotePort]["ipv6"],
+ self.get_mac_address(dutPort),
+ )
+ else:
+ out = self.tester.send_ping6(
+ remotePort, ipv6, self.get_mac_address(dutPort)
+ )
+
+ if out and "64 bytes from" in out:
+ self.logger.info(
+ "PORT MAP: [dut %d: tester %d]" % (dutPort, remotePort)
+ )
+ self.ports_map[dutPort] = remotePort
+ hits[remotePort] = True
+ if self.crb["IP"] == self.crb["tester IP"]:
+ # remove dut port act as tester port
+ remove_port = self.get_port_info(remotepci)
+ if remove_port is not None:
+ remove.append(remove_port)
+ # skip ping from those port already act as dut port
+ testerPort = self.tester.get_local_index(dutpci)
+ if testerPort != -1:
+ hits[testerPort] = True
+ break
+
+ for port in remove:
+ self.ports_info.remove(port)
+
+ def disable_tester_ipv6(self):
+ for tester_port in self.ports_map:
+ if self.tester.ports_info[tester_port]["type"].lower() not in (
+ "ixia",
+ "trex",
+ ):
+ port = self.tester.ports_info[tester_port]["port"]
+ port.disable_ipv6()
+
+ def enable_tester_ipv6(self):
+ for tester_port in range(len(self.tester.ports_info)):
+ if self.tester.ports_info[tester_port]["type"].lower() not in (
+ "ixia",
+ "trex",
+ ):
+ port = self.tester.ports_info[tester_port]["port"]
+ port.enable_ipv6()
+
+ def check_port_occupied(self, port):
+ out = self.alt_session.send_expect("lsof -i:%d" % port, "# ")
+ if out == "":
+ return False
+ else:
+ return True
+
+ def get_maximal_vnc_num(self):
+ out = self.send_expect("ps aux | grep '\-vnc' | grep -v grep", "# ")
+ if out:
+ ports = re.findall(r"-vnc .*?:(\d+)", out)
+ for num in range(len(ports)):
+ ports[num] = int(ports[num])
+ ports.sort()
+ else:
+ ports = [
+ 0,
+ ]
+ return ports[-1]
+
+ def close(self):
+ """
+ Close ssh session of DUT.
+ """
+ if self.session:
+ self.session.close()
+ self.session = None
+ if self.alt_session:
+ self.alt_session.close()
+ self.alt_session = None
+ if self.host_init_flag:
+ self.host_session.close()
+
+ def virt_exit(self):
+ """
+ Stop all unstopped hypervisors process
+ """
+ # try to kill all hypervisor process
+ for pid in self.virt_pids:
+ self.send_expect("kill -s SIGTERM %d" % pid, "# ", alt_session=True)
+ time.sleep(3)
+ self.virt_pids = []
+
+ def crb_exit(self):
+ """
+ Recover all resource before crb exit
+ """
+ self.enable_tester_ipv6()
+ self.close()
+ self.logger.logger_exit()
+
+
+class _EalParameter(object):
+ def __init__(
+ self,
+ dut: Dut,
+ fixed_prefix: bool,
+ socket: int,
+ cores: Union[str, List[int], List[str]],
+ ports: Union[List[str], List[int]],
+ port_options: Dict[Union[str, int], str],
+ prefix: str,
+ no_pci: bool,
+ b_ports: Union[List[str], List[int]],
+ vdevs: List[str],
+ other_eal_param: str,
+ ):
+ """
+ generate eal parameters character string;
+ :param dut: dut device;
+ :param fixed_prefix: use fixed file-prefix or not, when it is true,
+ the file-prefix will not be added a timestamp
+ :param socket: the physical CPU socket index, -1 means no care cpu socket;
+ :param cores: set the core info, eg:
+ cores=[0,1,2,3],
+ cores=['0','1','2','3'],
+ cores='default',
+ cores='1S/4C/1T',
+ cores='all';
+ param ports: set PCI allow list, eg:
+ ports=['0000:1a:00.0', '0000:1a:00.1'],
+ ports=[0, 1];
+ param port_options: set options of port, eg:
+ port_options={'0000:1a:00.0': "proto_xtr=vlan"},
+ port_options={0: "cap=dcf"};
+ param prefix: set file prefix string, eg:
+ prefix='vf';
+ param no_pci: switch of disable PCI bus eg:
+ no_pci=True;
+ param b_ports: skip probing a PCI device to prevent EAL from using it, eg:
+ b_ports=['0000:1a:00.0'],
+ b_ports=[0];
+ param vdevs: virtual device list, eg:
+ vdevs=['net_ring0', 'net_ring1'];
+ param other_eal_param: user defined DPDK eal parameters, eg:
+ other_eal_param='--single-file-segments';
+ """
+ self.os_type = dut.get_os_type()
+ self.fixed_prefix = fixed_prefix
+ self.socket = socket
+ self.dut = dut
+ self.cores = self._validate_cores(cores)
+ self.ports = self._validate_ports(ports)
+ self.port_options: Dict = self._validate_port_options(port_options)
+ self.prefix = prefix
+ self.no_pci = no_pci
+ self.b_ports = self._validate_ports(b_ports)
+ self.vdevs = vdevs
+ self.other_eal_param = other_eal_param
+
+ _param_validate_exception_info_template = (
+ "Invalid parameter of %s about value of %s, Please reference API doc."
+ )
+
+ @staticmethod
+ def _validate_cores(cores: Union[str, List[int], List[str]]):
+ core_string_match = r"default|all|\d+S/\d+C/\d+T|$"
+ if isinstance(cores, list) and (
+ all(map(lambda _core: type(_core) == int, cores))
+ or all(map(lambda _core: type(_core) == str, cores))
+ ):
+ return cores
+ elif type(cores) == str and re.match(core_string_match, cores, re.I):
+ return cores
+ else:
+ raise ParameterInvalidException("cores", cores)
+
+ @staticmethod
+ def _validate_ports(ports: Union[List[str], List[int]]):
+ if not isinstance(ports, list):
+ raise ParameterInvalidException("ports", ports)
+ if not (
+ all(map(lambda _port: type(_port) == int, ports))
+ or all(map(lambda _port: type(_port) == str, ports))
+ and all(
+ map(
+ lambda _port: re.match(r"^([\d\w]+:){1,2}[\d\w]+\.[\d\w]+$", _port),
+ ports,
+ )
+ )
+ ):
+ raise ParameterInvalidException(
+ _EalParameter._param_validate_exception_info_template % ("ports", ports)
+ )
+ return ports
+
+ @staticmethod
+ def _validate_port_options(port_options: Dict[Union[str, int], str]):
+ if not isinstance(port_options, Dict):
+ raise ParameterInvalidException(
+ _EalParameter._param_validate_exception_info_template
+ % ("port_options", port_options)
+ )
+ port_list = port_options.keys()
+ _EalParameter._validate_ports(list(port_list))
+ return port_options
+
+ @staticmethod
+ def _validate_vdev(vdev: List[str]):
+ if not isinstance(vdev, list):
+ raise ParameterInvalidException(
+ _EalParameter._param_validate_exception_info_template % ("vdev", vdev)
+ )
+
+ def _make_cores_param(self) -> str:
+ is_use_default_cores = (
+ self.cores == ""
+ or isinstance(self.cores, str)
+ and self.cores.lower() == "default"
+ )
+ if is_use_default_cores:
+ default_cores = "1S/2C/1T"
+ core_list = self.dut.get_core_list(default_cores)
+ else:
+ core_list = self._get_cores()
+
+ def _get_consecutive_cores_range(_cores: List[int]):
+ _formated_core_list = []
+ _tmp_cores_list = list(sorted(map(int, _cores)))
+ _segment = _tmp_cores_list[:1]
+ for _core_num in _tmp_cores_list[1:]:
+ if _core_num - _segment[-1] == 1:
+ _segment.append(_core_num)
+ else:
+ _formated_core_list.append(
+ f"{_segment[0]}-{_segment[-1]}"
+ if len(_segment) > 1
+ else f"{_segment[0]}"
+ )
+ _index = _tmp_cores_list.index(_core_num)
+ _formated_core_list.extend(
+ _get_consecutive_cores_range(_tmp_cores_list[_index:])
+ )
+ _segment.clear()
+ break
+ if len(_segment) > 0:
+ _formated_core_list.append(
+ f"{_segment[0]}-{_segment[-1]}"
+ if len(_segment) > 1
+ else f"{_segment[0]}"
+ )
+ return _formated_core_list
+
+ return f'-l {",".join(_get_consecutive_cores_range(core_list))}'
+
+ def _make_memory_channels(self) -> str:
+ param_template = "-n {}"
+ return param_template.format(self.dut.get_memory_channels())
+
+ def _make_ports_param(self) -> str:
+ no_port_config = (
+ len(self.ports) == 0 and len(self.b_ports) == 0 and not self.no_pci
+ )
+ port_config_not_in_eal_param = not (
+ "-a" in self.other_eal_param
+ or "-b" in self.other_eal_param
+ or "--no-pci" in self.other_eal_param
+ )
+ if no_port_config and port_config_not_in_eal_param:
+ return self._make_default_ports_param()
+ else:
+ return self._get_ports_and_wraped_port_with_port_options()
+
+ def _make_default_ports_param(self) -> str:
+ pci_list = []
+ allow_option = self._make_allow_option()
+ if len(self.dut.ports_info) != 0:
+ for port_info in self.dut.ports_info:
+ pci_list.append("%s %s" % (allow_option, port_info["pci"]))
+ self.dut.logger.info(pci_list)
+ return " ".join(pci_list)
+
+ def _make_b_ports_param(self) -> str:
+ b_pci_list = []
+ if len(self.b_ports) != 0:
+ for port in self.b_ports:
+ if type(port) == int:
+ b_pci_list.append("-b %s" % self.dut.ports_info[port]["pci"])
+ else:
+ b_pci_list = ["-b %s" % pci for pci in self.b_ports]
+ return " ".join(b_pci_list)
+
+ def _make_no_pci_param(self) -> str:
+ if self.no_pci is True:
+ return "--no-pci"
+ else:
+ return ""
+
+ def _make_prefix_param(self) -> str:
+ if self.prefix == "":
+ fixed_file_prefix = "dpdk" + "_" + self.dut.prefix_subfix
+ else:
+ fixed_file_prefix = self.prefix
+ if not self.fixed_prefix:
+ fixed_file_prefix = fixed_file_prefix + "_" + self.dut.prefix_subfix
+ fixed_file_prefix = self._do_os_handle_with_prefix_param(fixed_file_prefix)
+ return fixed_file_prefix
+
+ def _make_vdevs_param(self) -> str:
+ if len(self.vdevs) == 0:
+ return ""
+ else:
+ _vdevs = ["--vdev " + vdev for vdev in self.vdevs]
+ return " ".join(_vdevs)
+
+ def _make_share_library_path_param(self) -> str:
+ use_shared_lib = settings.load_global_setting(settings.HOST_SHARED_LIB_SETTING)
+ shared_lib_path = settings.load_global_setting(settings.HOST_SHARED_LIB_PATH)
+ if use_shared_lib == "true" and shared_lib_path and "Virt" not in str(self.dut):
+ return " -d {} ".format(shared_lib_path)
+ return ""
+
+ def _make_default_force_max_simd_bitwidth_param(self) -> str:
+ rx_mode = settings.load_global_setting(settings.DPDK_RXMODE_SETTING)
+ param_template = " --force-max-simd-bitwidth=%s "
+ bitwith_dict = {
+ "novector": "64",
+ "sse": "128",
+ "avx2": "256",
+ "avx512": "512",
+ "nolimit": "0",
+ }
+ if (
+ rx_mode in bitwith_dict
+ and "force-max-simd-bitwidth" not in self.other_eal_param
+ ):
+ return param_template % bitwith_dict.get(rx_mode)
+ else:
+ return ""
+
+ def _get_cores(self) -> List[int]:
+ if type(self.cores) == list:
+ return self.cores
+ elif isinstance(self.cores, str):
+ return self.dut.get_core_list(self.cores, socket=self.socket)
+
+ def _get_ports_and_wraped_port_with_port_options(self) -> str:
+ w_pci_list = []
+ for port in self.ports:
+ w_pci_list.append(self._add_port_options_to(port))
+ return " ".join(w_pci_list)
+
+ def _add_port_options_to(self, port: Union[str, int]) -> str:
+ allow_option = self._make_allow_option()
+ port_mac_addr = self.dut.ports_info[port]["pci"] if type(port) == int else port
+ port_param = f"{allow_option} {port_mac_addr}"
+ port_option = self._get_port_options_from_config(port)
+ if port_option:
+ port_param = f"{port_param},{port_option}"
+ return port_param
+
+ def _get_port_options_from_config(self, port: Union[str, int]) -> str:
+ if port in list(self.port_options.keys()):
+ return self.port_options[port]
+ else:
+ return ""
+
+ def _make_allow_option(self) -> str:
+ is_new_dpdk_version = (
+ self.dut.dpdk_version > "20.11.0-rc3" or self.dut.dpdk_version == "20.11.0"
+ )
+ return "-a" if is_new_dpdk_version else "-w"
+
+ def _do_os_handle_with_prefix_param(self, file_prefix: str) -> str:
+ if self.dut.get_os_type() == "freebsd":
+ self.dut.prefix_list = []
+ file_prefix = ""
+ else:
+ self.dut.prefix_list.append(file_prefix)
+ file_prefix = "--file-prefix=" + file_prefix
+ return file_prefix
+
+ def make_eal_param(self) -> str:
+ _eal_str = " ".join(
+ [
+ self._make_cores_param(),
+ self._make_memory_channels(),
+ self._make_ports_param(),
+ self._make_b_ports_param(),
+ self._make_prefix_param(),
+ self._make_no_pci_param(),
+ self._make_vdevs_param(),
+ self._make_share_library_path_param(),
+ self._make_default_force_max_simd_bitwidth_param(),
+ # append user defined eal parameters
+ self.other_eal_param,
+ ]
+ )
+ return _eal_str
--
2.20.1
^ permalink raw reply [relevance 1%]
* [PATCH v3 2/2] eal: factorize lcore main loop
@ 2022-04-05 16:34 2% ` David Marchand
2022-04-14 11:48 0% ` David Marchand
0 siblings, 1 reply; 200+ results
From: David Marchand @ 2022-04-05 16:34 UTC (permalink / raw)
To: dev
Cc: thomas, Morten Brørup, Tyler Retzlaff, Ray Kinsella,
Bruce Richardson, Dmitry Kozlyuk, Narcisa Ana Maria Vasile,
Dmitry Malloy, Pallavi Kadam
All OS implementations provide the same main loop.
Introduce helpers (shared for Linux and FreeBSD) to handle synchronisation
between main and threads and factorize the rest as common code.
Thread id are now logged as string in a common format across OS.
Note: libabigail flags this change as breaking ABI in clang builds:
1 function with some indirect sub-type change:
[C] 'function int rte_eal_remote_launch(int (void*)*, void*, unsigned
int)' at eal_common_launch.c:35:1 has some indirect sub-type
changes:
parameter 1 of type 'int (void*)*' changed:
in pointed to type 'function type int (void*)' at rte_launch.h:31:1:
entity changed from 'function type int (void*)' to 'typedef
lcore_function_t' at rte_launch.h:31:1
type size hasn't changed
This is being investigated on libabigail side.
For now, we don't have much choice but to waive reports on this symbol.
Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Morten Brørup <mb@smartsharesystems.com>
Acked-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
---
Changes since v2:
- aligned rte_eal_remote_launch definition to prototype,
- waived false positive ABI breakage for clang builds,
Changes since v1:
- rebased on top of Tyler fix for Windows and new cleanup,
---
devtools/libabigail.abignore | 4 +
lib/eal/common/eal_common_launch.c | 36 +++++++-
lib/eal/common/eal_common_thread.c | 63 ++++++++++++++
lib/eal/common/eal_thread.h | 27 ++++++
lib/eal/freebsd/eal.c | 7 +-
lib/eal/freebsd/eal_thread.c | 128 ----------------------------
lib/eal/linux/eal.c | 4 +-
lib/eal/linux/eal_thread.c | 130 +----------------------------
lib/eal/unix/eal_unix_thread.c | 63 ++++++++++++++
lib/eal/unix/meson.build | 5 +-
lib/eal/windows/eal_thread.c | 126 +++++++---------------------
11 files changed, 231 insertions(+), 362 deletions(-)
create mode 100644 lib/eal/unix/eal_unix_thread.c
diff --git a/devtools/libabigail.abignore b/devtools/libabigail.abignore
index 5be5c28dc3..79ff15dc4e 100644
--- a/devtools/libabigail.abignore
+++ b/devtools/libabigail.abignore
@@ -52,3 +52,7 @@
; Ignore visibility fix of local functions in experimental gpudev library
[suppress_file]
soname_regexp = ^librte_gpudev\.
+
+; Ignore libabigail false-positive in clang builds, after moving code.
+[suppress_function]
+ name = rte_eal_remote_launch
diff --git a/lib/eal/common/eal_common_launch.c b/lib/eal/common/eal_common_launch.c
index 9f393b9bda..992f8e4631 100644
--- a/lib/eal/common/eal_common_launch.c
+++ b/lib/eal/common/eal_common_launch.c
@@ -5,11 +5,13 @@
#include <errno.h>
#include <rte_launch.h>
+#include <rte_eal_trace.h>
#include <rte_atomic.h>
#include <rte_pause.h>
#include <rte_lcore.h>
#include "eal_private.h"
+#include "eal_thread.h"
/*
* Wait until a lcore finished its job.
@@ -18,12 +20,44 @@ int
rte_eal_wait_lcore(unsigned worker_id)
{
while (__atomic_load_n(&lcore_config[worker_id].state,
- __ATOMIC_ACQUIRE) != WAIT)
+ __ATOMIC_ACQUIRE) != WAIT)
rte_pause();
return lcore_config[worker_id].ret;
}
+/*
+ * Send a message to a worker lcore identified by worker_id to call a
+ * function f with argument arg. Once the execution is done, the
+ * remote lcore switches to WAIT state.
+ */
+int
+rte_eal_remote_launch(lcore_function_t *f, void *arg, unsigned int worker_id)
+{
+ int rc = -EBUSY;
+
+ /* Check if the worker is in 'WAIT' state. Use acquire order
+ * since 'state' variable is used as the guard variable.
+ */
+ if (__atomic_load_n(&lcore_config[worker_id].state,
+ __ATOMIC_ACQUIRE) != WAIT)
+ goto finish;
+
+ lcore_config[worker_id].arg = arg;
+ /* Ensure that all the memory operations are completed
+ * before the worker thread starts running the function.
+ * Use worker thread function as the guard variable.
+ */
+ __atomic_store_n(&lcore_config[worker_id].f, f, __ATOMIC_RELEASE);
+
+ eal_thread_wake_worker(worker_id);
+ rc = 0;
+
+finish:
+ rte_eal_trace_thread_remote_launch(f, arg, worker_id, rc);
+ return rc;
+}
+
/*
* Check that every WORKER lcores are in WAIT state, then call
* rte_eal_remote_launch() for all of them. If call_main is true
diff --git a/lib/eal/common/eal_common_thread.c b/lib/eal/common/eal_common_thread.c
index 684bea166c..962b7e9ac4 100644
--- a/lib/eal/common/eal_common_thread.c
+++ b/lib/eal/common/eal_common_thread.c
@@ -9,6 +9,7 @@
#include <assert.h>
#include <string.h>
+#include <rte_eal_trace.h>
#include <rte_errno.h>
#include <rte_lcore.h>
#include <rte_log.h>
@@ -163,6 +164,68 @@ __rte_thread_uninit(void)
RTE_PER_LCORE(_lcore_id) = LCORE_ID_ANY;
}
+/* main loop of threads */
+__rte_noreturn void *
+eal_thread_loop(void *arg)
+{
+ unsigned int lcore_id = (uintptr_t)arg;
+ char cpuset[RTE_CPU_AFFINITY_STR_LEN];
+ int ret;
+
+ __rte_thread_init(lcore_id, &lcore_config[lcore_id].cpuset);
+
+ ret = eal_thread_dump_current_affinity(cpuset, sizeof(cpuset));
+ RTE_LOG(DEBUG, EAL, "lcore %u is ready (tid=%zx;cpuset=[%s%s])\n",
+ lcore_id, (uintptr_t)pthread_self(), cpuset,
+ ret == 0 ? "" : "...");
+
+ rte_eal_trace_thread_lcore_ready(lcore_id, cpuset);
+
+ /* read on our pipe to get commands */
+ while (1) {
+ lcore_function_t *f;
+ void *fct_arg;
+
+ eal_thread_wait_command();
+
+ /* Set the state to 'RUNNING'. Use release order
+ * since 'state' variable is used as the guard variable.
+ */
+ __atomic_store_n(&lcore_config[lcore_id].state, RUNNING,
+ __ATOMIC_RELEASE);
+
+ eal_thread_ack_command();
+
+ /* Load 'f' with acquire order to ensure that
+ * the memory operations from the main thread
+ * are accessed only after update to 'f' is visible.
+ * Wait till the update to 'f' is visible to the worker.
+ */
+ while ((f = __atomic_load_n(&lcore_config[lcore_id].f,
+ __ATOMIC_ACQUIRE)) == NULL)
+ rte_pause();
+
+ /* call the function and store the return value */
+ fct_arg = lcore_config[lcore_id].arg;
+ ret = f(fct_arg);
+ lcore_config[lcore_id].ret = ret;
+ lcore_config[lcore_id].f = NULL;
+ lcore_config[lcore_id].arg = NULL;
+
+ /* Store the state with release order to ensure that
+ * the memory operations from the worker thread
+ * are completed before the state is updated.
+ * Use 'state' as the guard variable.
+ */
+ __atomic_store_n(&lcore_config[lcore_id].state, WAIT,
+ __ATOMIC_RELEASE);
+ }
+
+ /* never reached */
+ /* pthread_exit(NULL); */
+ /* return NULL; */
+}
+
enum __rte_ctrl_thread_status {
CTRL_THREAD_LAUNCHING, /* Yet to call pthread_create function */
CTRL_THREAD_RUNNING, /* Control thread is running successfully */
diff --git a/lib/eal/common/eal_thread.h b/lib/eal/common/eal_thread.h
index 3c84efd553..ca3378d463 100644
--- a/lib/eal/common/eal_thread.h
+++ b/lib/eal/common/eal_thread.h
@@ -58,4 +58,31 @@ eal_thread_dump_affinity(rte_cpuset_t *cpuset, char *str, unsigned int size);
int
eal_thread_dump_current_affinity(char *str, unsigned int size);
+/**
+ * Called by the main thread to wake up a worker in 'WAIT' state.
+ * This function blocks until the worker acknowledge it started processing a
+ * new command.
+ * This function is private to EAL.
+ *
+ * @param worker_id
+ * The lcore_id of a worker thread.
+ */
+void
+eal_thread_wake_worker(unsigned int worker_id);
+
+/**
+ * Called by a worker thread to sleep after entering 'WAIT' state.
+ * This function is private to EAL.
+ */
+void
+eal_thread_wait_command(void);
+
+/**
+ * Called by a worker thread to acknowledge new command after leaving 'WAIT'
+ * state.
+ * This function is private to EAL.
+ */
+void
+eal_thread_ack_command(void);
+
#endif /* EAL_THREAD_H */
diff --git a/lib/eal/freebsd/eal.c b/lib/eal/freebsd/eal.c
index e233e57184..a6b20960f2 100644
--- a/lib/eal/freebsd/eal.c
+++ b/lib/eal/freebsd/eal.c
@@ -579,7 +579,6 @@ int
rte_eal_init(int argc, char **argv)
{
int i, fctret, ret;
- pthread_t thread_id;
static uint32_t run_once;
uint32_t has_run = 0;
char cpuset[RTE_CPU_AFFINITY_STR_LEN];
@@ -604,8 +603,6 @@ rte_eal_init(int argc, char **argv)
return -1;
}
- thread_id = pthread_self();
-
eal_reset_internal_config(internal_conf);
/* clone argv to report out later in telemetry */
@@ -794,8 +791,8 @@ rte_eal_init(int argc, char **argv)
ret = eal_thread_dump_current_affinity(cpuset, sizeof(cpuset));
- RTE_LOG(DEBUG, EAL, "Main lcore %u is ready (tid=%p;cpuset=[%s%s])\n",
- config->main_lcore, thread_id, cpuset,
+ RTE_LOG(DEBUG, EAL, "Main lcore %u is ready (tid=%zx;cpuset=[%s%s])\n",
+ config->main_lcore, (uintptr_t)pthread_self(), cpuset,
ret == 0 ? "" : "...");
RTE_LCORE_FOREACH_WORKER(i) {
diff --git a/lib/eal/freebsd/eal_thread.c b/lib/eal/freebsd/eal_thread.c
index 9044d70ef7..ab81b527bc 100644
--- a/lib/eal/freebsd/eal_thread.c
+++ b/lib/eal/freebsd/eal_thread.c
@@ -20,138 +20,10 @@
#include <rte_per_lcore.h>
#include <rte_eal.h>
#include <rte_lcore.h>
-#include <rte_eal_trace.h>
#include "eal_private.h"
#include "eal_thread.h"
-/*
- * Send a message to a worker lcore identified by worker_id to call a
- * function f with argument arg. Once the execution is done, the
- * remote lcore switches to WAIT state.
- */
-int
-rte_eal_remote_launch(int (*f)(void *), void *arg, unsigned worker_id)
-{
- int n;
- char c = 0;
- int m2w = lcore_config[worker_id].pipe_main2worker[1];
- int w2m = lcore_config[worker_id].pipe_worker2main[0];
- int rc = -EBUSY;
-
- /* Check if the worker is in 'WAIT' state. Use acquire order
- * since 'state' variable is used as the guard variable.
- */
- if (__atomic_load_n(&lcore_config[worker_id].state,
- __ATOMIC_ACQUIRE) != WAIT)
- goto finish;
-
- lcore_config[worker_id].arg = arg;
- /* Ensure that all the memory operations are completed
- * before the worker thread starts running the function.
- * Use worker thread function as the guard variable.
- */
- __atomic_store_n(&lcore_config[worker_id].f, f, __ATOMIC_RELEASE);
-
- /* send message */
- n = 0;
- while (n == 0 || (n < 0 && errno == EINTR))
- n = write(m2w, &c, 1);
- if (n < 0)
- rte_panic("cannot write on configuration pipe\n");
-
- /* wait ack */
- do {
- n = read(w2m, &c, 1);
- } while (n < 0 && errno == EINTR);
-
- if (n <= 0)
- rte_panic("cannot read on configuration pipe\n");
-
- rc = 0;
-finish:
- rte_eal_trace_thread_remote_launch(f, arg, worker_id, rc);
- return rc;
-}
-
-/* main loop of threads */
-__rte_noreturn void *
-eal_thread_loop(void *arg)
-{
- unsigned int lcore_id = (uintptr_t)arg;
- char c;
- int n, ret;
- unsigned lcore_id;
- int m2w, w2m;
- char cpuset[RTE_CPU_AFFINITY_STR_LEN];
-
- m2w = lcore_config[lcore_id].pipe_main2worker[0];
- w2m = lcore_config[lcore_id].pipe_worker2main[1];
-
- __rte_thread_init(lcore_id, &lcore_config[lcore_id].cpuset);
-
- ret = eal_thread_dump_current_affinity(cpuset, sizeof(cpuset));
- RTE_LOG(DEBUG, EAL, "lcore %u is ready (tid=%p;cpuset=[%s%s])\n",
- lcore_id, pthread_self(), cpuset, ret == 0 ? "" : "...");
-
- rte_eal_trace_thread_lcore_ready(lcore_id, cpuset);
-
- /* read on our pipe to get commands */
- while (1) {
- lcore_function_t *f;
- void *fct_arg;
-
- /* wait command */
- do {
- n = read(m2w, &c, 1);
- } while (n < 0 && errno == EINTR);
-
- if (n <= 0)
- rte_panic("cannot read on configuration pipe\n");
-
- /* Set the state to 'RUNNING'. Use release order
- * since 'state' variable is used as the guard variable.
- */
- __atomic_store_n(&lcore_config[lcore_id].state, RUNNING,
- __ATOMIC_RELEASE);
-
- /* send ack */
- n = 0;
- while (n == 0 || (n < 0 && errno == EINTR))
- n = write(w2m, &c, 1);
- if (n < 0)
- rte_panic("cannot write on configuration pipe\n");
-
- /* Load 'f' with acquire order to ensure that
- * the memory operations from the main thread
- * are accessed only after update to 'f' is visible.
- * Wait till the update to 'f' is visible to the worker.
- */
- while ((f = __atomic_load_n(&lcore_config[lcore_id].f,
- __ATOMIC_ACQUIRE)) == NULL)
- rte_pause();
-
- /* call the function and store the return value */
- fct_arg = lcore_config[lcore_id].arg;
- ret = f(fct_arg);
- lcore_config[lcore_id].ret = ret;
- lcore_config[lcore_id].f = NULL;
- lcore_config[lcore_id].arg = NULL;
-
- /* Store the state with release order to ensure that
- * the memory operations from the worker thread
- * are completed before the state is updated.
- * Use 'state' as the guard variable.
- */
- __atomic_store_n(&lcore_config[lcore_id].state, WAIT,
- __ATOMIC_RELEASE);
- }
-
- /* never reached */
- /* pthread_exit(NULL); */
- /* return NULL; */
-}
-
/* require calling thread tid by gettid() */
int rte_sys_gettid(void)
{
diff --git a/lib/eal/linux/eal.c b/lib/eal/linux/eal.c
index 98c6838026..1ef263434a 100644
--- a/lib/eal/linux/eal.c
+++ b/lib/eal/linux/eal.c
@@ -862,7 +862,6 @@ int
rte_eal_init(int argc, char **argv)
{
int i, fctret, ret;
- pthread_t thread_id;
static uint32_t run_once;
uint32_t has_run = 0;
const char *p;
@@ -890,7 +889,6 @@ rte_eal_init(int argc, char **argv)
p = strrchr(argv[0], '/');
strlcpy(logid, p ? p + 1 : argv[0], sizeof(logid));
- thread_id = pthread_self();
eal_reset_internal_config(internal_conf);
@@ -1129,7 +1127,7 @@ rte_eal_init(int argc, char **argv)
ret = eal_thread_dump_current_affinity(cpuset, sizeof(cpuset));
RTE_LOG(DEBUG, EAL, "Main lcore %u is ready (tid=%zx;cpuset=[%s%s])\n",
- config->main_lcore, (uintptr_t)thread_id, cpuset,
+ config->main_lcore, (uintptr_t)pthread_self(), cpuset,
ret == 0 ? "" : "...");
RTE_LCORE_FOREACH_WORKER(i) {
diff --git a/lib/eal/linux/eal_thread.c b/lib/eal/linux/eal_thread.c
index 26b0a7d48a..820cc905e0 100644
--- a/lib/eal/linux/eal_thread.c
+++ b/lib/eal/linux/eal_thread.c
@@ -14,139 +14,11 @@
#include <rte_log.h>
#include <rte_eal.h>
#include <rte_lcore.h>
-#include <rte_eal_trace.h>
+#include <rte_string_fns.h>
#include "eal_private.h"
#include "eal_thread.h"
-/*
- * Send a message to a worker lcore identified by worker_id to call a
- * function f with argument arg. Once the execution is done, the
- * remote lcore switches to WAIT state.
- */
-int
-rte_eal_remote_launch(int (*f)(void *), void *arg, unsigned int worker_id)
-{
- int n;
- char c = 0;
- int m2w = lcore_config[worker_id].pipe_main2worker[1];
- int w2m = lcore_config[worker_id].pipe_worker2main[0];
- int rc = -EBUSY;
-
- /* Check if the worker is in 'WAIT' state. Use acquire order
- * since 'state' variable is used as the guard variable.
- */
- if (__atomic_load_n(&lcore_config[worker_id].state,
- __ATOMIC_ACQUIRE) != WAIT)
- goto finish;
-
- lcore_config[worker_id].arg = arg;
- /* Ensure that all the memory operations are completed
- * before the worker thread starts running the function.
- * Use worker thread function pointer as the guard variable.
- */
- __atomic_store_n(&lcore_config[worker_id].f, f, __ATOMIC_RELEASE);
-
- /* send message */
- n = 0;
- while (n == 0 || (n < 0 && errno == EINTR))
- n = write(m2w, &c, 1);
- if (n < 0)
- rte_panic("cannot write on configuration pipe\n");
-
- /* wait ack */
- do {
- n = read(w2m, &c, 1);
- } while (n < 0 && errno == EINTR);
-
- if (n <= 0)
- rte_panic("cannot read on configuration pipe\n");
-
- rc = 0;
-finish:
- rte_eal_trace_thread_remote_launch(f, arg, worker_id, rc);
- return rc;
-}
-
-/* main loop of threads */
-__rte_noreturn void *
-eal_thread_loop(void *arg)
-{
- unsigned int lcore_id = (uintptr_t)arg;
- char c;
- int n, ret;
- int m2w, w2m;
- char cpuset[RTE_CPU_AFFINITY_STR_LEN];
-
-
- m2w = lcore_config[lcore_id].pipe_main2worker[0];
- w2m = lcore_config[lcore_id].pipe_worker2main[1];
-
- __rte_thread_init(lcore_id, &lcore_config[lcore_id].cpuset);
-
- ret = eal_thread_dump_current_affinity(cpuset, sizeof(cpuset));
- RTE_LOG(DEBUG, EAL, "lcore %u is ready (tid=%zx;cpuset=[%s%s])\n",
- lcore_id, (uintptr_t)pthread_self(), cpuset,
- ret == 0 ? "" : "...");
-
- rte_eal_trace_thread_lcore_ready(lcore_id, cpuset);
-
- /* read on our pipe to get commands */
- while (1) {
- lcore_function_t *f;
- void *fct_arg;
-
- /* wait command */
- do {
- n = read(m2w, &c, 1);
- } while (n < 0 && errno == EINTR);
-
- if (n <= 0)
- rte_panic("cannot read on configuration pipe\n");
-
- /* Set the state to 'RUNNING'. Use release order
- * since 'state' variable is used as the guard variable.
- */
- __atomic_store_n(&lcore_config[lcore_id].state, RUNNING,
- __ATOMIC_RELEASE);
-
- /* send ack */
- n = 0;
- while (n == 0 || (n < 0 && errno == EINTR))
- n = write(w2m, &c, 1);
- if (n < 0)
- rte_panic("cannot write on configuration pipe\n");
-
- /* Load 'f' with acquire order to ensure that
- * the memory operations from the main thread
- * are accessed only after update to 'f' is visible.
- * Wait till the update to 'f' is visible to the worker.
- */
- while ((f = __atomic_load_n(&lcore_config[lcore_id].f,
- __ATOMIC_ACQUIRE)) == NULL)
- rte_pause();
-
- /* call the function and store the return value */
- fct_arg = lcore_config[lcore_id].arg;
- ret = f(fct_arg);
- lcore_config[lcore_id].ret = ret;
- lcore_config[lcore_id].f = NULL;
- lcore_config[lcore_id].arg = NULL;
-
- /* Store the state with release order to ensure that
- * the memory operations from the worker thread
- * are completed before the state is updated.
- * Use 'state' as the guard variable.
- */
- __atomic_store_n(&lcore_config[lcore_id].state, WAIT,
- __ATOMIC_RELEASE);
- }
-
- /* never reached */
- /* pthread_exit(NULL); */
- /* return NULL; */
-}
-
/* require calling thread tid by gettid() */
int rte_sys_gettid(void)
{
diff --git a/lib/eal/unix/eal_unix_thread.c b/lib/eal/unix/eal_unix_thread.c
new file mode 100644
index 0000000000..70b5ba6b98
--- /dev/null
+++ b/lib/eal/unix/eal_unix_thread.c
@@ -0,0 +1,63 @@
+/* SPDX-License-Identifier: BSD-3-Clause
+ * Copyright(c) 2022 Red Hat, Inc.
+ */
+
+#include <errno.h>
+#include <unistd.h>
+
+#include <rte_debug.h>
+
+#include "eal_private.h"
+
+void
+eal_thread_wake_worker(unsigned int worker_id)
+{
+ int m2w = lcore_config[worker_id].pipe_main2worker[1];
+ int w2m = lcore_config[worker_id].pipe_worker2main[0];
+ char c = 0;
+ int n;
+
+ do {
+ n = write(m2w, &c, 1);
+ } while (n == 0 || (n < 0 && errno == EINTR));
+ if (n < 0)
+ rte_panic("cannot write on configuration pipe\n");
+
+ do {
+ n = read(w2m, &c, 1);
+ } while (n < 0 && errno == EINTR);
+ if (n <= 0)
+ rte_panic("cannot read on configuration pipe\n");
+}
+
+void
+eal_thread_wait_command(void)
+{
+ unsigned int lcore_id = rte_lcore_id();
+ int m2w;
+ char c;
+ int n;
+
+ m2w = lcore_config[lcore_id].pipe_main2worker[0];
+ do {
+ n = read(m2w, &c, 1);
+ } while (n < 0 && errno == EINTR);
+ if (n <= 0)
+ rte_panic("cannot read on configuration pipe\n");
+}
+
+void
+eal_thread_ack_command(void)
+{
+ unsigned int lcore_id = rte_lcore_id();
+ char c = 0;
+ int w2m;
+ int n;
+
+ w2m = lcore_config[lcore_id].pipe_worker2main[1];
+ do {
+ n = write(w2m, &c, 1);
+ } while (n == 0 || (n < 0 && errno == EINTR));
+ if (n < 0)
+ rte_panic("cannot write on configuration pipe\n");
+}
diff --git a/lib/eal/unix/meson.build b/lib/eal/unix/meson.build
index a22ea7cabc..781505ca90 100644
--- a/lib/eal/unix/meson.build
+++ b/lib/eal/unix/meson.build
@@ -3,9 +3,10 @@
sources += files(
'eal_file.c',
+ 'eal_filesystem.c',
+ 'eal_firmware.c',
'eal_unix_memory.c',
+ 'eal_unix_thread.c',
'eal_unix_timer.c',
- 'eal_firmware.c',
- 'eal_filesystem.c',
'rte_thread.c',
)
diff --git a/lib/eal/windows/eal_thread.c b/lib/eal/windows/eal_thread.c
index 95e96548de..f3c61b4456 100644
--- a/lib/eal/windows/eal_thread.c
+++ b/lib/eal/windows/eal_thread.c
@@ -11,124 +11,62 @@
#include <rte_per_lcore.h>
#include <rte_common.h>
#include <rte_memory.h>
-#include <eal_thread.h>
#include "eal_private.h"
+#include "eal_thread.h"
#include "eal_windows.h"
-/*
- * Send a message to a worker lcore identified by worker_id to call a
- * function f with argument arg. Once the execution is done, the
- * remote lcore switches to WAIT state.
- */
-int
-rte_eal_remote_launch(lcore_function_t *f, void *arg, unsigned int worker_id)
+void
+eal_thread_wake_worker(unsigned int worker_id)
{
- int n;
- char c = 0;
int m2w = lcore_config[worker_id].pipe_main2worker[1];
int w2m = lcore_config[worker_id].pipe_worker2main[0];
+ char c = 0;
+ int n;
- /* Check if the worker is in 'WAIT' state. Use acquire order
- * since 'state' variable is used as the guard variable.
- */
- if (__atomic_load_n(&lcore_config[worker_id].state,
- __ATOMIC_ACQUIRE) != WAIT)
- return -EBUSY;
-
- lcore_config[worker_id].arg = arg;
- /* Ensure that all the memory operations are completed
- * before the worker thread starts running the function.
- * Use worker thread function as the guard variable.
- */
- __atomic_store_n(&lcore_config[worker_id].f, f, __ATOMIC_RELEASE);
-
- /* send message */
- n = 0;
- while (n == 0 || (n < 0 && errno == EINTR))
+ do {
n = _write(m2w, &c, 1);
+ } while (n == 0 || (n < 0 && errno == EINTR));
if (n < 0)
rte_panic("cannot write on configuration pipe\n");
- /* wait ack */
do {
n = _read(w2m, &c, 1);
} while (n < 0 && errno == EINTR);
-
if (n <= 0)
rte_panic("cannot read on configuration pipe\n");
-
- return 0;
}
-/* main loop of threads */
-void *
-eal_thread_loop(void *arg)
+void
+eal_thread_wait_command(void)
{
- unsigned int lcore_id = (uintptr_t)arg;
+ unsigned int lcore_id = rte_lcore_id();
+ int m2w;
char c;
- int n, ret;
- int m2w, w2m;
- char cpuset[RTE_CPU_AFFINITY_STR_LEN];
+ int n;
m2w = lcore_config[lcore_id].pipe_main2worker[0];
- w2m = lcore_config[lcore_id].pipe_worker2main[1];
+ do {
+ n = _read(m2w, &c, 1);
+ } while (n < 0 && errno == EINTR);
+ if (n <= 0)
+ rte_panic("cannot read on configuration pipe\n");
+}
- __rte_thread_init(lcore_id, &lcore_config[lcore_id].cpuset);
-
- RTE_LOG(DEBUG, EAL, "lcore %u is ready (tid=%zx;cpuset=[%s])\n",
- lcore_id, (uintptr_t)pthread_self(), cpuset);
-
- /* read on our pipe to get commands */
- while (1) {
- lcore_function_t *f;
- void *fct_arg;
-
- /* wait command */
- do {
- n = _read(m2w, &c, 1);
- } while (n < 0 && errno == EINTR);
-
- if (n <= 0)
- rte_panic("cannot read on configuration pipe\n");
-
- /* Set the state to 'RUNNING'. Use release order
- * since 'state' variable is used as the guard variable.
- */
- __atomic_store_n(&lcore_config[lcore_id].state, RUNNING,
- __ATOMIC_RELEASE);
-
- /* send ack */
- n = 0;
- while (n == 0 || (n < 0 && errno == EINTR))
- n = _write(w2m, &c, 1);
- if (n < 0)
- rte_panic("cannot write on configuration pipe\n");
-
- /* Load 'f' with acquire order to ensure that
- * the memory operations from the main thread
- * are accessed only after update to 'f' is visible.
- * Wait till the update to 'f' is visible to the worker.
- */
- while ((f = __atomic_load_n(&lcore_config[lcore_id].f,
- __ATOMIC_ACQUIRE)) == NULL)
- rte_pause();
-
- /* call the function and store the return value */
- fct_arg = lcore_config[lcore_id].arg;
- ret = f(fct_arg);
- lcore_config[lcore_id].ret = ret;
- lcore_config[lcore_id].f = NULL;
- lcore_config[lcore_id].arg = NULL;
-
- /* Store the state with release order to ensure that
- * the memory operations from the worker thread
- * are completed before the state is updated.
- * Use 'state' as the guard variable.
- */
- __atomic_store_n(&lcore_config[lcore_id].state, WAIT,
- __ATOMIC_RELEASE);
- }
+void
+eal_thread_ack_command(void)
+{
+ unsigned int lcore_id = rte_lcore_id();
+ char c = 0;
+ int w2m;
+ int n;
+
+ w2m = lcore_config[lcore_id].pipe_worker2main[1];
+ do {
+ n = _write(w2m, &c, 1);
+ } while (n == 0 || (n < 0 && errno == EINTR));
+ if (n < 0)
+ rte_panic("cannot write on configuration pipe\n");
}
/* function to create threads */
--
2.23.0
^ permalink raw reply [relevance 2%]
* Re: [PATCH v2 2/2] eal: factorize lcore main loop
@ 2022-04-05 7:05 3% ` David Marchand
0 siblings, 0 replies; 200+ results
From: David Marchand @ 2022-04-05 7:05 UTC (permalink / raw)
To: dev
Cc: Thomas Monjalon, Morten Brørup, Tyler Retzlaff,
Bruce Richardson, Dmitry Kozlyuk, Narcisa Ana Maria Vasile,
Dmitry Malloy, Pallavi Kadam, Dodji Seketeli
On Fri, Apr 1, 2022 at 10:44 AM David Marchand
<david.marchand@redhat.com> wrote:
>
> All OS implementations provide the same main loop.
> Introduce helpers (shared for Linux and FreeBSD) to handle synchronisation
> between main and threads and factorize the rest as common code.
> Thread id are now logged as string in a common format across OS.
>
> Signed-off-by: David Marchand <david.marchand@redhat.com>
> Acked-by: Morten Brørup <mb@smartsharesystems.com>
> Acked-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
> ---
> Changes since v1:
> - rebased on top of Tyler fix for Windows and new cleanup,
FYI, this series needs a respin to fix Windows build (/me hides..).
There is also a false positive ABI breakage reported by libabigail
that Dodji is looking into.
--
David Marchand
^ permalink raw reply [relevance 3%]
* [PATCH v2 2/6] eventdev: add weight and affinity to queue attributes
2022-04-05 5:40 3% ` [PATCH v2 " Shijith Thotton
@ 2022-04-05 5:40 3% ` Shijith Thotton
2022-05-09 12:46 0% ` Jerin Jacob
2022-04-11 11:07 3% ` [PATCH v2 0/6] Extend and set event queue attributes at runtime Shijith Thotton
2022-05-15 9:53 3% ` [PATCH v3 0/5] " Shijith Thotton
2 siblings, 1 reply; 200+ results
From: Shijith Thotton @ 2022-04-05 5:40 UTC (permalink / raw)
To: dev, jerinj
Cc: Shijith Thotton, pbhagavatula, harry.van.haaren, mattias.ronnblom
Extended eventdev queue QoS attributes to support weight and affinity.
If queues are of same priority, events from the queue with highest
weight will be scheduled first. Affinity indicates the number of times,
the subsequent schedule calls from an event port will use the same event
queue. Schedule call selects another queue if current queue goes empty
or schedule count reaches affinity count.
To avoid ABI break, weight and affinity attributes are not yet added to
queue config structure and relies on PMD for managing it. New eventdev
op queue_attr_get can be used to get it from the PMD.
Signed-off-by: Shijith Thotton <sthotton@marvell.com>
---
lib/eventdev/eventdev_pmd.h | 22 +++++++++++++++++++++
lib/eventdev/rte_eventdev.c | 12 ++++++++++++
lib/eventdev/rte_eventdev.h | 38 +++++++++++++++++++++++++++++++++++--
3 files changed, 70 insertions(+), 2 deletions(-)
diff --git a/lib/eventdev/eventdev_pmd.h b/lib/eventdev/eventdev_pmd.h
index 3b85d9f7a5..5495aee4f6 100644
--- a/lib/eventdev/eventdev_pmd.h
+++ b/lib/eventdev/eventdev_pmd.h
@@ -341,6 +341,26 @@ typedef int (*eventdev_queue_setup_t)(struct rte_eventdev *dev,
typedef void (*eventdev_queue_release_t)(struct rte_eventdev *dev,
uint8_t queue_id);
+/**
+ * Get an event queue attribute at runtime.
+ *
+ * @param dev
+ * Event device pointer
+ * @param queue_id
+ * Event queue index
+ * @param attr_id
+ * Event queue attribute id
+ * @param[out] attr_value
+ * Event queue attribute value
+ *
+ * @return
+ * - 0: Success.
+ * - <0: Error code on failure.
+ */
+typedef int (*eventdev_queue_attr_get_t)(struct rte_eventdev *dev,
+ uint8_t queue_id, uint32_t attr_id,
+ uint32_t *attr_value);
+
/**
* Set an event queue attribute at runtime.
*
@@ -1231,6 +1251,8 @@ struct eventdev_ops {
/**< Set up an event queue. */
eventdev_queue_release_t queue_release;
/**< Release an event queue. */
+ eventdev_queue_attr_get_t queue_attr_get;
+ /**< Get an event queue attribute. */
eventdev_queue_attr_set_t queue_attr_set;
/**< Set an event queue attribute. */
diff --git a/lib/eventdev/rte_eventdev.c b/lib/eventdev/rte_eventdev.c
index a31e99be02..12b261f923 100644
--- a/lib/eventdev/rte_eventdev.c
+++ b/lib/eventdev/rte_eventdev.c
@@ -838,6 +838,18 @@ rte_event_queue_attr_get(uint8_t dev_id, uint8_t queue_id, uint32_t attr_id,
*attr_value = conf->schedule_type;
break;
+ case RTE_EVENT_QUEUE_ATTR_WEIGHT:
+ *attr_value = RTE_EVENT_QUEUE_WEIGHT_LOWEST;
+ if (dev->dev_ops->queue_attr_get)
+ return (*dev->dev_ops->queue_attr_get)(
+ dev, queue_id, attr_id, attr_value);
+ break;
+ case RTE_EVENT_QUEUE_ATTR_AFFINITY:
+ *attr_value = RTE_EVENT_QUEUE_AFFINITY_LOWEST;
+ if (dev->dev_ops->queue_attr_get)
+ return (*dev->dev_ops->queue_attr_get)(
+ dev, queue_id, attr_id, attr_value);
+ break;
default:
return -EINVAL;
};
diff --git a/lib/eventdev/rte_eventdev.h b/lib/eventdev/rte_eventdev.h
index 16e9d5fb5b..a6fbaf1c11 100644
--- a/lib/eventdev/rte_eventdev.h
+++ b/lib/eventdev/rte_eventdev.h
@@ -222,8 +222,14 @@ struct rte_event;
/* Event device capability bitmap flags */
#define RTE_EVENT_DEV_CAP_QUEUE_QOS (1ULL << 0)
-/**< Event scheduling prioritization is based on the priority associated with
- * each event queue.
+/**< Event scheduling prioritization is based on the priority and weight
+ * associated with each event queue. Events from a queue with highest priority
+ * is scheduled first. If the queues are of same priority, weight of the queues
+ * are considered to select a queue in a weighted round robin fashion.
+ * Subsequent dequeue calls from an event port could see events from the same
+ * event queue, if the queue is configured with an affinity count. Affinity
+ * count is the number of subsequent dequeue calls, in which an event port
+ * should use the same event queue if the queue is non-empty
*
* @see rte_event_queue_setup(), rte_event_queue_attr_set()
*/
@@ -331,6 +337,26 @@ struct rte_event;
* @see rte_event_port_link()
*/
+/* Event queue scheduling weights */
+#define RTE_EVENT_QUEUE_WEIGHT_HIGHEST 255
+/**< Highest weight of an event queue
+ * @see rte_event_queue_attr_get(), rte_event_queue_attr_set()
+ */
+#define RTE_EVENT_QUEUE_WEIGHT_LOWEST 0
+/**< Lowest weight of an event queue
+ * @see rte_event_queue_attr_get(), rte_event_queue_attr_set()
+ */
+
+/* Event queue scheduling affinity */
+#define RTE_EVENT_QUEUE_AFFINITY_HIGHEST 255
+/**< Highest scheduling affinity of an event queue
+ * @see rte_event_queue_attr_get(), rte_event_queue_attr_set()
+ */
+#define RTE_EVENT_QUEUE_AFFINITY_LOWEST 0
+/**< Lowest scheduling affinity of an event queue
+ * @see rte_event_queue_attr_get(), rte_event_queue_attr_set()
+ */
+
/**
* Get the total number of event devices that have been successfully
* initialised.
@@ -684,6 +710,14 @@ rte_event_queue_setup(uint8_t dev_id, uint8_t queue_id,
* The schedule type of the queue.
*/
#define RTE_EVENT_QUEUE_ATTR_SCHEDULE_TYPE 4
+/**
+ * The weight of the queue.
+ */
+#define RTE_EVENT_QUEUE_ATTR_WEIGHT 5
+/**
+ * Affinity of the queue.
+ */
+#define RTE_EVENT_QUEUE_ATTR_AFFINITY 6
/**
* Get an attribute from a queue.
--
2.25.1
^ permalink raw reply [relevance 3%]
* [PATCH v2 0/6] Extend and set event queue attributes at runtime
2022-03-29 13:10 3% [PATCH 0/6] Extend and set event queue attributes at runtime Shijith Thotton
` (2 preceding siblings ...)
2022-03-29 18:49 0% ` [PATCH 0/6] Extend and set event queue attributes at runtime Jerin Jacob
@ 2022-04-05 5:40 3% ` Shijith Thotton
2022-04-05 5:40 3% ` [PATCH v2 2/6] eventdev: add weight and affinity to queue attributes Shijith Thotton
` (2 more replies)
3 siblings, 3 replies; 200+ results
From: Shijith Thotton @ 2022-04-05 5:40 UTC (permalink / raw)
To: dev, jerinj
Cc: Shijith Thotton, pbhagavatula, harry.van.haaren, mattias.ronnblom
This series adds support for setting event queue attributes at runtime
and adds two new event queue attributes weight and affinity. Eventdev
capability RTE_EVENT_DEV_CAP_RUNTIME_QUEUE_ATTR is added to expose the
capability to set attributes at runtime and rte_event_queue_attr_set()
API is used to set the attributes.
Attributes weight and affinity are not yet added to rte_event_queue_conf
structure to avoid ABI break and will be added in 22.11. Till then, PMDs
using the new attributes are expected to manage them.
Test application changes and example implementation are added as last
three patches.
v2:
* Modified attr_value type from u32 to u64 for set().
* Removed RTE_EVENT_QUEUE_ATTR_MAX macro.
* Fixed return value in implementation.
Pavan Nikhilesh (1):
common/cnxk: use lock when accessing mbox of SSO
Shijith Thotton (5):
eventdev: support to set queue attributes at runtime
eventdev: add weight and affinity to queue attributes
doc: announce change in event queue conf structure
test/event: test cases to test runtime queue attribute
event/cnxk: support to set runtime queue attributes
app/test/test_eventdev.c | 149 ++++++++++++++++++
doc/guides/eventdevs/features/cnxk.ini | 1 +
doc/guides/eventdevs/features/default.ini | 1 +
doc/guides/rel_notes/deprecation.rst | 3 +
drivers/common/cnxk/roc_sso.c | 174 ++++++++++++++++------
drivers/common/cnxk/roc_sso_priv.h | 1 +
drivers/common/cnxk/roc_tim.c | 134 +++++++++++------
drivers/event/cnxk/cn10k_eventdev.c | 4 +
drivers/event/cnxk/cn9k_eventdev.c | 4 +
drivers/event/cnxk/cnxk_eventdev.c | 91 ++++++++++-
drivers/event/cnxk/cnxk_eventdev.h | 16 ++
lib/eventdev/eventdev_pmd.h | 44 ++++++
lib/eventdev/rte_eventdev.c | 38 +++++
lib/eventdev/rte_eventdev.h | 71 ++++++++-
lib/eventdev/version.map | 3 +
15 files changed, 631 insertions(+), 103 deletions(-)
--
2.25.1
^ permalink raw reply [relevance 3%]
* RE: [PATCH 1/6] eventdev: support to set queue attributes at runtime
2022-03-30 12:14 3% ` Mattias Rönnblom
@ 2022-04-04 11:45 0% ` Shijith Thotton
0 siblings, 0 replies; 200+ results
From: Shijith Thotton @ 2022-04-04 11:45 UTC (permalink / raw)
To: Mattias Rönnblom, dev, Jerin Jacob Kollanukkaran
Cc: Pavan Nikhilesh Bhagavatula, Ray Kinsella
>> Added a new eventdev API rte_event_queue_attr_set(), to set event queue
>> attributes at runtime from the values set during initialization using
>> rte_event_queue_setup(). PMD's supporting this feature should expose the
>> capability RTE_EVENT_DEV_CAP_RUNTIME_QUEUE_ATTR.
>>
>> Signed-off-by: Shijith Thotton <sthotton@marvell.com>
>> ---
>> doc/guides/eventdevs/features/default.ini | 1 +
>> lib/eventdev/eventdev_pmd.h | 22 +++++++++++++
>> lib/eventdev/rte_eventdev.c | 31 ++++++++++++++++++
>> lib/eventdev/rte_eventdev.h | 38 ++++++++++++++++++++++-
>> lib/eventdev/version.map | 3 ++
>> 5 files changed, 94 insertions(+), 1 deletion(-)
>>
>> diff --git a/doc/guides/eventdevs/features/default.ini
>b/doc/guides/eventdevs/features/default.ini
>> index 2ea233463a..00360f60c6 100644
>> --- a/doc/guides/eventdevs/features/default.ini
>> +++ b/doc/guides/eventdevs/features/default.ini
>> @@ -17,6 +17,7 @@ runtime_port_link =
>> multiple_queue_port =
>> carry_flow_id =
>> maintenance_free =
>> +runtime_queue_attr =
>>
>> ;
>> ; Features of a default Ethernet Rx adapter.
>> diff --git a/lib/eventdev/eventdev_pmd.h b/lib/eventdev/eventdev_pmd.h
>> index ce469d47a6..6182749503 100644
>> --- a/lib/eventdev/eventdev_pmd.h
>> +++ b/lib/eventdev/eventdev_pmd.h
>> @@ -341,6 +341,26 @@ typedef int (*eventdev_queue_setup_t)(struct
>rte_eventdev *dev,
>> typedef void (*eventdev_queue_release_t)(struct rte_eventdev *dev,
>> uint8_t queue_id);
>>
>> +/**
>> + * Set an event queue attribute at runtime.
>> + *
>> + * @param dev
>> + * Event device pointer
>> + * @param queue_id
>> + * Event queue index
>> + * @param attr_id
>> + * Event queue attribute id
>> + * @param attr_value
>> + * Event queue attribute value
>> + *
>> + * @return
>> + * - 0: Success.
>> + * - <0: Error code on failure.
>> + */
>> +typedef int (*eventdev_queue_attr_set_t)(struct rte_eventdev *dev,
>> + uint8_t queue_id, uint32_t attr_id,
>> + uint32_t attr_value);
>> +
>> /**
>> * Retrieve the default event port configuration.
>> *
>> @@ -1211,6 +1231,8 @@ struct eventdev_ops {
>> /**< Set up an event queue. */
>> eventdev_queue_release_t queue_release;
>> /**< Release an event queue. */
>> + eventdev_queue_attr_set_t queue_attr_set;
>> + /**< Set an event queue attribute. */
>>
>> eventdev_port_default_conf_get_t port_def_conf;
>> /**< Get default port configuration. */
>> diff --git a/lib/eventdev/rte_eventdev.c b/lib/eventdev/rte_eventdev.c
>> index 532a253553..13c8af877e 100644
>> --- a/lib/eventdev/rte_eventdev.c
>> +++ b/lib/eventdev/rte_eventdev.c
>> @@ -844,6 +844,37 @@ rte_event_queue_attr_get(uint8_t dev_id, uint8_t
>queue_id, uint32_t attr_id,
>> return 0;
>> }
>>
>> +int
>> +rte_event_queue_attr_set(uint8_t dev_id, uint8_t queue_id, uint32_t attr_id,
>> + uint32_t attr_value)
>> +{
>> + struct rte_eventdev *dev;
>> +
>> + RTE_EVENTDEV_VALID_DEVID_OR_ERR_RET(dev_id, -EINVAL);
>> + dev = &rte_eventdevs[dev_id];
>> + if (!is_valid_queue(dev, queue_id)) {
>> + RTE_EDEV_LOG_ERR("Invalid queue_id=%" PRIu8, queue_id);
>> + return -EINVAL;
>> + }
>> +
>> + if (attr_id > RTE_EVENT_QUEUE_ATTR_MAX) {
>> + RTE_EDEV_LOG_ERR("Invalid attribute ID %" PRIu8, attr_id);
>> + return -EINVAL;
>> + }
>> +
>> + if (!(dev->data->event_dev_cap &
>> + RTE_EVENT_DEV_CAP_RUNTIME_QUEUE_ATTR)) {
>> + RTE_EDEV_LOG_ERR(
>> + "Device %" PRIu8 "does not support changing queue
>attributes at runtime",
>> + dev_id);
>> + return -ENOTSUP;
>> + }
>> +
>> + RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->queue_attr_set, -
>ENOTSUP);
>> + return (*dev->dev_ops->queue_attr_set)(dev, queue_id, attr_id,
>> + attr_value);
>> +}
>> +
>> int
>> rte_event_port_link(uint8_t dev_id, uint8_t port_id,
>> const uint8_t queues[], const uint8_t priorities[],
>> diff --git a/lib/eventdev/rte_eventdev.h b/lib/eventdev/rte_eventdev.h
>> index 42a5660169..19710cd0c5 100644
>> --- a/lib/eventdev/rte_eventdev.h
>> +++ b/lib/eventdev/rte_eventdev.h
>> @@ -225,7 +225,7 @@ struct rte_event;
>> /**< Event scheduling prioritization is based on the priority associated with
>> * each event queue.
>> *
>> - * @see rte_event_queue_setup()
>> + * @see rte_event_queue_setup(), rte_event_queue_attr_set()
>> */
>> #define RTE_EVENT_DEV_CAP_EVENT_QOS (1ULL << 1)
>> /**< Event scheduling prioritization is based on the priority associated with
>> @@ -307,6 +307,13 @@ struct rte_event;
>> * global pool, or process signaling related to load balancing.
>> */
>>
>> +#define RTE_EVENT_DEV_CAP_RUNTIME_QUEUE_ATTR (1ULL << 11)
>> +/**< Event device is capable of changing the queue attributes at runtime i.e
>after
>> + * rte_event_queue_setup() or rte_event_start() call sequence. If this flag is
>> + * not set, eventdev queue attributes can only be configured during
>> + * rte_event_queue_setup().
>> + */
>> +
>> /* Event device priority levels */
>> #define RTE_EVENT_DEV_PRIORITY_HIGHEST 0
>> /**< Highest priority expressed across eventdev subsystem
>> @@ -678,6 +685,11 @@ rte_event_queue_setup(uint8_t dev_id, uint8_t
>queue_id,
>> */
>> #define RTE_EVENT_QUEUE_ATTR_SCHEDULE_TYPE 4
>>
>> +/**
>> + * Maximum supported attribute ID.
>> + */
>> +#define RTE_EVENT_QUEUE_ATTR_MAX
>RTE_EVENT_QUEUE_ATTR_SCHEDULE_TYPE
>> +
>
>This #define will assure that every new attribute breaks the ABI. Is
>that intentional?
>
Will remove .
>> /**
>> * Get an attribute from a queue.
>> *
>> @@ -702,6 +714,30 @@ int
>> rte_event_queue_attr_get(uint8_t dev_id, uint8_t queue_id, uint32_t attr_id,
>> uint32_t *attr_value);
>>
>> +/**
>> + * Set an event queue attribute.
>> + *
>> + * @param dev_id
>> + * Eventdev id
>> + * @param queue_id
>> + * Eventdev queue id
>> + * @param attr_id
>> + * The attribute ID to set
>> + * @param attr_value
>> + * The attribute value to set
>> + *
>> + * @return
>> + * - 0: Successfully set attribute.
>> + * - -EINVAL: invalid device, queue or attr_id.
>> + * - -ENOTSUP: device does not support setting event attribute.
>> + * - -EBUSY: device is in running state
>> + * - <0: failed to set event queue attribute
>> + */
>> +__rte_experimental
>> +int
>> +rte_event_queue_attr_set(uint8_t dev_id, uint8_t queue_id, uint32_t attr_id,
>> + uint32_t attr_value);
>> +
>> /* Event port specific APIs */
>>
>> /* Event port configuration bitmap flags */
>> diff --git a/lib/eventdev/version.map b/lib/eventdev/version.map
>> index cd5dada07f..c581b75c18 100644
>> --- a/lib/eventdev/version.map
>> +++ b/lib/eventdev/version.map
>> @@ -108,6 +108,9 @@ EXPERIMENTAL {
>>
>> # added in 22.03
>> rte_event_eth_rx_adapter_event_port_get;
>> +
>> + # added in 22.07
>> + rte_event_queue_attr_set;
>> };
>>
>> INTERNAL {
^ permalink raw reply [relevance 0%]
* RE: [PATCH 1/2] security: introduce per session event metadata
2022-04-04 9:48 3% ` Akhil Goyal
@ 2022-04-04 10:42 0% ` Gujjar, Abhinandan S
2022-04-13 7:13 3% ` Akhil Goyal
0 siblings, 1 reply; 200+ results
From: Gujjar, Abhinandan S @ 2022-04-04 10:42 UTC (permalink / raw)
To: Akhil Goyal, Volodymyr Fialko, dev, Jayatheerthan, Jay, Vangati,
Narender
Cc: Jerin Jacob Kollanukkaran, Anoob Joseph
+ @Jayatheerthan, Jay & @Vangati, Narender
> -----Original Message-----
> From: Akhil Goyal <gakhil@marvell.com>
> Sent: Monday, April 4, 2022 3:19 PM
> To: Gujjar, Abhinandan S <abhinandan.gujjar@intel.com>; Volodymyr Fialko
> <vfialko@marvell.com>; dev@dpdk.org
> Cc: Jerin Jacob Kollanukkaran <jerinj@marvell.com>; Anoob Joseph
> <anoobj@marvell.com>
> Subject: RE: [PATCH 1/2] security: introduce per session event metadata
>
> Hi Abhinandan,
> > ----------------------------------------------------------------------
> > Acked-by: Abhinandan Gujjar <Abhinandan.gujjar@intel.com>
> >
> This change would be an ABI breakage. So to avoid that, we are planning to
> Propose a better solution compared to this patch.
> We plan to add a new cryptodev op to set the event metadata. A single API
> which can be used in all cases - sym/asym/security sessions.
>
> As currently in case of sym crypto, userdata is being used for storing the event
> Metadata and it is then dereferenced in the PMD which is wrong.
> User data is meant only for user to use and PMD should not dereference it.
>
> Hence a new cryptodev op can be used to set session event metadata explicitly
> if event mode is enabled.
>
> I will be sending the proposal soon. Would need your help in testing the Intel
> usecases.
>
> Regards,
> Akhil
> > > -----Original Message-----
> > > From: Volodymyr Fialko <vfialko@marvell.com>
> > > Sent: Friday, March 25, 2022 4:46 PM
> > > To: dev@dpdk.org; Gujjar, Abhinandan S
> > > <abhinandan.gujjar@intel.com>;
> > Akhil
> > > Goyal <gakhil@marvell.com>
> > > Cc: jerinj@marvell.com; Volodymyr Fialko <vfialko@marvell.com>;
> > > Anoob Joseph <anoobj@marvell.com>
> > > Subject: [PATCH 1/2] security: introduce per session event metadata
> > >
> > > Implement API to set/get event data per security session.
> > >
> > > Signed-off-by: Volodymyr Fialko <vfialko@marvell.com>
> > > Acked-by: Akhil Goyal <gakhil@marvell.com>
> > > Acked-by: Anoob Joseph <anoobj@marvell.com>
> > > ---
> > > .../prog_guide/event_crypto_adapter.rst | 4 +-
> > > lib/security/rte_security.h | 43 +++++++++++++++++++
> > > 2 files changed, 45 insertions(+), 2 deletions(-)
> > >
> > > diff --git a/doc/guides/prog_guide/event_crypto_adapter.rst
> > > b/doc/guides/prog_guide/event_crypto_adapter.rst
> > > index 4fb5c688e0..227b36b4b7 100644
> > > --- a/doc/guides/prog_guide/event_crypto_adapter.rst
> > > +++ b/doc/guides/prog_guide/event_crypto_adapter.rst
> > > @@ -246,9 +246,9 @@ by ``rte_cryptodev_sym_session_get_user_data()``
> > API.
> > > The RTE_EVENT_CRYPTO_ADAPTER_CAP_SESSION_PRIVATE_DATA
> capability
> > > indicates whether HW or SW supports this feature.
> > >
> > > -For security session, ``rte_security_session_set_private_data()``
> > > API
> > > +For security session, ``rte_security_session_set_event_mdata()``
> > > +API
> > > will be used to set request/response data. The same data will be
> > > obtained -by ``rte_security_session_get_private_data()`` API.
> > > +by ``rte_security_session_get_event_mdata()`` API.
> > >
> > > For session-less it is mandatory to place the request/response data
> > > with the ``rte_crypto_op``.
> > > diff --git a/lib/security/rte_security.h
> > > b/lib/security/rte_security.h index
> > > b080d10c2c..29ec514504 100644
> > > --- a/lib/security/rte_security.h
> > > +++ b/lib/security/rte_security.h
> > > @@ -526,6 +526,8 @@ struct rte_security_session {
> > > /**< Private session material */
> > > uint64_t opaque_data;
> > > /**< Opaque user defined data */
> > > + void *event_mdata;
> > > + /**< Event request/response information */
> > > };
> > >
> > > /**
> > > @@ -729,6 +731,47 @@ set_sec_session_private_data(struct
> > > rte_security_session *sess,
> > > sess->sess_private_data = private_data; }
> > >
> > > +/**
> > > + * Get event meta data attached to a security session.
> > > + *
> > > + * @param sess Session pointer allocated by
> > > + * *rte_security_session_create*.
> > > + *
> > > + * @return
> > > + * - On success return pointer to the event crypto meta data which is set
> > > + * using *rte_security_session_set_event_mdata*
> > > + * - On failure returns NULL.
> > > + */
> > > +__rte_experimental
> > > +static inline void *
> > > +rte_security_session_get_event_mdata(const struct
> > > +rte_security_session
> > > +*sess) {
> > > + return sess->event_mdata;
> > > +}
> > > +
> > > +/**
> > > + * Attach event crypto meta data to a security session.
> > > + *
> > > + * Application can allocate memory for *rte_event_crypto_metadata*
> > > +and set the
> > > + * reference pointer using this API which the PMD can retrieve
> > > +using
> > > + * *rte_security_session_get_event_mdata*
> > > + *
> > > + * The API should be used only in case session is used for event
> > > +crypto
> > > + * adapter.
> > > + *
> > > + * @param sess Session pointer allocated by
> > > + * *rte_security_session_create*.
> > > + * @param ev_mdata Pointer to the event crypto meta data
> > > + * (aka *union rte_event_crypto_metadata*)
> > > + */
> > > +__rte_experimental
> > > +static inline void
> > > +rte_security_session_set_event_mdata(struct rte_security_session *sess,
> > > + void *ev_mdata)
> > > +{
> > > + sess->event_mdata = ev_mdata;
> > > +}
> > > +
> > > /**
> > > * Attach a session to a crypto operation.
> > > * This API is needed only in case of
> > > RTE_SECURITY_SESS_CRYPTO_PROTO_OFFLOAD
> > > --
> > > 2.25.1
^ permalink raw reply [relevance 0%]
* RE: [PATCH 1/2] security: introduce per session event metadata
@ 2022-04-04 9:48 3% ` Akhil Goyal
2022-04-04 10:42 0% ` Gujjar, Abhinandan S
0 siblings, 1 reply; 200+ results
From: Akhil Goyal @ 2022-04-04 9:48 UTC (permalink / raw)
To: Gujjar, Abhinandan S, Volodymyr Fialko, dev
Cc: Jerin Jacob Kollanukkaran, Anoob Joseph
Hi Abhinandan,
> ----------------------------------------------------------------------
> Acked-by: Abhinandan Gujjar <Abhinandan.gujjar@intel.com>
>
This change would be an ABI breakage. So to avoid that, we are planning to
Propose a better solution compared to this patch.
We plan to add a new cryptodev op to set the event metadata. A single API
which can be used in all cases - sym/asym/security sessions.
As currently in case of sym crypto, userdata is being used for storing the event
Metadata and it is then dereferenced in the PMD which is wrong.
User data is meant only for user to use and PMD should not dereference it.
Hence a new cryptodev op can be used to set session event metadata
explicitly if event mode is enabled.
I will be sending the proposal soon. Would need your help in testing the
Intel usecases.
Regards,
Akhil
> > -----Original Message-----
> > From: Volodymyr Fialko <vfialko@marvell.com>
> > Sent: Friday, March 25, 2022 4:46 PM
> > To: dev@dpdk.org; Gujjar, Abhinandan S <abhinandan.gujjar@intel.com>;
> Akhil
> > Goyal <gakhil@marvell.com>
> > Cc: jerinj@marvell.com; Volodymyr Fialko <vfialko@marvell.com>; Anoob
> > Joseph <anoobj@marvell.com>
> > Subject: [PATCH 1/2] security: introduce per session event metadata
> >
> > Implement API to set/get event data per security session.
> >
> > Signed-off-by: Volodymyr Fialko <vfialko@marvell.com>
> > Acked-by: Akhil Goyal <gakhil@marvell.com>
> > Acked-by: Anoob Joseph <anoobj@marvell.com>
> > ---
> > .../prog_guide/event_crypto_adapter.rst | 4 +-
> > lib/security/rte_security.h | 43 +++++++++++++++++++
> > 2 files changed, 45 insertions(+), 2 deletions(-)
> >
> > diff --git a/doc/guides/prog_guide/event_crypto_adapter.rst
> > b/doc/guides/prog_guide/event_crypto_adapter.rst
> > index 4fb5c688e0..227b36b4b7 100644
> > --- a/doc/guides/prog_guide/event_crypto_adapter.rst
> > +++ b/doc/guides/prog_guide/event_crypto_adapter.rst
> > @@ -246,9 +246,9 @@ by ``rte_cryptodev_sym_session_get_user_data()``
> API.
> > The RTE_EVENT_CRYPTO_ADAPTER_CAP_SESSION_PRIVATE_DATA capability
> > indicates whether HW or SW supports this feature.
> >
> > -For security session, ``rte_security_session_set_private_data()`` API
> > +For security session, ``rte_security_session_set_event_mdata()`` API
> > will be used to set request/response data. The same data will be obtained -by
> > ``rte_security_session_get_private_data()`` API.
> > +by ``rte_security_session_get_event_mdata()`` API.
> >
> > For session-less it is mandatory to place the request/response data with the
> > ``rte_crypto_op``.
> > diff --git a/lib/security/rte_security.h b/lib/security/rte_security.h index
> > b080d10c2c..29ec514504 100644
> > --- a/lib/security/rte_security.h
> > +++ b/lib/security/rte_security.h
> > @@ -526,6 +526,8 @@ struct rte_security_session {
> > /**< Private session material */
> > uint64_t opaque_data;
> > /**< Opaque user defined data */
> > + void *event_mdata;
> > + /**< Event request/response information */
> > };
> >
> > /**
> > @@ -729,6 +731,47 @@ set_sec_session_private_data(struct
> > rte_security_session *sess,
> > sess->sess_private_data = private_data; }
> >
> > +/**
> > + * Get event meta data attached to a security session.
> > + *
> > + * @param sess Session pointer allocated by
> > + * *rte_security_session_create*.
> > + *
> > + * @return
> > + * - On success return pointer to the event crypto meta data which is set
> > + * using *rte_security_session_set_event_mdata*
> > + * - On failure returns NULL.
> > + */
> > +__rte_experimental
> > +static inline void *
> > +rte_security_session_get_event_mdata(const struct rte_security_session
> > +*sess) {
> > + return sess->event_mdata;
> > +}
> > +
> > +/**
> > + * Attach event crypto meta data to a security session.
> > + *
> > + * Application can allocate memory for *rte_event_crypto_metadata* and
> > +set the
> > + * reference pointer using this API which the PMD can retrieve using
> > + * *rte_security_session_get_event_mdata*
> > + *
> > + * The API should be used only in case session is used for event crypto
> > + * adapter.
> > + *
> > + * @param sess Session pointer allocated by
> > + * *rte_security_session_create*.
> > + * @param ev_mdata Pointer to the event crypto meta data
> > + * (aka *union rte_event_crypto_metadata*)
> > + */
> > +__rte_experimental
> > +static inline void
> > +rte_security_session_set_event_mdata(struct rte_security_session *sess,
> > + void *ev_mdata)
> > +{
> > + sess->event_mdata = ev_mdata;
> > +}
> > +
> > /**
> > * Attach a session to a crypto operation.
> > * This API is needed only in case of
> > RTE_SECURITY_SESS_CRYPTO_PROTO_OFFLOAD
> > --
> > 2.25.1
^ permalink raw reply [relevance 3%]
* RE: [PATCH 1/6] eventdev: support to set queue attributes at runtime
2022-04-04 9:35 3% ` Shijith Thotton
@ 2022-04-04 9:45 4% ` Van Haaren, Harry
0 siblings, 0 replies; 200+ results
From: Van Haaren, Harry @ 2022-04-04 9:45 UTC (permalink / raw)
To: Shijith Thotton, dev, Jerin Jacob Kollanukkaran
Cc: Pavan Nikhilesh Bhagavatula, Ray Kinsella
> -----Original Message-----
> From: Shijith Thotton <sthotton@marvell.com>
> Sent: Monday, April 4, 2022 10:36 AM
> To: Van Haaren, Harry <harry.van.haaren@intel.com>; dev@dpdk.org; Jerin Jacob
> Kollanukkaran <jerinj@marvell.com>
> Cc: Pavan Nikhilesh Bhagavatula <pbhagavatula@marvell.com>; Ray Kinsella
> <mdr@ashroe.eu>
> Subject: RE: [PATCH 1/6] eventdev: support to set queue attributes at runtime
>
> ><snip>
> >
> >> +/**
> >> + * Set an event queue attribute at runtime.
> >> + *
> >> + * @param dev
> >> + * Event device pointer
> >> + * @param queue_id
> >> + * Event queue index
> >> + * @param attr_id
> >> + * Event queue attribute id
> >> + * @param attr_value
> >> + * Event queue attribute value
> >> + *
> >> + * @return
> >> + * - 0: Success.
> >> + * - <0: Error code on failure.
> >> + */
> >> +typedef int (*eventdev_queue_attr_set_t)(struct rte_eventdev *dev,
> >> + uint8_t queue_id, uint32_t attr_id,
> >> + uint32_t attr_value);
> >
> >Is using a uint64_t a better type for attr_value? Given there might be more in
> >future,
> >limiting to 32-bits now may cause headaches later, and uint64_t doesn't cost
> >extra?
> >
> >I think 32-bits of attr_id is enough :)
> >
> >Same comment on the _get() API in patch 2/6, a uint64_t * would be a better fit
> >there in my opinion.
> >
> ><snip>
>
> Changing size of attr_value will an ABI break. Can we wait till a need arises ?
Ah, I forgot that the _get() function is already upstream in DPDK today.
Its actually an API *and* ABI break, which is worse, as user code would have to
change (not just a re-compile against the newer DPDK version...). Any application
attempting source-compatibility with 21.11 and 22.11 would have to #ifdef the
parameter, switching uint32_t* and uint64_t*... or use some magic void* hacks.
Yes I suppose that waiting until a u64 is required for a real-world use-case is probably
better than breaking existing users code today (or in next ABI breaking release) with the
intent of getting to "perfect" API/ABIs...
Suggest to use a u64 for _set() to avoid getting into this same situation again,
but leave _get() as is, until it is required to change for a real use-case?
^ permalink raw reply [relevance 4%]
* RE: [PATCH 1/6] eventdev: support to set queue attributes at runtime
@ 2022-04-04 9:35 3% ` Shijith Thotton
2022-04-04 9:45 4% ` Van Haaren, Harry
0 siblings, 1 reply; 200+ results
From: Shijith Thotton @ 2022-04-04 9:35 UTC (permalink / raw)
To: Van Haaren, Harry, dev, Jerin Jacob Kollanukkaran
Cc: Pavan Nikhilesh Bhagavatula, Ray Kinsella
><snip>
>
>> +/**
>> + * Set an event queue attribute at runtime.
>> + *
>> + * @param dev
>> + * Event device pointer
>> + * @param queue_id
>> + * Event queue index
>> + * @param attr_id
>> + * Event queue attribute id
>> + * @param attr_value
>> + * Event queue attribute value
>> + *
>> + * @return
>> + * - 0: Success.
>> + * - <0: Error code on failure.
>> + */
>> +typedef int (*eventdev_queue_attr_set_t)(struct rte_eventdev *dev,
>> + uint8_t queue_id, uint32_t attr_id,
>> + uint32_t attr_value);
>
>Is using a uint64_t a better type for attr_value? Given there might be more in
>future,
>limiting to 32-bits now may cause headaches later, and uint64_t doesn't cost
>extra?
>
>I think 32-bits of attr_id is enough :)
>
>Same comment on the _get() API in patch 2/6, a uint64_t * would be a better fit
>there in my opinion.
>
><snip>
Changing size of attr_value will an ABI break. Can we wait till a need arises ?
^ permalink raw reply [relevance 3%]
* RE: [PATCH 2/6] eventdev: add weight and affinity to queue attributes
2022-03-30 12:12 0% ` Mattias Rönnblom
@ 2022-04-04 9:33 0% ` Shijith Thotton
0 siblings, 0 replies; 200+ results
From: Shijith Thotton @ 2022-04-04 9:33 UTC (permalink / raw)
To: Mattias Rönnblom, dev, Jerin Jacob Kollanukkaran
Cc: Pavan Nikhilesh Bhagavatula
>> Extended eventdev queue QoS attributes to support weight and affinity.
>> If queues are of same priority, events from the queue with highest
>> weight will be scheduled first. Affinity indicates the number of times,
>> the subsequent schedule calls from an event port will use the same event
>> queue. Schedule call selects another queue if current queue goes empty
>> or schedule count reaches affinity count.
>>
>> To avoid ABI break, weight and affinity attributes are not yet added to
>> queue config structure and relies on PMD for managing it. New eventdev
>> op queue_attr_get can be used to get it from the PMD.
>
>Have you considered using a PMD-specific command line parameter as a
>stop-gap until you can extend the config struct?
>
>> Signed-off-by: Shijith Thotton <sthotton@marvell.com>
>> ---
>> lib/eventdev/eventdev_pmd.h | 22 ++++++++++++++++++++
>> lib/eventdev/rte_eventdev.c | 12 +++++++++++
>> lib/eventdev/rte_eventdev.h | 41 +++++++++++++++++++++++++++++++++-
>---
>> 3 files changed, 71 insertions(+), 4 deletions(-)
>>
>> diff --git a/lib/eventdev/eventdev_pmd.h b/lib/eventdev/eventdev_pmd.h
>> index 6182749503..f19df98a7a 100644
>> --- a/lib/eventdev/eventdev_pmd.h
>> +++ b/lib/eventdev/eventdev_pmd.h
>> @@ -341,6 +341,26 @@ typedef int (*eventdev_queue_setup_t)(struct
>rte_eventdev *dev,
>> typedef void (*eventdev_queue_release_t)(struct rte_eventdev *dev,
>> uint8_t queue_id);
>>
>> +/**
>> + * Get an event queue attribute at runtime.
>> + *
>> + * @param dev
>> + * Event device pointer
>> + * @param queue_id
>> + * Event queue index
>> + * @param attr_id
>> + * Event queue attribute id
>> + * @param[out] attr_value
>> + * Event queue attribute value
>> + *
>> + * @return
>> + * - 0: Success.
>> + * - <0: Error code on failure.
>> + */
>> +typedef int (*eventdev_queue_attr_get_t)(struct rte_eventdev *dev,
>> + uint8_t queue_id, uint32_t attr_id,
>> + uint32_t *attr_value);
>> +
>> /**
>> * Set an event queue attribute at runtime.
>> *
>> @@ -1231,6 +1251,8 @@ struct eventdev_ops {
>> /**< Set up an event queue. */
>> eventdev_queue_release_t queue_release;
>> /**< Release an event queue. */
>> + eventdev_queue_attr_get_t queue_attr_get;
>> + /**< Get an event queue attribute. */
>> eventdev_queue_attr_set_t queue_attr_set;
>> /**< Set an event queue attribute. */
>>
>> diff --git a/lib/eventdev/rte_eventdev.c b/lib/eventdev/rte_eventdev.c
>> index 13c8af877e..37f0e54bf3 100644
>> --- a/lib/eventdev/rte_eventdev.c
>> +++ b/lib/eventdev/rte_eventdev.c
>> @@ -838,6 +838,18 @@ rte_event_queue_attr_get(uint8_t dev_id, uint8_t
>queue_id, uint32_t attr_id,
>>
>> *attr_value = conf->schedule_type;
>> break;
>> + case RTE_EVENT_QUEUE_ATTR_WEIGHT:
>> + *attr_value = RTE_EVENT_QUEUE_WEIGHT_LOWEST;
>> + if (dev->dev_ops->queue_attr_get)
>> + return (*dev->dev_ops->queue_attr_get)(
>> + dev, queue_id, attr_id, attr_value);
>> + break;
>> + case RTE_EVENT_QUEUE_ATTR_AFFINITY:
>> + *attr_value = RTE_EVENT_QUEUE_AFFINITY_LOWEST;
>> + if (dev->dev_ops->queue_attr_get)
>> + return (*dev->dev_ops->queue_attr_get)(
>> + dev, queue_id, attr_id, attr_value);
>> + break;
>> default:
>> return -EINVAL;
>> };
>> diff --git a/lib/eventdev/rte_eventdev.h b/lib/eventdev/rte_eventdev.h
>> index 19710cd0c5..fa16fc5dcb 100644
>> --- a/lib/eventdev/rte_eventdev.h
>> +++ b/lib/eventdev/rte_eventdev.h
>> @@ -222,8 +222,14 @@ struct rte_event;
>>
>> /* Event device capability bitmap flags */
>> #define RTE_EVENT_DEV_CAP_QUEUE_QOS (1ULL << 0)
>> -/**< Event scheduling prioritization is based on the priority associated with
>> - * each event queue.
>> +/**< Event scheduling prioritization is based on the priority and weight
>> + * associated with each event queue. Events from a queue with highest priority
>> + * is scheduled first. If the queues are of same priority, a queue with highest
>> + * weight is selected. Subsequent schedules from an event port could see
>events
>> + * from the same event queue if the queue is configured with an affinity count.
>> + * Affinity count of a queue indicates the number of times, the subsequent
>> + * schedule calls from an event port should use the same queue if the queue is
>> + * non-empty.
>
>Is this specifying something else than WRR scheduling for equal-priority
>queues?
>
It is WRR for equal-priority queues. I will update the text as follows. Please check.
/**< Event scheduling prioritization is based on the priority and weight
* associated with each event queue. Events from a queue with highest priority
* is scheduled first. If the queues are of same priority, weight of the queues
* are used to select a queue in a weighted round robin fashion. Subsequent
* dequeue calls from an event port could see events from the same event queue
* if the queue is configured with an affinity count. Affinity count of a queue
* indicates the number of subsequent dequeue calls from an event port which
* should use the same queue if the queue is non-empty.
>What is a schedule call? I must say I don't understand this description.
Schedule call indicates a dequeue call. I have updated the text to avoid confusion.
>Is affinity the per-port batch size from the queue that is "next in
>line" for an opportunity to be scheduled to a port?
>
Not exactly batch size. It is the number of subsequent dequeue calls which
should use the same queue. So the subsequent dequeue calls could return a max of
affinity * batch_size number of events from the same queue.
>> *
>> * @see rte_event_queue_setup(), rte_event_queue_attr_set()
>> */
>> @@ -331,6 +337,26 @@ struct rte_event;
>> * @see rte_event_port_link()
>> */
>>
>> +/* Event queue scheduling weights */
>> +#define RTE_EVENT_QUEUE_WEIGHT_HIGHEST 255
>> +/**< Highest weight of an event queue
>> + * @see rte_event_queue_attr_get(), rte_event_queue_attr_set()
>> + */
>> +#define RTE_EVENT_QUEUE_WEIGHT_LOWEST 0
>> +/**< Lowest weight of an event queue
>> + * @see rte_event_queue_attr_get(), rte_event_queue_attr_set()
>> + */
>> +
>> +/* Event queue scheduling affinity */
>> +#define RTE_EVENT_QUEUE_AFFINITY_HIGHEST 255
>> +/**< Highest scheduling affinity of an event queue
>> + * @see rte_event_queue_attr_get(), rte_event_queue_attr_set()
>> + */
>> +#define RTE_EVENT_QUEUE_AFFINITY_LOWEST 0
>> +/**< Lowest scheduling affinity of an event queue
>> + * @see rte_event_queue_attr_get(), rte_event_queue_attr_set()
>> + */
>> +
>> /**
>> * Get the total number of event devices that have been successfully
>> * initialised.
>> @@ -684,11 +710,18 @@ rte_event_queue_setup(uint8_t dev_id, uint8_t
>queue_id,
>> * The schedule type of the queue.
>> */
>> #define RTE_EVENT_QUEUE_ATTR_SCHEDULE_TYPE 4
>> -
>> +/**
>> + * The weight of the queue.
>> + */
>> +#define RTE_EVENT_QUEUE_ATTR_WEIGHT 5
>> +/**
>> + * Affinity of the queue.
>> + */
>> +#define RTE_EVENT_QUEUE_ATTR_AFFINITY 6
>> /**
>> * Maximum supported attribute ID.
>> */
>> -#define RTE_EVENT_QUEUE_ATTR_MAX
>RTE_EVENT_QUEUE_ATTR_SCHEDULE_TYPE
>> +#define RTE_EVENT_QUEUE_ATTR_MAX RTE_EVENT_QUEUE_ATTR_AFFINITY
>>
>
>> /**
>> * Get an attribute from a queue.
^ permalink raw reply [relevance 0%]
* RE: [PATCH 0/6] Extend and set event queue attributes at runtime
2022-03-30 10:52 4% ` Van Haaren, Harry
@ 2022-04-04 7:57 0% ` Shijith Thotton
0 siblings, 0 replies; 200+ results
From: Shijith Thotton @ 2022-04-04 7:57 UTC (permalink / raw)
To: Van Haaren, Harry, Jerin Jacob, Jayatheerthan, Jay, Carrillo,
Erik G, Gujjar, Abhinandan S, McDaniel, Timothy, Hemant Agrawal,
Nipun Gupta, mattias.ronnblom, Ray Kinsella
Cc: dpdk-dev, Jerin Jacob Kollanukkaran, Pavan Nikhilesh Bhagavatula,
Liang Ma
>> >
>> > This series adds support for setting event queue attributes at runtime
>> > and adds two new event queue attributes weight and affinity. Eventdev
>> > capability RTE_EVENT_DEV_CAP_RUNTIME_QUEUE_ATTR is added to expose
>> the
>> > capability to set attributes at runtime and rte_event_queue_attr_set()
>> > API is used to set the attributes.
>> >
>> > Attributes weight and affinity are not yet added to rte_event_queue_conf
>> > structure to avoid ABI break and will be added in 22.11. Till then, PMDs
>> > using the new attributes are expected to manage them.
>
>When the new attributes are added to queue_conf structure in 22.11, will the
>attr_get() function have any real use?
>
>If the attr_get() function is not useful post 22.11 (aka, returns const-integers?), we
>should consider if waiting
>for ABI-break in 22.11 is a better solution as it doesn't add public API/ABI functions
>that only have limited time value..?
>
queue_attr_get is an internal op and is not called if the op is not set by the
PMD. So no changes are needed from other PMDs to incorporate this. It is useful
to the PMDs needing the new attributes before they are added to
rte_event_queue_conf struct in 22.11.
><snip>
>
>> + @Van Haaren, Harry @Jayatheerthan, Jay @Erik Gabriel Carrillo
>> @Gujjar, Abhinandan S @McDaniel, Timothy @Hemant Agrawal @Nipun
>> Gupta @Mattias Rönnblom @lingma @Ray Kinsella
>
>Thanks for flagging Jerin, indeed I hadn't looked at this patchset yet.
>
>From event/sw point of view, the new runtime queue attribute capability is not
>available, so the feature flag will not be set.
>
><snip>
>
>Some code comments inline on the impl patches comping up. Regards, -Harry
^ permalink raw reply [relevance 0%]
* 21.11.1 patches review and test
@ 2022-04-01 10:22 2% Kevin Traynor
2022-04-11 3:03 0% ` Pei Zhang
` (2 more replies)
0 siblings, 3 replies; 200+ results
From: Kevin Traynor @ 2022-04-01 10:22 UTC (permalink / raw)
To: stable
Cc: dev, Abhishek Marathe, Ali Alnubani, benjamin.walker,
David Christensen, hariprasad.govindharajan, Hemant Agrawal,
Ian Stokes, Jerin Jacob, John McNamara, Ju-Hyoung Lee,
Kevin Traynor, Luca Boccassi, Pei Zhang, qian.q.xu,
Raslan Darawsheh, Thomas Monjalon, yuan.peng, zhaoyan.chen
Hi all,
Here is a list of patches targeted for stable release 21.11.1.
Please try and complete validation by April 13th.
Please help with testing and validation of your use cases and report
any issues/results with reply-all to this mail. For the final release
the fixes and reported validations will be added to the release notes.
A release candidate tarball can be found at:
https://dpdk.org/browse/dpdk-stable/tag/?id=v21.11.1-rc1
These patches are located at branch 21.11 of dpdk-stable repo:
https://dpdk.org/browse/dpdk-stable/
Thanks.
Kevin
---
Adham Masarwah (2):
net/mlx5: fix destroying empty matchers list
app/testpmd: fix show RSS RETA on Windows
Ajit Khaparde (7):
net/bnxt: fix ring teardown
net/bnxt: fix PAM4 mask setting
net/bnxt: fix crash by validating pointer
net/bnxt: check VF representor pointer before access
net/bnxt: fix VF resource allocation strategy
net/bnxt: set HW coalescing parameters
net/bnxt: fix ring calculation for representors
Alexander Kozyrev (4):
net/mlx5: fix maximum packet headers size for TSO
net/mlx5: fix MPRQ WQE size assertion
net/mlx5: fix committed bucket size
net/mlx5: fix meter capabilities reporting
Ali Alnubani (1):
doc: fix typos and punctuation in flow API guide
Anatoly Burakov (1):
net/qede: fix redundant condition in debug code
Andy Pei (1):
vdpa/ifc: fix log info mismatch
Ankur Dwivedi (1):
common/cnxk: fix NPC key extraction validation
Anoob Joseph (4):
common/cnxk: fix reset of fields
crypto/cnxk: fix inflight count calculation
crypto/cnxk: fix extend tail calculation
crypto/cnxk: fix update of number of descriptors
Arek Kusztal (1):
cryptodev: fix RSA key type name
Asaf Ravid (1):
net/cnxk: fix promiscuous mode in multicast enable flow
Ashwin Sekhar T K (1):
mempool/cnxk: fix batch allocation failure path
Bin Zheng (1):
net/ixgbe: add vector Rx parameter check
Bing Zhao (5):
common/mlx5: fix probing failure code
app/testpmd: fix raw encap of GENEVE option
net/mlx5: fix matcher priority with ICMP or ICMPv6
net/mlx5: remove unused reference counter
net/mlx5: fix configuration without Rx queue
Brian Dooley (13):
eal: add missing C++ guards
telemetry: add missing C++ guards
ethdev: add missing C++ guards
metrics: add missing C++ guards
acl: add missing C++ guards
compressdev: add missing C++ guards
eventdev: add missing C++ guards
kni: add missing C++ guards
vhost: add missing C++ guards
bpf: add missing C++ guards
cryptodev: add missing C++ guards
examples/l2fwd-crypto: fix port mask overflow
crypto/virtio: fix out-of-bounds access
Bruce Richardson (23):
doc: remove dependency on findutils on FreeBSD
dma/idxd: fix burst capacity calculation
dma/idxd: fix paths to driver sysfs directory
dma/idxd: fix wrap-around in burst capacity calculation
build: fix warnings when running external commands
build: remove deprecated Meson functions
eal: fix C++ include
eventdev: fix C++ include
graph: fix C++ include
ipsec: fix C++ include
table: fix C++ include
vhost: fix C++ include
ethdev: fix cast for C++ compatibility
test/dma: fix missing checks for device capacity
dma/idxd: configure maximum batch size to high value
doc: improve configuration examples in idxd guide
distributor: fix potential overflow
eal/freebsd: add missing C++ include guards
compressdev: fix missing space in log macro
cryptodev: fix clang C++ include
eventdev: fix clang C++ include
doc: replace characters for (R) symbol in Linux guide
doc: fix missing note on UIO module in Linux guide
Chandubabu Namburu (1):
net/axgbe: use PCI root complex device to distinguish device
Chenbo Xia (1):
vhost: fix queue number check when setting inflight FD
Chengchang Tang (1):
net/bonding: fix offloading configuration
Chengwen Feng (2):
net/hns3: delete duplicated RSS type
dma/hisilicon: use common PCI device naming
Chuanshe Zhang (1):
examples/flow_classify: fix failure message
Ciara Loftus (2):
net/af_xdp: fix build with -Wunused-function
net/af_xdp: ensure socket is deleted on Rx queue setup error
Ciara Power (4):
crypto/ipsec_mb: fix queue setup null pointer dereference
crypto/ipsec_mb: fix queue cleanup null pointer dereference
crypto/ipsec_mb: fix tainted data for session
crypto/ipsec_mb: remove useless check
Cristian Dumitrescu (2):
pipeline: fix annotation checks
pipeline: fix table state memory allocation
Dapeng Yu (2):
net/ice: track DCF state of PF
net/i40e: enable maximum frame size at port level
Dariusz Sosnowski (3):
net/mlx5: fix inline length for multi-segment TSO
net/mlx5: fix MPLS/GRE Verbs spec ordering
net/mlx5: fix VLAN push action validation
David Marchand (8):
devtools: fix comment detection in forbidden token check
stack: fix stubs header export
test/mbuf: fix mbuf data content check
ethdev: fix MAC address in telemetry device info
net/af_xdp: add missing trailing newline in logs
devtools: remove event/dlb exception in ABI check
vhost: fix FD leak with inflight messages
bpf: fix build with some libpcap version on FreeBSD
Dawid Gorecki (2):
net/ena: fix reset reason being overwritten
net/ena: check memory BAR before initializing LLQ
Devendra Singh Rawat (3):
net/qede: fix Tx completion
net/qede: fix Rx bulk
net/qede: fix maximum Rx packet length
Dmitry Kozlyuk (8):
net/mlx5: fix GCC uninitialized variable warning
net/mlx5: relax headroom assertion
app/testpmd: fix external buffer allocation
common/mlx5: fix MR lookup for non-contiguous mempool
common/mlx5: add Netlink event helpers
net/mlx5: fix link status change detection
net/mlx5: fix initial link status detection
net/mlx5: fix modify port action validation
Elena Agostini (3):
gpu/cuda: fix memory list cleanup
doc: add CUDA driver features
gpu/cuda: fix dependency loading path
Ferruh Yigit (2):
net/bonding: fix MTU set for slaves
ethdev: fix doxygen comments for device info struct
Geoffrey Le Gourriérec (1):
net/bnxt: restore dependency on kernel modules
Gerry Gribbon (1):
app/regex: fix number of matches
Gowrishankar Muthukrishnan (6):
event/cnxk: fix variables casting
event/cnxk: fix uninitialized local variables
common/cnxk: add missing checks of return values
common/cnxk fix unintended sign extension
common/cnxk: fix uninitialized pointer read
net/cnxk: fix uninitialized local variable
Gregory Etelson (10):
net/mlx5: fix RSS expansion with explicit next protocol
net/mlx5: fix GRE protocol type translation for Verbs
net/mlx5: fix GRE item translation in Verbs
net/mlx5: reduce flex item flow handle size
net/mlx5: fix flex item header length translation
net/mlx5: fix inet IPIP protocol type
net/mlx5: fix next protocol RSS expansion
net/mlx5: fix flex item availability
app/testpmd: fix GTP header parsing in checksum engine
app/testpmd: fix flow rule with flex input link
Haiyue Wang (2):
net/iavf: remove git residue symbol
doc: fix KNI PMD name typo
Harman Kalra (3):
common/cnxk: reset stale values on error debug registers
common/cnxk: always use single interrupt ID with NIX
common/cnxk: fix mbuf data offset for VF
Harold Huang (2):
net/virtio-user: fix resource leak on probing failure
net/kni: fix config initialization
Heinrich Kuhn (1):
net/nfp: free HW ring memzone on queue release
Hemant Agrawal (1):
crypto/dpaax_sec: fix auth/cipher xform chain checks
Honnappa Nagarahalli (3):
examples/distributor: reduce Tx queue number to 1
examples/l3fwd: share queue size variables
examples/l3fwd: make Rx and Tx queue size configurable
Huisong Li (10):
net/hns3: fix mailbox wait time
net/hns3: fix using enum as boolean
net/hns3: fix max packet size rollback in PF
net/hns3: fix insecure way to query MAC statistics
net/hns3: fix double decrement of secondary count
net/hns3: fix operating queue when TCAM table is invalid
kni: fix freeing order in device release
net/hns3: fix RSS TC mode entry
net/hns3: fix VF RSS TC mode entry
net/hns3: increase time waiting for PF reset completion
Ivan Malov (8):
net/sfc: validate queue span when parsing flow action RSS
net/sfc: fix lock releases
net/sfc: do not push fast free offload to default TxQ config
net/sfc: demand Tx fast free offload on EF10 simple datapath
common/sfc_efx/base: fix recirculation ID set in outer rules
common/sfc_efx/base: add missing handler for 1-byte fields
net/sfc: fix flow tunnel support detection
net/sfc: reduce log level of tunnel restore info error
Jakub Poczatek (1):
doc: fix FIPS guide
Jiawei Wang (4):
net/mlx5: fix NIC egress flow mismatch in switchdev mode
net/mlx5: fix sample flow action on trusted device
net/mlx5: fix implicit tag insertion with sample action
net/mlx5: fix port matching in sample flow rule
Jiawen Wu (8):
net/ngbe: fix Rx by initializing packet buffer early
net/ngbe: fix missed link interrupt
net/ngbe: fix Tx hang on queue disable
net/ngbe: fix packet statistics
net/txgbe: fix link up and down
net/txgbe: fix KR auto-negotiation
net/ngbe: fix debug logs
net/txgbe: fix debug logs
Jie Hai (1):
net/hns3: remove duplicate macro definition
Jie Wang (1):
net: fix L2TPv2 common header
Jie Zhou (2):
eal/windows: fix error code for not supported API
test/mem: fix error check
Josh Soref (1):
fix spelling in comments and strings
Junfeng Guo (3):
net/ice: fix pattern check for flow director parser
net/ice: fix pattern check in flow director
raw/ntb: clear all valid doorbell bits on init
Junjie Wan (1):
net/bonding: fix slaves initializing on MTU setting
Junxiao Shi (1):
net/af_xdp: fix custom program loading with multiple queues
Juraj Linkeš (1):
config/arm: add values for native armv7
Kai Ji (2):
test/crypto: fix out-of-place SGL in raw datapath
crypto/qat: fix GEN4 AEAD job in raw data path
Kalesh AP (15):
net/bnxt: fix multicast address set
net/bnxt: fix multicast MAC restore during reset recovery
net/bnxt: fix queue stop operation
net/bnxt: restore RSS configuration after reset recovery
net/bnxt: fix restoring VLAN filtering after recovery
net/bnxt: cap maximum number of unicast MAC addresses
net/bnxt: set fast-path pointers only if recovery succeeds
net/bnxt: add null check for mark table
net/bnxt: fix flow create when RSS is disabled
net/bnxt: get maximum supported multicast filters count
net/bnxt: fix handling of VF configuration change
net/bnxt: fix xstats query
net/bnxt: fix check for autoneg enablement
net/bnxt: handle ring cleanup in case of error
net/bnxt: fix memzone allocation per VNIC
Karl Bonde Torp (1):
build: fix build on FreeBSD with Meson 0.61.1
Kathleen Capella (2):
net/iavf: count continuous DD bits for Arm
net/iavf: count continuous DD bits for Arm in flex Rx
Kevin Liu (2):
net/ice: fix Tx checksum offload
net/ice: fix Tx offload path choice
Kevin Traynor (4):
maintainers: update for stable branches
build: suppress rte_crypto_asym_op abi check
Revert "crypto/ipsec_mb: fix length and offset settings"
Revert "net/mlx5: fix flex item availability"
Kumara Parameshwaran (2):
ethdev: add internal function to device struct from name
net/tap: fix to populate FDs in secondary process
Lance Richardson (2):
buildtools: fix AVX512 check for Python 3.5
net/bnxt: fix xstats names query overrun
Leyi Rong (1):
net/iavf: fix potential out-of-bounds access
Lijun Ou (1):
net/hns3: fix RSS key with null
Lior Margalit (1):
net/mlx5: fix assertion on flags set in packet mbuf
Madhuker Mythri (1):
devargs: fix crash with uninitialized parsing
Martijn Bakker (1):
pflock: fix header file installation
Martin Spinler (2):
net/nfb: fix array indexes in deinit functions
net/nfb: fix multicast/promiscuous mode switching
Marvin Liu (1):
net/virtio: fix slots number when indirect feature on
Matan Azrad (1):
vdpa/mlx5: workaround queue stop with traffic
Maxime Coquelin (1):
vhost: fix unsafe vring addresses modifications
Maxime Gouin (3):
bus/ifpga: remove useless check while browsing devices
net/nfp: remove duplicated check when setting MAC address
net/nfp: remove useless range checks
Megha Ajmera (1):
examples/qos_sched: fix core mask overflow
Michael Baum (17):
common/mlx5: add minimum WQE size for striding RQ
net/mlx5: improve stride parameter names
net/mlx5: fix MPRQ stride devargs adjustment
common/mlx5: fix error handling in multi-class probe
net/mlx5: fix memory socket selection in ASO management
common/mlx5: fix missing validation in devargs parsing
net/mlx5: fix sibling device config check
net/mlx5: fix ineffective metadata argument adjustment
net/mlx5: fix ASO CT object release
net/mlx5: fix errno update in shared context creation
net/mlx5: fix entry in shared Rx queues list
doc: remove obsolete vector Tx explanations from mlx5 guide
doc: replace broken links in mlx guides
doc: correct name of BlueField-2 in mlx5 guide
net/mlx5: fix shared counter flag in flow validation
net/mlx5: fix check in count action validation
common/mlx5: consider local functions as internal
Michal Krawczyk (6):
net/ena: remove unused enumeration
net/ena: remove unused offload variables
net/ena: skip timer if reset is triggered
net/ena: fix meta descriptor DF flag setup
net/ena: fix checksum flag for L4
bus/pci: assign driver pointer before mapping
Michal Wilczynski (1):
net/ice: fix overwriting of LSE bit by DCF
Min Hu (Connor) (6):
net/hns3: fix Rx/Tx functions update
net/hns3: fix vector Rx/Tx when PTP enabled
net/bonding: fix promiscuous and allmulticast state
net/bonding: fix reference count on mbufs
app/testpmd: fix bonding mode set
app/testpmd: check starting port is not in bonding
Naga Harish K S V (2):
eventdev/eth_tx: fix queue add error code
eventdev/eth_rx: fix queue config query
Nicolas Chautru (1):
baseband/acc100: avoid out-of-bounds access
Nipun Gupta (1):
examples/l3fwd: fix Rx burst size for event mode
Nithin Dabilpuram (11):
examples/ipsec-secgw: fix eventdev start sequence
examples/ipsec-secgw: fix default flow rule creation
common/cnxk: fix shift offset for TL3 length disable
common/cnxk: fix byte order of frag sizes and infos
common/cnxk: fix null pointer dereferences
common/cnxk: fix uninitialized variables
examples/ipsec-secgw: fix buffer freeing in vector mode
net/cnxk: fix inline device RQ tag mask
net/cnxk: register callback early to handle initial packets
net/cnxk: fix inline IPsec security error handling
common/cnxk: fix bitmap usage for TM
Pablo de Lara (9):
crypto/ipsec_mb: fix buffer overrun
crypto/ipsec_mb: check missing operation types
crypto/ipsec_mb: fix ZUC authentication verify
crypto/ipsec_mb: fix ZUC operation overwrite
crypto/ipsec_mb: fix length and offset settings
test/efd: fix sockets mask size
efd: fix uninitialized structure
crypto/ipsec_mb: fix length and offset settings
crypto/ipsec_mb: fix GMAC parameters setting
Pavan Nikhilesh (6):
eventdev/eth_rx: fix missing internal port checks
event/cnxk: fix QoS devargs parsing
common/cnxk: add workaround for vWQE flush
config: align mempool elements to 128 bytes on CN10K
event/cnxk: fix sub-event clearing mask length
event/cnxk: fix Rx adapter config check
Peng Yu (1):
vhost: fix linker script syntax
Piotr Bronowski (2):
crypto/ipsec_mb: fix premature dereference
crypto/ipsec_mb: fix GCM requested digest length
Qi Zhang (2):
net/ice: fix Tx checksum offload capability
doc: update matching versions in ice guide
Radu Nicolau (5):
examples/ipsec-secgw: fix offload flag used for TSO IPv6
net/iavf: fix segmentation offload condition
net/iavf: fix segmentation offload buffer size
net/iavf: support NAT-T / UDP encapsulation
net/iavf: fix AES-GMAC IV size
Rahul Bhansali (2):
net/cnxk: fix mbuf data length
examples/l3fwd: fix buffer overflow in Tx
Rahul Lakkireddy (1):
net/cxgbe: fix dangling pointer by mailbox access rework
Raja Zidane (8):
net/mlx5: fix mark enabling for Rx
app/testpmd: fix GENEVE parsing in checksum mode
app/compress-perf: fix cycle count operations allocation
app/compress-perf: optimize operations pool allocation
compress/mlx5: support out-of-space status
app/compress-perf: fix socket ID type during init
app/compress-perf: fix number of queue pairs to setup
compressdev: fix socket ID type
Rakesh Kudurumalla (2):
net/cnxk: fix build with GCC 12
net/cnxk: fix RSS RETA table update
Rashmi Shetty (1):
doc: fix dlb2 guide
Reshma Pattan (1):
app/pdump: abort on multi-core capture limit
Rongwei Liu (3):
net/mlx5: fix shared RSS destroy
net/mlx5: fix meter creation default state
net/mlx5: forbid multiple ASO actions in a single rule
Ruifeng Wang (1):
config: add arch define for Arm
Satheesh Paul (5):
common/cnxk: fix nibble parsing order when dumping MCAM
common/cnxk: fix flow deletion
common/cnxk: fix log level during MCAM allocation
common/cnxk: fix base rule merge
net/cnxk: fix Rx/Tx function update
Sean Morrissey (2):
app/testpmd: fix dereference before null check
doc: fix telemetry example in cryptodev guide
Shijith Thotton (1):
crypto/cnxk: enable allocated queues only
Shun Hao (3):
net/mlx5: fix meter sub-policy creation
net/mlx5: fix E-Switch manager vport ID
net/mlx5: fix meter policy creation assert
Simei Su (1):
net/ice: fix mbuf offload flag for Rx timestamp
Srikanth Yalavarthi (1):
dma/cnxk: fix installing internal headers
Stephen Douthit (1):
net/ixgbe: fix FSP check for X550EM devices
Stephen Hemminger (7):
eal/linux: log hugepage create errors with filename
net/memif: remove unnecessary Rx interrupt stub
ipc: end multiprocess thread during cleanup
vfio: cleanup the multiprocess sync handle
pcapng: handle failure of link status query
test/bpf: skip dump if conversion fails
app/dumpcap: check for failure to set promiscuous
Steve Yang (4):
app/testpmd: fix stack overflow for EEPROM display
net/i40e: fix unintentional integer overflow
eal/linux: fix illegal memory access in uevent handler
net/iavf: fix function pointer in multi-process
Suanming Mou (3):
net/mlx5: set flow error for hash list create
net/mlx5: remove unused function
net/mlx5: fix indexed pool fetch overlap
Thinh Tran (1):
net/mlx5: fix CPU socket ID for Rx queue creation
Thomas Monjalon (6):
doc: replace deprecated distutils version parsing
dmadev: add missing header include
app/testpmd: fix build without drivers
regexdev: fix section attribute of symbols
build: hide local symbols in shared libraries
devtools: fix symbols check
Tianfei Zhang (2):
raw/ifpga/base: fix SPI transaction
raw/ifpga: fix thread closing
Tianli Lai (1):
examples/kni: add missing trailing newline in log
Timothy McDaniel (3):
event/dlb2: update rolling mask used for dequeue
event/dlb2: poll HW CQ inflights before mapping queue
event/dlb2: add shift value check in sparse dequeue
Vanshika Shukla (2):
net/dpaa2: fix unregistering interrupt handler
net/dpaa2: fix timestamping for IEEE1588
Viacheslav Ovsiienko (4):
net/mlx5: fix modify field MAC address offset
app/testpmd: fix Tx scheduling interval
net/mlx5: fix metadata endianness in modify field action
doc: fix modify field action description for mlx5
Vladimir Medvedkin (1):
app/fib: fix division by zero
Wei Huang (5):
raw/ifpga/base: fix port feature ID
raw/ifpga: fix variable initialization in probing
raw/ifpga: fix interrupt handle allocation
raw/ifpga: fix monitor thread
raw/ifpga: fix build with optimization
Weiguo Li (14):
common/cnxk: fix error checking
net/enic: fix dereference before null check
net/dpaa2: fix null pointer dereference
regex/mlx5: fix memory allocation check
net/memif: remove pointer deference before null check
net/iavf: fix null pointer dereference
vdpa/sfc: fix null dereference during config
vdpa/sfc: fix null dereference during removal
compress/octeontx: fix null pointer dereference
eventdev/eth_rx: fix parameters parsing memory leak
net/sfc: fix memory allocation size for cache
net/txgbe: fix queue statistics mapping
sched: remove useless malloc in PIE data init
net/bnxt: fix null dereference in session cleanup
Wenwu Ma (1):
examples/vhost: fix launch with physical port
Wenxuan Wu (1):
eal/linux: fix device monitor stop return
Xiaoyu Min (1):
net/mlx5: reject jump to root table
Xuan Ding (2):
vhost: fix field naming in guest page struct
vhost: fix physical address mapping
Xueming Li (1):
net/virtio: fix Tx queue 0 overriden by queue 128
Yajun Wu (1):
common/mlx5: fix queue pair ack timeout configuration
Yiding Zhou (1):
net/ice: fix build with 16-byte Rx descriptor
Yu Wenjun (1):
net/bonding: fix RSS with early configure
Yuan Wang (1):
vhost: fix guest to host physical address mapping
Yunjian Wang (12):
net/bonding: fix mode type mismatch
ethdev: fix Rx queue telemetry memory leak on failure
net/ice: fix link up when starting device
net/virtio-user: check FD flags getting failure
net/virtio: fix uninitialized RSS key
ring: fix error code when creating ring
net/ixgbe: check filter init failure
mem: check allocation in dynamic hugepage init
ethdev: remove unnecessary null check
net/ixgbe: reset security context pointer on close
net/txgbe: reset security context pointer on close
net/iavf: reset security context pointer on stop
Yuying Zhang (1):
net/ice/base: add profile validation on switch filter
Zhihong Wang (1):
ring: fix overflow in memory size calculation
^ permalink raw reply [relevance 2%]
* [PATCH 2/3] doc: fix API index Markdown syntax
@ 2022-03-31 21:28 6% ` Dmitry Kozlyuk
1 sibling, 0 replies; 200+ results
From: Dmitry Kozlyuk @ 2022-03-31 21:28 UTC (permalink / raw)
To: dev
Cc: Vipin Varghese, Dmitry Kozlyuk, Olivier Matz, Thomas Monjalon,
David Marchand
API documentation index had spaces between link caption and URL,
which may be unsupported by some Markdown implementations.
That is, "[caption](URL)" is valid but "[caption] (URL)" is not.
The problematic behavior is observed with Doxygen on Windows.
Remove the spaces.
Unfortunately, Markdown syntax is not formally specified.
Fixes: 9bf486e606b0 ("doc: generate HTML for API with doxygen")
Signed-off-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
---
I believe there's no need for this patch in stable releases,
because it was never an issue until an attempt to build on Windows.
doc/api/doxy-api-index.md | 366 +++++++++++++++++++-------------------
1 file changed, 183 insertions(+), 183 deletions(-)
diff --git a/doc/api/doxy-api-index.md b/doc/api/doxy-api-index.md
index 4245b9635c..baecb2e52e 100644
--- a/doc/api/doxy-api-index.md
+++ b/doc/api/doxy-api-index.md
@@ -9,222 +9,222 @@ API
The public API headers are grouped by topics:
- **device**:
- [dev] (@ref rte_dev.h),
- [ethdev] (@ref rte_ethdev.h),
- [ethctrl] (@ref rte_eth_ctrl.h),
- [rte_flow] (@ref rte_flow.h),
- [rte_tm] (@ref rte_tm.h),
- [rte_mtr] (@ref rte_mtr.h),
- [bbdev] (@ref rte_bbdev.h),
- [cryptodev] (@ref rte_cryptodev.h),
- [security] (@ref rte_security.h),
- [compressdev] (@ref rte_compressdev.h),
- [compress] (@ref rte_comp.h),
- [regexdev] (@ref rte_regexdev.h),
- [dmadev] (@ref rte_dmadev.h),
- [eventdev] (@ref rte_eventdev.h),
- [event_eth_rx_adapter] (@ref rte_event_eth_rx_adapter.h),
- [event_eth_tx_adapter] (@ref rte_event_eth_tx_adapter.h),
- [event_timer_adapter] (@ref rte_event_timer_adapter.h),
- [event_crypto_adapter] (@ref rte_event_crypto_adapter.h),
- [rawdev] (@ref rte_rawdev.h),
- [metrics] (@ref rte_metrics.h),
- [bitrate] (@ref rte_bitrate.h),
- [latency] (@ref rte_latencystats.h),
- [devargs] (@ref rte_devargs.h),
- [PCI] (@ref rte_pci.h),
- [vdev] (@ref rte_bus_vdev.h),
- [vfio] (@ref rte_vfio.h)
+ [dev](@ref rte_dev.h),
+ [ethdev](@ref rte_ethdev.h),
+ [ethctrl](@ref rte_eth_ctrl.h),
+ [rte_flow](@ref rte_flow.h),
+ [rte_tm](@ref rte_tm.h),
+ [rte_mtr](@ref rte_mtr.h),
+ [bbdev](@ref rte_bbdev.h),
+ [cryptodev](@ref rte_cryptodev.h),
+ [security](@ref rte_security.h),
+ [compressdev](@ref rte_compressdev.h),
+ [compress](@ref rte_comp.h),
+ [regexdev](@ref rte_regexdev.h),
+ [dmadev](@ref rte_dmadev.h),
+ [eventdev](@ref rte_eventdev.h),
+ [event_eth_rx_adapter](@ref rte_event_eth_rx_adapter.h),
+ [event_eth_tx_adapter](@ref rte_event_eth_tx_adapter.h),
+ [event_timer_adapter](@ref rte_event_timer_adapter.h),
+ [event_crypto_adapter](@ref rte_event_crypto_adapter.h),
+ [rawdev](@ref rte_rawdev.h),
+ [metrics](@ref rte_metrics.h),
+ [bitrate](@ref rte_bitrate.h),
+ [latency](@ref rte_latencystats.h),
+ [devargs](@ref rte_devargs.h),
+ [PCI](@ref rte_pci.h),
+ [vdev](@ref rte_bus_vdev.h),
+ [vfio](@ref rte_vfio.h)
- **device specific**:
- [softnic] (@ref rte_eth_softnic.h),
- [bond] (@ref rte_eth_bond.h),
- [vhost] (@ref rte_vhost.h),
- [vdpa] (@ref rte_vdpa.h),
- [KNI] (@ref rte_kni.h),
- [ixgbe] (@ref rte_pmd_ixgbe.h),
- [i40e] (@ref rte_pmd_i40e.h),
- [ice] (@ref rte_pmd_ice.h),
- [iavf] (@ref rte_pmd_iavf.h),
- [ioat] (@ref rte_ioat_rawdev.h),
- [bnxt] (@ref rte_pmd_bnxt.h),
- [dpaa] (@ref rte_pmd_dpaa.h),
- [dpaa2] (@ref rte_pmd_dpaa2.h),
- [mlx5] (@ref rte_pmd_mlx5.h),
- [dpaa2_mempool] (@ref rte_dpaa2_mempool.h),
- [dpaa2_cmdif] (@ref rte_pmd_dpaa2_cmdif.h),
- [dpaa2_qdma] (@ref rte_pmd_dpaa2_qdma.h),
- [crypto_scheduler] (@ref rte_cryptodev_scheduler.h),
- [dlb2] (@ref rte_pmd_dlb2.h),
- [ifpga] (@ref rte_pmd_ifpga.h)
+ [softnic](@ref rte_eth_softnic.h),
+ [bond](@ref rte_eth_bond.h),
+ [vhost](@ref rte_vhost.h),
+ [vdpa](@ref rte_vdpa.h),
+ [KNI](@ref rte_kni.h),
+ [ixgbe](@ref rte_pmd_ixgbe.h),
+ [i40e](@ref rte_pmd_i40e.h),
+ [ice](@ref rte_pmd_ice.h),
+ [iavf](@ref rte_pmd_iavf.h),
+ [ioat](@ref rte_ioat_rawdev.h),
+ [bnxt](@ref rte_pmd_bnxt.h),
+ [dpaa](@ref rte_pmd_dpaa.h),
+ [dpaa2](@ref rte_pmd_dpaa2.h),
+ [mlx5](@ref rte_pmd_mlx5.h),
+ [dpaa2_mempool](@ref rte_dpaa2_mempool.h),
+ [dpaa2_cmdif](@ref rte_pmd_dpaa2_cmdif.h),
+ [dpaa2_qdma](@ref rte_pmd_dpaa2_qdma.h),
+ [crypto_scheduler](@ref rte_cryptodev_scheduler.h),
+ [dlb2](@ref rte_pmd_dlb2.h),
+ [ifpga](@ref rte_pmd_ifpga.h)
- **memory**:
- [memseg] (@ref rte_memory.h),
- [memzone] (@ref rte_memzone.h),
- [mempool] (@ref rte_mempool.h),
- [malloc] (@ref rte_malloc.h),
- [memcpy] (@ref rte_memcpy.h)
+ [memseg](@ref rte_memory.h),
+ [memzone](@ref rte_memzone.h),
+ [mempool](@ref rte_mempool.h),
+ [malloc](@ref rte_malloc.h),
+ [memcpy](@ref rte_memcpy.h)
- **timers**:
- [cycles] (@ref rte_cycles.h),
- [timer] (@ref rte_timer.h),
- [alarm] (@ref rte_alarm.h)
+ [cycles](@ref rte_cycles.h),
+ [timer](@ref rte_timer.h),
+ [alarm](@ref rte_alarm.h)
- **locks**:
- [atomic] (@ref rte_atomic.h),
- [mcslock] (@ref rte_mcslock.h),
- [pflock] (@ref rte_pflock.h),
- [rwlock] (@ref rte_rwlock.h),
- [spinlock] (@ref rte_spinlock.h),
- [ticketlock] (@ref rte_ticketlock.h),
- [RCU] (@ref rte_rcu_qsbr.h)
+ [atomic](@ref rte_atomic.h),
+ [mcslock](@ref rte_mcslock.h),
+ [pflock](@ref rte_pflock.h),
+ [rwlock](@ref rte_rwlock.h),
+ [spinlock](@ref rte_spinlock.h),
+ [ticketlock](@ref rte_ticketlock.h),
+ [RCU](@ref rte_rcu_qsbr.h)
- **CPU arch**:
- [branch prediction] (@ref rte_branch_prediction.h),
- [cache prefetch] (@ref rte_prefetch.h),
- [SIMD] (@ref rte_vect.h),
- [byte order] (@ref rte_byteorder.h),
- [CPU flags] (@ref rte_cpuflags.h),
- [CPU pause] (@ref rte_pause.h),
- [I/O access] (@ref rte_io.h),
- [power management] (@ref rte_power_intrinsics.h)
+ [branch prediction](@ref rte_branch_prediction.h),
+ [cache prefetch](@ref rte_prefetch.h),
+ [SIMD](@ref rte_vect.h),
+ [byte order](@ref rte_byteorder.h),
+ [CPU flags](@ref rte_cpuflags.h),
+ [CPU pause](@ref rte_pause.h),
+ [I/O access](@ref rte_io.h),
+ [power management](@ref rte_power_intrinsics.h)
- **CPU multicore**:
- [interrupts] (@ref rte_interrupts.h),
- [launch] (@ref rte_launch.h),
- [lcore] (@ref rte_lcore.h),
- [per-lcore] (@ref rte_per_lcore.h),
- [service cores] (@ref rte_service.h),
- [keepalive] (@ref rte_keepalive.h),
- [power/freq] (@ref rte_power.h),
- [PMD power] (@ref rte_power_pmd_mgmt.h)
+ [interrupts](@ref rte_interrupts.h),
+ [launch](@ref rte_launch.h),
+ [lcore](@ref rte_lcore.h),
+ [per-lcore](@ref rte_per_lcore.h),
+ [service cores](@ref rte_service.h),
+ [keepalive](@ref rte_keepalive.h),
+ [power/freq](@ref rte_power.h),
+ [PMD power](@ref rte_power_pmd_mgmt.h)
- **layers**:
- [ethernet] (@ref rte_ether.h),
- [ARP] (@ref rte_arp.h),
- [HIGIG] (@ref rte_higig.h),
- [ICMP] (@ref rte_icmp.h),
- [ESP] (@ref rte_esp.h),
- [IPsec] (@ref rte_ipsec.h),
- [IPsec group] (@ref rte_ipsec_group.h),
- [IPsec SA] (@ref rte_ipsec_sa.h),
- [IPsec SAD] (@ref rte_ipsec_sad.h),
- [IP] (@ref rte_ip.h),
- [frag/reass] (@ref rte_ip_frag.h),
- [SCTP] (@ref rte_sctp.h),
- [TCP] (@ref rte_tcp.h),
- [UDP] (@ref rte_udp.h),
- [GTP] (@ref rte_gtp.h),
- [GRO] (@ref rte_gro.h),
- [GSO] (@ref rte_gso.h),
- [GRE] (@ref rte_gre.h),
- [MPLS] (@ref rte_mpls.h),
- [VXLAN] (@ref rte_vxlan.h),
- [Geneve] (@ref rte_geneve.h),
- [eCPRI] (@ref rte_ecpri.h),
- [L2TPv2] (@ref rte_l2tpv2.h),
- [PPP] (@ref rte_ppp.h)
+ [ethernet](@ref rte_ether.h),
+ [ARP](@ref rte_arp.h),
+ [HIGIG](@ref rte_higig.h),
+ [ICMP](@ref rte_icmp.h),
+ [ESP](@ref rte_esp.h),
+ [IPsec](@ref rte_ipsec.h),
+ [IPsec group](@ref rte_ipsec_group.h),
+ [IPsec SA](@ref rte_ipsec_sa.h),
+ [IPsec SAD](@ref rte_ipsec_sad.h),
+ [IP](@ref rte_ip.h),
+ [frag/reass](@ref rte_ip_frag.h),
+ [SCTP](@ref rte_sctp.h),
+ [TCP](@ref rte_tcp.h),
+ [UDP](@ref rte_udp.h),
+ [GTP](@ref rte_gtp.h),
+ [GRO](@ref rte_gro.h),
+ [GSO](@ref rte_gso.h),
+ [GRE](@ref rte_gre.h),
+ [MPLS](@ref rte_mpls.h),
+ [VXLAN](@ref rte_vxlan.h),
+ [Geneve](@ref rte_geneve.h),
+ [eCPRI](@ref rte_ecpri.h),
+ [L2TPv2](@ref rte_l2tpv2.h),
+ [PPP](@ref rte_ppp.h)
- **QoS**:
- [metering] (@ref rte_meter.h),
- [scheduler] (@ref rte_sched.h),
- [RED congestion] (@ref rte_red.h)
+ [metering](@ref rte_meter.h),
+ [scheduler](@ref rte_sched.h),
+ [RED congestion](@ref rte_red.h)
- **routing**:
- [LPM IPv4 route] (@ref rte_lpm.h),
- [LPM IPv6 route] (@ref rte_lpm6.h),
- [RIB IPv4] (@ref rte_rib.h),
- [RIB IPv6] (@ref rte_rib6.h),
- [FIB IPv4] (@ref rte_fib.h),
- [FIB IPv6] (@ref rte_fib6.h)
+ [LPM IPv4 route](@ref rte_lpm.h),
+ [LPM IPv6 route](@ref rte_lpm6.h),
+ [RIB IPv4](@ref rte_rib.h),
+ [RIB IPv6](@ref rte_rib6.h),
+ [FIB IPv4](@ref rte_fib.h),
+ [FIB IPv6](@ref rte_fib6.h)
- **hashes**:
- [hash] (@ref rte_hash.h),
- [jhash] (@ref rte_jhash.h),
- [thash] (@ref rte_thash.h),
- [thash_gfni] (@ref rte_thash_gfni.h),
- [FBK hash] (@ref rte_fbk_hash.h),
- [CRC hash] (@ref rte_hash_crc.h)
+ [hash](@ref rte_hash.h),
+ [jhash](@ref rte_jhash.h),
+ [thash](@ref rte_thash.h),
+ [thash_gfni](@ref rte_thash_gfni.h),
+ [FBK hash](@ref rte_fbk_hash.h),
+ [CRC hash](@ref rte_hash_crc.h)
- **classification**
- [reorder] (@ref rte_reorder.h),
- [distributor] (@ref rte_distributor.h),
- [EFD] (@ref rte_efd.h),
- [ACL] (@ref rte_acl.h),
- [member] (@ref rte_member.h),
- [flow classify] (@ref rte_flow_classify.h),
- [BPF] (@ref rte_bpf.h)
+ [reorder](@ref rte_reorder.h),
+ [distributor](@ref rte_distributor.h),
+ [EFD](@ref rte_efd.h),
+ [ACL](@ref rte_acl.h),
+ [member](@ref rte_member.h),
+ [flow classify](@ref rte_flow_classify.h),
+ [BPF](@ref rte_bpf.h)
- **containers**:
- [mbuf] (@ref rte_mbuf.h),
- [mbuf pool ops] (@ref rte_mbuf_pool_ops.h),
- [ring] (@ref rte_ring.h),
- [stack] (@ref rte_stack.h),
- [tailq] (@ref rte_tailq.h),
- [bitmap] (@ref rte_bitmap.h)
+ [mbuf](@ref rte_mbuf.h),
+ [mbuf pool ops](@ref rte_mbuf_pool_ops.h),
+ [ring](@ref rte_ring.h),
+ [stack](@ref rte_stack.h),
+ [tailq](@ref rte_tailq.h),
+ [bitmap](@ref rte_bitmap.h)
- **packet framework**:
- * [port] (@ref rte_port.h):
- [ethdev] (@ref rte_port_ethdev.h),
- [ring] (@ref rte_port_ring.h),
- [frag] (@ref rte_port_frag.h),
- [reass] (@ref rte_port_ras.h),
- [sched] (@ref rte_port_sched.h),
- [kni] (@ref rte_port_kni.h),
- [src/sink] (@ref rte_port_source_sink.h)
- * [table] (@ref rte_table.h):
- [lpm IPv4] (@ref rte_table_lpm.h),
- [lpm IPv6] (@ref rte_table_lpm_ipv6.h),
- [ACL] (@ref rte_table_acl.h),
- [hash] (@ref rte_table_hash.h),
- [array] (@ref rte_table_array.h),
- [stub] (@ref rte_table_stub.h)
- * [pipeline] (@ref rte_pipeline.h)
- [port_in_action] (@ref rte_port_in_action.h)
- [table_action] (@ref rte_table_action.h)
+ * [port](@ref rte_port.h):
+ [ethdev](@ref rte_port_ethdev.h),
+ [ring](@ref rte_port_ring.h),
+ [frag](@ref rte_port_frag.h),
+ [reass](@ref rte_port_ras.h),
+ [sched](@ref rte_port_sched.h),
+ [kni](@ref rte_port_kni.h),
+ [src/sink](@ref rte_port_source_sink.h)
+ * [table](@ref rte_table.h):
+ [lpm IPv4](@ref rte_table_lpm.h),
+ [lpm IPv6](@ref rte_table_lpm_ipv6.h),
+ [ACL](@ref rte_table_acl.h),
+ [hash](@ref rte_table_hash.h),
+ [array](@ref rte_table_array.h),
+ [stub](@ref rte_table_stub.h)
+ * [pipeline](@ref rte_pipeline.h)
+ [port_in_action](@ref rte_port_in_action.h)
+ [table_action](@ref rte_table_action.h)
* SWX pipeline:
- [control] (@ref rte_swx_ctl.h),
- [extern] (@ref rte_swx_extern.h),
- [pipeline] (@ref rte_swx_pipeline.h)
+ [control](@ref rte_swx_ctl.h),
+ [extern](@ref rte_swx_extern.h),
+ [pipeline](@ref rte_swx_pipeline.h)
* SWX port:
- [port] (@ref rte_swx_port.h),
- [ethdev] (@ref rte_swx_port_ethdev.h),
- [fd] (@ref rte_swx_port_fd.h),
- [ring] (@ref rte_swx_port_ring.h),
- [src/sink] (@ref rte_swx_port_source_sink.h)
+ [port](@ref rte_swx_port.h),
+ [ethdev](@ref rte_swx_port_ethdev.h),
+ [fd](@ref rte_swx_port_fd.h),
+ [ring](@ref rte_swx_port_ring.h),
+ [src/sink](@ref rte_swx_port_source_sink.h)
* SWX table:
- [table] (@ref rte_swx_table.h),
- [table_em] (@ref rte_swx_table_em.h)
- [table_wm] (@ref rte_swx_table_wm.h)
- * [graph] (@ref rte_graph.h):
- [graph_worker] (@ref rte_graph_worker.h)
+ [table](@ref rte_swx_table.h),
+ [table_em](@ref rte_swx_table_em.h)
+ [table_wm](@ref rte_swx_table_wm.h)
+ * [graph](@ref rte_graph.h):
+ [graph_worker](@ref rte_graph_worker.h)
* graph_nodes:
- [eth_node] (@ref rte_node_eth_api.h),
- [ip4_node] (@ref rte_node_ip4_api.h)
+ [eth_node](@ref rte_node_eth_api.h),
+ [ip4_node](@ref rte_node_ip4_api.h)
- **basic**:
- [bitops] (@ref rte_bitops.h),
- [approx fraction] (@ref rte_approx.h),
- [random] (@ref rte_random.h),
- [config file] (@ref rte_cfgfile.h),
- [key/value args] (@ref rte_kvargs.h),
- [string] (@ref rte_string_fns.h)
+ [bitops](@ref rte_bitops.h),
+ [approx fraction](@ref rte_approx.h),
+ [random](@ref rte_random.h),
+ [config file](@ref rte_cfgfile.h),
+ [key/value args](@ref rte_kvargs.h),
+ [string](@ref rte_string_fns.h)
- **debug**:
- [jobstats] (@ref rte_jobstats.h),
- [telemetry] (@ref rte_telemetry.h),
- [pcapng] (@ref rte_pcapng.h),
- [pdump] (@ref rte_pdump.h),
- [hexdump] (@ref rte_hexdump.h),
- [debug] (@ref rte_debug.h),
- [log] (@ref rte_log.h),
- [errno] (@ref rte_errno.h),
- [trace] (@ref rte_trace.h),
- [trace_point] (@ref rte_trace_point.h)
+ [jobstats](@ref rte_jobstats.h),
+ [telemetry](@ref rte_telemetry.h),
+ [pcapng](@ref rte_pcapng.h),
+ [pdump](@ref rte_pdump.h),
+ [hexdump](@ref rte_hexdump.h),
+ [debug](@ref rte_debug.h),
+ [log](@ref rte_log.h),
+ [errno](@ref rte_errno.h),
+ [trace](@ref rte_trace.h),
+ [trace_point](@ref rte_trace_point.h)
- **misc**:
- [EAL config] (@ref rte_eal.h),
- [common] (@ref rte_common.h),
- [experimental APIs] (@ref rte_compat.h),
- [ABI versioning] (@ref rte_function_versioning.h),
- [version] (@ref rte_version.h)
+ [EAL config](@ref rte_eal.h),
+ [common](@ref rte_common.h),
+ [experimental APIs](@ref rte_compat.h),
+ [ABI versioning](@ref rte_function_versioning.h),
+ [version](@ref rte_version.h)
--
2.29.3
^ permalink raw reply [relevance 6%]
* Re: [PATCH 1/6] eventdev: support to set queue attributes at runtime
@ 2022-03-30 12:14 3% ` Mattias Rönnblom
2022-04-04 11:45 0% ` Shijith Thotton
1 sibling, 1 reply; 200+ results
From: Mattias Rönnblom @ 2022-03-30 12:14 UTC (permalink / raw)
To: Shijith Thotton, dev, jerinj; +Cc: pbhagavatula, Ray Kinsella
On 2022-03-29 15:11, Shijith Thotton wrote:
> Added a new eventdev API rte_event_queue_attr_set(), to set event queue
> attributes at runtime from the values set during initialization using
> rte_event_queue_setup(). PMD's supporting this feature should expose the
> capability RTE_EVENT_DEV_CAP_RUNTIME_QUEUE_ATTR.
>
> Signed-off-by: Shijith Thotton <sthotton@marvell.com>
> ---
> doc/guides/eventdevs/features/default.ini | 1 +
> lib/eventdev/eventdev_pmd.h | 22 +++++++++++++
> lib/eventdev/rte_eventdev.c | 31 ++++++++++++++++++
> lib/eventdev/rte_eventdev.h | 38 ++++++++++++++++++++++-
> lib/eventdev/version.map | 3 ++
> 5 files changed, 94 insertions(+), 1 deletion(-)
>
> diff --git a/doc/guides/eventdevs/features/default.ini b/doc/guides/eventdevs/features/default.ini
> index 2ea233463a..00360f60c6 100644
> --- a/doc/guides/eventdevs/features/default.ini
> +++ b/doc/guides/eventdevs/features/default.ini
> @@ -17,6 +17,7 @@ runtime_port_link =
> multiple_queue_port =
> carry_flow_id =
> maintenance_free =
> +runtime_queue_attr =
>
> ;
> ; Features of a default Ethernet Rx adapter.
> diff --git a/lib/eventdev/eventdev_pmd.h b/lib/eventdev/eventdev_pmd.h
> index ce469d47a6..6182749503 100644
> --- a/lib/eventdev/eventdev_pmd.h
> +++ b/lib/eventdev/eventdev_pmd.h
> @@ -341,6 +341,26 @@ typedef int (*eventdev_queue_setup_t)(struct rte_eventdev *dev,
> typedef void (*eventdev_queue_release_t)(struct rte_eventdev *dev,
> uint8_t queue_id);
>
> +/**
> + * Set an event queue attribute at runtime.
> + *
> + * @param dev
> + * Event device pointer
> + * @param queue_id
> + * Event queue index
> + * @param attr_id
> + * Event queue attribute id
> + * @param attr_value
> + * Event queue attribute value
> + *
> + * @return
> + * - 0: Success.
> + * - <0: Error code on failure.
> + */
> +typedef int (*eventdev_queue_attr_set_t)(struct rte_eventdev *dev,
> + uint8_t queue_id, uint32_t attr_id,
> + uint32_t attr_value);
> +
> /**
> * Retrieve the default event port configuration.
> *
> @@ -1211,6 +1231,8 @@ struct eventdev_ops {
> /**< Set up an event queue. */
> eventdev_queue_release_t queue_release;
> /**< Release an event queue. */
> + eventdev_queue_attr_set_t queue_attr_set;
> + /**< Set an event queue attribute. */
>
> eventdev_port_default_conf_get_t port_def_conf;
> /**< Get default port configuration. */
> diff --git a/lib/eventdev/rte_eventdev.c b/lib/eventdev/rte_eventdev.c
> index 532a253553..13c8af877e 100644
> --- a/lib/eventdev/rte_eventdev.c
> +++ b/lib/eventdev/rte_eventdev.c
> @@ -844,6 +844,37 @@ rte_event_queue_attr_get(uint8_t dev_id, uint8_t queue_id, uint32_t attr_id,
> return 0;
> }
>
> +int
> +rte_event_queue_attr_set(uint8_t dev_id, uint8_t queue_id, uint32_t attr_id,
> + uint32_t attr_value)
> +{
> + struct rte_eventdev *dev;
> +
> + RTE_EVENTDEV_VALID_DEVID_OR_ERR_RET(dev_id, -EINVAL);
> + dev = &rte_eventdevs[dev_id];
> + if (!is_valid_queue(dev, queue_id)) {
> + RTE_EDEV_LOG_ERR("Invalid queue_id=%" PRIu8, queue_id);
> + return -EINVAL;
> + }
> +
> + if (attr_id > RTE_EVENT_QUEUE_ATTR_MAX) {
> + RTE_EDEV_LOG_ERR("Invalid attribute ID %" PRIu8, attr_id);
> + return -EINVAL;
> + }
> +
> + if (!(dev->data->event_dev_cap &
> + RTE_EVENT_DEV_CAP_RUNTIME_QUEUE_ATTR)) {
> + RTE_EDEV_LOG_ERR(
> + "Device %" PRIu8 "does not support changing queue attributes at runtime",
> + dev_id);
> + return -ENOTSUP;
> + }
> +
> + RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->queue_attr_set, -ENOTSUP);
> + return (*dev->dev_ops->queue_attr_set)(dev, queue_id, attr_id,
> + attr_value);
> +}
> +
> int
> rte_event_port_link(uint8_t dev_id, uint8_t port_id,
> const uint8_t queues[], const uint8_t priorities[],
> diff --git a/lib/eventdev/rte_eventdev.h b/lib/eventdev/rte_eventdev.h
> index 42a5660169..19710cd0c5 100644
> --- a/lib/eventdev/rte_eventdev.h
> +++ b/lib/eventdev/rte_eventdev.h
> @@ -225,7 +225,7 @@ struct rte_event;
> /**< Event scheduling prioritization is based on the priority associated with
> * each event queue.
> *
> - * @see rte_event_queue_setup()
> + * @see rte_event_queue_setup(), rte_event_queue_attr_set()
> */
> #define RTE_EVENT_DEV_CAP_EVENT_QOS (1ULL << 1)
> /**< Event scheduling prioritization is based on the priority associated with
> @@ -307,6 +307,13 @@ struct rte_event;
> * global pool, or process signaling related to load balancing.
> */
>
> +#define RTE_EVENT_DEV_CAP_RUNTIME_QUEUE_ATTR (1ULL << 11)
> +/**< Event device is capable of changing the queue attributes at runtime i.e after
> + * rte_event_queue_setup() or rte_event_start() call sequence. If this flag is
> + * not set, eventdev queue attributes can only be configured during
> + * rte_event_queue_setup().
> + */
> +
> /* Event device priority levels */
> #define RTE_EVENT_DEV_PRIORITY_HIGHEST 0
> /**< Highest priority expressed across eventdev subsystem
> @@ -678,6 +685,11 @@ rte_event_queue_setup(uint8_t dev_id, uint8_t queue_id,
> */
> #define RTE_EVENT_QUEUE_ATTR_SCHEDULE_TYPE 4
>
> +/**
> + * Maximum supported attribute ID.
> + */
> +#define RTE_EVENT_QUEUE_ATTR_MAX RTE_EVENT_QUEUE_ATTR_SCHEDULE_TYPE
> +
This #define will assure that every new attribute breaks the ABI. Is
that intentional?
> /**
> * Get an attribute from a queue.
> *
> @@ -702,6 +714,30 @@ int
> rte_event_queue_attr_get(uint8_t dev_id, uint8_t queue_id, uint32_t attr_id,
> uint32_t *attr_value);
>
> +/**
> + * Set an event queue attribute.
> + *
> + * @param dev_id
> + * Eventdev id
> + * @param queue_id
> + * Eventdev queue id
> + * @param attr_id
> + * The attribute ID to set
> + * @param attr_value
> + * The attribute value to set
> + *
> + * @return
> + * - 0: Successfully set attribute.
> + * - -EINVAL: invalid device, queue or attr_id.
> + * - -ENOTSUP: device does not support setting event attribute.
> + * - -EBUSY: device is in running state
> + * - <0: failed to set event queue attribute
> + */
> +__rte_experimental
> +int
> +rte_event_queue_attr_set(uint8_t dev_id, uint8_t queue_id, uint32_t attr_id,
> + uint32_t attr_value);
> +
> /* Event port specific APIs */
>
> /* Event port configuration bitmap flags */
> diff --git a/lib/eventdev/version.map b/lib/eventdev/version.map
> index cd5dada07f..c581b75c18 100644
> --- a/lib/eventdev/version.map
> +++ b/lib/eventdev/version.map
> @@ -108,6 +108,9 @@ EXPERIMENTAL {
>
> # added in 22.03
> rte_event_eth_rx_adapter_event_port_get;
> +
> + # added in 22.07
> + rte_event_queue_attr_set;
> };
>
> INTERNAL {
^ permalink raw reply [relevance 3%]
* Re: [PATCH 2/6] eventdev: add weight and affinity to queue attributes
2022-03-29 13:11 3% ` [PATCH 2/6] eventdev: add weight and affinity to queue attributes Shijith Thotton
@ 2022-03-30 12:12 0% ` Mattias Rönnblom
2022-04-04 9:33 0% ` Shijith Thotton
0 siblings, 1 reply; 200+ results
From: Mattias Rönnblom @ 2022-03-30 12:12 UTC (permalink / raw)
To: Shijith Thotton, dev, jerinj; +Cc: pbhagavatula
On 2022-03-29 15:11, Shijith Thotton wrote:
> Extended eventdev queue QoS attributes to support weight and affinity.
> If queues are of same priority, events from the queue with highest
> weight will be scheduled first. Affinity indicates the number of times,
> the subsequent schedule calls from an event port will use the same event
> queue. Schedule call selects another queue if current queue goes empty
> or schedule count reaches affinity count.
>
> To avoid ABI break, weight and affinity attributes are not yet added to
> queue config structure and relies on PMD for managing it. New eventdev
> op queue_attr_get can be used to get it from the PMD.
Have you considered using a PMD-specific command line parameter as a
stop-gap until you can extend the config struct?
> Signed-off-by: Shijith Thotton <sthotton@marvell.com>
> ---
> lib/eventdev/eventdev_pmd.h | 22 ++++++++++++++++++++
> lib/eventdev/rte_eventdev.c | 12 +++++++++++
> lib/eventdev/rte_eventdev.h | 41 +++++++++++++++++++++++++++++++++----
> 3 files changed, 71 insertions(+), 4 deletions(-)
>
> diff --git a/lib/eventdev/eventdev_pmd.h b/lib/eventdev/eventdev_pmd.h
> index 6182749503..f19df98a7a 100644
> --- a/lib/eventdev/eventdev_pmd.h
> +++ b/lib/eventdev/eventdev_pmd.h
> @@ -341,6 +341,26 @@ typedef int (*eventdev_queue_setup_t)(struct rte_eventdev *dev,
> typedef void (*eventdev_queue_release_t)(struct rte_eventdev *dev,
> uint8_t queue_id);
>
> +/**
> + * Get an event queue attribute at runtime.
> + *
> + * @param dev
> + * Event device pointer
> + * @param queue_id
> + * Event queue index
> + * @param attr_id
> + * Event queue attribute id
> + * @param[out] attr_value
> + * Event queue attribute value
> + *
> + * @return
> + * - 0: Success.
> + * - <0: Error code on failure.
> + */
> +typedef int (*eventdev_queue_attr_get_t)(struct rte_eventdev *dev,
> + uint8_t queue_id, uint32_t attr_id,
> + uint32_t *attr_value);
> +
> /**
> * Set an event queue attribute at runtime.
> *
> @@ -1231,6 +1251,8 @@ struct eventdev_ops {
> /**< Set up an event queue. */
> eventdev_queue_release_t queue_release;
> /**< Release an event queue. */
> + eventdev_queue_attr_get_t queue_attr_get;
> + /**< Get an event queue attribute. */
> eventdev_queue_attr_set_t queue_attr_set;
> /**< Set an event queue attribute. */
>
> diff --git a/lib/eventdev/rte_eventdev.c b/lib/eventdev/rte_eventdev.c
> index 13c8af877e..37f0e54bf3 100644
> --- a/lib/eventdev/rte_eventdev.c
> +++ b/lib/eventdev/rte_eventdev.c
> @@ -838,6 +838,18 @@ rte_event_queue_attr_get(uint8_t dev_id, uint8_t queue_id, uint32_t attr_id,
>
> *attr_value = conf->schedule_type;
> break;
> + case RTE_EVENT_QUEUE_ATTR_WEIGHT:
> + *attr_value = RTE_EVENT_QUEUE_WEIGHT_LOWEST;
> + if (dev->dev_ops->queue_attr_get)
> + return (*dev->dev_ops->queue_attr_get)(
> + dev, queue_id, attr_id, attr_value);
> + break;
> + case RTE_EVENT_QUEUE_ATTR_AFFINITY:
> + *attr_value = RTE_EVENT_QUEUE_AFFINITY_LOWEST;
> + if (dev->dev_ops->queue_attr_get)
> + return (*dev->dev_ops->queue_attr_get)(
> + dev, queue_id, attr_id, attr_value);
> + break;
> default:
> return -EINVAL;
> };
> diff --git a/lib/eventdev/rte_eventdev.h b/lib/eventdev/rte_eventdev.h
> index 19710cd0c5..fa16fc5dcb 100644
> --- a/lib/eventdev/rte_eventdev.h
> +++ b/lib/eventdev/rte_eventdev.h
> @@ -222,8 +222,14 @@ struct rte_event;
>
> /* Event device capability bitmap flags */
> #define RTE_EVENT_DEV_CAP_QUEUE_QOS (1ULL << 0)
> -/**< Event scheduling prioritization is based on the priority associated with
> - * each event queue.
> +/**< Event scheduling prioritization is based on the priority and weight
> + * associated with each event queue. Events from a queue with highest priority
> + * is scheduled first. If the queues are of same priority, a queue with highest
> + * weight is selected. Subsequent schedules from an event port could see events
> + * from the same event queue if the queue is configured with an affinity count.
> + * Affinity count of a queue indicates the number of times, the subsequent
> + * schedule calls from an event port should use the same queue if the queue is
> + * non-empty.
Is this specifying something else than WRR scheduling for equal-priority
queues?
What is a schedule call? I must say I don't understand this description.
Is affinity the per-port batch size from the queue that is "next in
line" for an opportunity to be scheduled to a port?
> *
> * @see rte_event_queue_setup(), rte_event_queue_attr_set()
> */
> @@ -331,6 +337,26 @@ struct rte_event;
> * @see rte_event_port_link()
> */
>
> +/* Event queue scheduling weights */
> +#define RTE_EVENT_QUEUE_WEIGHT_HIGHEST 255
> +/**< Highest weight of an event queue
> + * @see rte_event_queue_attr_get(), rte_event_queue_attr_set()
> + */
> +#define RTE_EVENT_QUEUE_WEIGHT_LOWEST 0
> +/**< Lowest weight of an event queue
> + * @see rte_event_queue_attr_get(), rte_event_queue_attr_set()
> + */
> +
> +/* Event queue scheduling affinity */
> +#define RTE_EVENT_QUEUE_AFFINITY_HIGHEST 255
> +/**< Highest scheduling affinity of an event queue
> + * @see rte_event_queue_attr_get(), rte_event_queue_attr_set()
> + */
> +#define RTE_EVENT_QUEUE_AFFINITY_LOWEST 0
> +/**< Lowest scheduling affinity of an event queue
> + * @see rte_event_queue_attr_get(), rte_event_queue_attr_set()
> + */
> +
> /**
> * Get the total number of event devices that have been successfully
> * initialised.
> @@ -684,11 +710,18 @@ rte_event_queue_setup(uint8_t dev_id, uint8_t queue_id,
> * The schedule type of the queue.
> */
> #define RTE_EVENT_QUEUE_ATTR_SCHEDULE_TYPE 4
> -
> +/**
> + * The weight of the queue.
> + */
> +#define RTE_EVENT_QUEUE_ATTR_WEIGHT 5
> +/**
> + * Affinity of the queue.
> + */
> +#define RTE_EVENT_QUEUE_ATTR_AFFINITY 6
> /**
> * Maximum supported attribute ID.
> */
> -#define RTE_EVENT_QUEUE_ATTR_MAX RTE_EVENT_QUEUE_ATTR_SCHEDULE_TYPE
> +#define RTE_EVENT_QUEUE_ATTR_MAX RTE_EVENT_QUEUE_ATTR_AFFINITY
>
> /**
> * Get an attribute from a queue.
^ permalink raw reply [relevance 0%]
* RE: [PATCH 0/6] Extend and set event queue attributes at runtime
2022-03-29 18:49 0% ` [PATCH 0/6] Extend and set event queue attributes at runtime Jerin Jacob
@ 2022-03-30 10:52 4% ` Van Haaren, Harry
2022-04-04 7:57 0% ` Shijith Thotton
0 siblings, 1 reply; 200+ results
From: Van Haaren, Harry @ 2022-03-30 10:52 UTC (permalink / raw)
To: Jerin Jacob, Shijith Thotton, Jayatheerthan, Jay, Carrillo,
Erik G, Gujjar, Abhinandan S, McDaniel, Timothy, Hemant Agrawal,
Nipun Gupta, mattias.ronnblom, Ray Kinsella
Cc: dpdk-dev, Jerin Jacob, Pavan Nikhilesh, Liang Ma
> -----Original Message-----
> From: Jerin Jacob <jerinjacobk@gmail.com>
> Sent: Tuesday, March 29, 2022 7:50 PM
> To: Shijith Thotton <sthotton@marvell.com>; Van Haaren, Harry
> <harry.van.haaren@intel.com>; Jayatheerthan, Jay
> <jay.jayatheerthan@intel.com>; Carrillo, Erik G <erik.g.carrillo@intel.com>;
> Gujjar, Abhinandan S <abhinandan.gujjar@intel.com>; McDaniel, Timothy
> <timothy.mcdaniel@intel.com>; Hemant Agrawal <hemant.agrawal@nxp.com>;
> Nipun Gupta <nipun.gupta@nxp.com>; mattias.ronnblom
> <mattias.ronnblom@ericsson.com>; Ray Kinsella <mdr@ashroe.eu>
> Cc: dpdk-dev <dev@dpdk.org>; Jerin Jacob <jerinj@marvell.com>; Pavan
> Nikhilesh <pbhagavatula@marvell.com>; Liang Ma <liangma@liangbit.com>
> Subject: Re: [PATCH 0/6] Extend and set event queue attributes at runtime
>
> On Tue, Mar 29, 2022 at 6:42 PM Shijith Thotton <sthotton@marvell.com> wrote:
> >
> > This series adds support for setting event queue attributes at runtime
> > and adds two new event queue attributes weight and affinity. Eventdev
> > capability RTE_EVENT_DEV_CAP_RUNTIME_QUEUE_ATTR is added to expose
> the
> > capability to set attributes at runtime and rte_event_queue_attr_set()
> > API is used to set the attributes.
> >
> > Attributes weight and affinity are not yet added to rte_event_queue_conf
> > structure to avoid ABI break and will be added in 22.11. Till then, PMDs
> > using the new attributes are expected to manage them.
When the new attributes are added to queue_conf structure in 22.11, will the attr_get() function have any real use?
If the attr_get() function is not useful post 22.11 (aka, returns const-integers?), we should consider if waiting
for ABI-break in 22.11 is a better solution as it doesn't add public API/ABI functions that only have limited time value..?
<snip>
> + @Van Haaren, Harry @Jayatheerthan, Jay @Erik Gabriel Carrillo
> @Gujjar, Abhinandan S @McDaniel, Timothy @Hemant Agrawal @Nipun
> Gupta @Mattias Rönnblom @lingma @Ray Kinsella
Thanks for flagging Jerin, indeed I hadn't looked at this patchset yet.
From event/sw point of view, the new runtime queue attribute capability is not
available, so the feature flag will not be set.
<snip>
Some code comments inline on the impl patches comping up. Regards, -Harry
^ permalink raw reply [relevance 4%]
* Re: [PATCH 0/6] Extend and set event queue attributes at runtime
2022-03-29 13:10 3% [PATCH 0/6] Extend and set event queue attributes at runtime Shijith Thotton
2022-03-29 13:11 3% ` [PATCH 2/6] eventdev: add weight and affinity to queue attributes Shijith Thotton
@ 2022-03-29 18:49 0% ` Jerin Jacob
2022-03-30 10:52 4% ` Van Haaren, Harry
2022-04-05 5:40 3% ` [PATCH v2 " Shijith Thotton
3 siblings, 1 reply; 200+ results
From: Jerin Jacob @ 2022-03-29 18:49 UTC (permalink / raw)
To: Shijith Thotton, Van Haaren, Harry, Jayatheerthan, Jay,
Erik Gabriel Carrillo, Gujjar, Abhinandan S, McDaniel, Timothy,
Hemant Agrawal, Nipun Gupta, Mattias Rönnblom, Ray Kinsella
Cc: dpdk-dev, Jerin Jacob, Pavan Nikhilesh, Liang Ma
On Tue, Mar 29, 2022 at 6:42 PM Shijith Thotton <sthotton@marvell.com> wrote:
>
> This series adds support for setting event queue attributes at runtime
> and adds two new event queue attributes weight and affinity. Eventdev
> capability RTE_EVENT_DEV_CAP_RUNTIME_QUEUE_ATTR is added to expose the
> capability to set attributes at runtime and rte_event_queue_attr_set()
> API is used to set the attributes.
>
> Attributes weight and affinity are not yet added to rte_event_queue_conf
> structure to avoid ABI break and will be added in 22.11. Till then, PMDs
> using the new attributes are expected to manage them.
>
> Test application changes and example implementation are added as last
> three patches.
+ @Van Haaren, Harry @Jayatheerthan, Jay @Erik Gabriel Carrillo
@Gujjar, Abhinandan S @McDaniel, Timothy @Hemant Agrawal @Nipun
Gupta @Mattias Rönnblom @lingma @Ray Kinsella
> Pavan Nikhilesh (1):
> common/cnxk: use lock when accessing mbox of SSO
>
> Shijith Thotton (5):
> eventdev: support to set queue attributes at runtime
> eventdev: add weight and affinity to queue attributes
> doc: announce change in event queue conf structure
> test/event: test cases to test runtime queue attribute
> event/cnxk: support to set runtime queue attributes
>
> app/test/test_eventdev.c | 146 ++++++++++++++++++
> doc/guides/eventdevs/features/cnxk.ini | 1 +
> doc/guides/eventdevs/features/default.ini | 1 +
> doc/guides/rel_notes/deprecation.rst | 3 +
> drivers/common/cnxk/roc_sso.c | 174 ++++++++++++++++------
> drivers/common/cnxk/roc_sso_priv.h | 1 +
> drivers/common/cnxk/roc_tim.c | 134 +++++++++++------
> drivers/event/cnxk/cn10k_eventdev.c | 4 +
> drivers/event/cnxk/cn9k_eventdev.c | 4 +
> drivers/event/cnxk/cnxk_eventdev.c | 81 +++++++++-
> drivers/event/cnxk/cnxk_eventdev.h | 16 ++
> lib/eventdev/eventdev_pmd.h | 44 ++++++
> lib/eventdev/rte_eventdev.c | 43 ++++++
> lib/eventdev/rte_eventdev.h | 75 +++++++++-
> lib/eventdev/version.map | 3 +
> 15 files changed, 627 insertions(+), 103 deletions(-)
>
> --
> 2.25.1
>
^ permalink raw reply [relevance 0%]
* [PATCH 2/6] eventdev: add weight and affinity to queue attributes
2022-03-29 13:10 3% [PATCH 0/6] Extend and set event queue attributes at runtime Shijith Thotton
@ 2022-03-29 13:11 3% ` Shijith Thotton
2022-03-30 12:12 0% ` Mattias Rönnblom
2022-03-29 18:49 0% ` [PATCH 0/6] Extend and set event queue attributes at runtime Jerin Jacob
2022-04-05 5:40 3% ` [PATCH v2 " Shijith Thotton
3 siblings, 1 reply; 200+ results
From: Shijith Thotton @ 2022-03-29 13:11 UTC (permalink / raw)
To: dev, jerinj; +Cc: Shijith Thotton, pbhagavatula
Extended eventdev queue QoS attributes to support weight and affinity.
If queues are of same priority, events from the queue with highest
weight will be scheduled first. Affinity indicates the number of times,
the subsequent schedule calls from an event port will use the same event
queue. Schedule call selects another queue if current queue goes empty
or schedule count reaches affinity count.
To avoid ABI break, weight and affinity attributes are not yet added to
queue config structure and relies on PMD for managing it. New eventdev
op queue_attr_get can be used to get it from the PMD.
Signed-off-by: Shijith Thotton <sthotton@marvell.com>
---
lib/eventdev/eventdev_pmd.h | 22 ++++++++++++++++++++
lib/eventdev/rte_eventdev.c | 12 +++++++++++
lib/eventdev/rte_eventdev.h | 41 +++++++++++++++++++++++++++++++++----
3 files changed, 71 insertions(+), 4 deletions(-)
diff --git a/lib/eventdev/eventdev_pmd.h b/lib/eventdev/eventdev_pmd.h
index 6182749503..f19df98a7a 100644
--- a/lib/eventdev/eventdev_pmd.h
+++ b/lib/eventdev/eventdev_pmd.h
@@ -341,6 +341,26 @@ typedef int (*eventdev_queue_setup_t)(struct rte_eventdev *dev,
typedef void (*eventdev_queue_release_t)(struct rte_eventdev *dev,
uint8_t queue_id);
+/**
+ * Get an event queue attribute at runtime.
+ *
+ * @param dev
+ * Event device pointer
+ * @param queue_id
+ * Event queue index
+ * @param attr_id
+ * Event queue attribute id
+ * @param[out] attr_value
+ * Event queue attribute value
+ *
+ * @return
+ * - 0: Success.
+ * - <0: Error code on failure.
+ */
+typedef int (*eventdev_queue_attr_get_t)(struct rte_eventdev *dev,
+ uint8_t queue_id, uint32_t attr_id,
+ uint32_t *attr_value);
+
/**
* Set an event queue attribute at runtime.
*
@@ -1231,6 +1251,8 @@ struct eventdev_ops {
/**< Set up an event queue. */
eventdev_queue_release_t queue_release;
/**< Release an event queue. */
+ eventdev_queue_attr_get_t queue_attr_get;
+ /**< Get an event queue attribute. */
eventdev_queue_attr_set_t queue_attr_set;
/**< Set an event queue attribute. */
diff --git a/lib/eventdev/rte_eventdev.c b/lib/eventdev/rte_eventdev.c
index 13c8af877e..37f0e54bf3 100644
--- a/lib/eventdev/rte_eventdev.c
+++ b/lib/eventdev/rte_eventdev.c
@@ -838,6 +838,18 @@ rte_event_queue_attr_get(uint8_t dev_id, uint8_t queue_id, uint32_t attr_id,
*attr_value = conf->schedule_type;
break;
+ case RTE_EVENT_QUEUE_ATTR_WEIGHT:
+ *attr_value = RTE_EVENT_QUEUE_WEIGHT_LOWEST;
+ if (dev->dev_ops->queue_attr_get)
+ return (*dev->dev_ops->queue_attr_get)(
+ dev, queue_id, attr_id, attr_value);
+ break;
+ case RTE_EVENT_QUEUE_ATTR_AFFINITY:
+ *attr_value = RTE_EVENT_QUEUE_AFFINITY_LOWEST;
+ if (dev->dev_ops->queue_attr_get)
+ return (*dev->dev_ops->queue_attr_get)(
+ dev, queue_id, attr_id, attr_value);
+ break;
default:
return -EINVAL;
};
diff --git a/lib/eventdev/rte_eventdev.h b/lib/eventdev/rte_eventdev.h
index 19710cd0c5..fa16fc5dcb 100644
--- a/lib/eventdev/rte_eventdev.h
+++ b/lib/eventdev/rte_eventdev.h
@@ -222,8 +222,14 @@ struct rte_event;
/* Event device capability bitmap flags */
#define RTE_EVENT_DEV_CAP_QUEUE_QOS (1ULL << 0)
-/**< Event scheduling prioritization is based on the priority associated with
- * each event queue.
+/**< Event scheduling prioritization is based on the priority and weight
+ * associated with each event queue. Events from a queue with highest priority
+ * is scheduled first. If the queues are of same priority, a queue with highest
+ * weight is selected. Subsequent schedules from an event port could see events
+ * from the same event queue if the queue is configured with an affinity count.
+ * Affinity count of a queue indicates the number of times, the subsequent
+ * schedule calls from an event port should use the same queue if the queue is
+ * non-empty.
*
* @see rte_event_queue_setup(), rte_event_queue_attr_set()
*/
@@ -331,6 +337,26 @@ struct rte_event;
* @see rte_event_port_link()
*/
+/* Event queue scheduling weights */
+#define RTE_EVENT_QUEUE_WEIGHT_HIGHEST 255
+/**< Highest weight of an event queue
+ * @see rte_event_queue_attr_get(), rte_event_queue_attr_set()
+ */
+#define RTE_EVENT_QUEUE_WEIGHT_LOWEST 0
+/**< Lowest weight of an event queue
+ * @see rte_event_queue_attr_get(), rte_event_queue_attr_set()
+ */
+
+/* Event queue scheduling affinity */
+#define RTE_EVENT_QUEUE_AFFINITY_HIGHEST 255
+/**< Highest scheduling affinity of an event queue
+ * @see rte_event_queue_attr_get(), rte_event_queue_attr_set()
+ */
+#define RTE_EVENT_QUEUE_AFFINITY_LOWEST 0
+/**< Lowest scheduling affinity of an event queue
+ * @see rte_event_queue_attr_get(), rte_event_queue_attr_set()
+ */
+
/**
* Get the total number of event devices that have been successfully
* initialised.
@@ -684,11 +710,18 @@ rte_event_queue_setup(uint8_t dev_id, uint8_t queue_id,
* The schedule type of the queue.
*/
#define RTE_EVENT_QUEUE_ATTR_SCHEDULE_TYPE 4
-
+/**
+ * The weight of the queue.
+ */
+#define RTE_EVENT_QUEUE_ATTR_WEIGHT 5
+/**
+ * Affinity of the queue.
+ */
+#define RTE_EVENT_QUEUE_ATTR_AFFINITY 6
/**
* Maximum supported attribute ID.
*/
-#define RTE_EVENT_QUEUE_ATTR_MAX RTE_EVENT_QUEUE_ATTR_SCHEDULE_TYPE
+#define RTE_EVENT_QUEUE_ATTR_MAX RTE_EVENT_QUEUE_ATTR_AFFINITY
/**
* Get an attribute from a queue.
--
2.25.1
^ permalink raw reply [relevance 3%]
* [PATCH 0/6] Extend and set event queue attributes at runtime
@ 2022-03-29 13:10 3% Shijith Thotton
` (3 more replies)
0 siblings, 4 replies; 200+ results
From: Shijith Thotton @ 2022-03-29 13:10 UTC (permalink / raw)
To: dev, jerinj; +Cc: Shijith Thotton, pbhagavatula
This series adds support for setting event queue attributes at runtime
and adds two new event queue attributes weight and affinity. Eventdev
capability RTE_EVENT_DEV_CAP_RUNTIME_QUEUE_ATTR is added to expose the
capability to set attributes at runtime and rte_event_queue_attr_set()
API is used to set the attributes.
Attributes weight and affinity are not yet added to rte_event_queue_conf
structure to avoid ABI break and will be added in 22.11. Till then, PMDs
using the new attributes are expected to manage them.
Test application changes and example implementation are added as last
three patches.
Pavan Nikhilesh (1):
common/cnxk: use lock when accessing mbox of SSO
Shijith Thotton (5):
eventdev: support to set queue attributes at runtime
eventdev: add weight and affinity to queue attributes
doc: announce change in event queue conf structure
test/event: test cases to test runtime queue attribute
event/cnxk: support to set runtime queue attributes
app/test/test_eventdev.c | 146 ++++++++++++++++++
doc/guides/eventdevs/features/cnxk.ini | 1 +
doc/guides/eventdevs/features/default.ini | 1 +
doc/guides/rel_notes/deprecation.rst | 3 +
drivers/common/cnxk/roc_sso.c | 174 ++++++++++++++++------
drivers/common/cnxk/roc_sso_priv.h | 1 +
drivers/common/cnxk/roc_tim.c | 134 +++++++++++------
drivers/event/cnxk/cn10k_eventdev.c | 4 +
drivers/event/cnxk/cn9k_eventdev.c | 4 +
drivers/event/cnxk/cnxk_eventdev.c | 81 +++++++++-
drivers/event/cnxk/cnxk_eventdev.h | 16 ++
lib/eventdev/eventdev_pmd.h | 44 ++++++
lib/eventdev/rte_eventdev.c | 43 ++++++
lib/eventdev/rte_eventdev.h | 75 +++++++++-
lib/eventdev/version.map | 3 +
15 files changed, 627 insertions(+), 103 deletions(-)
--
2.25.1
^ permalink raw reply [relevance 3%]
* Re: [PATCH] devtools: document ABI suppression rules
2022-03-23 9:24 13% [PATCH] devtools: document ABI suppression rules David Marchand
@ 2022-03-29 9:37 4% ` Thomas Monjalon
0 siblings, 0 replies; 200+ results
From: Thomas Monjalon @ 2022-03-29 9:37 UTC (permalink / raw)
To: David Marchand; +Cc: dev, Ray Kinsella
23/03/2022 10:24, David Marchand:
> Suppression rules are being added during the life of an ABI and cleaned
> when bumping the major version.
> Sort and document those rules to avoid pruning rules that should be
> kept.
>
> Signed-off-by: David Marchand <david.marchand@redhat.com>
Good idea.
Applied, thanks.
^ permalink raw reply [relevance 4%]
* [PATCH] devtools: document ABI suppression rules
@ 2022-03-23 9:24 13% David Marchand
2022-03-29 9:37 4% ` Thomas Monjalon
0 siblings, 1 reply; 200+ results
From: David Marchand @ 2022-03-23 9:24 UTC (permalink / raw)
To: dev; +Cc: thomas, Ray Kinsella
Suppression rules are being added during the life of an ABI and cleaned
when bumping the major version.
Sort and document those rules to avoid pruning rules that should be
kept.
Signed-off-by: David Marchand <david.marchand@redhat.com>
---
devtools/libabigail.abignore | 20 ++++++++++++++++----
1 file changed, 16 insertions(+), 4 deletions(-)
diff --git a/devtools/libabigail.abignore b/devtools/libabigail.abignore
index c618f20032..587cc5c381 100644
--- a/devtools/libabigail.abignore
+++ b/devtools/libabigail.abignore
@@ -1,3 +1,7 @@
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+; Core suppression rules: DO NOT TOUCH;
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
[suppress_function]
symbol_version = EXPERIMENTAL
[suppress_variable]
@@ -16,15 +20,23 @@
[suppress_file]
soname_regexp = ^librte_.*mlx.*glue\.
-; Ignore fields inserted in place of reserved_opts of rte_security_ipsec_sa_options
-[suppress_type]
- name = rte_security_ipsec_sa_options
- has_data_member_inserted_between = {offset_of(reserved_opts), end}
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+; Experimental APIs exceptions ;
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Ignore changes to rte_crypto_asym_op, asymmetric crypto API is experimental
[suppress_type]
name = rte_crypto_asym_op
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+; Temporary exceptions till next major ABI version ;
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+; Ignore fields inserted in place of reserved_opts of rte_security_ipsec_sa_options
+[suppress_type]
+ name = rte_security_ipsec_sa_options
+ has_data_member_inserted_between = {offset_of(reserved_opts), end}
+
; Ignore section attribute fixes in experimental regexdev library
[suppress_file]
soname_regexp = ^librte_regexdev\.
--
2.23.0
^ permalink raw reply [relevance 13%]
* Re: [PATCH] version: 22.07-rc0
2022-03-22 9:15 0% ` Ray Kinsella
@ 2022-03-22 10:35 0% ` Thomas Monjalon
0 siblings, 0 replies; 200+ results
From: Thomas Monjalon @ 2022-03-22 10:35 UTC (permalink / raw)
To: David Marchand, Ray Kinsella; +Cc: dev, Aaron Conole, Michael Santana
22/03/2022 10:15, Ray Kinsella:
> David Marchand <david.marchand@redhat.com> writes:
> > On Mon, Mar 21, 2022 at 2:01 PM Thomas Monjalon <thomas@monjalon.net> wrote:
> >> 18/03/2022 15:35, David Marchand:
> >> > +* No ABI change that would break compatibility with 21.11.
> >>
> >> Should we say 21.11 and 22.03?
> >
> > In practice, compatibility is probably maintained, but we are
> > committed to maintain ABI compatibility with v21.11 only.
> > So I would leave this as is.
> >
> > http://inbox.dpdk.org/dev/27c97b09-0b78-ccbc-db1e-860ac6012aec@ashroe.eu/
>
> Agreed +1 - our only commitment is to v21.11.
> Otherwise things would start to get very complicated. :-)
I don't think it would be more complicated.
In reality, we are already testing compatibility with minor versions,
and there is no issue.
^ permalink raw reply [relevance 0%]
* Re: [PATCH] version: 22.07-rc0
2022-03-21 14:09 3% ` David Marchand
@ 2022-03-22 9:15 0% ` Ray Kinsella
2022-03-22 10:35 0% ` Thomas Monjalon
0 siblings, 1 reply; 200+ results
From: Ray Kinsella @ 2022-03-22 9:15 UTC (permalink / raw)
To: David Marchand; +Cc: Thomas Monjalon, dev, Aaron Conole, Michael Santana
David Marchand <david.marchand@redhat.com> writes:
> On Mon, Mar 21, 2022 at 2:01 PM Thomas Monjalon <thomas@monjalon.net> wrote:
>>
>> 18/03/2022 15:35, David Marchand:
>> > +ABI Changes
>> > +-----------
>> > +
>> > +.. This section should contain ABI changes. Sample format:
>> > +
>> > + * sample: Add a short 1-2 sentence description of the ABI change
>> > + which was announced in the previous releases and made in this release.
>> > + Start with a scope label like "ethdev:".
>> > + Use fixed width quotes for ``function_names`` or ``struct_names``.
>> > + Use the past tense.
>> > +
>> > + This section is a comment. Do not overwrite or remove it.
>> > + Also, make sure to start the actual text at the margin.
>> > + =======================================================
>> > +
>> > +* No ABI change that would break compatibility with 21.11.
>>
>> Should we say 21.11 and 22.03?
>
> In practice, compatibility is probably maintained, but we are
> committed to maintain ABI compatibility with v21.11 only.
> So I would leave this as is.
>
> http://inbox.dpdk.org/dev/27c97b09-0b78-ccbc-db1e-860ac6012aec@ashroe.eu/
Agreed +1 - our only commitment is to v21.11.
Otherwise things would start to get very complicated. :-)
--
Regards, Ray K
^ permalink raw reply [relevance 0%]
* Re: [PATCH] version: 22.07-rc0
2022-03-18 15:46 0% ` Aaron Conole
@ 2022-03-21 15:41 0% ` Thomas Monjalon
0 siblings, 0 replies; 200+ results
From: Thomas Monjalon @ 2022-03-21 15:41 UTC (permalink / raw)
To: David Marchand; +Cc: dev, Michael Santana, Aaron Conole
18/03/2022 16:46, Aaron Conole:
> David Marchand <david.marchand@redhat.com> writes:
>
> > Start a new release cycle with empty release notes.
> > Bump version and ABI minor.
> >
> > Signed-off-by: David Marchand <david.marchand@redhat.com>
> > Acked-by: Thomas Monjalon <thomas@monjalon.net>
> Acked-by: Aaron Conole <aconole@redhat.com>
Applied, thanks
^ permalink raw reply [relevance 0%]
* Re: [PATCH] version: 22.07-rc0
2022-03-21 13:01 0% ` Thomas Monjalon
@ 2022-03-21 14:09 3% ` David Marchand
2022-03-22 9:15 0% ` Ray Kinsella
0 siblings, 1 reply; 200+ results
From: David Marchand @ 2022-03-21 14:09 UTC (permalink / raw)
To: Thomas Monjalon; +Cc: dev, Aaron Conole, Michael Santana, Ray Kinsella
On Mon, Mar 21, 2022 at 2:01 PM Thomas Monjalon <thomas@monjalon.net> wrote:
>
> 18/03/2022 15:35, David Marchand:
> > +ABI Changes
> > +-----------
> > +
> > +.. This section should contain ABI changes. Sample format:
> > +
> > + * sample: Add a short 1-2 sentence description of the ABI change
> > + which was announced in the previous releases and made in this release.
> > + Start with a scope label like "ethdev:".
> > + Use fixed width quotes for ``function_names`` or ``struct_names``.
> > + Use the past tense.
> > +
> > + This section is a comment. Do not overwrite or remove it.
> > + Also, make sure to start the actual text at the margin.
> > + =======================================================
> > +
> > +* No ABI change that would break compatibility with 21.11.
>
> Should we say 21.11 and 22.03?
In practice, compatibility is probably maintained, but we are
committed to maintain ABI compatibility with v21.11 only.
So I would leave this as is.
http://inbox.dpdk.org/dev/27c97b09-0b78-ccbc-db1e-860ac6012aec@ashroe.eu/
--
David Marchand
^ permalink raw reply [relevance 3%]
* Re: [PATCH] version: 22.07-rc0
2022-03-18 15:46 0% ` Aaron Conole
@ 2022-03-21 13:01 0% ` Thomas Monjalon
2022-03-21 14:09 3% ` David Marchand
1 sibling, 1 reply; 200+ results
From: Thomas Monjalon @ 2022-03-21 13:01 UTC (permalink / raw)
To: David Marchand; +Cc: dev, Aaron Conole, Michael Santana
18/03/2022 15:35, David Marchand:
> +ABI Changes
> +-----------
> +
> +.. This section should contain ABI changes. Sample format:
> +
> + * sample: Add a short 1-2 sentence description of the ABI change
> + which was announced in the previous releases and made in this release.
> + Start with a scope label like "ethdev:".
> + Use fixed width quotes for ``function_names`` or ``struct_names``.
> + Use the past tense.
> +
> + This section is a comment. Do not overwrite or remove it.
> + Also, make sure to start the actual text at the margin.
> + =======================================================
> +
> +* No ABI change that would break compatibility with 21.11.
Should we say 21.11 and 22.03?
^ permalink raw reply [relevance 0%]
* Re: [PATCH] version: 22.07-rc0
@ 2022-03-18 15:46 0% ` Aaron Conole
2022-03-21 15:41 0% ` Thomas Monjalon
2022-03-21 13:01 0% ` Thomas Monjalon
1 sibling, 1 reply; 200+ results
From: Aaron Conole @ 2022-03-18 15:46 UTC (permalink / raw)
To: David Marchand; +Cc: dev, thomas, Michael Santana
David Marchand <david.marchand@redhat.com> writes:
> Start a new release cycle with empty release notes.
> Bump version and ABI minor.
>
> Signed-off-by: David Marchand <david.marchand@redhat.com>
> Acked-by: Thomas Monjalon <thomas@monjalon.net>
> ---
Acked-by: Aaron Conole <aconole@redhat.com>
^ permalink raw reply [relevance 0%]
Results 2201-2400 of ~18000 next (older) | prev (newer) | reverse | sort options + mbox downloads above
-- links below jump to the message on this page --
2020-10-09 3:48 [dpdk-dev] [PATCH v6 0/3] librte_ethdev: error recovery support Kalesh A P
2022-02-11 10:09 ` [dpdk-dev] [PATCH v7 1/4] ethdev: support device reset and recovery events Ray Kinsella
2022-02-14 10:16 ` Ray Kinsella
2022-02-14 11:15 ` Thomas Monjalon
2022-02-14 16:06 ` Ray Kinsella
2022-05-21 10:33 0% ` fengchengwen
2022-05-24 15:11 0% ` Ray Kinsella
2022-02-17 17:23 [PATCH v3 0/4] app/test: add inline IPsec and reassembly cases Akhil Goyal
2022-04-16 19:25 ` [PATCH v4 00/10] " Akhil Goyal
2022-04-16 19:25 ` [PATCH v4 07/10] ethdev: add IPsec SA expiry event subtypes Akhil Goyal
2022-04-19 8:58 3% ` Thomas Monjalon
2022-04-19 10:14 3% ` [EXT] " Akhil Goyal
2022-04-19 10:19 0% ` Anoob Joseph
2022-04-19 10:47 0% ` Thomas Monjalon
2022-04-19 12:27 0% ` Akhil Goyal
2022-04-19 15:41 0% ` Ray Kinsella
2022-04-20 13:51 0% ` Akhil Goyal
2022-03-01 8:58 [PATCH v3 1/1] ethdev: mtr: support input color selection skori
2022-04-21 18:02 5% ` [dpdk-dev] [PATCH v4] ethdev: mtr: support protocol based " jerinj
2022-04-26 10:19 0% ` Ray Kinsella
2022-05-01 14:46 5% ` [dpdk-dev] [PATCH v5] " jerinj
2022-03-06 9:20 [PATCH 0/2] add missing local symbols catch-all Thomas Monjalon
2022-03-08 14:24 ` [PATCH v2 " Thomas Monjalon
2022-03-08 14:24 ` [PATCH v2 2/2] build: hide local symbols in shared libraries Thomas Monjalon
2022-04-15 14:56 0% ` Ray Kinsella
2022-03-10 23:49 [PATCH v1] bbdev: add new operation for FFT processing Nicolas Chautru
2022-03-10 23:49 ` Nicolas Chautru
2022-05-25 22:07 ` Chautru, Nicolas
2022-05-26 6:05 ` Hemant Agrawal
2022-06-07 11:29 3% ` David Marchand
2022-03-17 17:43 [PATCH] net/pcap: support MTU set ido g
2022-05-30 10:36 3% ` [PATCH v3] pcap: " Ido Goshen
2022-05-30 18:05 0% ` Ferruh Yigit
2022-05-31 13:12 0% ` Ido Goshen
2022-06-06 16:21 3% ` [PATCH v4] " Ido Goshen
2022-06-06 17:10 0% ` Stephen Hemminger
2022-06-06 19:07 3% ` Ido Goshen
2022-06-07 6:27 3% ` [PATCH v5] pcap: support MTU set for linux interafces Ido Goshen
2022-03-18 14:35 [PATCH] version: 22.07-rc0 David Marchand
2022-03-18 15:46 0% ` Aaron Conole
2022-03-21 15:41 0% ` Thomas Monjalon
2022-03-21 13:01 0% ` Thomas Monjalon
2022-03-21 14:09 3% ` David Marchand
2022-03-22 9:15 0% ` Ray Kinsella
2022-03-22 10:35 0% ` Thomas Monjalon
2022-03-23 9:24 13% [PATCH] devtools: document ABI suppression rules David Marchand
2022-03-29 9:37 4% ` Thomas Monjalon
2022-03-23 9:30 [PATCH] eal: factorize lcore main loop David Marchand
2022-04-01 8:44 ` [PATCH v2 1/2] eal: cleanup lcore ID hand-over David Marchand
2022-04-01 8:44 ` [PATCH v2 2/2] eal: factorize lcore main loop David Marchand
2022-04-05 7:05 3% ` David Marchand
2022-04-05 16:34 ` [PATCH v3 1/2] eal: cleanup lcore ID hand-over David Marchand
2022-04-05 16:34 2% ` [PATCH v3 2/2] eal: factorize lcore main loop David Marchand
2022-04-14 11:48 0% ` David Marchand
2022-03-25 11:16 [PATCH 0/2] Session crypto event metadata api Volodymyr Fialko
2022-03-25 11:16 ` [PATCH 1/2] security: introduce per session event metadata Volodymyr Fialko
2022-04-04 8:38 ` Gujjar, Abhinandan S
2022-04-04 9:48 3% ` Akhil Goyal
2022-04-04 10:42 0% ` Gujjar, Abhinandan S
2022-04-13 7:13 3% ` Akhil Goyal
2022-04-18 19:36 0% ` Akhil Goyal
2022-04-18 19:33 4% ` [PATCH v2 0/7] Add new cryptodev op for " Akhil Goyal
2022-04-18 19:33 2% ` [PATCH v2 1/7] cryptodev: add APIs to get/set " Akhil Goyal
2022-04-21 14:37 4% ` [PATCH v3 0/7] Add new cryptodev op for " Akhil Goyal
2022-04-21 14:37 2% ` [PATCH v3 1/7] cryptodev: add APIs to get/set " Akhil Goyal
2022-04-27 15:38 0% ` Zhang, Roy Fan
2022-04-28 14:42 0% ` Gujjar, Abhinandan S
2022-04-27 15:37 0% ` [PATCH v3 0/7] Add new cryptodev op for " Zhang, Roy Fan
2022-04-28 14:24 0% ` Gujjar, Abhinandan S
2022-05-01 19:24 4% ` [PATCH v4 " Akhil Goyal
2022-05-01 19:24 2% ` [PATCH v4 1/7] cryptodev: add APIs to get/set " Akhil Goyal
2022-05-02 9:01 0% ` Anoob Joseph
2022-05-02 11:06 0% ` Gujjar, Abhinandan S
2022-05-02 11:08 0% ` [PATCH v4 0/7] Add new cryptodev op for " Gujjar, Abhinandan S
2022-05-12 12:45 4% ` [PATCH v5 " Akhil Goyal
2022-05-12 12:45 2% ` [PATCH v5 1/7] cryptodev: add APIs to get/set " Akhil Goyal
2022-05-16 18:30 0% ` [PATCH v5 0/7] Add new cryptodev op for " Akhil Goyal
2022-03-29 13:10 3% [PATCH 0/6] Extend and set event queue attributes at runtime Shijith Thotton
2022-03-29 13:11 ` [PATCH 1/6] eventdev: support to set " Shijith Thotton
2022-03-30 10:58 ` Van Haaren, Harry
2022-04-04 9:35 3% ` Shijith Thotton
2022-04-04 9:45 4% ` Van Haaren, Harry
2022-03-30 12:14 3% ` Mattias Rönnblom
2022-04-04 11:45 0% ` Shijith Thotton
2022-03-29 13:11 3% ` [PATCH 2/6] eventdev: add weight and affinity to queue attributes Shijith Thotton
2022-03-30 12:12 0% ` Mattias Rönnblom
2022-04-04 9:33 0% ` Shijith Thotton
2022-03-29 18:49 0% ` [PATCH 0/6] Extend and set event queue attributes at runtime Jerin Jacob
2022-03-30 10:52 4% ` Van Haaren, Harry
2022-04-04 7:57 0% ` Shijith Thotton
2022-04-05 5:40 3% ` [PATCH v2 " Shijith Thotton
2022-04-05 5:40 3% ` [PATCH v2 2/6] eventdev: add weight and affinity to queue attributes Shijith Thotton
2022-05-09 12:46 0% ` Jerin Jacob
2022-04-11 11:07 3% ` [PATCH v2 0/6] Extend and set event queue attributes at runtime Shijith Thotton
2022-05-15 9:53 3% ` [PATCH v3 0/5] " Shijith Thotton
2022-05-15 9:53 3% ` [PATCH v3 2/5] eventdev: add weight and affinity to queue attributes Shijith Thotton
2022-05-16 17:35 3% ` [PATCH v4 0/5] Extend and set event queue attributes at runtime Shijith Thotton
2022-05-16 17:35 3% ` [PATCH v4 2/5] eventdev: add weight and affinity to queue attributes Shijith Thotton
2022-03-31 21:28 [PATCH 0/3] doc: build on Windows Dmitry Kozlyuk
2022-03-31 21:28 6% ` [PATCH 2/3] doc: fix API index Markdown syntax Dmitry Kozlyuk
2022-04-06 17:10 ` [PATCH v2 0/3] doc: build on Windows Dmitry Kozlyuk
2022-04-06 17:10 6% ` [PATCH v2 2/3] doc: fix API index Markdown syntax Dmitry Kozlyuk
2022-04-01 3:22 [RFC 1/6] net/mlx5: add LWM support for Rxq Spike Du
2022-05-06 3:56 ` [RFC v1 0/7] net/mlx5: introduce limit watermark and host shaper Spike Du
2022-05-06 3:56 ` [RFC v1 3/7] ethdev: introduce Rx queue based limit watermark Spike Du
2022-05-19 9:37 4% ` Andrew Rybchenko
2022-05-22 5:58 ` [RFC v2 0/7] introduce per-queue limit watermark and host shaper Spike Du
2022-05-22 5:58 ` [RFC v2 3/7] ethdev: introduce Rx queue based limit watermark Spike Du
2022-05-22 15:23 3% ` Stephen Hemminger
2022-05-23 3:01 0% ` Spike Du
2022-05-23 21:45 4% ` Thomas Monjalon
2022-05-24 2:50 3% ` Spike Du
2022-05-24 8:18 3% ` Thomas Monjalon
2022-05-25 12:59 4% ` Andrew Rybchenko
2022-05-25 13:58 3% ` Thomas Monjalon
2022-05-25 14:23 0% ` Andrew Rybchenko
2022-05-23 22:54 0% ` Stephen Hemminger
2022-05-24 3:46 0% ` Spike Du
2022-04-01 10:22 2% 21.11.1 patches review and test Kevin Traynor
2022-04-11 3:03 0% ` Pei Zhang
2022-04-13 4:06 0% ` YangHang Liu
2022-04-11 6:58 0% ` Christian Ehrhardt
2022-04-13 7:26 0% ` Christian Ehrhardt
2022-04-13 10:06 3% ` Kevin Traynor
2022-04-14 5:52 0% ` Christian Ehrhardt
2022-04-14 9:08 4% ` Kevin Traynor
2022-04-20 5:50 3% ` Christian Ehrhardt
2022-04-25 13:39 0% ` Kevin Traynor
2022-04-02 10:41 [v4 1/3] ethdev: introduce protocol type based header split wenxuanx.wu
2022-04-26 11:13 ` [PATCH v5 0/3] ethdev: introduce protocol based buffer split wenxuanx.wu
2022-04-26 11:13 ` [PATCH v5 1/4] lib/ethdev: introduce protocol type " wenxuanx.wu
2022-05-17 21:12 3% ` Thomas Monjalon
2022-05-19 14:40 0% ` Ding, Xuan
2022-05-26 14:58 0% ` Ding, Xuan
2022-04-06 15:04 [RFC PATCH v1 00/18] merge DTS component files to DPDK Juraj Linkeš
2022-04-06 15:04 1% ` [RFC PATCH v1 02/18] dts: merge DTS framework/dut.py " Juraj Linkeš
2022-04-07 5:30 [RFC 0/2] queue-based flow aged report Xiaoyu Min
2022-04-07 5:30 ` [RFC 1/2] ethdev: port flags for pre-configuration flow hints Xiaoyu Min
2022-04-07 15:04 3% ` Stephen Hemminger
2022-04-08 2:35 4% ` Jack Min
2022-04-12 16:16 [DPDK v2] net/ixgbe: promote MDIO API zhichaox.zeng
2022-04-12 17:56 ` [DPDK v3] " zhichaox.zeng
2022-04-15 14:36 4% ` Ray Kinsella
2022-04-18 6:41 0% ` Yang, Qiming
2022-04-15 17:31 [PATCH 0/3] Enable ASan in GHA David Marchand
2022-04-15 17:31 3% ` [PATCH 3/3] ci: build some job with ASan David Marchand
2022-05-05 9:29 ` [PATCH v2 0/2] Enable ASan in GHA David Marchand
2022-05-05 9:29 3% ` [PATCH v2 2/2] ci: build some job with ASan David Marchand
2022-04-19 9:01 15% [PATCH] doc: fix typos 'depreciated' instead of 'deprecated' Stephen Coleman
2022-04-19 15:44 0% ` Ray Kinsella
2022-04-19 16:14 [RFC] eal: add bus cleanup to eal cleanup Kevin Laatz
2022-04-20 6:55 4% ` Morten Brørup
2022-04-22 9:18 4% ` Kevin Laatz
2022-04-22 12:14 0% ` Morten Brørup
2022-06-03 14:36 ` [PATCH v7] " Kevin Laatz
2022-06-07 11:09 ` Thomas Monjalon
2022-06-07 15:12 3% ` David Marchand
2022-04-21 4:38 16% kni: check abi version between kmod and lib Stephen Coleman
2022-04-21 14:16 4% ` Ray Kinsella
2022-04-21 14:54 4% ` Stephen Hemminger
2022-04-21 15:40 8% ` Ray Kinsella
2022-04-21 15:50 4% ` Stephen Hemminger
2022-04-22 8:46 8% ` Ray Kinsella
2022-04-22 10:07 4% ` Stephen Coleman
2022-04-21 16:34 15% ` [PATCH v2] " youcai
2022-04-24 8:51 15% ` [PATCH v3] " youcai
2022-04-24 10:35 4% ` Stephen Coleman
2022-04-21 12:30 [PATCH 0/6] move DPAA2 QDMA driver freom raw to dma nipun.gupta
2022-05-05 9:05 ` [PATCH v3 " nipun.gupta
2022-05-26 6:00 ` Hemant Agrawal
2022-05-31 15:29 3% ` Thomas Monjalon
2022-04-25 23:38 librte_bpf: roadmap or any specific plans for this library Björn Svensson A
2022-04-28 10:34 4% ` David Marchand
2022-04-26 7:18 4% [PATCH 1/2] ci: switch to Ubuntu 20.04 David Marchand
2022-05-06 11:57 4% ` [PATCH v2 " David Marchand
2022-04-26 13:58 1% DPDK 21.11.1 released Kevin Traynor
2022-04-27 11:32 [PATCH 1/3] eventdev: add function to quiesce an event port Pavan Nikhilesh
2022-05-09 17:29 3% ` Jerin Jacob
2022-05-05 10:27 3% [PATCH 0/6] Vhost checksum offload improvements Maxime Coquelin
2022-05-05 17:29 [PATCH 00/11] Introduce support for RISC-V architecture Stanislaw Kardach
2022-05-05 17:30 9% ` [PATCH 10/11] devtools: add RISC-V to test-meson-builds.sh Stanislaw Kardach
2022-05-10 15:07 ` [PATCH v2 0/8] Introduce support for RISC-V architecture Stanislaw Kardach
2022-05-10 15:07 9% ` [PATCH v2 7/8] devtools: add RISC-V to test-meson-builds.sh Stanislaw Kardach
2022-05-10 15:35 0% ` Stanisław Kardach
2022-05-10 15:48 ` [PATCH v3 0/8] Introduce support for RISC-V architecture Stanislaw Kardach
2022-05-10 15:48 9% ` [PATCH v3 7/8] devtools: add RISC-V to test-meson-builds.sh Stanislaw Kardach
2022-05-10 11:58 [PATCH 1/1] lpm: add a scalar version of lookupx4 function Stanislaw Kardach
2022-05-19 17:02 ` Medvedkin, Vladimir
2022-05-24 16:28 ` Stanisław Kardach
2022-05-27 11:16 ` Stanisław Kardach
2022-05-27 13:16 3% ` Medvedkin, Vladimir
2022-05-27 18:18 3% ` [PATCH v2 1/2] lpm: add const to lpm arg of rte_lpm_lookup Stanislaw Kardach
2022-05-30 18:24 3% ` [PATCH v3 " Stanislaw Kardach
2022-05-30 20:38 0% ` Stephen Hemminger
2022-06-01 9:35 0% ` Medvedkin, Vladimir
2022-05-11 13:53 [PATCH] sched: enable CMAN at runtime Marcin Danilewicz
2022-05-12 13:10 4% ` [PATCH v2] " Marcin Danilewicz
2022-05-30 11:19 3% ` Dumitrescu, Cristian
2022-05-30 14:03 4% ` Danilewicz, MarcinX
2022-06-02 9:57 3% ` Danilewicz, MarcinX
2022-05-30 11:35 0% ` Dumitrescu, Cristian
2022-06-07 10:40 0% ` Danilewicz, MarcinX
2022-06-08 9:42 1% ` [PATCH v3] " Marcin Danilewicz
2022-06-08 11:59 0% ` Dumitrescu, Cristian
2022-06-08 15:29 0% ` Danilewicz, MarcinX
2022-05-18 10:16 [PATCH 00/12] Fix compilation with gcc 12 David Marchand
2022-05-18 10:16 ` [PATCH 04/12] net/ena: fix build with GCC 12 David Marchand
2022-05-20 20:28 ` Stephen Hemminger
2022-05-21 9:49 3% ` Morten Brørup
2022-05-21 16:23 0% ` Stephen Hemminger
2022-05-22 20:30 0% ` Morten Brørup
2022-05-20 5:54 3% [PATCH 00/40] cryptodev: rsa, dh, ecdh changes Arek Kusztal
2022-05-20 5:54 8% ` [PATCH 02/40] cryptodev: remove list end enumerators Arek Kusztal
2022-05-20 7:19 0% ` [EXT] " Akhil Goyal
2022-05-20 7:30 0% ` [EXT] [PATCH 00/40] cryptodev: rsa, dh, ecdh changes Akhil Goyal
2022-05-20 7:37 0% ` Kusztal, ArkadiuszX
2022-05-24 18:46 3% [RFT 0/2] pie: floating point fixes Stephen Hemminger
2022-05-24 19:31 0% ` Morten Brørup
2022-05-25 9:53 4% [PATCH] eal/ppc: undefine AltiVec keyword vector Thomas Monjalon
2022-05-25 11:48 ` Ray Kinsella
2022-05-25 15:40 ` Thomas Monjalon
2022-05-25 18:02 3% ` Ray Kinsella
2022-05-25 18:34 3% ` Tyler Retzlaff
2022-05-26 10:18 0% ` Thomas Monjalon
2022-05-26 11:02 0% ` Ray Kinsella
2022-06-01 15:04 0% ` Thomas Monjalon
2022-05-30 13:15 2% [dpdk-dev] [RFC PATCH] ethdev: support congestion management jerinj
2022-05-30 19:43 0% ` Ajit Khaparde
2022-05-31 1:09 0% ` Min Hu (Connor)
2022-05-31 16:09 0% ` Stephen Hemminger
2022-05-31 4:04 3% [PATCH v4 00/12] cryptodev: rsa, dh, ecdh changes Arek Kusztal
2022-05-31 4:04 4% ` [PATCH v4 06/12] cryptodev: add elliptic curve diffie hellman Arek Kusztal
2022-05-31 7:49 0% ` [PATCH v4 00/12] cryptodev: rsa, dh, ecdh changes Zhang, Roy Fan
2022-05-31 11:52 0% ` [EXT] " Akhil Goyal
2022-05-31 14:12 [PATCH v4 0/8] Introduce support for RISC-V architecture Stanislaw Kardach
2022-05-31 14:13 9% ` [PATCH v4 7/8] devtools: add RISC-V to test-meson-builds.sh Stanislaw Kardach
2022-06-01 9:02 [PATCH v5 00/12] cryptodev: rsa, dh, ecdh changes Arek Kusztal
2022-06-01 9:02 4% ` [PATCH v5 06/12] cryptodev: add elliptic curve diffie hellman Arek Kusztal
2022-06-01 10:14 0% ` Kusztal, ArkadiuszX
2022-06-02 13:33 3% ` [EXT] " Akhil Goyal
2022-06-02 14:21 0% ` Ray Kinsella
2022-06-02 14:25 0% ` Akhil Goyal
2022-06-02 14:46 4% ` Kusztal, ArkadiuszX
2022-06-03 13:26 4% ` Ray Kinsella
2022-06-01 11:15 3% [PATCH v4 1/2] lpm: add const to lpm arg of rte_lpm_lookup Stanislaw Kardach
2022-06-02 20:52 0% ` Thomas Monjalon
2022-06-03 7:29 0% ` Bruce Richardson
2022-06-03 7:43 0% ` Thomas Monjalon
2022-06-02 1:52 [PATCH 00/14] Add support of NFP3800 chip and firmware with NFDk Jin Liu
2022-06-02 1:52 6% ` [PATCH 07/14] net/nfp: support NFDK firmware Jin Liu
2022-06-02 22:53 0% ` Ferruh Yigit
2022-06-04 9:09 3% Optimizations are not features Morten Brørup
2022-06-04 9:33 0% ` Jerin Jacob
2022-06-04 10:00 0% ` Andrew Rybchenko
2022-06-04 11:10 0% ` Jerin Jacob
2022-06-04 12:19 3% ` Morten Brørup
2022-06-04 12:51 0% ` Andrew Rybchenko
2022-06-05 8:15 0% ` Morten Brørup
2022-06-05 16:05 0% ` Stephen Hemminger
2022-06-06 9:35 0% ` Konstantin Ananyev
2022-06-06 22:50 [PATCH v1] bbdev: add device status info Nicolas Chautru
2022-06-06 22:50 ` Nicolas Chautru
2022-06-07 0:09 3% ` Stephen Hemminger
2022-06-07 12:42 0% ` Maxime Coquelin
2022-06-07 15:44 0% ` Chautru, Nicolas
2022-06-07 16:20 0% ` Maxime Coquelin
2022-06-07 16:42 0% ` Stephen Hemminger
2022-06-07 10:46 [PATCH RESEND v4 0/8] Introduce support for RISC-V architecture Stanislaw Kardach
2022-06-07 10:46 9% ` [PATCH RESEND v4 7/8] devtools: add RISC-V to test-meson-builds.sh Stanislaw Kardach
2022-06-07 13:48 4% Minutes of Technical Board Meeting, 2022-06-01 Olivier Matz
2022-06-08 12:49 3% [PATCH v2 0/6] Vhost checksum offload improvements Maxime Coquelin
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).