Skip to content

Commit 1713efb

Browse files
committed
net: ena: Remove autopolling mode
JIRA: https://issues.redhat.com/browse/RHEL-94831 commit b356b91 Author: Dr. David Alan Gilbert <linux@treblig.org> Date: Sun Nov 3 19:41:49 2024 +0000 net: ena: Remove autopolling mode This manually reverts commit a4e262c ("net: ena: allow automatic fallback to polling mode") which is unused. (I did it manually because there are other minor comment and function changes surrounding it). Build tested only. Suggested-by: David Arinzon <darinzon@amazon.com> Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org> Link: https://patch.msgid.link/20241103194149.293456-1-linux@treblig.org Signed-off-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: Dennis Chen <dechen@redhat.com>
1 parent 26d1da0 commit 1713efb

File tree

2 files changed

+5
-34
lines changed

2 files changed

+5
-34
lines changed

drivers/net/ethernet/amazon/ena/ena_com.c

Lines changed: 5 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -763,25 +763,16 @@ static int ena_com_wait_and_process_admin_cq_interrupts(struct ena_comp_ctx *com
763763

764764
if (comp_ctx->status == ENA_CMD_COMPLETED) {
765765
netdev_err(admin_queue->ena_dev->net_device,
766-
"The ena device sent a completion but the driver didn't receive a MSI-X interrupt (cmd %d), autopolling mode is %s\n",
767-
comp_ctx->cmd_opcode, admin_queue->auto_polling ? "ON" : "OFF");
768-
/* Check if fallback to polling is enabled */
769-
if (admin_queue->auto_polling)
770-
admin_queue->polling = true;
766+
"The ena device sent a completion but the driver didn't receive a MSI-X interrupt (cmd %d)\n",
767+
comp_ctx->cmd_opcode);
771768
} else {
772769
netdev_err(admin_queue->ena_dev->net_device,
773770
"The ena device didn't send a completion for the admin cmd %d status %d\n",
774771
comp_ctx->cmd_opcode, comp_ctx->status);
775772
}
776-
/* Check if shifted to polling mode.
777-
* This will happen if there is a completion without an interrupt
778-
* and autopolling mode is enabled. Continuing normal execution in such case
779-
*/
780-
if (!admin_queue->polling) {
781-
admin_queue->running_state = false;
782-
ret = -ETIME;
783-
goto err;
784-
}
773+
admin_queue->running_state = false;
774+
ret = -ETIME;
775+
goto err;
785776
}
786777

787778
ret = ena_com_comp_status_to_errno(admin_queue, comp_ctx->comp_status);
@@ -1650,12 +1641,6 @@ void ena_com_set_admin_polling_mode(struct ena_com_dev *ena_dev, bool polling)
16501641
ena_dev->admin_queue.polling = polling;
16511642
}
16521643

1653-
void ena_com_set_admin_auto_polling_mode(struct ena_com_dev *ena_dev,
1654-
bool polling)
1655-
{
1656-
ena_dev->admin_queue.auto_polling = polling;
1657-
}
1658-
16591644
int ena_com_mmio_reg_read_request_init(struct ena_com_dev *ena_dev)
16601645
{
16611646
struct ena_com_mmio_read *mmio_read = &ena_dev->mmio_read;

drivers/net/ethernet/amazon/ena/ena_com.h

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -224,9 +224,6 @@ struct ena_com_admin_queue {
224224
/* Indicate if the admin queue should poll for completion */
225225
bool polling;
226226

227-
/* Define if fallback to polling mode should occur */
228-
bool auto_polling;
229-
230227
u16 curr_cmd_id;
231228

232229
/* Indicate that the ena was initialized and can
@@ -493,17 +490,6 @@ bool ena_com_get_admin_running_state(struct ena_com_dev *ena_dev);
493490
*/
494491
void ena_com_set_admin_polling_mode(struct ena_com_dev *ena_dev, bool polling);
495492

496-
/* ena_com_set_admin_auto_polling_mode - Enable autoswitch to polling mode
497-
* @ena_dev: ENA communication layer struct
498-
* @polling: Enable/Disable polling mode
499-
*
500-
* Set the autopolling mode.
501-
* If autopolling is on:
502-
* In case of missing interrupt when data is available switch to polling.
503-
*/
504-
void ena_com_set_admin_auto_polling_mode(struct ena_com_dev *ena_dev,
505-
bool polling);
506-
507493
/* ena_com_admin_q_comp_intr_handler - admin queue interrupt handler
508494
* @ena_dev: ENA communication layer struct
509495
*

0 commit comments

Comments
 (0)