linux-next: manual merge of the net-next tree with the net tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi all,

Today's linux-next merge of the net-next tree got a conflict in
net/switchdev/switchdev.c between commit eea39946a1f3 ("rename
RTNH_F_EXTERNAL to RTNH_F_OFFLOAD") from the net tree and various
commits from the net-next tree.

I fixed it up (see below) and can carry the fix as necessary (no action
is required).

-- 
Cheers,
Stephen Rothwell                    sfr@xxxxxxxxxxxxxxxx

diff --cc net/switchdev/switchdev.c
index 055453d48668,0409f9b5bdbc..000000000000
--- a/net/switchdev/switchdev.c
+++ b/net/switchdev/switchdev.c
@@@ -328,18 -670,13 +670,13 @@@ int switchdev_fib_ipv4_add(u32 dst, in
  	if (fi->fib_net->ipv4.fib_offload_disabled)
  		return 0;
  
- 	dev = netdev_switch_get_dev_by_nhs(fi);
+ 	dev = switchdev_get_dev_by_nhs(fi);
  	if (!dev)
  		return 0;
- 	ops = dev->swdev_ops;
- 
- 	if (ops->swdev_fib_ipv4_add) {
- 		err = ops->swdev_fib_ipv4_add(dev, htonl(dst), dst_len,
- 					      fi, tos, type, nlflags,
- 					      tb_id);
- 		if (!err)
- 			fi->fib_flags |= RTNH_F_OFFLOAD;
- 	}
+ 
+ 	err = switchdev_port_obj_add(dev, &fib_obj);
+ 	if (!err)
 -		fi->fib_flags |= RTNH_F_EXTERNAL;
++		fi->fib_flags |= RTNH_F_OFFLOAD;
  
  	return err;
  }
@@@ -357,27 -694,34 +694,34 @@@ EXPORT_SYMBOL_GPL(switchdev_fib_ipv4_ad
   *
   *	Delete IPv4 route entry from switch device.
   */
- int netdev_switch_fib_ipv4_del(u32 dst, int dst_len, struct fib_info *fi,
- 			       u8 tos, u8 type, u32 tb_id)
+ int switchdev_fib_ipv4_del(u32 dst, int dst_len, struct fib_info *fi,
+ 			   u8 tos, u8 type, u32 tb_id)
  {
+ 	struct switchdev_obj fib_obj = {
+ 		.id = SWITCHDEV_OBJ_IPV4_FIB,
+ 		.u.ipv4_fib = {
+ 			.dst = dst,
+ 			.dst_len = dst_len,
+ 			.fi = fi,
+ 			.tos = tos,
+ 			.type = type,
+ 			.nlflags = 0,
+ 			.tb_id = tb_id,
+ 		},
+ 	};
  	struct net_device *dev;
- 	const struct swdev_ops *ops;
  	int err = 0;
  
 -	if (!(fi->fib_flags & RTNH_F_EXTERNAL))
 +	if (!(fi->fib_flags & RTNH_F_OFFLOAD))
  		return 0;
  
- 	dev = netdev_switch_get_dev_by_nhs(fi);
+ 	dev = switchdev_get_dev_by_nhs(fi);
  	if (!dev)
  		return 0;
- 	ops = dev->swdev_ops;
  
- 	if (ops->swdev_fib_ipv4_del) {
- 		err = ops->swdev_fib_ipv4_del(dev, htonl(dst), dst_len,
- 					      fi, tos, type, tb_id);
- 		if (!err)
- 			fi->fib_flags &= ~RTNH_F_OFFLOAD;
- 	}
+ 	err = switchdev_port_obj_del(dev, &fib_obj);
+ 	if (!err)
 -		fi->fib_flags &= ~RTNH_F_EXTERNAL;
++		fi->fib_flags &= ~RTNH_F_OFFLOAD;
  
  	return err;
  }

Attachment: pgpDnar8csngm.pgp
Description: OpenPGP digital signature


[Index of Archives]     [Linux Kernel]     [Linux USB Development]     [Yosemite News]     [Linux SCSI]

  Powered by Linux