Re: Where to put new header file

Ben Huntsman <[email protected]>
Newsgroups gmane.comp.file-systems.openafs.devel
Message-ID <MWHPR0701MB36743FEFAD4A186F24D3A966A7D09@MWHPR0701MB3674.namprd07.prod.outlook.com>
Hi Jeffrey-
   I opened a case with IBM and they acknowledged the problem and are going to look into how to resolve.  You are correct it is present in AIX 7.2 as well, though I thought I had it building on 7.2.  Obviously not.  I will submit my patches for 7.3 here shortly and then go double-check 7.2.

   In the mean time, this is the gist of what I'm proposing as a work-around, instead of adding or generating an empty header:

diff --git a/src/rx/AIX/rx_knet.c b/src/rx/AIX/rx_knet.c
index 54a6c8583..19d9ecaac 100644
--- a/src/rx/AIX/rx_knet.c
+++ b/src/rx/AIX/rx_knet.c
@@ -72,7 +72,12 @@ rxk_input(struct mbuf *am, int hlen)
  * are in a separate kernel extension, and they are unwilling to export their
  * symbols to us.  We can get there indirectly, however.
  */
+#ifdef AFS_AIX72_ENV /* Avoid including net/netisr.h on AIX 7.2 and higher */
+#define NETISR_MAX     64
+#define NET_KPROC      0
+#else
 #include <net/netisr.h>
+#endif
 static struct ifqueue rxk_q;   /* RXKluge queue        */
 static struct arpcom rxk_bogosity;

Thank you!

-Ben



________________________________
From: Jeffrey E Altman
Sent: Tuesday, January 31, 2023 10:14 AM
To: Ben Huntsman; [email protected]
Subject: Re: [OpenAFS-devel] Where to put new header file

On 1/31/2023 12:17 PM, Ben Huntsman ([email protected]<mailto:[email protected]>) wrote:
#ifdef  _KERNEL

#ifdef  _AIX_FULLOSF
#include "kern/queue.h"
#include "kern/thread.h"
#include "kern/sched_prim.h"
#else
#define EVENT_NETISR    0x0726
#include <sys/libsysp.h>        /* remque/insque */
#endif
...


The above block of code appears to be present in net/netisr.h on AIX 7.2 as well.


I might have missed something but it appears the only defines OpenAFS uses from net/netisr.h are:


/* AIX 3.x compatibility defines */
#define NETISR_MAX      64
#define NET_KPROC       0


These are used in the add_input_type() call.

NET_KPROC has always been 0 and I think OpenAFS should be using NETISR_AFS (33) instead of (NETISR_MAX - 1).


If an empty file needs to be created, please do not add it to the repository.  Instead, I suggest creating it at build time.


Jeffrey Altman
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.