@@ -4350,6 +4350,7 @@ mlxsw_sp_fib_entry_hw_flags_refresh(struct mlxsw_sp *mlxsw_sp,
4350
4350
{
4351
4351
switch (op ) {
4352
4352
case MLXSW_SP_FIB_ENTRY_OP_WRITE :
4353
+ case MLXSW_SP_FIB_ENTRY_OP_UPDATE :
4353
4354
mlxsw_sp_fib_entry_hw_flags_set (mlxsw_sp , fib_entry );
4354
4355
break ;
4355
4356
case MLXSW_SP_FIB_ENTRY_OP_DELETE :
@@ -4381,6 +4382,7 @@ mlxsw_sp_router_ll_basic_fib_entry_pack(struct mlxsw_sp_fib_entry_op_ctx *op_ctx
4381
4382
4382
4383
switch (op ) {
4383
4384
case MLXSW_SP_FIB_ENTRY_OP_WRITE :
4385
+ case MLXSW_SP_FIB_ENTRY_OP_UPDATE :
4384
4386
ralue_op = MLXSW_REG_RALUE_OP_WRITE_WRITE ;
4385
4387
break ;
4386
4388
case MLXSW_SP_FIB_ENTRY_OP_DELETE :
@@ -4699,10 +4701,12 @@ static int mlxsw_sp_fib_entry_op(struct mlxsw_sp *mlxsw_sp,
4699
4701
4700
4702
static int __mlxsw_sp_fib_entry_update (struct mlxsw_sp * mlxsw_sp ,
4701
4703
struct mlxsw_sp_fib_entry_op_ctx * op_ctx ,
4702
- struct mlxsw_sp_fib_entry * fib_entry )
4704
+ struct mlxsw_sp_fib_entry * fib_entry ,
4705
+ bool is_new )
4703
4706
{
4704
4707
return mlxsw_sp_fib_entry_op (mlxsw_sp , op_ctx , fib_entry ,
4705
- MLXSW_SP_FIB_ENTRY_OP_WRITE );
4708
+ is_new ? MLXSW_SP_FIB_ENTRY_OP_WRITE :
4709
+ MLXSW_SP_FIB_ENTRY_OP_UPDATE );
4706
4710
}
4707
4711
4708
4712
static int mlxsw_sp_fib_entry_update (struct mlxsw_sp * mlxsw_sp ,
@@ -4711,7 +4715,7 @@ static int mlxsw_sp_fib_entry_update(struct mlxsw_sp *mlxsw_sp,
4711
4715
struct mlxsw_sp_fib_entry_op_ctx * op_ctx = mlxsw_sp -> router -> ll_op_ctx ;
4712
4716
4713
4717
mlxsw_sp_fib_entry_op_ctx_clear (op_ctx );
4714
- return __mlxsw_sp_fib_entry_update (mlxsw_sp , op_ctx , fib_entry );
4718
+ return __mlxsw_sp_fib_entry_update (mlxsw_sp , op_ctx , fib_entry , false );
4715
4719
}
4716
4720
4717
4721
static int mlxsw_sp_fib_entry_del (struct mlxsw_sp * mlxsw_sp ,
@@ -5091,11 +5095,12 @@ static int mlxsw_sp_fib_node_entry_link(struct mlxsw_sp *mlxsw_sp,
5091
5095
struct mlxsw_sp_fib_entry * fib_entry )
5092
5096
{
5093
5097
struct mlxsw_sp_fib_node * fib_node = fib_entry -> fib_node ;
5098
+ bool is_new = !fib_node -> fib_entry ;
5094
5099
int err ;
5095
5100
5096
5101
fib_node -> fib_entry = fib_entry ;
5097
5102
5098
- err = __mlxsw_sp_fib_entry_update (mlxsw_sp , op_ctx , fib_entry );
5103
+ err = __mlxsw_sp_fib_entry_update (mlxsw_sp , op_ctx , fib_entry , is_new );
5099
5104
if (err )
5100
5105
goto err_fib_entry_update ;
5101
5106
@@ -5509,7 +5514,8 @@ static int mlxsw_sp_nexthop6_group_update(struct mlxsw_sp *mlxsw_sp,
5509
5514
* currently associated with it in the device's table is that
5510
5515
* of the old group. Start using the new one instead.
5511
5516
*/
5512
- err = __mlxsw_sp_fib_entry_update (mlxsw_sp , op_ctx , & fib6_entry -> common );
5517
+ err = __mlxsw_sp_fib_entry_update (mlxsw_sp , op_ctx ,
5518
+ & fib6_entry -> common , false);
5513
5519
if (err )
5514
5520
goto err_fib_entry_update ;
5515
5521
0 commit comments