This repository was archived by the owner on Mar 1, 2023. It is now read-only.
forked from sonic-net/sonic-buildimage
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit f36e2c7
Update git submodules
* Update src/sonic-swss from branch 'broadcom_sonic'
to 09d35c997a8013f9c328d45048273cdd282eb981
- [JIRA SONIC-6788] Sonic - SONIC_2.0 - ST:After unconfigure L3 config
with VRf, "unregister_netdevice: waiting for Vrf1 to become free. Usage
count = 6" scrolls on console
Whenever IP packet arrives in IP Stack, fib lookup is performed on table based on Route policy configured and based on fib lookup result, dst will be allocated for this packet.
When IP packet is received, prior to dst allocation, lookup is happening in local route table later in l3mdev-table. This is evident from BT below and traces added in dev_hold.
This holds refcount of l3mdev netdev.
[ 109.400301] hold dev: Vrf1 ref: 117
[ 109.400308] CPU: 2 PID: 13410 Comm: python3.6 Tainted: G O 4.9.0-9-2-amd64 #1 Debian 4.9. 168-1+deb9u3
[ 109.400312] Hardware name: Accton AS7326/Default string, BIOS AS7326 V36 20181228 12/28/2018
[ 109.400314] 0000000000000000 ffffffffa37349f4 ffff8b04b93aa800 ffff8b052ba9d000
[ 109.400321] ffffffffa391c87e 00000000ffffffff ffffffffa40e2240 ffff8b04b93aa800
[ 109.400325] ffff8b052ba9d000 0000000000000001 ffffffffa391c8f4 0000000000000002
[ 109.400330] Call Trace:
[ 109.400333] <IRQ>
[ 109.400342] [<ffffffffa37349f4>] ? dump_stack+0x5c/0x78
[ 109.400347] [<ffffffffa391c87e>] ? dst_init+0x17e/0x190
[ 109.400351] [<ffffffffa391c8f4>] ? dst_alloc+0x64/0x90
[ 109.400354] [<ffffffffa394e6d4>] ? rt_dst_alloc+0x54/0xf0
[ 109.400359] [<ffffffffa3951b51>] ? ip_route_input_noref+0x1f1/0xe00
[ 109.400366] [<ffffffffc0450788>] ? nf_nat_ipv4_in+0x28/0x80 [nf_nat_ipv4]
[ 109.400370] [<ffffffffa3953d7b>] ? ip_rcv_finish+0xab/0x400
[ 109.400375] [<ffffffffa3954744>] ? ip_rcv+0x294/0x370
[ 109.400379] [<ffffffffa3953cd0>] ? inet_del_offload+0x40/0x40
[ 109.400387] [<ffffffffa391164d>] ? __netif_receive_skb_core+0x51d/0xa40
[ 109.400393] [<ffffffffa3911bef>] ? netif_receive_skb_internal+0x2f/0xa0
[ 109.400407] [<ffffffffc059b812>] ? br_pass_frame_up+0xc2/0x160 [bridge]
[ 109.400419] [<ffffffffc059b660>] ? br_port_flags_change+0x20/0x20 [bridge]
[ 109.400430] [<ffffffffc059bad0>] ? br_handle_frame_finish+0x220/0x510 [bridge]
[ 109.400441] [<ffffffffc059be00>] ? br_handle_local_finish+0x40/0x40 [bridge]
[ 109.400449] [<ffffffffa394ca74>] ? nf_iterate+0x54/0x60
[ 109.400460] [<ffffffffc059be00>] ? br_handle_local_finish+0x40/0x40 [bridge]
[ 109.400471] [<ffffffffc059bf6b>] ? br_handle_frame+0x16b/0x2f0 [bridge]
[ 109.400481] [<ffffffffc059b8b0>] ? br_pass_frame_up+0x160/0x160 [bridge]
[ 109.400489] [<ffffffffa3911438>] ? __netif_receive_skb_core+0x308/0xa40
[ 109.400499] [<ffffffffc066e006>] ? _iproc_write+0x88/0x90 [linux_kernel_bde]
[ 109.400507] [<ffffffffc066e0d8>] ? lkbde_irq_mask_set+0xca/0xdb [linux_kernel_bde]
[ 109.400514] [<ffffffffa3912ca8>] ? process_backlog+0x88/0x130
[ 109.400519] [<ffffffffa3912436>] ? net_rx_action+0x246/0x380
[ 109.400525] [<ffffffffa3a20f1d>] ? __do_softirq+0x10d/0x2b0
[ 109.400531] [<ffffffffa34800b2>] ? irq_exit+0xc2/0xd0
[ 109.400536] [<ffffffffa3a1ffa7>] ? do_IRQ+0x57/0xe0
[ 109.400541] [<ffffffffa3a1dd16>] ? common_interrupt+0x96/0x96
This takes reference of VRF l3mdev netdev during fib lookup which is wrong.
Currently, in sonic, fib rule lookup follows below policy: first local table is looked up, then l3mdev-table(VRF table) later main table.
root@leaf4:~# ip rule ls
0: from all lookup local
1000: from all lookup [l3mdev-table]
32765: from 10.59.136.34 lookup default
32766: from all lookup main
32767: from all lookup default
root@leaf4:~#
This means local table lookup is done first followed by VRF table, this can cause issue esp in case of duplicate IP in VRF and default vrf causing false hits.
Above policy should be changed to first do l3mdev-table lookup(VRF table) followed by local table.
Adding code in vrfmgrd to ensure local table priority is reduced by increasing preference to 32765 when first vrf is configured in system.
Change-Id: Ic24b498244434c5452dc0721f99c72332ece0b271 parent b6fdb66 commit f36e2c7Copy full SHA for f36e2c7
1 file changed
+1
-1
lines changedsrc/sonic-swss
Copy file name to clipboardSubmodule sonic-swss updated from bb3f1d1 to 09d35c9
0 commit comments