Thread (11 messages) 11 messages, 3 authors, 2024-03-11

Re: [PATCH iproute2-next 1/4] libnetlink: Add rta_getattr_uint()

From: Stephen Hemminger <stephen@networkplumber.org>
Date: 2024-03-09 17:22:00

On Fri, 8 Mar 2024 19:43:34 -0800
Jakub Kicinski [off-list ref] wrote:
On Fri, 8 Mar 2024 14:58:59 -0800 Stephen Hemminger wrote:
quoted
quoted
+static inline __u64 rta_getattr_uint(const struct rtattr *rta)
+{
+	if (RTA_PAYLOAD(rta) == sizeof(__u32))
+		return rta_getattr_u32(rta);
+	return rta_getattr_u64(rta);    
Don't understand the use case here.
The kernel always sends the same payload size for the same attribute.  
Please see commit 374d345d9b5e13380c in the kernel.
Ok, but maybe go further and handle u16 and u8
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help