From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wr1-f47.google.com (mail-wr1-f47.google.com [209.85.221.47]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id EA18D42FCCE for ; Thu, 20 Aug 2026 11:32:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.47 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787225572; cv=none; b=aJ7nkakzaxTx0t0YIqOMEdXy6VgmHFm0khFQJtrdOeYyw3c14jVsUJ+e4cp0yVRH5hzeu2neCHZFYbh/Zmen45klrU7MrrxZcL/Me+hV2ZBjgYcqBZxUD3RBt2JgHWgPU5uCBFUK2G6baTIvIhHUVBEhm2McXfutKL5/cpaacU8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787225572; c=relaxed/simple; bh=uP/UTsy8kwYisSv/QmRJoBJoAc0HcQ69Td3V7W4PJvQ=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=VvtbEVrPCkf/Vjhh3rx8hTRuJPYgcZTe1xOeFDoCp6bpskCDzqNmNmFoyY8tC20JK+8ah6lrzxonBEXXY94hUtJWSvL8PWijEtktlmCsAbD6GGPYuGyE+8SJlTM61idfXG8ycOf0nA8IbEyMt6dQuSt1d56Dd9KzfpVBzwCoT5s= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=Jnhc0gk1; arc=none smtp.client-ip=209.85.221.47 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Jnhc0gk1" Received: by mail-wr1-f47.google.com with SMTP id ffacd0b85a97d-47fe89fb333so1098117f8f.3 for ; Thu, 20 Aug 2026 04:32:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1787225569; x=1787830369; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to:content-type; bh=6yXEIzBRPpjoZFSbIo25T90zBhHhHVIBv06Zg70CmTk=; b=Jnhc0gk1P/GFAUVZ9dZWFYoOtAuTaMkUBqoWwXqkLv8f0hz106ni7J0iI1XjKAWmdY 9JhBQ69N/marl2E5Rysjqexz5rJ+R+kX3SSDQGtlhEc8yYwYR/9Y3uvDAUE/kd7pT6rM JpIVcRQ1Gm3VO7jsvLCilg3CEap49uXp9iVGJlYSQP2y6D7ZD3q+N2zLajXeapdw4P5/ b5J08f7VK8Y8P3OW76EMV09aYOaprunVY9vfVe7tisFkpvjOjjuPBSc4Tg9HgkPZTO2j 05jnkII6/RUX9AXxuFRxW+XkzfzRGWIebwreNxOFCJdrcDzfGUQ42HJ+Wfcjtm5+atx5 AlIw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1787225569; x=1787830369; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=6yXEIzBRPpjoZFSbIo25T90zBhHhHVIBv06Zg70CmTk=; b=qOdWMoAfhflCCWOQ9I8mK3R9AUFekoEf343ctVB+zaIhKYoEHHh0sx41XZ5fIoyDMD WJzF9T2XC4Fzpsg52IjnmsXfkMYpkGm5BXFXWYT9ZbMR3CTCsLwZZxUWRlFaPtPW+4mV 2Emf9YLD4cfmFwGYAZOFdTcFh3ZdItF96iXyN7mqv3PDn8obrHGIP1q8esu2HuQfiEgX kaku+QK1PatN2ZwXsszx22jHa6PTrz3WIw/Y8v+uo4b0e9iJL8ONAEa9j98FIuMwk3VA aj+8k1DDHoMMen6ZYNcqAs5LI9k6wfgQYWtG3FTqbvidxdaO0XjO+7Rtza5E87SP9+X5 Pdvw== X-Forwarded-Encrypted: i=1; AHgh+RoWWUkmEZ572/qXHQ6psrqoCf9ZOYhy7kGWrhcBZ7ZrVswmYuZbctVEaOVLLHerhjHlSttfiptwaRQ7sgo=@vger.kernel.org X-Gm-Message-State: AFuF++nII/S1JK9r9SouuMVNoz8pBmsd+MPoCMZgXh+/fttkcd4itwXv b/+2y+y/z11ye2MrSByobMvbWNy985B62aL8++hnhqzWccmkDlkLqqfaH2AODA== X-Gm-Gg: AR+sD127h/XCeXk72is0sudqXuIRRI7cQOeG/C6WSlBs6BAkYKrl423EWT6GZEAUyFK VVwRrzTlW3N7GuZVQJFVgSzWH0BNovbzBKcDeR7jdVQOsJyMnXYwOWbNURMa6QNFw4s1pqc/Ymz hcd6K5JrTVQFTOBMT+mIFUbJ8FctfCo0ubYIr5bCKJEEhviO2Fq7UhQpG5E/Q+wSlgif0z/Q8dm cxEnPcorMufGT+MDPJ3jgJBHci9mEuGb1VBRt/fFyx8X4AGkb/JSIdnpTqapsMLqIOB5ngzksiA 5yQ+12xIlpblNfAlD9zsmwQx6nfQFZVZezAfmOEg9t9n57Yx4iwrBdzOs+/XCc6Pr6YM3gXurBE 4tRThzM2u5/5yC4M4U2Z7rT05gIJUhTz9OZqhudYbHeBVorkWh2O2ty43foZHak50INAoeIqO4N Q66/MaU/IVxaIs+3LyspNx+GvCXlsYh/gVEIGj8GifeHuUmiZsq+/SH2AehV3wRsNDmZpmmEZ2z uWvxmean63240IkOslfaUoP+8v3r2jp3JjRUOv+HfQ9SQ== X-Received: by 2002:a05:6000:41eb:b0:47f:4919:d5b2 with SMTP id ffacd0b85a97d-482b1e8460dmr21869188f8f.1.1787225568843; Thu, 20 Aug 2026 04:32:48 -0700 (PDT) Received: from il-orgads-lp.corp.audiocodes.com ([134.231.187.64]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-482b1441753sm14183262f8f.5.2026.08.20.04.32.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 20 Aug 2026 04:32:48 -0700 (PDT) From: Orgad Shaneh To: gregkh@linuxfoundation.org Cc: linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org, Orgad Shaneh Subject: [PATCH] staging: octeon: schedule the TX cleanup tasklet every 1024th packet Date: Thu, 20 Aug 2026 14:32:39 +0300 Message-ID: <20260820113239.8169-1-orgads@gmail.com> X-Mailer: git-send-email 2.53.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit cvm_oct_xmit() means to schedule the cleanup tasklet once every 1024 packets, as its comment says, to cover the pathological case of heavy traffic on one port delaying the cleanup of another port blocked waiting for it. The test is inverted: total_to_clean & 0x3ff is true for 1023 of every 1024 values, and false only on the multiples of 1024. So the tasklet is scheduled on nearly every packet, and skipped on exactly the packet the comment wants. That costs one TASKLET softirq per transmitted packet, each walking every port and doing an FAU fetch-and-add per non-empty queue, and it buys nothing for this port, which already frees its completed skbs inline from the skb_to_free value it reads out of the FAU. Test the mask against zero. On a CN50XX board (2 cores at 300MHz) carrying ~6.9k transmitted packets/s, TASKLET softirqs drop from 7133/s to 597/s with no throughput change; the freeing work is conserved, so this removes softirq entries, not work. Fixes: 4898c560103f ("Staging: Octeon: Free transmit SKBs in a timely manner") Signed-off-by: Orgad Shaneh --- drivers/staging/octeon/ethernet-tx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/octeon/ethernet-tx.c b/drivers/staging/octeon/ethernet-tx.c index cc20c1e6791..5e536827f87 100644 --- a/drivers/staging/octeon/ethernet-tx.c +++ b/drivers/staging/octeon/ethernet-tx.c @@ -481,7 +481,7 @@ netdev_tx_t cvm_oct_xmit(struct sk_buff *skb, struct net_device *dev) cvmx_fau_fetch_and_add32(FAU_TOTAL_TX_TO_CLEAN, 1); } - if (total_to_clean & 0x3ff) { + if ((total_to_clean & 0x3ff) == 0) { /* * Schedule the cleanup tasklet every 1024 packets for * the pathological case of high traffic on one port -- 2.53.0