[dpdk-dev] [PATCH v8 3/3] net/ice: enable advanced RSS

Ferruh Yigit ferruh.yigit at intel.com
Mon Oct 21 19:30:05 CEST 2019


On 10/21/2019 1:06 PM, Simei Su wrote:
> This patch supports:
>   (1)symmetric hash by rte_flow RSS action.
>   (2)input set change by rte_flow RSS action.
> 
> Signed-off-by: Simei Su <simei.su at intel.com>
> Acked-by: Qi Zhang <qi.z.zhang at intel.com>

<...>

> +static int
> +ice_hash_parse_action(struct ice_pattern_match_item *pattern_match_item,
> +		const struct rte_flow_action actions[],
> +		void **meta,
> +		struct rte_flow_error *error)
> +{
> +	const struct rte_flow_action *action;
> +	enum rte_flow_action_type action_type;
> +	const struct rte_flow_action_rss *rss;
> +	struct rss_type_match_hdr *m = (struct rss_type_match_hdr *)
> +				(pattern_match_item->meta);
> +	uint32_t type_list_len = RTE_DIM(ice_hash_type_list);
> +	struct ice_hash_match_type *type_match_item;
> +
> +	/* Supported action is RSS. */
> +	for (action = actions; action->type !=
> +		RTE_FLOW_ACTION_TYPE_END; action++) {
> +		action_type = action->type;
> +		switch (action_type) {
> +		case RTE_FLOW_ACTION_TYPE_RSS:
> +			rss = action->conf;
> +			uint16_t i;
> +			uint64_t rss_hf = rss->types;

ICC is giving following error [1], it seems switch case is not a scope, so
fixing the warning while merging by moving the definitions above switch.


[1]
error #589: transfer of control bypasses initialization of:
            variable "rss_hf" (declared at line 299)
                switch (action_type) {
                ^



More information about the dev mailing list