All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: Scott Mitchell <scott.k.mitch1@gmail.com>
Cc: dev@dpdk.org, thomas@monjalon.net, david.marchand@redhat.com,
	mb@smartsharesystems.com
Subject: Re: [PATCH v3 2/2] net/af_packet: add iouring Tx acceleration
Date: Wed, 2 Dec 2026 15:43:40 -0800	[thread overview]
Message-ID: <20261202154340.187472ba@phoenix.local> (raw)
In-Reply-To: <20261202185420.17858-3-scott.k.mitch1@gmail.com>

On Wed,  2 Dec 2026 10:54:20 -0800
Scott Mitchell <scott.k.mitch1@gmail.com> wrote:

> +/* Helper: Count this process's io_uring SQPOLL threads (comm "iou-sqp-<pid>"), or -1. */
> +static int
> +count_sqpoll_threads(void)
> +{
> +	char path[PATH_MAX], comm[32];
> +	struct dirent *de;
> +	DIR *dir;
> +	FILE *f;
> +	int n = 0;
> +
> +	dir = opendir("/proc/self/task");
> +	if (dir == NULL)
> +		return -1;
> +	while ((de = readdir(dir)) != NULL) {
> +		if (de->d_name[0] == '.')
> +			continue;
> +		snprintf(path, sizeof(path), "/proc/self/task/%s/comm", de->d_name);
> +		f = fopen(path, "r");
> +		if (f == NULL)
> +			continue;
> +		if (fgets(comm, sizeof(comm), f) != NULL && strncmp(comm, "iou-sqp-", 8) == 0)
> +			n++;
> +		fclose(f);
> +	}
> +	closedir(dir);
> +	return n;
> +}

NAK
Depending on internals like this is recipe for future disaster.

The test should not be looking at how ring is implemented.

  reply	other threads:[~2026-12-02 23:43 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-04 16:12 [RFC v1] net/af_packet: add io_uring TX acceleration scott.k.mitch1
2026-02-04 16:52 ` Stephen Hemminger
2026-02-05  0:08   ` Scott Mitchell
2026-12-01 22:36 ` [RFC PATCH v2] " Scott Mitchell
2026-12-01 22:44   ` Scott Mitchell
2026-12-02 17:16     ` Stephen Hemminger
2026-12-02 18:52       ` Scott Mitchell
2026-12-02 18:54   ` [PATCH v3 0/2] net/af_packet: add io_uring Tx acceleration Scott Mitchell
2026-12-02 18:54     ` [PATCH v3 1/2] config: detect liburing Scott Mitchell
2026-12-02 18:54     ` [PATCH v3 2/2] net/af_packet: add iouring Tx acceleration Scott Mitchell
2026-12-02 23:43       ` Stephen Hemminger [this message]
2026-12-03  0:00     ` [PATCH v3 0/2] net/af_packet: add io_uring " Stephen Hemminger
2026-12-02 16:59 ` [RFC v1] net/af_packet: add io_uring TX acceleration Stephen Hemminger
2026-12-02 17:02 ` Stephen Hemminger
2026-12-02 17:03 ` Stephen Hemminger
2026-12-02 17:04 ` Stephen Hemminger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20261202154340.187472ba@phoenix.local \
    --to=stephen@networkplumber.org \
    --cc=david.marchand@redhat.com \
    --cc=dev@dpdk.org \
    --cc=mb@smartsharesystems.com \
    --cc=scott.k.mitch1@gmail.com \
    --cc=thomas@monjalon.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.