laforge has submitted this change. ( https://gerrit.osmocom.org/c/libosmocore/+/43151?usp=email )
Change subject: linuxlist: drop no-op prefetch() calls
......................................................................
linuxlist: drop no-op prefetch() calls
prefetch() has always been a no-op stub in this header so calling
it buys nothing at runtime. Drop all call sites and remove the
now-dead stub itself.
The macro was copied over from the Linux kernel back when
linuxlist.h was first added in 2010 [1], where prefetch() was a real,
arch-specific cache prefetch hint at the time. Upstream itself later
dropped prefetching from the regular list iterators in 2011 [2].
Change-Id: Id84973330df44b4efdd1bd85e4b7c3cb88642f92
Related: [1] ec8b4501c7 ("intial checkin of the libosmocore project")
Related: [2] e66eed651fd1 ("list: remove prefetching from regular list iterators")
Related: OS#7036, OS#6858
---
M include/osmocom/core/linuxlist.h
1 file changed, 17 insertions(+), 30 deletions(-)
Approvals:
laforge: Looks good to me, approved; Verified
pespin: Looks good to me, but someone else must approve
diff --git a/include/osmocom/core/linuxlist.h b/include/osmocom/core/linuxlist.h
index 06627fb..49d347e 100644
--- a/include/osmocom/core/linuxlist.h
+++ b/include/osmocom/core/linuxlist.h
@@ -22,8 +22,6 @@
#define inline __inline__
#endif
-static inline void prefetch(const void *x) {;}
-
/*! Cast a member of a structure out to the containing structure.
* \param[in] ptr the pointer to the member.
* \param[in] type the type of the container struct this is embedded in.
@@ -283,15 +281,13 @@
* \param head the head of the list over which to iterate.
*/
#define llist_for_each(pos, head) \
- for (pos = (head)->next, prefetch(pos->next); pos != (head); \
- pos = pos->next, prefetch(pos->next))
+ for (pos = (head)->next; pos != (head); pos = pos->next)
-/*! Iterate over a linked list (no prefetch).
+/*! Iterate over a linked list.
* \param pos the llist_head to use as a loop counter.
* \param head the head of the list over which to iterate.
*
- * This variant differs from llist_for_each() in that it's the
- * simplest possible llist iteration code, no prefetching is done.
+ * Equivalent to llist_for_each(); kept for API compatibility.
* Use this for code that knows the llist to be very short (empty
* or 1 entry) most of the time.
*/
@@ -303,8 +299,7 @@
* \param head the head of the list over which to iterate.
*/
#define llist_for_each_prev(pos, head) \
- for (pos = (head)->prev, prefetch(pos->prev); pos != (head); \
- pos = pos->prev, prefetch(pos->prev))
+ for (pos = (head)->prev; pos != (head); pos = pos->prev)
/*! Iterate over a linked list, safe against removal of llist entry.
* \param pos the llist_head to use as a loop counter.
@@ -321,11 +316,9 @@
* \param member the name of the llist_head within the struct pos.
*/
#define llist_for_each_entry(pos, head, member) \
- for (pos = llist_entry((head)->next, typeof(*pos), member), \
- prefetch(__llist_member(pos, member)->next); \
+ for (pos = llist_entry((head)->next, typeof(*pos), member); \
__llist_member(pos, member) != (head); \
- pos = llist_entry(__llist_member(pos, member)->next, typeof(*pos), member), \
- prefetch(__llist_member(pos, member)->next))
+ pos = llist_entry(__llist_member(pos, member)->next, typeof(*pos), member))
/*! Iterate backwards over a linked list of a given type.
* \param pos the 'type *' to use as a loop counter.
@@ -333,11 +326,9 @@
* \param member the name of the llist_head within the struct pos.
*/
#define llist_for_each_entry_reverse(pos, head, member) \
- for (pos = llist_entry((head)->prev, typeof(*pos), member), \
- prefetch(__llist_member(pos, member)->prev); \
+ for (pos = llist_entry((head)->prev, typeof(*pos), member); \
__llist_member(pos, member) != (head); \
- pos = llist_entry(__llist_member(pos, member)->prev, typeof(*pos), member), \
- prefetch(__llist_member(pos, member)->prev))
+ pos = llist_entry(__llist_member(pos, member)->prev, typeof(*pos), member))
/*! Iterate over a linked list of a given type,
* continuing after an existing point.
@@ -346,11 +337,9 @@
* \param member the name of the llist_head within the struct pos.
*/
#define llist_for_each_entry_continue(pos, head, member) \
- for (pos = llist_entry(pos->member.next, typeof(*pos), member), \
- prefetch(__llist_member(pos, member)->next); \
+ for (pos = llist_entry(pos->member.next, typeof(*pos), member); \
__llist_member(pos, member) != (head); \
- pos = llist_entry(__llist_member(pos, member)->next, typeof(*pos), member), \
- prefetch(__llist_member(pos, member)->next))
+ pos = llist_entry(__llist_member(pos, member)->next, typeof(*pos), member))
/*! Iterate over llist of given type, safe against removal of llist entry.
* \param pos the 'type *' to use as a loop counter.
@@ -369,8 +358,8 @@
* \param head the head of the list over which to iterate.
*/
#define llist_for_each_rcu(pos, head) \
- for (pos = (head)->next, prefetch(pos->next); pos != (head); \
- pos = pos->next, ({ smp_read_barrier_depends(); 0;}), prefetch(pos->next))
+ for (pos = (head)->next; pos != (head); \
+ pos = pos->next, ({ smp_read_barrier_depends(); 0;}))
#define __llist_for_each_rcu(pos, head) \
for (pos = (head)->next; pos != (head); \
@@ -391,12 +380,10 @@
* \param member the name of the llist_struct within the struct.
*/
#define llist_for_each_entry_rcu(pos, head, member) \
- for (pos = llist_entry((head)->next, typeof(*pos), member), \
- prefetch(__llist_member(pos, member)->next); \
- __llist_member(pos, member) != (head); \
+ for (pos = llist_entry((head)->next, typeof(*pos), member); \
+ __llist_member(pos, member) != (head); \
pos = llist_entry(__llist_member(pos, member)->next, typeof(*pos), member), \
- ({ smp_read_barrier_depends(); 0;}), \
- prefetch(__llist_member(pos, member)->next))
+ ({ smp_read_barrier_depends(); 0;}))
/*! Iterate over an rcu-protected llist, continuing after existing point.
@@ -404,8 +391,8 @@
* \param head the head of the list over which to iterate.
*/
#define llist_for_each_continue_rcu(pos, head) \
- for ((pos) = (pos)->next, prefetch((pos)->next); (pos) != (head); \
- (pos) = (pos)->next, ({ smp_read_barrier_depends(); 0;}), prefetch((pos)->next))
+ for ((pos) = (pos)->next; (pos) != (head); \
+ (pos) = (pos)->next, ({ smp_read_barrier_depends(); 0;}))
/*! Count number of llist items by iterating.
* \param head the llist head to count items of.
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/43151?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: merged
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: Id84973330df44b4efdd1bd85e4b7c3cb88642f92
Gerrit-Change-Number: 43151
Gerrit-PatchSet: 4
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Attention is currently required from: pespin.
lynxis lazus has posted comments on this change by lynxis lazus. ( https://gerrit.osmocom.org/c/osmo-msc/+/43482?usp=email )
Change subject: libvlr: fix linter issues
......................................................................
Patch Set 1:
(1 comment)
File src/libvlr/vlr_access_req_fsm.c:
https://gerrit.osmocom.org/c/osmo-msc/+/43482/comment/15816bb8_72915dd0?usp… :
PS1, Line 790: .in_event_mask = TODO,
> how is this even compiling? 😮What about: […]
there is a huge #if 0
--
To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/43482?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-Change-Id: I99f424b196e3b583716d05e77dcd03b907920af1
Gerrit-Change-Number: 43482
Gerrit-PatchSet: 1
Gerrit-Owner: lynxis lazus <lynxis(a)fe80.eu>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Comment-Date: Tue, 01 Sep 2026 08:09:00 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: pespin <pespin(a)sysmocom.de>
jolly has submitted this change. ( https://gerrit.osmocom.org/c/onomondo-ipa/+/43403?usp=email )
Change subject: Update README.md related to the current command line parameters
......................................................................
Update README.md related to the current command line parameters
Change-Id: I66b89db33676139c8746eb1f94133e14af6e1485
---
M README.md
1 file changed, 13 insertions(+), 13 deletions(-)
Approvals:
dexter: Looks good to me, approved
Jenkins Builder: Verified
diff --git a/README.md b/README.md
index 2c7ba03..44d76ea 100644
--- a/README.md
+++ b/README.md
@@ -1,9 +1,9 @@
# Onomondo IPA
onomondo-ipa is a C-based IoT Profile Assistant in the IoT Device (IPAd, see also SGP.31) implementation. The IPAd is an
-element in the 3GPP IoT eSIM system as described in SGP.31 and SGP.32. It interfaces between the eUICC on one side,
-and the eIM (via HTTPS) on the other side. The implementation presented here can run on a regular Linux host. It can also be used
-as a library to add IPAd functionality to an IoT device that runs an RTOS.
+element in the 3GPP IoT eSIM system as described in SGP.31 and SGP.32. It interfaces between the eUICC on one side,
+and the eIM (via HTTPS) on the other side. The implementation presented here can run on a regular Linux host. It can
+also be used as a library to add IPAd functionality to an IoT device that runs an RTOS.
This code currently implements SGP.32 v1.0, an early version
of the GSMA specifications which did never get used in production. The only SAS-SM accredited eUICCs
@@ -89,19 +89,19 @@
### Command-Line Options
-There are a number of command-line options supported. The most relevant options are:
+There are a number of command-line options and operations supported. The most relevant options are:
* `-r` specifies the PCSC reader number.
-* `-f` specifies the path to an initial eIM configuration file.
* `-I` omit verification of the SSL certificate of the eIM. This option makes the operation of onomondo-ipa insecure,
but may be helpful for testing and debugging in lab setups.
* `-E` enable the IoT eUICC emulation in case a regular consumer eUICC should be used.
+* `add-initial-eim <PATH>` specifies the path to an initial eIM configuration file.
-(use option -h to query the full list of parameters)
+(use option -h to query the full list of options and operation parameters)
### Initial Setup
-During the first run, onomondo-ipa will create an `nvstate.bin` file in its working directory.
+During the first run, onomondo-ipa will create an `nvstate.bin` file in its working directory.
This file is used as non-volatile storage of data.
In case the IoT eUICC is not yet provisioned with an eIM configuration, onomondo-ipa can be used to perform the
@@ -112,15 +112,15 @@
Example: load the initial eIM configuration onto the eUICC in PCSC reader 2
```
-./src/ipa/ipa -r 2 -f ../contrib/sample_eim_cfg.ber
+./src/ipa/ipa -r 2 add-initial-eim ../contrib/sample_eim_cfg.ber
```
### Querying eIM Packages
-When onomondo-ipa is called without the `-f` parameter, it will read the eUICC configuration and the eidValue from the
-eUICC and use it to query the eIM for eIM packages. In case no eIM package is available (error code
-noEimPackageAvailable), onomondo-ipa will exit. This condition is technically not an error, it just means that currently
-no eIM package is available for the given eUICC / eidValue.
+When onomondo-ipa is called without the `add-initial-eim` operation parameter, it will read the eIM configuration data
+and the eidValue from the eUICC and use it to query the eIM for eIM packages. In case no eIM package is available (error
+code noEimPackageAvailable), onomondo-ipa will exit. This condition is technically not an error, it just means that
+currently no eIM package is available for the given eUICC / eidValue.
When there is an eIM package available for the given eUICC / eidValue, then onomondo-ipa will download it and execute
the requested procedure. Immediately after that, the next eIM package is requested and processed until the eIM returns
@@ -134,6 +134,6 @@
License
----------
-Copyright (c) 2025 Onomondo ApS & sysmocom - s.f.m.c. GmbH.
+Copyright (c) 2025-2026 Onomondo ApS & sysmocom - s.f.m.c. GmbH.
Licensed under the GNU Affero General Public License v3.0 only.
--
To view, visit https://gerrit.osmocom.org/c/onomondo-ipa/+/43403?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: merged
Gerrit-Project: onomondo-ipa
Gerrit-Branch: master
Gerrit-Change-Id: I66b89db33676139c8746eb1f94133e14af6e1485
Gerrit-Change-Number: 43403
Gerrit-PatchSet: 4
Gerrit-Owner: jolly <andreas(a)eversberg.eu>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: jolly <andreas(a)eversberg.eu>