Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 31 Oct 2024 16:00:04 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: d96267deb493 - stable/13 - ena: Set ena_min_poll_delay_us default value
Message-ID:  <202410311600.49VG04Ym060425@gitrepo.freebsd.org>

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

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

commit d96267deb493add01e5e99700b866573e3342419
Author:     osamaabb <osamaabb@amazon.com>
AuthorDate: 2024-09-23 08:06:41 +0000
Commit:     Osama Abboud <osamaabb@FreeBSD.org>
CommitDate: 2024-10-31 14:55:20 +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 a895ede8226f..6943480aecc5 100644
--- a/sys/dev/ena/ena.c
+++ b/sys/dev/ena/ena.c
@@ -3737,6 +3737,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?202410311600.49VG04Ym060425>