forked from Minki/linux
rocker: Provide offload indication using nexthop flags
We want to stop using the FIB info's flags to provide the offlaod indication and instead do that on a per-nexthop basis. Convert rocker to do just that. It only supports one nexthop per-route, so conversion is simple. Signed-off-by: Ido Schimmel <idosch@mellanox.com> Signed-off-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
475abbf1ef
commit
63e701c15c
@ -2761,7 +2761,7 @@ static int ofdpa_fib4_add(struct rocker *rocker,
|
||||
fen_info->tb_id, 0);
|
||||
if (err)
|
||||
return err;
|
||||
fib_info_offload_inc(fen_info->fi);
|
||||
fen_info->fi->fib_nh->nh_flags |= RTNH_F_OFFLOAD;
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -2776,7 +2776,7 @@ static int ofdpa_fib4_del(struct rocker *rocker,
|
||||
ofdpa_port = ofdpa_port_dev_lower_find(fen_info->fi->fib_dev, rocker);
|
||||
if (!ofdpa_port)
|
||||
return 0;
|
||||
fib_info_offload_dec(fen_info->fi);
|
||||
fen_info->fi->fib_nh->nh_flags &= ~RTNH_F_OFFLOAD;
|
||||
return ofdpa_port_fib_ipv4(ofdpa_port, htonl(fen_info->dst),
|
||||
fen_info->dst_len, fen_info->fi,
|
||||
fen_info->tb_id, OFDPA_OP_FLAG_REMOVE);
|
||||
@ -2803,7 +2803,7 @@ static void ofdpa_fib4_abort(struct rocker *rocker)
|
||||
rocker);
|
||||
if (!ofdpa_port)
|
||||
continue;
|
||||
fib_info_offload_dec(flow_entry->fi);
|
||||
flow_entry->fi->fib_nh->nh_flags &= ~RTNH_F_OFFLOAD;
|
||||
ofdpa_flow_tbl_del(ofdpa_port, OFDPA_OP_FLAG_REMOVE,
|
||||
flow_entry);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user