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 6736E45AEA for ; Wed, 9 Oct 2024 06:01:20 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 58BFE40A81; Wed, 9 Oct 2024 06:01:20 +0200 (CEST) Received: from mail-pf1-f180.google.com (mail-pf1-f180.google.com [209.85.210.180]) by mails.dpdk.org (Postfix) with ESMTP id A73764028A for ; Wed, 9 Oct 2024 06:01:17 +0200 (CEST) Received: by mail-pf1-f180.google.com with SMTP id d2e1a72fcca58-71e10ae746aso1385678b3a.2 for ; Tue, 08 Oct 2024 21:01:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1728446477; x=1729051277; 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=ygAgg1lBj/SYtJ6sySeOD6ulw+qxVqcFf+22glxkONs=; b=cpH9cnqHvzn28DM2s8vx2fAm/sdqkYVgHk3XOFI9toFfLpCyraSTPbtny/RM5eOQ3R d4Ynv573/LFBqFClYe7TnETgCMjj6xxNAkSUsXWjdO+PqcPcwfe9wGOJNhoqKGAMReFH 3FrLPk0mP7ofDxZg9aB9UYjDidcSC2fAZSpWcyLeGKDChLSVkw9FVbwCssC5BDdvs2ZQ TGYD9MEvHfIDUOGlCOAh7ARFNm/NKiG/i4pXWyrdFtArUSj/pVA79faTjjW49pnBDq+p J/Fv5issUAm1dVIXhecP35zriyrlLyt94jIHMzajJy4/9bcDwZa/wFF29e44obc0do/g gvNQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1728446477; x=1729051277; 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=ygAgg1lBj/SYtJ6sySeOD6ulw+qxVqcFf+22glxkONs=; b=e9JpCjdpaVjwGgPtw5IrWd0ZJGjIscIV16Qeia2soQxAw49cJLaxsTzEK9ZHPnrfdC eQgoqOWINWdMlIYerirC02sJLENJNQGGzhD/Q/MCqGF7S+uZAjJisS/RexLT2gl8DVZK SsFmGSqJkR/srI1AY00guREB21Iq1K0ciQw2QuZKp0OMpKNKUA2DnLBqY8r7PBaB0/rk UXk9Tw/K+qtlFFjdkNOTOgYjp/kVPmWs703QJxjJTMOuYGoD8YkFQQSGdgPeJJ5pP2br N43rSJkSB7icyINhgw0xQUvvf138eMKOl3KfP1kDVGlivTM+rPuZHmkA3uEQLASYvYZP U6cw== X-Forwarded-Encrypted: i=1; AJvYcCUGce07RqNjm/KarMN9H+TukKKmOp6X0VE+FzQjGCY0R37FxAZrKD0yDCaWp83I3eP9oRH5GP8=@dpdk.org X-Gm-Message-State: AOJu0YyiucJWmKXElrUA65Bq5JIWJ2aUOZ7Exo+NiJ1WUvdyF64Az5nn IHs4PiZJzTo1ewXpmO2MIhwC1aY1X/qmRbFw28cegkqKjq1dsK2yolCJpjKQDew= X-Google-Smtp-Source: AGHT+IEz54lXzUBz89N5TnsjTkA/QIbX3UtINh1ArGd5jeUhwqvPJb+uI3t0NvHLc8Y6A1sEOWO6YQ== X-Received: by 2002:a05:6a00:98c:b0:71e:1066:1f86 with SMTP id d2e1a72fcca58-71e1db7538fmr2039766b3a.9.1728446476650; Tue, 08 Oct 2024 21:01:16 -0700 (PDT) Received: from hermes.local (204-195-96-226.wavecable.com. [204.195.96.226]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-71df0ccd225sm6870494b3a.52.2024.10.08.21.01.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Oct 2024 21:01:16 -0700 (PDT) Date: Tue, 8 Oct 2024 21:01:07 -0700 From: Stephen Hemminger To: Cc: Harman Kalra , Jianfeng Tan , , Subject: Re: [PATCH 1/5] interrupts: fix number of bytes read for vdev Message-ID: <20241008210107.7f41e36c@hermes.local> In-Reply-To: <20241007150403.1680983-1-skoteshwar@marvell.com> References: <20241007150403.1680983-1-skoteshwar@marvell.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org On Mon, 7 Oct 2024 20:33:59 +0530 wrote: > From: Satha Rao > > Correct the number of bytes to read during vdev interrupt processing. > The driver sets this value, and the rxtx interrupt handling already > performs this correctly. > > Fixes: 99998feec90 ("eal/linux: add interrupt type for vdev") > Cc: stable@dpdk.org > > Signed-off-by: Satha Rao Not sure how this works. The code in eal_handle_interrupts sits on a epoll_wait() waiting for next interrupt. eal_inter_process_interrupts() is called. The switch you modified decides what needs to be read to clear the interrupt. If you change RTE_INTR_HANDLE_VDEV to read bytes from the eventfd by setting bytes_read then the code in this function will read the counter value from the event fd immediately. Then when eal_intr_proc_rxtx_intr() is called it will decide to read again. And since the event is cleared, this read will get EWOULDBLOCK. What exactly is the issue? How to reproduce it? Also setting call = true in the switch is wrong. The code later in eal_intr_process_interrupts that handles bytes_read > 0 already sets call = true if interrupt was cleared from eventfd.