Change in libosmo-netif[master]: src/stream: Work around more Linux kernel ABI breakage

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

pespin gerrit-no-reply at lists.osmocom.org
Tue Jun 2 10:42:53 UTC 2020


pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmo-netif/+/18628 )

Change subject: src/stream: Work around more Linux kernel ABI breakage
......................................................................


Patch Set 1:

(5 comments)

https://gerrit.osmocom.org/c/libosmo-netif/+/18628/1//COMMIT_MSG 
Commit Message:

https://gerrit.osmocom.org/c/libosmo-netif/+/18628/1//COMMIT_MSG@14 
PS1, Line 14: and https://marc.info/?l=linux-sctp&m=158729301516157&w=2 for the ost
typo: most


https://gerrit.osmocom.org/c/libosmo-netif/+/18628/1/src/stream.c 
File src/stream.c:

https://gerrit.osmocom.org/c/libosmo-netif/+/18628/1/src/stream.c@100 
PS1, Line 100:  * But as it doesn't do that, let's try to work around this */
In general, I think it is worth finding out the requried size only once and storing it in a static size_t sctp_setsockopt_size once it's found to work, and then simply call setsokopt directly if that static var is != 0.


https://gerrit.osmocom.org/c/libosmo-netif/+/18628/1/src/stream.c@121 
PS1, Line 121: 			continue;
AFAIU this probably deserves logging and error and if you end up here you can already return.

So that means for instance size=11 and we failed, so we try with try_sizes[i]=10. If we want to set even in 11th byte, we won't be able and we don't need to continue since we'll never be able to set it. That's also why an error log is required.


https://gerrit.osmocom.org/c/libosmo-netif/+/18628/1/src/stream.c@131 
PS1, Line 131: 		memcpy(buf, event, size);
memcpy(buf, event, size);
memset(buf+size, 0, sizeof(buf) - size);


https://gerrit.osmocom.org/c/libosmo-netif/+/18628/1/src/stream.c@140 
PS1, Line 140: 	}
Probably worth logging in else {} here for new-to-come kernels.



-- 
To view, visit https://gerrit.osmocom.org/c/libosmo-netif/+/18628
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: libosmo-netif
Gerrit-Branch: master
Gerrit-Change-Id: Icc49f347cdc0bb77a5c0e230597d662ac35b4acc
Gerrit-Change-Number: 18628
Gerrit-PatchSet: 1
Gerrit-Owner: laforge <laforge at osmocom.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: pespin <pespin at sysmocom.de>
Gerrit-Comment-Date: Tue, 02 Jun 2020 10:42:53 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20200602/07fbf976/attachment.htm>


More information about the gerrit-log mailing list