Re: [PATCH 4/4] netconsole: implement extended console support

From: David Miller
Date: Tue May 12 2015 - 19:24:15 EST

From: Tejun Heo <tj@xxxxxxxxxx>
Date: Mon, 11 May 2015 16:37:45 -0400

> The current code does produce the latter outcome.
> header = msg;
> body = memchr(msg, ';', msg_len);
> if (WARN_ON_ONCE(!body))
> return;
> header_len = body - header;
> body_len = msg_len - header_len - 1;
> body++;
> @body points to ';' after memchr(), so @header_len doesn't include
> ';'. @body is incremented after calculating @header_len.

Ok, thanks for explaining, it is clear to me now.

Second question, is there an upper bound on this header size?

Because if there is, it seems to me that there is no reason why we
can't just avoid the fragmentation support altogether.

The current code limits to 1000 bytes, and that limit seems arbitrary.
Obviously this code is meant to work on interfaces with an ethernet
MTU or larger. So you could bump the limit enough to accomodate the
new header size, yet still be within the real constraints.

What do you think?
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at