From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id D36E94622E for ; Sat, 15 Feb 2025 16:59:08 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 639B7400D7; Sat, 15 Feb 2025 16:59:08 +0100 (CET) Received: from mail-pl1-f170.google.com (mail-pl1-f170.google.com [209.85.214.170]) by mails.dpdk.org (Postfix) with ESMTP id 5800A40041 for ; Sat, 15 Feb 2025 16:59:06 +0100 (CET) Received: by mail-pl1-f170.google.com with SMTP id d9443c01a7336-220f4dd756eso27873205ad.3 for ; Sat, 15 Feb 2025 07:59:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1739635145; x=1740239945; darn=dpdk.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:from:to:cc:subject:date :message-id:reply-to; bh=C/rS3XTvMRCO5geay6eBQvmjkD0YisnXoWt0WWjEL24=; b=p/Qos3HmaQUHu6qJ6yKRPpJhOTYvRMtNsVPY92TnuacMm529Qy2f283lVoyCLjkXWg gY9gvaKVmbo3pyhD8zVyRVCOTr0mikwZMmsXJpFvw2W0elPGI/WRlyDcxphuUEhqVrwO 27qpTI0NCQol+GBmqs1mAqBcyUQXIYFOfyvHAwLJSYrcM4tNBHkVnYE5ss2PzRtorwpn g1VTdZn3uls9PaMhajzl1Qf+9GvWfIIRc5hYrLmShOI10G9+BlOyh8anhKL79FAlhn6m P9J/BJDDmak9hHAx7L2jlOe+C417CvALaGmnyy37/YlMvVEomdRnvxOOgyDvFbHqpdJ0 rVPw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1739635145; x=1740239945; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=C/rS3XTvMRCO5geay6eBQvmjkD0YisnXoWt0WWjEL24=; b=a/AKh6TVWJMB+icrB8rFO2jyqqLyQqr75lpSQnVgsIt4Ks/y8PDcEuZCeTe/fkNLot P7L8xNsf2Qr7576JBMwkl3O5+pEsR4jCIcEoCYFWYURtC9CxlVLPlezAtxg8n3SIgPUh M9kYr5VX/AAPkKTXndTume+UU81gOQAnF5c/XlCi1QgybaX0IAgjgcEHy6sMZKY+f+yv zf0VTLVISTObB/pfolD8q4CPM6Q2CWRJRXfwPlH2MTpSiE0buIR95hoAgWweizVyoG2A bVwg2rJjsaubjmKu9UM4+Hb87oa5ENMhs5dxjsDUgHWG6U1MNWjAsDFL07zVz34lYWq6 kRqg== X-Gm-Message-State: AOJu0YyP9AaokTGRs3pbq71ct4KHGgT68mFY/rQ2uiva3I3uc/vZwbYC qKXX2UfqSKdhvpCTHIq98vQeQOPV8fpnJ11F19n98OiBY9SSiczTHya6/LpY72k= X-Gm-Gg: ASbGncv2xGOsMgGLFE998cqfyS7d1A/T1z8F2zcGztIbAXfZLcdZRyLogwsoL6MNV9O GvU3vLtG2xSPxB0sWOVh+sq/wcxJlfcQ/u5+IQKtfQ6sJI6smizm2lYoWkqepF6UxwCysj9mP/K Rpcp0V5W63QEBydtdwOAcWckYG2b+XgavT6fwKJbsf/Itt52RlAFKq600S1OHdb1nVUJGxK+Tww wMnhJI4zYD9i3ZBoYlsNcBWite/89d/whYmS2Ri1mHcbJXmOFo9Ysxj1mPOjX6fw0KHcdBRfBdl bhJ9qFh24WaYncrwuQNyAcMiI5K21qizRDy0r16DpZ4KAU79HjKdlmfnhAmHAtQLwEpd X-Google-Smtp-Source: AGHT+IEc6lgEGhDWrHbPRS4fzuN85YDJMAgIUdEuuigWE54cm2s0047XgJ5OlCzzevR07UKbPBVNRw== X-Received: by 2002:a17:903:947:b0:21b:d2b6:ca7f with SMTP id d9443c01a7336-221040bd770mr54268585ad.32.1739635145402; Sat, 15 Feb 2025 07:59:05 -0800 (PST) Received: from hermes.local (204-195-96-226.wavecable.com. [204.195.96.226]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-220d5349061sm45772695ad.5.2025.02.15.07.59.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 15 Feb 2025 07:59:05 -0800 (PST) Date: Sat, 15 Feb 2025 07:59:03 -0800 From: Stephen Hemminger To: Alan Beadle Cc: users@dpdk.org Subject: Re: Questions about interrupts Message-ID: <20250215075903.1424c0b0@hermes.local> In-Reply-To: References: <20250213142613.23d52f6b@hermes.local> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-BeenThere: users@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK usage discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: users-bounces@dpdk.org On Sat, 15 Feb 2025 10:55:45 -0500 Alan Beadle wrote: > > After enabling interrupts, the application should do one more call to rx_burst > > which will see if there any packets that raced in. > > If it does get some packets, chances are you want to disable interrupts > > and go back to polling mode. > > As I'm sure you are aware, polling one more time would not change the > likelihood that additional packets arrive and disarm the interrupt > before the thread suspends. A packet could still arrive between that > polling round and the call to rte_epoll_wait(). Is there really no way > to atomically arm the interrupt and suspend, guaranteeing that my > thread will never suspend if packets have arrived prior to suspending? The interrupts are edge-triggered so the state of the interrupt is recorded. Using epoll, the device is reading the state out of the MSI-x register, and before going to sleep epoll does a "do you you have anything" check for all sources.