[OpenAFS-devel] Where to put new header file

Ben Huntsman ben@huntsmans.net
Tue, 31 Jan 2023 20:14:53 +0000


--_000_MWHPR0701MB36743FEFAD4A186F24D3A966A7D09MWHPR0701MB3674_
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

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 su=
bmit 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-aroun=
d, 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 th=
eir
  * 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; openafs-devel@openafs.org
Subject: Re: [OpenAFS-devel] Where to put new header file

On 1/31/2023 12:17 PM, Ben Huntsman (ben@huntsmans.net<mailto:ben@huntsmans=
.net>) 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 repositor=
y.  Instead, I suggest creating it at build time.


Jeffrey Altman




--_000_MWHPR0701MB36743FEFAD4A186F24D3A966A7D09MWHPR0701MB3674_
Content-Type: text/html; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<html>
<head>
<meta http-equiv=3D"Content-Type" content=3D"text/html; charset=3Diso-8859-=
1">
<style type=3D"text/css" style=3D"display:none;"> P {margin-top:0;margin-bo=
ttom:0;} </style>
</head>
<body dir=3D"ltr">
<div style=3D"font-family: Calibri, Arial, Helvetica, sans-serif; font-size=
: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);" class=
=3D"elementToProof">
Hi Jeffrey-</div>
<div style=3D"font-family: Calibri, Arial, Helvetica, sans-serif; font-size=
: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);" class=
=3D"elementToProof">
&nbsp; &nbsp;I opened a case with IBM and they acknowledged the problem and=
 are going to look into how to resolve.&nbsp; You are correct it is present=
 in AIX 7.2 as well, though I thought I had it building on 7.2.&nbsp; Obvio=
usly not.&nbsp; I will submit my patches for 7.3 here shortly
 and then go double-check 7.2.</div>
<div style=3D"font-family: Calibri, Arial, Helvetica, sans-serif; font-size=
: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);" class=
=3D"elementToProof">
<br>
</div>
<div style=3D"font-family: Calibri, Arial, Helvetica, sans-serif; font-size=
: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);" class=
=3D"elementToProof">
&nbsp; &nbsp;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:</div>
<div style=3D"font-family: Calibri, Arial, Helvetica, sans-serif; font-size=
: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);" class=
=3D"elementToProof">
<br>
</div>
<div style=3D"font-family: Calibri, Arial, Helvetica, sans-serif; font-size=
: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);" class=
=3D"elementToProof ContentPasted0">
diff --git a/src/rx/AIX/rx_knet.c b/src/rx/AIX/rx_knet.c
<div class=3D"ContentPasted0">index 54a6c8583..19d9ecaac 100644</div>
<div class=3D"ContentPasted0">--- a/src/rx/AIX/rx_knet.c</div>
<div class=3D"ContentPasted0">+++ b/src/rx/AIX/rx_knet.c</div>
<div class=3D"ContentPasted0">@@ -72,7 +72,12 @@ rxk_input(struct mbuf *am,=
 int hlen)</div>
