From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pg1-f180.google.com (mail-pg1-f180.google.com [209.85.215.180]) by dpdk.org (Postfix) with ESMTP id F1F473798 for ; Tue, 26 Feb 2019 19:14:48 +0100 (CET) Received: by mail-pg1-f180.google.com with SMTP id q206so6590613pgq.4 for ; Tue, 26 Feb 2019 10:14:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:subject:message-id:mime-version :content-transfer-encoding; bh=VnpFMpzCWkDkbTE9Y1sX9O/cV1IqTSnABlDHrHfLtRw=; b=1gXMLjz0tMu9csWq4InfjRPLADsbmdqc0n2DXDJ5FPfXgatFWgOwaODmSY1E1GKZbe O/sRwQw8t4yGaoyHjzrdie6LOpf1uZjv/r+D+w2Lqc2o93O8yByJ1ZcKktiRt280sRZ/ +0j/Fmphzbc53nuEaLwSlFzpUh0O9AexbuOSjE4jIX/7fpDErnRfivzbxpfTY/kYy6+F in/YC4LXz5Brej8tcH0IEqKoJb47E6cvcitp4f/BJLSXLKW4wNLue5eqnjkMk17s1Ukc AheBMV+Cq1fiBd4LUWplETokJZx6BLq/QdJo1laXcVH9O9CpF5MCQLeLaRLYRwQPoIlw iPKQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:subject:message-id:mime-version :content-transfer-encoding; bh=VnpFMpzCWkDkbTE9Y1sX9O/cV1IqTSnABlDHrHfLtRw=; b=ZvDVXN0DSZNuPfiMeJoznBojZKxaoPcYmHmPIGl46WwA/jCx4LLSpVFE9eUhA2uBxH +yq/Dd7BGpVMTHUjS4YnGxxi8qMUc04ltpHGA/SYtZ4FcmvyOKf1E19div4MC5UyJ5k/ H74ctwuKJs9rjOAehmKwTKHMwqPHKCCpNHZI0G3xOYOsvUEd38IqHXfQrELyOT73OvwA QVgGCW08pk+hn61BRwBN9NDI+o4hIEYZOZDVaH9GGGPw76AWlmCPgBujeuzkAknZZp15 7YPycMG2Y8zAcxISPR17Ra/Ia1hzJvyU8RehWcll+WesOEn4siZV19jzV5x2mXhqQHJP wHvQ== X-Gm-Message-State: AHQUAuaGywCwFEMFmlSRY0ldB8O2GRmoblbim/i9hSqlg8cnG0xPLoja JJY6LxSUZbdYmJCjF4VJNGoZxxeGIyI= X-Google-Smtp-Source: AHgI3IY1L8tdXClmCTq/y38ETnHFo4FKSmk8yjWfpeSUaDvKXsgIsNKJx/dZJOgcnnsDU+hTJ7dF5w== X-Received: by 2002:a63:c948:: with SMTP id y8mr25941059pgg.263.1551204887538; Tue, 26 Feb 2019 10:14:47 -0800 (PST) Received: from shemminger-XPS-13-9360 (204-195-22-127.wavecable.com. [204.195.22.127]) by smtp.gmail.com with ESMTPSA id y6sm14090197pfy.87.2019.02.26.10.14.46 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 26 Feb 2019 10:14:47 -0800 (PST) Date: Tue, 26 Feb 2019 10:14:44 -0800 From: Stephen Hemminger To: dev@dpdk.org Message-ID: <20190226101444.752ee2da@shemminger-XPS-13-9360> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: [dpdk-dev] locking around rx_intr_enable/disable? X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Feb 2019 18:14:49 -0000 I noticed an anomaly in how receive interrupt control is done. In l3fwd-power there is a per-port lock around calls to enable interrupts but no locking around the call to disable interrupts. This looks broken since intr_disable requires multiple operations on some hardware. There are three better options: 1) do locking in rte_eth_dev (not application) 2) push any necessary locking down into the driver 3) lock on both places in l3fwd-power (and other usages) I am thinking #1 is easiest solution. Which ever solution is done, the documentation should be as well.