Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 31 Oct 2024 16:01:30 GMT
From:      Osama Abboud <osamaabb@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: a20c06c6f181 - stable/14 - ena: Set ena_min_poll_delay_us default value
Message-ID:  <202410311601.49VG1U1k070247@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch stable/14 has been updated by osamaabb:

URL: https://cgit.FreeBSD.org/src/commit/?id=a20c06c6f1813562e46ee10c6f19bb5d5a5b6143

commit a20c06c6f1813562e46ee10c6f19bb5d5a5b6143
Author:     osamaabb <osamaabb@amazon.com>
AuthorDate: 2024-09-23 08:06:41 +0000
Commit:     Osama Abboud <osamaabb@FreeBSD.org>
CommitDate: 2024-10-31 14:54:11 +0000

    ena: Set ena_min_poll_delay_us default value
    
    This commit sets the default value for ena_min_poll_delay_us to 100.
    
    This commit does not change the behavior of the driver, the delay is
    calculated as MAX(ENA_MIN_ADMIN_POLL_US, delay_us), where the first
    field is already defined as 100.
    The second parameter, delay_us is taken from ena_min_poll_delay_us
    which is currently unset - 0.
    
    Approved by: cperciva (mentor)
    Sponsored by: Amazon, Inc.
    
    (cherry picked from commit 637ff00f2f9bd6c8509d0e2ac8959c7a23f09650)
---
 sys/dev/ena/ena.c | 2 ++
 sys/dev/ena/ena.h | 2 ++
 2 files changed, 4 insertions(+)

diff --git a/sys/dev/ena/ena.c b/sys/dev/ena/ena.c
index 36e9ac15e8ff..8c20596d3d23 100644
--- a/sys/dev/ena/ena.c
+++ b/sys/dev/ena/ena.c
@@ -3736,6 +3736,8 @@ ena_attach(device_t pdev)
 		goto err_bus_free;
 	}
 
+	ena_dev->ena_min_poll_delay_us = ENA_ADMIN_POLL_DELAY_US;
+
 	/* Initially clear all the flags */
 	ENA_FLAG_ZERO(adapter);
 
diff --git a/sys/dev/ena/ena.h b/sys/dev/ena/ena.h
index 1a436a702ba1..876c3cd258aa 100644
--- a/sys/dev/ena/ena.h
+++ b/sys/dev/ena/ena.h
@@ -146,6 +146,8 @@
 /* Max number of timeouted packets before device reset */
 #define ENA_DEFAULT_TX_CMP_THRESHOLD	(128)
 
+#define ENA_ADMIN_POLL_DELAY_US 100
+
 /*
  * Supported PCI vendor and devices IDs
  */



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202410311601.49VG1U1k070247>