<div class=3D"ContentPasted0">&nbsp; * are in a separate kernel extension, =
and they are unwilling to export their</div>
<div class=3D"ContentPasted0">&nbsp; * symbols to us. &nbsp;We can get ther=
e indirectly, however.</div>
<div class=3D"ContentPasted0">&nbsp; */</div>
<div class=3D"ContentPasted0">+#ifdef AFS_AIX72_ENV /* Avoid including net/=
netisr.h on AIX 7.2 and higher */</div>
<div class=3D"ContentPasted0">+#define NETISR_MAX &nbsp; &nbsp; 64</div>
<div class=3D"ContentPasted0">+#define NET_KPROC &nbsp; &nbsp; &nbsp;0</div=
>
<div class=3D"ContentPasted0">+#else</div>
<div class=3D"ContentPasted0">&nbsp;#include &lt;net/netisr.h&gt;</div>
<div class=3D"ContentPasted0">+#endif</div>
<div class=3D"ContentPasted0">&nbsp;static struct ifqueue rxk_q; &nbsp; /* =
RXKluge queue &nbsp; &nbsp; &nbsp; &nbsp;*/</div>
<div class=3D"ContentPasted0">&nbsp;static struct arpcom rxk_bogosity;</div=
>
<br>
</div>
<div style=3D"font-family: Calibri, Arial, Helvetica, sans-serif; font-size=
: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);" class=
=3D"elementToProof ContentPasted0">
Thank you!</div>
<div style=3D"font-family: Calibri, Arial, Helvetica, sans-serif; font-size=
: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);" class=
=3D"elementToProof ContentPasted0">
<br>
</div>
<div style=3D"font-family: Calibri, Arial, Helvetica, sans-serif; font-size=
: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);" class=
=3D"elementToProof ContentPasted0">
-Ben</div>
<div style=3D"font-family: Calibri, Arial, Helvetica, sans-serif; font-size=
: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);" class=
=3D"elementToProof ContentPasted0">
<br>
</div>
<div>
<div><br>
</div>
<div style=3D"font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12p=
t; color:rgb(0,0,0);">
<br>
<hr tabindex=3D"-1" style=3D"display:inline-block; width:98%;">
<b>From:</b> Jeffrey E Altman<br>
<b>Sent:</b> Tuesday, January 31, 2023 10:14 AM<br>
<b>To:</b> Ben Huntsman; openafs-devel@openafs.org<br>
<b>Subject:</b> Re: [OpenAFS-devel] Where to put new header file
<div><br>
</div>
</div>
<div class=3D"rps_baf6">
<div>
<div class=3D"x_moz-cite-prefix">On 1/31/2023 12:17 PM, Ben Huntsman (<a hr=
ef=3D"mailto:ben@huntsmans.net" target=3D"_blank" rel=3D"noopener noreferre=
r" data-auth=3D"NotApplicable" class=3D"x_moz-txt-link-abbreviated" data-lo=
opstyle=3D"link">ben@huntsmans.net</a>) wrote:<br>
</div>
<blockquote type=3D"cite">#ifdef &nbsp;_KERNEL
<div>
<div class=3D"x_rps_baf6">
<div>
<blockquote type=3D"cite">
<div class=3D"x_x_elementToProof x_x_ContentPasted0" style=3D"font-family:C=
alibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0); backgr=
ound-color:rgb(255,255,255)">
<div><br class=3D"x_x_ContentPasted0">
</div>
<div class=3D"x_x_ContentPasted0">#ifdef &nbsp;_AIX_FULLOSF</div>
<div class=3D"x_x_ContentPasted0">#include &quot;kern/queue.h&quot;</div>
<div class=3D"x_x_ContentPasted0">#include &quot;kern/thread.h&quot;</div>
<div class=3D"x_x_ContentPasted0">#include &quot;kern/sched_prim.h&quot;</d=
iv>
<div class=3D"x_x_ContentPasted0">#else</div>
<div class=3D"x_x_ContentPasted0">#define EVENT_NETISR &nbsp; &nbsp;0x0726<=
/div>
<div class=3D"x_x_ContentPasted0">#include &lt;sys/libsysp.h&gt; &nbsp; &nb=
sp; &nbsp; &nbsp;/* remque/insque */</div>
<div class=3D"x_x_ContentPasted0">#endif</div>
...</div>
<div class=3D"x_x_elementToProof x_x_ContentPasted0" style=3D"font-family:C=
alibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0); backgr=
ound-color:rgb(255,255,255)">
<br>
</div>
</blockquote>
</div>
</div>
</div>
</blockquote>
<p style=3D"margin-top: 0px; margin-bottom: 0px;">The above block of code a=
ppears to be present in net/netisr.h on AIX 7.2 as well.</p>
<p style=3D"margin-top: 0px; margin-bottom: 0px;"><br>
</p>
<p style=3D"margin-top: 0px; margin-bottom: 0px;">I might have missed somet=
hing but it appears the only defines OpenAFS uses from net/netisr.h are:</p=
>
<p style=3D"margin-top: 0px; margin-bottom: 0px;"><br>
</p>
<p style=3D"margin-top: 0px; margin-bottom: 0px;">/* AIX 3.x compatibility =
defines */<br>
#define NETISR_MAX&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 64<br>
#define NET_KPROC&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0</p>
<p style=3D"margin-top: 0px; margin-bottom: 0px;"><br>
</p>
<p style=3D"margin-top: 0px; margin-bottom: 0px;">These are used in the add=
_input_type() call.&nbsp;&nbsp;
<br>
</p>
NET_KPROC has always been 0 and I think OpenAFS should be using NETISR_AFS =
(33) instead of (NETISR_MAX - 1).<br>
<p style=3D"margin-top: 0px; margin-bottom: 0px;"><br>
</p>
<p style=3D"margin-top: 0px; margin-bottom: 0px;">If an empty file needs to=
 be created, please do not add it to the repository.&nbsp; Instead, I sugge=
st creating it at build time.</p>
<p style=3D"margin-top: 0px; margin-bottom: 0px;"><br>
</p>
<p style=3D"margin-top: 0px; margin-bottom: 0px;">Jeffrey Altman</p>
<p style=3D"margin-top: 0px; margin-bottom: 0px;"><br>
</p>
<p style=3D"margin-top: 0px; margin-bottom: 0px;"><br>
</p>
<p style=3D"margin-top: 0px; margin-bottom: 0px;"><br>
</p>
</div>
</div>
</div>
</body>
</html>

--_000_MWHPR0701MB36743FEFAD4A186F24D3A966A7D09MWHPR0701MB3674_--