mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Pavan Kumar <pavan.m@oss.qualcomm.com>
To: andrew+netdev@lunn.ch, davem@davemloft.net, edumazet@google.com,
	kuba@kernel.org, pabeni@redhat.com
Cc: qingfang.deng@linux.dev, kees@kernel.org, ericwouds@gmail.com,
	manizada@pm.me, nbd@nbd.name, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	Pavan Kumar <pavan.m@oss.qualcomm.com>
Subject: [PATCH v1] pppoe: Add PPP interface name to /proc/net/pppoe output
Date: Tue, 28 Jul 2026 12:34:08 +0530	[thread overview]
Message-ID: <20260728070408.3458155-1-pavan.m@oss.qualcomm.com> (raw)

The pppoe_seq_show() function displays session ID, remote MAC address,
and the underlying Ethernet device, but omits the associated PPP
interface name. This makes it difficult to correlate PPPoE sessions
with their respective pppX interfaces.

Retrieve the interface name using ppp_dev_name() and append it as a
new "PPP-Device" column in the /proc/net/pppoe output.

Signed-off-by: Pavan Kumar <pavan.m@oss.qualcomm.com>
---
 drivers/net/ppp/pppoe.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/drivers/net/ppp/pppoe.c b/drivers/net/ppp/pppoe.c
index 6874a1a8edaf..cb31f5db43e8 100644
--- a/drivers/net/ppp/pppoe.c
+++ b/drivers/net/ppp/pppoe.c
@@ -963,17 +963,19 @@ static int pppoe_seq_show(struct seq_file *seq, void *v)
 {
 	struct pppox_sock *po;
 	char *dev_name;
+	char *ppp_name;
 
 	if (v == SEQ_START_TOKEN) {
-		seq_puts(seq, "Id       Address              Device\n");
+		seq_puts(seq, "Id       Address              Device   PPP-Device\n");
 		goto out;
 	}
 
 	po = v;
 	dev_name = po->pppoe_pa.dev;
+	ppp_name = ppp_dev_name(&po->chan);
 
-	seq_printf(seq, "%08X %pM %8s\n",
-		po->pppoe_pa.sid, po->pppoe_pa.remote, dev_name);
+	seq_printf(seq, "%08X %pM %8s %10s\n",
+		   po->pppoe_pa.sid, po->pppoe_pa.remote, dev_name, ppp_name ? ppp_name : "");
 out:
 	return 0;
 }

             reply	other threads:[~2026-07-28  7:11 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-28  7:04 Pavan Kumar [this message]
2026-07-28  7:06 Pavan Kumar
2026-07-31 13:37 ` Simon Horman

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=20260728070408.3458155-1-pavan.m@oss.qualcomm.com \
    --to=pavan.m@oss.qualcomm.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=ericwouds@gmail.com \
    --cc=kees@kernel.org \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=manizada@pm.me \
    --cc=nbd@nbd.name \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=qingfang.deng@linux.dev \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®