From: Christoph Hellwig <hch@lst.de>
To: Nilay Shroff <nilay@linux.ibm.com>
Cc: kbusch@kernel.org, dwagner@suse.de, hch@lst.de, hare@suse.de,
sagi@grimberg.me, chaitanyak@nvidia.com, gjoyce@linux.ibm.com,
linux-nvme@lists.infradead.org
Subject: Re: [PATCH v5 1/1] nvme-tcp: expose per-queue socket addresses via sysfs
Date: Wed, 2 Dec 2026 07:37:53 +0100 [thread overview]
Message-ID: <20261202063753.GC3336@lst.de> (raw)
In-Reply-To: <20261201095146.510810-4-nilay@linux.ibm.com>
I think the Sashiko nit on the output format has merit, but it's not
really my area of expertise. Can you look into that?
> + if (src.ss_family == AF_INET) {
> + struct sockaddr_in *sip = (struct sockaddr_in *)&src;
> + struct sockaddr_in *dip = (struct sockaddr_in *)&dst;
> +
> + ret = sysfs_emit(buf, "sip=%pI4,sport=%hu,dip=%pI4,dport=%hu\n",
> + &sip->sin_addr.s_addr, ntohs(sip->sin_port),
> + &dip->sin_addr.s_addr, ntohs(dip->sin_port));
> + } else if (src.ss_family == AF_INET6) {
> + struct sockaddr_in6 *sip6 = (struct sockaddr_in6 *)&src;
> + struct sockaddr_in6 *dip6 = (struct sockaddr_in6 *)&dst;
And another cosmetic nit, what about doing a switch on src.ss_family
and then having a helper for each address family to give this a bit
more structure?
prev parent reply other threads:[~2026-12-02 6:38 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-12-01 9:51 [PATCH v5 0/1] nvme-tcp: NIC topology aware I/O queue scaling and queue info export Nilay Shroff
2026-12-01 9:51 ` [PATCH v5 1/1] nvme-tcp: expose per-queue socket addresses via sysfs Nilay Shroff
2026-12-01 10:04 ` sashiko-bot
2026-12-02 6:37 ` Christoph Hellwig [this message]
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=20261202063753.GC3336@lst.de \
--to=hch@lst.de \
--cc=chaitanyak@nvidia.com \
--cc=dwagner@suse.de \
--cc=gjoyce@linux.ibm.com \
--cc=hare@suse.de \
--cc=kbusch@kernel.org \
--cc=linux-nvme@lists.infradead.org \
--cc=nilay@linux.ibm.com \
--cc=sagi@grimberg.me \
/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.