Bug 1127

Summary: net/i40e does not preserve RSS redirection table upon port stop/start
Product: DPDK Reporter: Andrew Rybchenko (andrew.rybchenko)
Component: ethdevAssignee: dev
Status: UNCONFIRMED ---    
Severity: normal CC: ivan.malov, kaiwenx.deng
Priority: Normal    
Version: 22.07   
Target Milestone: ---   
Hardware: All   
OS: All   

Description Andrew Rybchenko 2022-11-17 09:09:35 CET
net/i40e does not preserve RSS redirection table upon port stop/start

lib/ethdev/rte_ethdev.h line 86:

  79  * Please note that some configuration is not stored between calls to
  80  * rte_eth_dev_stop()/rte_eth_dev_start(). The following configuration will
  81  * be retained:
  82  *
  83  *     - MTU
  84  *     - flow control settings
  85  *     - receive mode configuration (promiscuous mode, all-multicast mode,
  86  *       hardware checksum mode, RSS/VMDq settings etc.)
  87  *     - VLAN filtering configuration
  88  *     - default MAC address
  89  *     - MAC addresses supplied to MAC address array
  90  *     - flow director filtering mode (but not filtering rules)
  91  *     - NIC queue statistics mappings

defines that RSS settings must be retained across restart.

Example log from dpdk-ethdev-ts tests available [1]. Lines below are lines in the log.

Steps to reproduce should be trivial and as far as I know testpmd has all required functionality: 
 - configure more than 1 Rx queue, 
 - start port (line 38),
 - update reta (lines 41 and 43),
 - stop (line 72),
 - start again (line 74),
 - read reta (line 77) and compare (example log shows that RETA is reset to default).
Obviously update should not match default configuration.

[1] https://ts-factory.io/bublik/v2/log/189828?focusId=190450&mode=treeAndinfoAndlog
Comment 1 Andrew Rybchenko 2022-11-17 09:25:21 CET
One more point related to the bug in fact. i40e reports invalid RETA table just after port configure (without start) - it pretends to have 64 Rx queues whereas ethdev is already configured to have another number of Rx queues (see [1] line 27):

rte_eth_dev_configure(0, 1, 1, { link_speeds=0, rxmode={ mq_mode=RSS, mtu=0, offloads=, flags=HW_STRIP_CRC }, txmode={ mq_mode=NONE, offloads=, pvid=0, flags= }, lbpk_mode=0, rx_conf_adv={ rss_conf={rss_key=, rss_key_len=0, rss_hf=} }, dcb_cap_en=0, intr_conf={ lsc=0, rxq=0 } }) -> 0

rte_eth_dev_rss_reta_query(0, 0x55d83fdddda0, 512) -> 0, reta_conf={ mask=ffffffffffffffff, reta= 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 mask=ffffffffffffffff, reta= 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 mask=ffffffffffffffff, reta= 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 mask=ffffffffffffffff, reta= 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 mask=ffffffffffffffff, reta= 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 mask=ffffffffffffffff, reta= 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 mask=ffffffffffffffff, reta= 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 mask=ffffffffffffffff, reta= 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 }

testpmd should be capable to reproduce the problem as well.

I think that the problem is related since the bug will be fixed as soon as default RETA is initialized on port configure and not reinitialized on start.

[1] https://ts-factory.io/bublik/v2/log/189828?focusId=190422&mode=treeAndinfoAndlog
Comment 2 dengkaiwen 2023-11-03 07:51:00 CET
please offer the reproduce steps with standard DPDK API like testpmd, l3fwd and other examples.