src/dpdk/drivers/net/failsafe/failsafe_ether.c
static int
fs_flow_complain(struct rte_flow_error *error)
{
	static const char *const errstrlist[] = {
		[RTE_FLOW_ERROR_TYPE_NONE] = "no error",
		[RTE_FLOW_ERROR_TYPE_UNSPECIFIED] = "cause unspecified",
		[RTE_FLOW_ERROR_TYPE_HANDLE] = "flow rule (handle)",
		[RTE_FLOW_ERROR_TYPE_ATTR_GROUP] = "group field",
		[RTE_FLOW_ERROR_TYPE_ATTR_PRIORITY] = "priority field",
		[RTE_FLOW_ERROR_TYPE_ATTR_INGRESS] = "ingress field",
		[RTE_FLOW_ERROR_TYPE_ATTR_EGRESS] = "egress field",
		[RTE_FLOW_ERROR_TYPE_ATTR] = "attributes structure",
		[RTE_FLOW_ERROR_TYPE_ITEM_NUM] = "pattern length",
		[RTE_FLOW_ERROR_TYPE_ITEM] = "specific pattern item",
		[RTE_FLOW_ERROR_TYPE_ACTION_NUM] = "number of actions",
		[RTE_FLOW_ERROR_TYPE_ACTION] = "specific action",
	};
	const char *errstr;
	char buf[32];
	int err = rte_errno;

	if ((unsigned int)error->type >= RTE_DIM(errstrlist) ||
			!errstrlist[error->type])
		errstr = "unknown type";
	else
		errstr = errstrlist[error->type];
	ERROR("Caught error type %d (%s): %s%s\n",
		error->type, errstr,
		error->cause ? (snprintf(buf, sizeof(buf), "cause: %p, ",
				error->cause), buf) : "",
		error->message ? error->message : "(no stated reason)");
	return -err;
}
/** Print a message out of a flow error. */
Print a message out of a flow error.
Print a message out of a flow error .
static int
fs_flow_complain(struct rte_flow_error *error)
{
	static const char *const errstrlist[] = {
		[RTE_FLOW_ERROR_TYPE_NONE] = "no error",
		[RTE_FLOW_ERROR_TYPE_UNSPECIFIED] = "cause unspecified",
		[RTE_FLOW_ERROR_TYPE_HANDLE] = "flow rule (handle)",
		[RTE_FLOW_ERROR_TYPE_ATTR_GROUP] = "group field",
		[RTE_FLOW_ERROR_TYPE_ATTR_PRIORITY] = "priority field",
		[RTE_FLOW_ERROR_TYPE_ATTR_INGRESS] = "ingress field",
		[RTE_FLOW_ERROR_TYPE_ATTR_EGRESS] = "egress field",
		[RTE_FLOW_ERROR_TYPE_ATTR] = "attributes structure",
		[RTE_FLOW_ERROR_TYPE_ITEM_NUM] = "pattern length",
		[RTE_FLOW_ERROR_TYPE_ITEM] = "specific pattern item",
		[RTE_FLOW_ERROR_TYPE_ACTION_NUM] = "number of actions",
		[RTE_FLOW_ERROR_TYPE_ACTION] = "specific action",
	};
	const char *errstr;
	char buf[32];
	int err = rte_errno;
	if ((unsigned int)error->type >= RTE_DIM(errstrlist) ||
			!errstrlist[error->type])
		errstr = "unknown type";
	else
		errstr = errstrlist[error->type];
	ERROR("Caught error type %d (%s): %s%s\n",
		error->type, errstr,
		error->cause ? (snprintf(buf, sizeof(buf), "cause: %p, ",
				error->cause), buf) : "",
		error->message ? error->message : "(no stated reason)");
	return -err;
}
static int fs_flow_complain ( struct rte_flow_error * error ) { static const char * const errstrlist [ ] = { [ RTE_FLOW_ERROR_TYPE_NONE ] = " " , [ RTE_FLOW_ERROR_TYPE_UNSPECIFIED ] = " " , [ RTE_FLOW_ERROR_TYPE_HANDLE ] = " " , [ RTE_FLOW_ERROR_TYPE_ATTR_GROUP ] = " " , [ RTE_FLOW_ERROR_TYPE_ATTR_PRIORITY ] = " " , [ RTE_FLOW_ERROR_TYPE_ATTR_INGRESS ] = " " , [ RTE_FLOW_ERROR_TYPE_ATTR_EGRESS ] = " " , [ RTE_FLOW_ERROR_TYPE_ATTR ] = " " , [ RTE_FLOW_ERROR_TYPE_ITEM_NUM ] = " " , [ RTE_FLOW_ERROR_TYPE_ITEM ] = " " , [ RTE_FLOW_ERROR_TYPE_ACTION_NUM ] = " " , [ RTE_FLOW_ERROR_TYPE_ACTION ] = " " , } ; const char * errstr ; char buf [ 32 ] ; int err = rte_errno ; if ( ( unsigned int ) error -> type >= RTE_DIM ( errstrlist ) || ! errstrlist [ error -> type ] ) errstr = " " ; else errstr = errstrlist [ error -> type ] ; ERROR ( " \n " , error -> type , errstr , error -> cause ? ( snprintf ( buf , sizeof ( buf ) , " " , error -> cause ) , buf ) : " " , error -> message ? error -> message : " " ) ; return - err ; }
Print a message out of a flow error.
Print a message out of a flow error .