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 1E29645AEA; Wed, 9 Oct 2024 06:01:19 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id CC07E4028A; Wed, 9 Oct 2024 06:01:18 +0200 (CEST) Received: from mail-pf1-f179.google.com (mail-pf1-f179.google.com [209.85.210.179]) by mails.dpdk.org (Postfix) with ESMTP id 9E6F14021E for ; Wed, 9 Oct 2024 06:01:17 +0200 (CEST) Received: by mail-pf1-f179.google.com with SMTP id d2e1a72fcca58-71e05198d1dso1945727b3a.1 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=jIOKsCsCv1JMNr9RzHhGfudXNtIBADqOoHBljrTfIrZPTonUV8BbDw3J2Vib+PY9Q5 IUSDQA5DOiU8fGjMgFGh/40Cvl/MFtFchfyp+6e9JuoDPONDjtruvouHvHN+bVGCcZup BieHrCntiU+CuKmN4HahzKaBGgWwEqrQ3hHv4/ihnKH4j6gzXPRkeFIZKGHHH4OhSNvz 5fnHen+f5enUO7/lvLZs8xmeBgMweDxdhax1SXX7CmfTEYyjz/9VzWxNvUPYvKmPBPd5 17sogvVKzJvMrN9eKdj2t3mR4qz+HxFSdP2CW14hm2dtMjvqHRs7p9qKfQPh2LWl8yPg jRtA== X-Forwarded-Encrypted: i=1; AJvYcCWx1f1qmt1lo/ciE+N179Y5/se3dEb9rAnDTirQvBK8ta/AX+PjUXThA5GBtU8ptgx+6Gw=@dpdk.org X-Gm-Message-State: AOJu0YwLO08QNW+8hLBAGSwxCEDXRLX3Qy9ulJvnag0OUHwt5QipmKwK wqmIKUoLHU1thfWPO0FImKh1cmHM3Q6VwuustC6iy23+lAZh4UAVm2o+AlPYZ2I= 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: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-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.