tree:
https://git.kernel.org/pub/scm/linux/kernel/git/sashal/linux-stable.git queue-4.9
head: 7aa8ea10050162c89054c107ee38b6211e7618e1
commit: 71ea7304c5b0a6f18ae17c267089ca7dd4d2dc2a [33/34] bonding: fix active-backup
failover for current ARP slave
config: xtensa-allyesconfig (attached as .config)
compiler: xtensa-linux-gcc (GCC) 7.5.0
reproduce (this is a W=1 build):
wget
https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O
~/bin/make.cross
chmod +x ~/bin/make.cross
git checkout 71ea7304c5b0a6f18ae17c267089ca7dd4d2dc2a
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-7.5.0 make.cross ARCH=xtensa
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
In file included from include/linux/linkage.h:4:0,
from include/linux/kernel.h:6,
from drivers/net/bonding/bond_main.c:34:
include/linux/scatterlist.h: In function 'sg_set_buf':
arch/xtensa/include/asm/page.h:185:9: warning: comparison of unsigned expression >=
0 is always true [-Wtype-limits]
((pfn) >= ARCH_PFN_OFFSET && ((pfn) - ARCH_PFN_OFFSET) < max_mapnr)
^
include/linux/compiler.h:184:42: note: in definition of macro 'unlikely'
# define unlikely(x) __builtin_expect(!!(x), 0)
^
include/linux/scatterlist.h:140:2: note: in expansion of macro 'BUG_ON'
BUG_ON(!virt_addr_valid(buf));
^~~~~~
arch/xtensa/include/asm/page.h:193:32: note: in expansion of macro 'pfn_valid'
#define virt_addr_valid(kaddr) pfn_valid(__pa(kaddr) >> PAGE_SHIFT)
^~~~~~~~~
include/linux/scatterlist.h:140:10: note: in expansion of macro
'virt_addr_valid'
BUG_ON(!virt_addr_valid(buf));
^~~~~~~~~~~~~~~
include/linux/dma-mapping.h: In function 'dma_map_resource':
arch/xtensa/include/asm/page.h:185:9: warning: comparison of unsigned expression >=
0 is always true [-Wtype-limits]
((pfn) >= ARCH_PFN_OFFSET && ((pfn) - ARCH_PFN_OFFSET) < max_mapnr)
^
include/linux/compiler.h:184:42: note: in definition of macro 'unlikely'
# define unlikely(x) __builtin_expect(!!(x), 0)
^
include/linux/dma-mapping.h:284:2: note: in expansion of macro 'BUG_ON'
BUG_ON(pfn_valid(PHYS_PFN(phys_addr)));
^~~~~~
include/linux/dma-mapping.h:284:9: note: in expansion of macro 'pfn_valid'
BUG_ON(pfn_valid(PHYS_PFN(phys_addr)));
^~~~~~~~~
drivers/net/bonding/bond_main.c: In function 'bond_ab_arp_inspect':
> drivers/net/bonding/bond_main.c:2734:5: error: implicit
declaration of function 'bond_propose_link_state'; did you mean
'bond_slave_link_status'? [-Werror=implicit-function-declaration]
bond_propose_link_state(slave, BOND_LINK_FAIL);
^~~~~~~~~~~~~~~~~~~~~~~
bond_slave_link_status
cc1: some warnings being treated as errors
#
https://git.kernel.org/pub/scm/linux/kernel/git/sashal/linux-stable.git/c...
git remote add sashal-linux-stable
https://git.kernel.org/pub/scm/linux/kernel/git/sashal/linux-stable.git
git fetch --no-tags sashal-linux-stable queue-4.9
git checkout 71ea7304c5b0a6f18ae17c267089ca7dd4d2dc2a
vim +2734 drivers/net/bonding/bond_main.c
2710
2711 /* Called to inspect slaves for active-backup mode ARP monitor link state
2712 * changes. Sets new_link in slaves to specify what action should take
2713 * place for the slave. Returns 0 if no changes are found, >0 if changes
2714 * to link states must be committed.
2715 *
2716 * Called with rcu_read_lock held.
2717 */
2718 static int bond_ab_arp_inspect(struct bonding *bond)
2719 {
2720 unsigned long trans_start, last_rx;
2721 struct list_head *iter;
2722 struct slave *slave;
2723 int commit = 0;
2724
2725 bond_for_each_slave_rcu(bond, slave, iter) {
2726 slave->new_link = BOND_LINK_NOCHANGE;
2727 last_rx = slave_last_rx(bond, slave);
2728
2729 if (slave->link != BOND_LINK_UP) {
2730 if (bond_time_in_interval(bond, last_rx, 1)) {
2731 slave->new_link = BOND_LINK_UP;
2732 commit++;
2733 } else if (slave->link == BOND_LINK_BACK) {
2734 bond_propose_link_state(slave, BOND_LINK_FAIL);
2735 commit++;
2736 }
2737 continue;
2738 }
2739
2740 /* Give slaves 2*delta after being enslaved or made
2741 * active. This avoids bouncing, as the last receive
2742 * times need a full ARP monitor cycle to be updated.
2743 */
2744 if (bond_time_in_interval(bond, slave->last_link_up, 2))
2745 continue;
2746
2747 /* Backup slave is down if:
2748 * - No current_arp_slave AND
2749 * - more than 3*delta since last receive AND
2750 * - the bond has an IP address
2751 *
2752 * Note: a non-null current_arp_slave indicates
2753 * the curr_active_slave went down and we are
2754 * searching for a new one; under this condition
2755 * we only take the curr_active_slave down - this
2756 * gives each slave a chance to tx/rx traffic
2757 * before being taken out
2758 */
2759 if (!bond_is_active_slave(slave) &&
2760 !rcu_access_pointer(bond->current_arp_slave) &&
2761 !bond_time_in_interval(bond, last_rx, 3)) {
2762 slave->new_link = BOND_LINK_DOWN;
2763 commit++;
2764 }
2765
2766 /* Active slave is down if:
2767 * - more than 2*delta since transmitting OR
2768 * - (more than 2*delta since receive AND
2769 * the bond has an IP address)
2770 */
2771 trans_start = dev_trans_start(slave->dev);
2772 if (bond_is_active_slave(slave) &&
2773 (!bond_time_in_interval(bond, trans_start, 2) ||
2774 !bond_time_in_interval(bond, last_rx, 2))) {
2775 slave->new_link = BOND_LINK_DOWN;
2776 commit++;
2777 }
2778 }
2779
2780 return commit;
2781 }
2782
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org