Skip to content

Commit

Permalink
nfp: flower-ct: fix error return code in nfp_fl_ct_add_offload()
Browse files Browse the repository at this point in the history
If nfp_tunnel_add_ipv6_off() fails, it should return error code
in nfp_fl_ct_add_offload().

Fixes: 5a2b930 ("nfp: flower-ct: compile match sections of flow_payload")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Signed-off-by: Louis Peens <louis.peens@corigine.com>
Reviewed-by: Simon Horman <simon.horman@corigine.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Yang Yingliang authored and David S. Miller committed Jul 28, 2021
1 parent 3bdc706 commit d80f6d6
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions drivers/net/ethernet/netronome/nfp/flower/conntrack.c
Original file line number Diff line number Diff line change
Expand Up @@ -710,8 +710,10 @@ static int nfp_fl_ct_add_offload(struct nfp_fl_nft_tc_merge *m_entry)
dst = &gre_match->ipv6.dst;

entry = nfp_tunnel_add_ipv6_off(priv->app, dst);
if (!entry)
if (!entry) {
err = -ENOMEM;
goto ct_offload_err;
}

flow_pay->nfp_tun_ipv6 = entry;
} else {
Expand Down Expand Up @@ -760,8 +762,10 @@ static int nfp_fl_ct_add_offload(struct nfp_fl_nft_tc_merge *m_entry)
dst = &udp_match->ipv6.dst;

entry = nfp_tunnel_add_ipv6_off(priv->app, dst);
if (!entry)
if (!entry) {
err = -ENOMEM;
goto ct_offload_err;
}

flow_pay->nfp_tun_ipv6 = entry;
} else {
Expand Down

0 comments on commit d80f6d6

Please sign in to comment.