.. code-block:: console
--allow ea:00.0,cos=<0..4>
+
+Use X86 Vector Instructions
+~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+DLB supports using x86 vector instructions to optimize the data path.
+
+The default mode of operation is to use scalar instructions, but
+the use of vector instructions can be enabled in the devargs, as
+follows
+
+ .. code-block:: console
+
+ --allow ea:00.0,vector_opts_enabled=<y/Y>
}
static int
-set_vector_opts_disab(const char *key __rte_unused,
+set_vector_opts_enab(const char *key __rte_unused,
const char *value,
void *opaque)
{
- bool *dlb2_vector_opts_disabled = opaque;
+ bool *dlb2_vector_opts_enabled = opaque;
if (value == NULL || opaque == NULL) {
DLB2_LOG_ERR("NULL pointer\n");
}
if ((*value == 'y') || (*value == 'Y'))
- *dlb2_vector_opts_disabled = true;
+ *dlb2_vector_opts_enabled = true;
else
- *dlb2_vector_opts_disabled = false;
+ *dlb2_vector_opts_enabled = false;
return 0;
}
#else
if ((qm_port->cq_depth > 64) ||
(!rte_is_power_of_2(qm_port->cq_depth)) ||
- (dlb2->vector_opts_disabled == true))
+ (dlb2->vector_opts_enabled == false))
qm_port->use_scalar = true;
#endif
#else
if ((qm_port->cq_depth > 64) ||
(!rte_is_power_of_2(qm_port->cq_depth)) ||
- (dlb2->vector_opts_disabled == true))
+ (dlb2->vector_opts_enabled == false))
qm_port->use_scalar = true;
#endif
dlb2->poll_interval = dlb2_args->poll_interval;
dlb2->sw_credit_quanta = dlb2_args->sw_credit_quanta;
dlb2->default_depth_thresh = dlb2_args->default_depth_thresh;
- dlb2->vector_opts_disabled = dlb2_args->vector_opts_disabled;
+ dlb2->vector_opts_enabled = dlb2_args->vector_opts_enabled;
err = dlb2_iface_open(&dlb2->qm_instance, name);
if (err < 0) {
DLB2_POLL_INTERVAL_ARG,
DLB2_SW_CREDIT_QUANTA_ARG,
DLB2_DEPTH_THRESH_ARG,
- DLB2_VECTOR_OPTS_DISAB_ARG,
+ DLB2_VECTOR_OPTS_ENAB_ARG,
NULL };
if (params != NULL && params[0] != '\0') {
}
ret = rte_kvargs_process(kvlist,
- DLB2_VECTOR_OPTS_DISAB_ARG,
- set_vector_opts_disab,
- &dlb2_args->vector_opts_disabled);
+ DLB2_VECTOR_OPTS_ENAB_ARG,
+ set_vector_opts_enab,
+ &dlb2_args->vector_opts_enabled);
if (ret != 0) {
- DLB2_LOG_ERR("%s: Error parsing vector opts disabled",
+ DLB2_LOG_ERR("%s: Error parsing vector opts enabled",
name);
rte_kvargs_free(kvlist);
return ret;
#define DLB2_POLL_INTERVAL_ARG "poll_interval"
#define DLB2_SW_CREDIT_QUANTA_ARG "sw_credit_quanta"
#define DLB2_DEPTH_THRESH_ARG "default_depth_thresh"
-#define DLB2_VECTOR_OPTS_DISAB_ARG "vector_opts_disable"
+#define DLB2_VECTOR_OPTS_ENAB_ARG "vector_opts_enable"
/* Begin HW related defines and structs */
uint32_t new_event_limit;
int max_num_events_override;
int num_dir_credits_override;
- bool vector_opts_disabled;
+ bool vector_opts_enabled;
volatile enum dlb2_run_state run_state;
uint16_t num_dir_queues; /* total num of evdev dir queues requested */
union {
int poll_interval;
int sw_credit_quanta;
int default_depth_thresh;
- bool vector_opts_disabled;
+ bool vector_opts_enabled;
};
/* End Eventdev related defines and structs */