bonding.h 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631
  1. /*
  2. * Bond several ethernet interfaces into a Cisco, running 'Etherchannel'.
  3. *
  4. * Portions are (c) Copyright 1995 Simon "Guru Aleph-Null" Janes
  5. * NCM: Network and Communications Management, Inc.
  6. *
  7. * BUT, I'm the one who modified it for ethernet, so:
  8. * (c) Copyright 1999, Thomas Davis, tadavis@lbl.gov
  9. *
  10. * This software may be used and distributed according to the terms
  11. * of the GNU Public License, incorporated herein by reference.
  12. *
  13. */
  14. #ifndef _LINUX_BONDING_H
  15. #define _LINUX_BONDING_H
  16. #include <linux/timer.h>
  17. #include <linux/proc_fs.h>
  18. #include <linux/if_bonding.h>
  19. #include <linux/cpumask.h>
  20. #include <linux/in6.h>
  21. #include <linux/netpoll.h>
  22. #include <linux/inetdevice.h>
  23. #include <linux/etherdevice.h>
  24. #include <linux/reciprocal_div.h>
  25. #include "bond_3ad.h"
  26. #include "bond_alb.h"
  27. #include "bond_options.h"
  28. #define DRV_VERSION "3.7.1"
  29. #define DRV_RELDATE "April 27, 2011"
  30. #define DRV_NAME "bonding"
  31. #define DRV_DESCRIPTION "Ethernet Channel Bonding Driver"
  32. #define bond_version DRV_DESCRIPTION ": v" DRV_VERSION " (" DRV_RELDATE ")\n"
  33. #define BOND_MAX_ARP_TARGETS 16
  34. #define BOND_DEFAULT_MIIMON 100
  35. /*
  36. * Less bad way to call ioctl from within the kernel; this needs to be
  37. * done some other way to get the call out of interrupt context.
  38. * Needs "ioctl" variable to be supplied by calling context.
  39. */
  40. #define IOCTL(dev, arg, cmd) ({ \
  41. int res = 0; \
  42. mm_segment_t fs = get_fs(); \
  43. set_fs(get_ds()); \
  44. res = ioctl(dev, arg, cmd); \
  45. set_fs(fs); \
  46. res; })
  47. #define BOND_MODE(bond) ((bond)->params.mode)
  48. /* slave list primitives */
  49. #define bond_slave_list(bond) (&(bond)->dev->adj_list.lower)
  50. #define bond_has_slaves(bond) !list_empty(bond_slave_list(bond))
  51. /* IMPORTANT: bond_first/last_slave can return NULL in case of an empty list */
  52. #define bond_first_slave(bond) \
  53. (bond_has_slaves(bond) ? \
  54. netdev_adjacent_get_private(bond_slave_list(bond)->next) : \
  55. NULL)
  56. #define bond_last_slave(bond) \
  57. (bond_has_slaves(bond) ? \
  58. netdev_adjacent_get_private(bond_slave_list(bond)->prev) : \
  59. NULL)
  60. /* Caller must have rcu_read_lock */
  61. #define bond_first_slave_rcu(bond) \
  62. netdev_lower_get_first_private_rcu(bond->dev)
  63. #define bond_is_first_slave(bond, pos) (pos == bond_first_slave(bond))
  64. #define bond_is_last_slave(bond, pos) (pos == bond_last_slave(bond))
  65. /**
  66. * bond_for_each_slave - iterate over all slaves
  67. * @bond: the bond holding this list
  68. * @pos: current slave
  69. * @iter: list_head * iterator
  70. *
  71. * Caller must hold bond->lock
  72. */
  73. #define bond_for_each_slave(bond, pos, iter) \
  74. netdev_for_each_lower_private((bond)->dev, pos, iter)
  75. /* Caller must have rcu_read_lock */
  76. #define bond_for_each_slave_rcu(bond, pos, iter) \
  77. netdev_for_each_lower_private_rcu((bond)->dev, pos, iter)
  78. #ifdef CONFIG_NET_POLL_CONTROLLER
  79. extern atomic_t netpoll_block_tx;
  80. static inline void block_netpoll_tx(void)
  81. {
  82. atomic_inc(&netpoll_block_tx);
  83. }
  84. static inline void unblock_netpoll_tx(void)
  85. {
  86. atomic_dec(&netpoll_block_tx);
  87. }
  88. static inline int is_netpoll_tx_blocked(struct net_device *dev)
  89. {
  90. if (unlikely(netpoll_tx_running(dev)))
  91. return atomic_read(&netpoll_block_tx);
  92. return 0;
  93. }
  94. #else
  95. #define block_netpoll_tx()
  96. #define unblock_netpoll_tx()
  97. #define is_netpoll_tx_blocked(dev) (0)
  98. #endif
  99. struct bond_params {
  100. int mode;
  101. int xmit_policy;
  102. int miimon;
  103. u8 num_peer_notif;
  104. int arp_interval;
  105. int arp_validate;
  106. int arp_all_targets;
  107. int use_carrier;
  108. int fail_over_mac;
  109. int updelay;
  110. int downdelay;
  111. int lacp_fast;
  112. unsigned int min_links;
  113. int ad_select;
  114. char primary[IFNAMSIZ];
  115. int primary_reselect;
  116. __be32 arp_targets[BOND_MAX_ARP_TARGETS];
  117. int tx_queues;
  118. int all_slaves_active;
  119. int resend_igmp;
  120. int lp_interval;
  121. int packets_per_slave;
  122. int tlb_dynamic_lb;
  123. struct reciprocal_value reciprocal_packets_per_slave;
  124. };
  125. struct bond_parm_tbl {
  126. char *modename;
  127. int mode;
  128. };
  129. struct slave {
  130. struct net_device *dev; /* first - useful for panic debug */
  131. struct bonding *bond; /* our master */
  132. int delay;
  133. /* all three in jiffies */
  134. unsigned long last_link_up;
  135. unsigned long last_rx;
  136. unsigned long target_last_arp_rx[BOND_MAX_ARP_TARGETS];
  137. s8 link; /* one of BOND_LINK_XXXX */
  138. s8 new_link;
  139. u8 backup:1, /* indicates backup slave. Value corresponds with
  140. BOND_STATE_ACTIVE and BOND_STATE_BACKUP */
  141. inactive:1, /* indicates inactive slave */
  142. should_notify:1; /* indicateds whether the state changed */
  143. u8 duplex;
  144. u32 original_mtu;
  145. u32 link_failure_count;
  146. u32 speed;
  147. u16 queue_id;
  148. u8 perm_hwaddr[ETH_ALEN];
  149. struct ad_slave_info *ad_info;
  150. struct tlb_slave_info tlb_info;
  151. #ifdef CONFIG_NET_POLL_CONTROLLER
  152. struct netpoll *np;
  153. #endif
  154. struct kobject kobj;
  155. };
  156. /*
  157. * Link pseudo-state only used internally by monitors
  158. */
  159. #define BOND_LINK_NOCHANGE -1
  160. /*
  161. * Here are the locking policies for the two bonding locks:
  162. *
  163. * 1) Get bond->lock when reading/writing slave list.
  164. * 2) Get bond->curr_slave_lock when reading/writing bond->curr_active_slave.
  165. * (It is unnecessary when the write-lock is put with bond->lock.)
  166. * 3) When we lock with bond->curr_slave_lock, we must lock with bond->lock
  167. * beforehand.
  168. */
  169. struct bonding {
  170. struct net_device *dev; /* first - useful for panic debug */
  171. struct slave __rcu *curr_active_slave;
  172. struct slave __rcu *current_arp_slave;
  173. struct slave *primary_slave;
  174. bool force_primary;
  175. s32 slave_cnt; /* never change this value outside the attach/detach wrappers */
  176. int (*recv_probe)(const struct sk_buff *, struct bonding *,
  177. struct slave *);
  178. rwlock_t lock;
  179. rwlock_t curr_slave_lock;
  180. u8 send_peer_notif;
  181. u8 igmp_retrans;
  182. #ifdef CONFIG_PROC_FS
  183. struct proc_dir_entry *proc_entry;
  184. char proc_file_name[IFNAMSIZ];
  185. #endif /* CONFIG_PROC_FS */
  186. struct list_head bond_list;
  187. u32 rr_tx_counter;
  188. struct ad_bond_info ad_info;
  189. struct alb_bond_info alb_info;
  190. struct bond_params params;
  191. struct workqueue_struct *wq;
  192. struct delayed_work mii_work;
  193. struct delayed_work arp_work;
  194. struct delayed_work alb_work;
  195. struct delayed_work ad_work;
  196. struct delayed_work mcast_work;
  197. #ifdef CONFIG_DEBUG_FS
  198. /* debugging support via debugfs */
  199. struct dentry *debug_dir;
  200. #endif /* CONFIG_DEBUG_FS */
  201. };
  202. #define bond_slave_get_rcu(dev) \
  203. ((struct slave *) rcu_dereference(dev->rx_handler_data))
  204. #define bond_slave_get_rtnl(dev) \
  205. ((struct slave *) rtnl_dereference(dev->rx_handler_data))
  206. #define bond_deref_active_protected(bond) \
  207. rcu_dereference_protected(bond->curr_active_slave, \
  208. lockdep_is_held(&bond->curr_slave_lock))
  209. struct bond_vlan_tag {
  210. __be16 vlan_proto;
  211. unsigned short vlan_id;
  212. };
  213. /**
  214. * Returns NULL if the net_device does not belong to any of the bond's slaves
  215. *
  216. * Caller must hold bond lock for read
  217. */
  218. static inline struct slave *bond_get_slave_by_dev(struct bonding *bond,
  219. struct net_device *slave_dev)
  220. {
  221. return netdev_lower_dev_get_private(bond->dev, slave_dev);
  222. }
  223. static inline struct bonding *bond_get_bond_by_slave(struct slave *slave)
  224. {
  225. return slave->bond;
  226. }
  227. static inline bool bond_should_override_tx_queue(struct bonding *bond)
  228. {
  229. return BOND_MODE(bond) == BOND_MODE_ACTIVEBACKUP ||
  230. BOND_MODE(bond) == BOND_MODE_ROUNDROBIN;
  231. }
  232. static inline bool bond_is_lb(const struct bonding *bond)
  233. {
  234. return BOND_MODE(bond) == BOND_MODE_TLB ||
  235. BOND_MODE(bond) == BOND_MODE_ALB;
  236. }
  237. static inline bool bond_is_nondyn_tlb(const struct bonding *bond)
  238. {
  239. return (BOND_MODE(bond) == BOND_MODE_TLB) &&
  240. (bond->params.tlb_dynamic_lb == 0);
  241. }
  242. static inline bool bond_mode_uses_arp(int mode)
  243. {
  244. return mode != BOND_MODE_8023AD && mode != BOND_MODE_TLB &&
  245. mode != BOND_MODE_ALB;
  246. }
  247. static inline bool bond_mode_uses_primary(int mode)
  248. {
  249. return mode == BOND_MODE_ACTIVEBACKUP || mode == BOND_MODE_TLB ||
  250. mode == BOND_MODE_ALB;
  251. }
  252. static inline bool bond_uses_primary(struct bonding *bond)
  253. {
  254. return bond_mode_uses_primary(BOND_MODE(bond));
  255. }
  256. static inline bool bond_slave_is_up(struct slave *slave)
  257. {
  258. return netif_running(slave->dev) && netif_carrier_ok(slave->dev);
  259. }
  260. static inline void bond_set_active_slave(struct slave *slave)
  261. {
  262. if (slave->backup) {
  263. slave->backup = 0;
  264. rtmsg_ifinfo(RTM_NEWLINK, slave->dev, 0, GFP_ATOMIC);
  265. }
  266. }
  267. static inline void bond_set_backup_slave(struct slave *slave)
  268. {
  269. if (!slave->backup) {
  270. slave->backup = 1;
  271. rtmsg_ifinfo(RTM_NEWLINK, slave->dev, 0, GFP_ATOMIC);
  272. }
  273. }
  274. static inline void bond_set_slave_state(struct slave *slave,
  275. int slave_state, bool notify)
  276. {
  277. if (slave->backup == slave_state)
  278. return;
  279. slave->backup = slave_state;
  280. if (notify) {
  281. rtmsg_ifinfo(RTM_NEWLINK, slave->dev, 0, GFP_ATOMIC);
  282. slave->should_notify = 0;
  283. } else {
  284. if (slave->should_notify)
  285. slave->should_notify = 0;
  286. else
  287. slave->should_notify = 1;
  288. }
  289. }
  290. static inline void bond_slave_state_change(struct bonding *bond)
  291. {
  292. struct list_head *iter;
  293. struct slave *tmp;
  294. bond_for_each_slave(bond, tmp, iter) {
  295. if (tmp->link == BOND_LINK_UP)
  296. bond_set_active_slave(tmp);
  297. else if (tmp->link == BOND_LINK_DOWN)
  298. bond_set_backup_slave(tmp);
  299. }
  300. }
  301. static inline void bond_slave_state_notify(struct bonding *bond)
  302. {
  303. struct list_head *iter;
  304. struct slave *tmp;
  305. bond_for_each_slave(bond, tmp, iter) {
  306. if (tmp->should_notify) {
  307. rtmsg_ifinfo(RTM_NEWLINK, tmp->dev, 0, GFP_ATOMIC);
  308. tmp->should_notify = 0;
  309. }
  310. }
  311. }
  312. static inline int bond_slave_state(struct slave *slave)
  313. {
  314. return slave->backup;
  315. }
  316. static inline bool bond_is_active_slave(struct slave *slave)
  317. {
  318. return !bond_slave_state(slave);
  319. }
  320. static inline bool bond_slave_can_tx(struct slave *slave)
  321. {
  322. return bond_slave_is_up(slave) && slave->link == BOND_LINK_UP &&
  323. bond_is_active_slave(slave);
  324. }
  325. #define BOND_PRI_RESELECT_ALWAYS 0
  326. #define BOND_PRI_RESELECT_BETTER 1
  327. #define BOND_PRI_RESELECT_FAILURE 2
  328. #define BOND_FOM_NONE 0
  329. #define BOND_FOM_ACTIVE 1
  330. #define BOND_FOM_FOLLOW 2
  331. #define BOND_ARP_TARGETS_ANY 0
  332. #define BOND_ARP_TARGETS_ALL 1
  333. #define BOND_ARP_VALIDATE_NONE 0
  334. #define BOND_ARP_VALIDATE_ACTIVE (1 << BOND_STATE_ACTIVE)
  335. #define BOND_ARP_VALIDATE_BACKUP (1 << BOND_STATE_BACKUP)
  336. #define BOND_ARP_VALIDATE_ALL (BOND_ARP_VALIDATE_ACTIVE | \
  337. BOND_ARP_VALIDATE_BACKUP)
  338. #define BOND_ARP_FILTER (BOND_ARP_VALIDATE_ALL + 1)
  339. #define BOND_ARP_FILTER_ACTIVE (BOND_ARP_VALIDATE_ACTIVE | \
  340. BOND_ARP_FILTER)
  341. #define BOND_ARP_FILTER_BACKUP (BOND_ARP_VALIDATE_BACKUP | \
  342. BOND_ARP_FILTER)
  343. #define BOND_SLAVE_NOTIFY_NOW true
  344. #define BOND_SLAVE_NOTIFY_LATER false
  345. static inline int slave_do_arp_validate(struct bonding *bond,
  346. struct slave *slave)
  347. {
  348. return bond->params.arp_validate & (1 << bond_slave_state(slave));
  349. }
  350. static inline int slave_do_arp_validate_only(struct bonding *bond)
  351. {
  352. return bond->params.arp_validate & BOND_ARP_FILTER;
  353. }
  354. static inline int bond_is_ip_target_ok(__be32 addr)
  355. {
  356. return !ipv4_is_lbcast(addr) && !ipv4_is_zeronet(addr);
  357. }
  358. /* Get the oldest arp which we've received on this slave for bond's
  359. * arp_targets.
  360. */
  361. static inline unsigned long slave_oldest_target_arp_rx(struct bonding *bond,
  362. struct slave *slave)
  363. {
  364. int i = 1;
  365. unsigned long ret = slave->target_last_arp_rx[0];
  366. for (; (i < BOND_MAX_ARP_TARGETS) && bond->params.arp_targets[i]; i++)
  367. if (time_before(slave->target_last_arp_rx[i], ret))
  368. ret = slave->target_last_arp_rx[i];
  369. return ret;
  370. }
  371. static inline unsigned long slave_last_rx(struct bonding *bond,
  372. struct slave *slave)
  373. {
  374. if (bond->params.arp_all_targets == BOND_ARP_TARGETS_ALL)
  375. return slave_oldest_target_arp_rx(bond, slave);
  376. return slave->last_rx;
  377. }
  378. #ifdef CONFIG_NET_POLL_CONTROLLER
  379. static inline void bond_netpoll_send_skb(const struct slave *slave,
  380. struct sk_buff *skb)
  381. {
  382. struct netpoll *np = slave->np;
  383. if (np)
  384. netpoll_send_skb(np, skb);
  385. }
  386. #else
  387. static inline void bond_netpoll_send_skb(const struct slave *slave,
  388. struct sk_buff *skb)
  389. {
  390. }
  391. #endif
  392. static inline void bond_set_slave_inactive_flags(struct slave *slave,
  393. bool notify)
  394. {
  395. if (!bond_is_lb(slave->bond))
  396. bond_set_slave_state(slave, BOND_STATE_BACKUP, notify);
  397. if (!slave->bond->params.all_slaves_active)
  398. slave->inactive = 1;
  399. }
  400. static inline void bond_set_slave_active_flags(struct slave *slave,
  401. bool notify)
  402. {
  403. bond_set_slave_state(slave, BOND_STATE_ACTIVE, notify);
  404. slave->inactive = 0;
  405. }
  406. static inline bool bond_is_slave_inactive(struct slave *slave)
  407. {
  408. return slave->inactive;
  409. }
  410. static inline __be32 bond_confirm_addr(struct net_device *dev, __be32 dst, __be32 local)
  411. {
  412. struct in_device *in_dev;
  413. __be32 addr = 0;
  414. rcu_read_lock();
  415. in_dev = __in_dev_get_rcu(dev);
  416. if (in_dev)
  417. addr = inet_confirm_addr(dev_net(dev), in_dev, dst, local,
  418. RT_SCOPE_HOST);
  419. rcu_read_unlock();
  420. return addr;
  421. }
  422. struct bond_net {
  423. struct net *net; /* Associated network namespace */
  424. struct list_head dev_list;
  425. #ifdef CONFIG_PROC_FS
  426. struct proc_dir_entry *proc_dir;
  427. #endif
  428. struct class_attribute class_attr_bonding_masters;
  429. };
  430. int bond_arp_rcv(const struct sk_buff *skb, struct bonding *bond, struct slave *slave);
  431. void bond_dev_queue_xmit(struct bonding *bond, struct sk_buff *skb, struct net_device *slave_dev);
  432. int bond_create(struct net *net, const char *name);
  433. int bond_create_sysfs(struct bond_net *net);
  434. void bond_destroy_sysfs(struct bond_net *net);
  435. void bond_prepare_sysfs_group(struct bonding *bond);
  436. int bond_sysfs_slave_add(struct slave *slave);
  437. void bond_sysfs_slave_del(struct slave *slave);
  438. int bond_enslave(struct net_device *bond_dev, struct net_device *slave_dev);
  439. int bond_release(struct net_device *bond_dev, struct net_device *slave_dev);
  440. u32 bond_xmit_hash(struct bonding *bond, struct sk_buff *skb);
  441. void bond_select_active_slave(struct bonding *bond);
  442. void bond_change_active_slave(struct bonding *bond, struct slave *new_active);
  443. void bond_create_debugfs(void);
  444. void bond_destroy_debugfs(void);
  445. void bond_debug_register(struct bonding *bond);
  446. void bond_debug_unregister(struct bonding *bond);
  447. void bond_debug_reregister(struct bonding *bond);
  448. const char *bond_mode_name(int mode);
  449. void bond_setup(struct net_device *bond_dev);
  450. unsigned int bond_get_num_tx_queues(void);
  451. int bond_netlink_init(void);
  452. void bond_netlink_fini(void);
  453. struct net_device *bond_option_active_slave_get_rcu(struct bonding *bond);
  454. const char *bond_slave_link_status(s8 link);
  455. struct bond_vlan_tag *bond_verify_device_path(struct net_device *start_dev,
  456. struct net_device *end_dev,
  457. int level);
  458. #ifdef CONFIG_PROC_FS
  459. void bond_create_proc_entry(struct bonding *bond);
  460. void bond_remove_proc_entry(struct bonding *bond);
  461. void bond_create_proc_dir(struct bond_net *bn);
  462. void bond_destroy_proc_dir(struct bond_net *bn);
  463. #else
  464. static inline void bond_create_proc_entry(struct bonding *bond)
  465. {
  466. }
  467. static inline void bond_remove_proc_entry(struct bonding *bond)
  468. {
  469. }
  470. static inline void bond_create_proc_dir(struct bond_net *bn)
  471. {
  472. }
  473. static inline void bond_destroy_proc_dir(struct bond_net *bn)
  474. {
  475. }
  476. #endif
  477. static inline struct slave *bond_slave_has_mac(struct bonding *bond,
  478. const u8 *mac)
  479. {
  480. struct list_head *iter;
  481. struct slave *tmp;
  482. bond_for_each_slave(bond, tmp, iter)
  483. if (ether_addr_equal_64bits(mac, tmp->dev->dev_addr))
  484. return tmp;
  485. return NULL;
  486. }
  487. /* Caller must hold rcu_read_lock() for read */
  488. static inline struct slave *bond_slave_has_mac_rcu(struct bonding *bond,
  489. const u8 *mac)
  490. {
  491. struct list_head *iter;
  492. struct slave *tmp;
  493. bond_for_each_slave_rcu(bond, tmp, iter)
  494. if (ether_addr_equal_64bits(mac, tmp->dev->dev_addr))
  495. return tmp;
  496. return NULL;
  497. }
  498. /* Caller must hold rcu_read_lock() for read */
  499. static inline bool bond_slave_has_mac_rx(struct bonding *bond, const u8 *mac)
  500. {
  501. struct list_head *iter;
  502. struct slave *tmp;
  503. struct netdev_hw_addr *ha;
  504. bond_for_each_slave_rcu(bond, tmp, iter)
  505. if (ether_addr_equal_64bits(mac, tmp->dev->dev_addr))
  506. return true;
  507. if (netdev_uc_empty(bond->dev))
  508. return false;
  509. netdev_for_each_uc_addr(ha, bond->dev)
  510. if (ether_addr_equal_64bits(mac, ha->addr))
  511. return true;
  512. return false;
  513. }
  514. /* Check if the ip is present in arp ip list, or first free slot if ip == 0
  515. * Returns -1 if not found, index if found
  516. */
  517. static inline int bond_get_targets_ip(__be32 *targets, __be32 ip)
  518. {
  519. int i;
  520. for (i = 0; i < BOND_MAX_ARP_TARGETS; i++)
  521. if (targets[i] == ip)
  522. return i;
  523. else if (targets[i] == 0)
  524. break;
  525. return -1;
  526. }
  527. /* exported from bond_main.c */
  528. extern int bond_net_id;
  529. extern const struct bond_parm_tbl bond_lacp_tbl[];
  530. extern const struct bond_parm_tbl xmit_hashtype_tbl[];
  531. extern const struct bond_parm_tbl arp_validate_tbl[];
  532. extern const struct bond_parm_tbl arp_all_targets_tbl[];
  533. extern const struct bond_parm_tbl fail_over_mac_tbl[];
  534. extern const struct bond_parm_tbl pri_reselect_tbl[];
  535. extern struct bond_parm_tbl ad_select_tbl[];
  536. /* exported from bond_netlink.c */
  537. extern struct rtnl_link_ops bond_link_ops;
  538. #endif /* _LINUX_BONDING_H */