On 7/1/16 8:04 AM, Jiri Pirko wrote:
+static int
+mlxsw_sp_router_fib4_entry_init(struct mlxsw_sp *mlxsw_sp,
+ const struct switchdev_obj_ipv4_fib *fib4,
+ struct mlxsw_sp_fib_entry *fib_entry)
+{
+ struct fib_info *fi = fib4->fi;
+
+ if (fib4->type == RTN_LOCAL || fib4->type == RTN_BROADCAST) {
+ fib_entry->type = MLXSW_SP_FIB_ENTRY_TYPE_TRAP;
+ return 0;
+ }
+ if (fib4->type != RTN_UNICAST)
+ return -EINVAL;
This is going to cause offload to fail b/c is a user has RTN_UNREACHABLE
or RTN_PROHIBIT default route in a table. Those routes are needed per
VRF/table to keep lookups from dropping to the another table.