public inbox for iwd@lists.linux.dev
 help / color / mirror / Atom feed
From: Denis Kenzior <denkenz@gmail.com>
To: iwd@lists.linux.dev
Cc: Denis Kenzior <denkenz@gmail.com>
Subject: [PATCH 2/5] monitor: Remove unused PACKET_AUXDATA handling
Date: Wed, 27 Dec 2023 00:09:47 -0600	[thread overview]
Message-ID: <20231227060954.103572-2-denkenz@gmail.com> (raw)
In-Reply-To: <20231227060954.103572-1-denkenz@gmail.com>

---
 monitor/nlmon.c | 13 ++-----------
 1 file changed, 2 insertions(+), 11 deletions(-)

diff --git a/monitor/nlmon.c b/monitor/nlmon.c
index 7f8ecdaa1996..b4d1f54c7579 100644
--- a/monitor/nlmon.c
+++ b/monitor/nlmon.c
@@ -7240,7 +7240,6 @@ static void store_message(struct nlmon *nlmon, const struct timeval *tv,
 }
 
 static void nlmon_message(struct nlmon *nlmon, const struct timeval *tv,
-					const struct tpacket_auxdata *tp,
 					const struct nlmsghdr *nlmsg)
 {
 	struct nlmon_req *req;
@@ -8181,7 +8180,7 @@ void nlmon_print_genl(struct nlmon *nlmon, const struct timeval *tv,
 		if (nlmsg->nlmsg_type == GENL_ID_CTRL)
 			continue;
 
-		nlmon_message(nlmon, tv, NULL, nlmsg);
+		nlmon_message(nlmon, tv, nlmsg);
 	}
 }
 
@@ -8194,9 +8193,7 @@ static bool nlmon_receive(struct l_io *io, void *user_data)
 	struct iovec iov;
 	struct cmsghdr *cmsg;
 	struct timeval copy_tv;
-	struct tpacket_auxdata copy_tp;
 	const struct timeval *tv = NULL;
-	const struct tpacket_auxdata *tp = NULL;
 	uint16_t proto_type;
 	unsigned char buf[8192];
 	unsigned char control[32];
@@ -8242,12 +8239,6 @@ static bool nlmon_receive(struct l_io *io, void *user_data)
 			memcpy(&copy_tv, CMSG_DATA(cmsg), sizeof(copy_tv));
 			tv = &copy_tv;
 		}
-
-		if (cmsg->cmsg_level == SOL_PACKET &&
-					cmsg->cmsg_type != PACKET_AUXDATA) {
-			memcpy(&copy_tp, CMSG_DATA(cmsg), sizeof(copy_tp));
-			tp = &copy_tp;
-		}
 	}
 
 	nlmsg_len = bytes_read;
@@ -8261,7 +8252,7 @@ static bool nlmon_receive(struct l_io *io, void *user_data)
 			nlmon_print_rtnl(nlmon, tv, nlmsg, nlmsg->nlmsg_len);
 			break;
 		case NETLINK_GENERIC:
-			nlmon_message(nlmon, tv, tp, nlmsg);
+			nlmon_message(nlmon, tv, nlmsg);
 			break;
 		}
 	}
-- 
2.43.0


  reply	other threads:[~2023-12-27  6:10 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-27  6:09 [PATCH 1/5] monitor: Remove unused code path Denis Kenzior
2023-12-27  6:09 ` Denis Kenzior [this message]
2023-12-27  6:09 ` [PATCH 3/5] monitor: Use nlmon_print_* inside nlmon_receive Denis Kenzior
2023-12-27  6:09 ` [PATCH 4/5] monitor: Move iwmon reading logic into main.c Denis Kenzior
2023-12-27  6:09 ` [PATCH 5/5] RFC: Initial iwtrace utility Denis Kenzior
2024-01-02 13:30   ` James Prestwood
2024-01-02 17:01 ` [PATCH 1/5] monitor: Remove unused code path Denis Kenzior

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=20231227060954.103572-2-denkenz@gmail.com \
    --to=denkenz@gmail.com \
    --cc=iwd@lists.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