[PATCH 01/10] Add GTP hub stub, as simplistic UDP forwarder.

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/OpenBSC@lists.osmocom.org/.

Neels Hofmeyr nhofmeyr at sysmocom.de
Fri Oct 9 00:01:07 UTC 2015


On Thu, Oct 08, 2015 at 05:00:08PM +0200, Harald Welte wrote:
> Hi Neels,
> 
> On Wed, Oct 07, 2015 at 04:18:19PM +0200, Neels Hofmeyr wrote:
> > +#define LOGERR(fmt, args...) \
> > +	LOGP(DGTPHUB, LOGL_ERROR, fmt, ##args)
> > +
> > +#define LOG(fmt, args...) \
> > +	LOGP(DGTPHUB, LOGL_NOTICE, fmt, ##args)
> 
> we typically don't do this in the Osmo* codebase,bt use the full
> statement.  However, it is your choice.
> 
> The problem I see with this is that you reduce/remove the flexibility of
> using multiplelog subsstems and levels.  You more or less assume that
> there will always only be two log levels used, and all messages will use
> the same subsystem.  Is that really the case?

It's intended as a per-C-file local definition just to reduce repetition.
If a file needs another log level (more than once), I intend to create
another LOGxxx #define; but never in an h. LOGP() is also available.

> When the full statement is used everytime, it is also easier to later
> change / tune the logging levels of certain statements, which is
> typically what happens after you run it in production with thousands of
> messages flowing through and you see what kind of granularity makes
> sense.

ok, I see. I'll drop them as I go, then.

> Also, I think in patch 10/10 you state 'add debug messages' but then
> use the LOG() macro.  So in fact you are adding NOTICE messages, not
> DEBUG messages.  So either of the two statements is wrong.

That's right. Most current LOG()s are actually not intended to live past
the commit that concludes GTP transcoding, fairly soon. That's what I
meant by debug, really.

Thanks!

~Neels

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.osmocom.org/pipermail/openbsc/attachments/20151009/91b78243/attachment.bin>


More information about the OpenBSC mailing list