Skip to content

[drop counters] Shut link from fanout side for test_egress_drop_on_down_link#2303

Merged
daall merged 2 commits intosonic-net:masterfrom
daall:egress_link_down_fix
Oct 5, 2020
Merged

[drop counters] Shut link from fanout side for test_egress_drop_on_down_link#2303
daall merged 2 commits intosonic-net:masterfrom
daall:egress_link_down_fix

Conversation

@daall
Copy link
Contributor

@daall daall commented Oct 1, 2020

Signed-off-by: Danny Allen daall@microsoft.com

Description of PR

Summary: [drop counters] Shut link from fanout side for test_egress_drop_on_down_link

Type of change

  • Bug fix
  • Testbed and Framework(new/improvement)
  • Test case(new/improvement)

Approach

What is the motivation for this PR?

The test_egress_drop_on_down_link test case was not passing reliably for us. We figured out that this is because the test is shutting the neighbor link from the DUT side. When this happens, the ARP entry for that interface is cleared, so the packets destined for the neighbor IP hit the default route rather than the bad ARP entry, so the packets are not dropped.

How did you do it?

Use the fanout_switch_port_lookup utility to get the corresponding fanout interface and shut that port down instead. This leaves the ARP entry intact and triggers the desired drops.

How did you verify/test it?

Ran test locally, it now passes reliably.

drop_packets/test_drop_counters.py::test_egress_drop_on_down_link[rif_members]
-------------------------------------------------------------------------------------------------- live log setup --------------------------------------------------------------------------------------------------
23:40:49 INFO __init__.py:set_default:49: Completeness level not set during test execution. Setting to default level: CompletenessLevel.basic
23:40:49 INFO __init__.py:check_test_completeness:128: Test has no defined levels. Continue without test completeness checks
23:40:50 INFO __init__.py:loganalyzer:32: Add start marker into DUT syslog
23:40:51 INFO __init__.py:loganalyzer:34: Load config and analyze log
23:40:57 INFO devices.py:shutdown:1098: Shut interface [Ethernet57/1]
-------------------------------------------------------------------------------------------------- live log call ---------------------------------------------------------------------------------------------------
23:41:00 INFO drop_packets.py:log_pkt_params:206: Selected TX interface on DUT - Ethernet104
23:41:00 INFO drop_packets.py:log_pkt_params:207: Packet DST MAC - 00:e0:ec:c2:ae:74
23:41:00 INFO drop_packets.py:log_pkt_params:208: Packet SRC MAC - 1a:7c:31:5c:5a:1a
23:41:00 INFO drop_packets.py:log_pkt_params:209: Packet IP DST - 10.0.0.49
23:41:00 INFO drop_packets.py:log_pkt_params:210: Packet IP SRC - 1.1.1.1
PASSED                                                                                                                                                                                                       [100%]
------------------------------------------------------------------------------------------------ live log teardown -------------------------------------------------------------------------------------------------
23:41:17 INFO devices.py:no_shutdown:1105: No shut interface [Ethernet57/1]

Any platform specific information?

Supported testbed topology if it's a new test case?

Documentation

…wn_link

Signed-off-by: Danny Allen <daall@microsoft.com>
@daall daall requested a review from a team October 1, 2020 23:46
@daall
Copy link
Contributor Author

daall commented Oct 1, 2020

@yvolynets-mlnx can you also review, please?

@yvolynets-mlnx
Copy link
Contributor

@yvolynets-mlnx can you also review, please?

Looks good to me

@daall daall merged commit 8632ea6 into sonic-net:master Oct 5, 2020
@daall daall deleted the egress_link_down_fix branch October 5, 2020 17:54
kazinator-arista pushed a commit to kazinator-arista/sonic-mgmt that referenced this pull request Mar 4, 2026
…submodule head (sonic-net#11705)

Kernel:
* 86c4b66 2022-07-28 | [Mellanox] Add new kernel patches from HW-MGMT package V.7.0020.3005 (sonic-net#287) (HEAD -> 202205) [Kebo Liu]
* 3a8416a 2022-07-05 | [patch] mlxsw: i2c: Prevent transaction execution for special chip (sonic-net#279) [Stepan Blyshchak]

swss:
* 3f69944 2022-08-10 | Set internal class state to reflect the actual state (sonic-net#2410) (HEAD -> 202205, tag: foo) [Prince Sunny]
* 87e98eb 2022-08-09 | [portsorch] Expose supported FEC modes to STABE_DB and check whether FEC mode is supported before setting it (sonic-net#2400) [Stephen Sun]
* e71ab99 2022-07-29 | portsorch: initial support for link-training (sonic-net#2359) [Dante (Kuo-Jung) Su]
* ed5e5be 2022-07-08 | Port configuration incremental update support (sonic-net#2305) [Junchao-Mellanox]

utilities:
* 0df3ba8 2022-08-12 | Revert "Improve the way to check port type of RJ45 port (sonic-net#2249)" (HEAD -> 202205) [Ying Xie]
* 9b21903 2022-08-12 | Fix test failure in dump table test in 202205 (sonic-net#2307) (HEAD -> 202205, github/202205) [Stephen Sun]
* 750d1db 2022-08-11 | Convert IPv6 addresses to lowercase in apply-patch (sonic-net#2299) (HEAD -> 202205) [dbarashinvd]
* 555947e 2022-08-09 | [config][muxcable] add support to enable/disable ycable telemetry (sonic-net#2297) [vdahiya12]
* 978f416 2022-08-09 | Fix GCU bug when backend service modifying config (sonic-net#2295) [jingwenxie]
* 8fed381 2022-08-02 | [intfutil] Check whether the FEC mode is supported on the platform before configuring it to CONFIG_DB (sonic-net#2223) (github/202205) [Stephen Sun]
* a1a09e4 2022-07-29 | Improve the way to check port type of RJ45 port (sonic-net#2249) [Stephen Sun]
* 9bdbfb8 2022-05-19 | sonic-utils: initial support for link-training (sonic-net#2071) [Dante (Kuo-Jung) Su]
* c088ec4 2022-08-10 | Support to enable fips for the command sonic_installer (sonic-net#2154) (sonic-net#2303) [xumia]

platform-daemon:
* 767cfb6 2022-08-09 | [ycabled] add capability to enable/disable telemetry (sonic-net#279) (HEAD -> 202205) [vdahiya12]

linkmgrd:
* cf1ba2b 2022-08-12 | wait for handler to be completed (sonic-net#114) (HEAD -> 202205, github/202205) [Jing Zhang]
* e99026c 2022-08-11 | [lgtm]: add uuid-dev to lgtm prepare (sonic-net#112) (HEAD -> 202205) [Jing Zhang]
* bd1b7f0 2022-08-11 | Adjust `DbInterfaceRaceConditionCheck` to Wait Longer for Handlers to be executed (sonic-net#111) (HEAD -> 202205, github/202205) [Jing Zhang]
* e9dc6b2 2022-08-11 | Backoff mux probing for server down scenario (sonic-net#106) [Jing Zhang]
* 0d61171 2022-08-09 | Fix race condition caused by strand `wrap` method (sonic-net#104) [Jing Zhang]
* e9ede7d 2022-07-02 | Enforce switch after config mux to active (sonic-net#95) [Longxiang Lyu]
* 15dbc30 2022-06-30 | Add unittest to verify mux toggle active (sonic-net#94) [Longxiang Lyu]

Signed-off-by: Ying Xie <ying.xie@microsoft.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants