<p><a href="https://gerrit.osmocom.org/c/libosmocore/+/22909">View Change</a></p><p>3 comments:</p><ul style="list-style: none; padding: 0;"><li style="margin: 0; padding: 0;"><p><a href="https://gerrit.osmocom.org/c/libosmocore/+/22909/1//COMMIT_MSG">Commit Message:</a></p><ul style="list-style: none; padding: 0;"><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.osmocom.org/c/libosmocore/+/22909/1//COMMIT_MSG@9">Patch Set #1, Line 9:</a> <code style="font-family:monospace,monospace">W</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">In practice, I wouldn't really expect the MTU to change at runtime at all. I'm not even sure it can happen while the device is up.  It's purely hypothetical in all practical deployments, IMHO.</p><p style="white-space: pre-wrap; word-wrap: break-word;">What does matter is that we determine the MTU of the underlying network device at least once when we open the AF_PACKET socket, rather than using our compile-time default.</p><p style="white-space: pre-wrap; word-wrap: break-word;">This can likely be achieved the same way (if we have mnl support included), but the commit should then emphasize the important use case, rather than the esoteric one.</p></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.osmocom.org/c/libosmocore/+/22909/1//COMMIT_MSG@12">Patch Set #1, Line 12:</a> <code style="font-family:monospace,monospace">T</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">I would suggest to extend the STATUS primitive from NS to BSSGP</p></li></ul></li><li style="margin: 0; padding: 0;"><p><a href="https://gerrit.osmocom.org/c/libosmocore/+/22909/1/src/gb/gprs_ns2_fr.c">File src/gb/gprs_ns2_fr.c:</a></p><ul style="list-style: none; padding: 0;"><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.osmocom.org/c/libosmocore/+/22909/1/src/gb/gprs_ns2_fr.c@610">Patch Set #1, Line 610:</a> </p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;"><pre style="font-family: monospace,monospace; white-space: pre-wrap;">/* 2 byte DLCI header */<br>       bind->mtu = mtu - 2;<br></pre></blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">I was not entirely sure about that part. AFAIR the AF_PACKET/SOCK_RAW code internally manages this somehow and adds size of the header.</p><p style="white-space: pre-wrap; word-wrap: break-word;">See https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/net/packet/af_packet.c#n2940</p><p style="white-space: pre-wrap; word-wrap: break-word;">"(len > dev->mtu + reserve + VLAN_HLEN + extra_len)" is the actual conditoion, and "reserve" corresponds to dev->hard_header_len.  This normally is the size of an ethernet header on ethernet-style devices. So I would have assumed it's the size of a FR header on a HDLC/FR device.</p><p style="white-space: pre-wrap; word-wrap: break-word;">However, much to my surprise. hdlc_fr.c actually sets hard_header_len to zero, so it seems you're right.</p></li></ul></li></ul><p>To view, visit <a href="https://gerrit.osmocom.org/c/libosmocore/+/22909">change 22909</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.osmocom.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.osmocom.org/c/libosmocore/+/22909"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: libosmocore </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-Change-Id: I946f7655c9526ffd98dabdce219c6a419b71e00c </div>
<div style="display:none"> Gerrit-Change-Number: 22909 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: lynxis lazus <lynxis@fe80.eu> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins Builder </div>
<div style="display:none"> Gerrit-Reviewer: daniel <dwillmann@sysmocom.de> </div>
<div style="display:none"> Gerrit-Reviewer: laforge <laforge@osmocom.org> </div>
<div style="display:none"> Gerrit-Comment-Date: Mon, 15 Feb 2021 10:55:30 +0000 </div>
<div style="display:none"> Gerrit-HasComments: Yes </div>
<div style="display:none"> Gerrit-Has-Labels: No </div>
<div style="display:none"> Gerrit-MessageType: comment </div>