[v3,03/13] net/ionic: don't auto-enable Rx scatter-gather a second time

Message ID 20240207031317.32293-4-andrew.boyer@amd.com (mailing list archive)
State Accepted, archived
Delegated to: Ferruh Yigit
Headers
Series net/ionic: miscellaneous fixes and improvements |

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Boyer, Andrew Feb. 7, 2024, 3:13 a.m. UTC
  The receive side will enable scatter-gather if required based on the
mbuf size. If the client already enabled it in the config, it does
not need to be enabled again. This reduces log output.

Signed-off-by: Andrew Boyer <andrew.boyer@amd.com>
---
 drivers/net/ionic/ionic_lif.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
  

Patch

diff --git a/drivers/net/ionic/ionic_lif.c b/drivers/net/ionic/ionic_lif.c
index 25b490deb6..fe2112c057 100644
--- a/drivers/net/ionic/ionic_lif.c
+++ b/drivers/net/ionic/ionic_lif.c
@@ -768,7 +768,8 @@  ionic_rx_qcq_alloc(struct ionic_lif *lif, uint32_t socket_id, uint32_t index,
 	max_mtu = rte_le_to_cpu_32(lif->adapter->ident.lif.eth.max_mtu);
 
 	/* If mbufs are too small to hold received packets, enable SG */
-	if (max_mtu > hdr_seg_size) {
+	if (max_mtu > hdr_seg_size &&
+	    !(lif->features & IONIC_ETH_HW_RX_SG)) {
 		IONIC_PRINT(NOTICE, "Enabling RX_OFFLOAD_SCATTER");
 		lif->eth_dev->data->dev_conf.rxmode.offloads |=
 			RTE_ETH_RX_OFFLOAD_SCATTER;