Thread (11 messages) 11 messages, 3 authors, 5d ago
COOLING5d

[RFC PATCH net-next v0 5/6] net: add ppc64 support for GeoNetworking

From: Simon Dietz <hidden>
Date: 2026-07-16 16:17:54
Also in: linux-wireless
Subsystem: networking [general], the rest · Maintainers: "David S. Miller", Eric Dumazet, Jakub Kicinski, Paolo Abeni, Linus Torvalds

From: Simon Dietz <redacted>

make GeoNetworking (cross-)compile under ppc64 (big endian)

Signed-off-by: Simon Dietz <redacted>
---
 include/linux/gn.h  |  8 ++++----
 net/gn/gn_prot.c    | 11 +++++------
 net/gn/gn_routing.c |  4 ++--
 3 files changed, 11 insertions(+), 12 deletions(-)
diff --git a/include/linux/gn.h b/include/linux/gn.h
index 862f635d5d11..94239897ad40 100644
--- a/include/linux/gn.h
+++ b/include/linux/gn.h
@@ -188,10 +188,10 @@ struct gn_spv {
  *The packet is dropped when rhl reaches 0
  */
 struct gn_basic_header {
-#ifdef __LITTLE_ENDIAN_BITFIELD
+#if defined(__LITTLE_ENDIAN_BITFIELD)
 	__u8 nh : 4;
 	__u8 version : 4;
-#elif __BIG_ENDIAN_BITFIELD
+#elif defined(__BIG_ENDIAN_BITFIELD)
 	__u8 version : 4;
 	__u8 nh : 4;
 #else
@@ -203,12 +203,12 @@ struct gn_basic_header {
 } __packed;
 
 struct gn_common_header {
-#ifdef __LITTLE_ENDIAN_BITFIELD
+#if defined(__LITTLE_ENDIAN_BITFIELD)
 	__u8 reserved : 4;
 	__u8 nh : 4;
 	__u8 hst : 4;
 	__u8 ht : 4;
-#elif __BIG_ENDIAN_BITFIELD
+#elif defined(__BIG_ENDIAN_BITFIELD)
 	__u8 nh : 4;
 	__u8 reserved : 4;
 	__u8 ht : 4;
diff --git a/net/gn/gn_prot.c b/net/gn/gn_prot.c
index 90ecbd67b64d..1599dc0aa185 100644
--- a/net/gn/gn_prot.c
+++ b/net/gn/gn_prot.c
@@ -495,7 +495,7 @@ void gn_fill_sopv(struct gn_iface *gnif, struct gn_lpv *sopv, gn_address_t addr)
 
 static void gn_fill_bh_ch(struct gn_iface *gnif, struct gn_header *gh,
 			  u8 packet_type, u8 packet_subtype, u8 rhl,
-			  u8 next_header, u16 payload_size)
+			  u8 next_header, __be16 payload_size)
 {
 	const u8 mhl = DEFAULT_HOP_LIMIT;
 	/* rhl should never be greater than mhl */
@@ -1851,11 +1851,10 @@ static int gn_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg)
 		rc = put_user(amount, (int __user *)argp);
 		break;
 	}
-	case SIOCGSTAMP:
-		//rc = sock_get_timestamp(sk, argp);
-		break;
-	case SIOCGSTAMPNS:
-		//rc = sock_get_timestampns(sk, argp);
+	case SIOCGSTAMP_OLD:
+	case SIOCGSTAMP_NEW:
+	case SIOCGSTAMPNS_OLD:
+	case SIOCGSTAMPNS_NEW:
 		break;
 	case SIOCGIFBRDADDR:
 	case SIOCDIFADDR:
diff --git a/net/gn/gn_routing.c b/net/gn/gn_routing.c
index 733ebd0d715a..3672a345530f 100644
--- a/net/gn/gn_routing.c
+++ b/net/gn/gn_routing.c
@@ -293,8 +293,8 @@ static void debug_loc_te(void)
 	hash_for_each_safe(gn_loc_t, bucket, tmp, entry, hnode) {
 		pr_debug("LOC_TE(%p) tst=%x addr=%llx ll_addr=%llx is_neighbour=%x ls_pending=%x\n",
 			 entry, entry->tst_addr, be64_to_cpu(entry->addr),
-			 be64_to_cpu(entry->ll_address), entry->is_neighbour,
-			 entry->ls_pending);
+			 ether_addr_to_u64(entry->ll_address),
+			 entry->is_neighbour, entry->ls_pending);
 	}
 	spin_unlock_bh(&gn_loc_t_lock);
 }
-- 
2.55.0
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help