aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/plugins/avf/avf_fdir_lib.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/plugins/avf/avf_fdir_lib.c b/src/plugins/avf/avf_fdir_lib.c
index 44c10dc7388..f38614e87ec 100644
--- a/src/plugins/avf/avf_fdir_lib.c
+++ b/src/plugins/avf/avf_fdir_lib.c
@@ -73,7 +73,7 @@ avf_fdir_rcfg_set_hdr (struct avf_fdir_conf *rcfg, int layer,
struct virtchnl_proto_hdrs *hdrs;
hdrs = &rcfg->add_fltr.rule_cfg.proto_hdrs;
- if (layer > VIRTCHNL_MAX_NUM_PROTO_HDRS)
+ if (layer >= VIRTCHNL_MAX_NUM_PROTO_HDRS)
return -1;
hdrs->proto_hdr[layer].type = hdr;
@@ -486,7 +486,7 @@ int
avf_fdir_rcfg_act_queue (struct avf_fdir_conf *rcfg, int queue, int size,
int act_idx)
{
- if (act_idx > VIRTCHNL_MAX_NUM_ACTIONS)
+ if (act_idx >= VIRTCHNL_MAX_NUM_ACTIONS)
return -AVF_FAILURE;
struct virtchnl_filter_action *filter_action;
@@ -565,7 +565,7 @@ avf_fdir_rcfg_act_drop (struct avf_fdir_conf *rcfg, int act_idx)
{
struct virtchnl_filter_action *filter_action;
- if (act_idx > VIRTCHNL_MAX_NUM_ACTIONS)
+ if (act_idx >= VIRTCHNL_MAX_NUM_ACTIONS)
return -AVF_FAILURE;
filter_action = rcfg->add_fltr.rule_cfg.action_set.actions + act_idx;
@@ -579,7 +579,7 @@ avf_fdir_rcfg_act_mark (struct avf_fdir_conf *rcfg, const u32 mark,
int act_idx)
{
struct virtchnl_filter_action *filter_action;
- if (act_idx > VIRTCHNL_MAX_NUM_ACTIONS)
+ if (act_idx >= VIRTCHNL_MAX_NUM_ACTIONS)
return -AVF_FAILURE;
filter_action = rcfg->add_fltr.rule_cfg.action_set.actions + act_idx;