git: 637ff00f2f9b - main - ena: Set ena_min_poll_delay_us default value
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 15 Oct 2024 17:43:09 UTC
The branch main has been updated by osamaabb: URL: https://cgit.FreeBSD.org/src/commit/?id=637ff00f2f9bd6c8509d0e2ac8959c7a23f09650 commit 637ff00f2f9bd6c8509d0e2ac8959c7a23f09650 Author: osamaabb <osamaabb@amazon.com> AuthorDate: 2024-09-23 08:06:41 +0000 Commit: Osama Abboud <osamaabb@FreeBSD.org> CommitDate: 2024-10-15 17:38:31 +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) MFC after: 2 weeks Sponsored by: Amazon, Inc. --- 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 */