@@ -1211,12 +1211,12 @@ static void gen_vxlan_header_ipv6(struct net_device *out_dev,
1211
1211
1212
1212
static int mlx5e_create_encap_header_ipv4 (struct mlx5e_priv * priv ,
1213
1213
struct net_device * mirred_dev ,
1214
- struct mlx5e_encap_entry * e ,
1215
- struct net_device * * out_dev )
1214
+ struct mlx5e_encap_entry * e )
1216
1215
{
1217
1216
int max_encap_size = MLX5_CAP_ESW (priv -> mdev , max_encap_header_size );
1218
1217
int ipv4_encap_size = ETH_HLEN + sizeof (struct iphdr ) + VXLAN_HLEN ;
1219
1218
struct ip_tunnel_key * tun_key = & e -> tun_info .key ;
1219
+ struct net_device * out_dev ;
1220
1220
struct neighbour * n = NULL ;
1221
1221
struct flowi4 fl4 = {};
1222
1222
char * encap_header ;
@@ -1245,7 +1245,7 @@ static int mlx5e_create_encap_header_ipv4(struct mlx5e_priv *priv,
1245
1245
fl4 .daddr = tun_key -> u .ipv4 .dst ;
1246
1246
fl4 .saddr = tun_key -> u .ipv4 .src ;
1247
1247
1248
- err = mlx5e_route_lookup_ipv4 (priv , mirred_dev , out_dev ,
1248
+ err = mlx5e_route_lookup_ipv4 (priv , mirred_dev , & out_dev ,
1249
1249
& fl4 , & n , & ttl );
1250
1250
if (err )
1251
1251
goto out ;
@@ -1257,13 +1257,13 @@ static int mlx5e_create_encap_header_ipv4(struct mlx5e_priv *priv,
1257
1257
}
1258
1258
1259
1259
e -> n = n ;
1260
- e -> out_dev = * out_dev ;
1260
+ e -> out_dev = out_dev ;
1261
1261
1262
- neigh_ha_snapshot (e -> h_dest , n , * out_dev );
1262
+ neigh_ha_snapshot (e -> h_dest , n , out_dev );
1263
1263
1264
1264
switch (e -> tunnel_type ) {
1265
1265
case MLX5_HEADER_TYPE_VXLAN :
1266
- gen_vxlan_header_ipv4 (* out_dev , encap_header ,
1266
+ gen_vxlan_header_ipv4 (out_dev , encap_header ,
1267
1267
ipv4_encap_size , e -> h_dest , ttl ,
1268
1268
fl4 .daddr ,
1269
1269
fl4 .saddr , tun_key -> tp_dst ,
@@ -1285,12 +1285,12 @@ static int mlx5e_create_encap_header_ipv4(struct mlx5e_priv *priv,
1285
1285
1286
1286
static int mlx5e_create_encap_header_ipv6 (struct mlx5e_priv * priv ,
1287
1287
struct net_device * mirred_dev ,
1288
- struct mlx5e_encap_entry * e ,
1289
- struct net_device * * out_dev )
1288
+ struct mlx5e_encap_entry * e )
1290
1289
{
1291
1290
int max_encap_size = MLX5_CAP_ESW (priv -> mdev , max_encap_header_size );
1292
1291
int ipv6_encap_size = ETH_HLEN + sizeof (struct ipv6hdr ) + VXLAN_HLEN ;
1293
1292
struct ip_tunnel_key * tun_key = & e -> tun_info .key ;
1293
+ struct net_device * out_dev ;
1294
1294
struct neighbour * n = NULL ;
1295
1295
struct flowi6 fl6 = {};
1296
1296
char * encap_header ;
@@ -1320,7 +1320,7 @@ static int mlx5e_create_encap_header_ipv6(struct mlx5e_priv *priv,
1320
1320
fl6 .daddr = tun_key -> u .ipv6 .dst ;
1321
1321
fl6 .saddr = tun_key -> u .ipv6 .src ;
1322
1322
1323
- err = mlx5e_route_lookup_ipv6 (priv , mirred_dev , out_dev ,
1323
+ err = mlx5e_route_lookup_ipv6 (priv , mirred_dev , & out_dev ,
1324
1324
& fl6 , & n , & ttl );
1325
1325
if (err )
1326
1326
goto out ;
@@ -1332,13 +1332,13 @@ static int mlx5e_create_encap_header_ipv6(struct mlx5e_priv *priv,
1332
1332
}
1333
1333
1334
1334
e -> n = n ;
1335
- e -> out_dev = * out_dev ;
1335
+ e -> out_dev = out_dev ;
1336
1336
1337
- neigh_ha_snapshot (e -> h_dest , n , * out_dev );
1337
+ neigh_ha_snapshot (e -> h_dest , n , out_dev );
1338
1338
1339
1339
switch (e -> tunnel_type ) {
1340
1340
case MLX5_HEADER_TYPE_VXLAN :
1341
- gen_vxlan_header_ipv6 (* out_dev , encap_header ,
1341
+ gen_vxlan_header_ipv6 (out_dev , encap_header ,
1342
1342
ipv6_encap_size , e -> h_dest , ttl ,
1343
1343
& fl6 .daddr ,
1344
1344
& fl6 .saddr , tun_key -> tp_dst ,
@@ -1371,7 +1371,6 @@ static int mlx5e_attach_encap(struct mlx5e_priv *priv,
1371
1371
struct mlx5_esw_flow_attr * attr = flow -> esw_attr ;
1372
1372
struct ip_tunnel_key * key = & tun_info -> key ;
1373
1373
struct mlx5e_encap_entry * e ;
1374
- struct net_device * out_dev ;
1375
1374
int tunnel_type , err = 0 ;
1376
1375
uintptr_t hash_key ;
1377
1376
bool found = false;
@@ -1419,9 +1418,9 @@ static int mlx5e_attach_encap(struct mlx5e_priv *priv,
1419
1418
INIT_LIST_HEAD (& e -> flows );
1420
1419
1421
1420
if (family == AF_INET )
1422
- err = mlx5e_create_encap_header_ipv4 (priv , mirred_dev , e , & out_dev );
1421
+ err = mlx5e_create_encap_header_ipv4 (priv , mirred_dev , e );
1423
1422
else if (family == AF_INET6 )
1424
- err = mlx5e_create_encap_header_ipv6 (priv , mirred_dev , e , & out_dev );
1423
+ err = mlx5e_create_encap_header_ipv6 (priv , mirred_dev , e );
1425
1424
1426
1425
if (err )
1427
1426
goto out_err ;
0 commit comments