lkml.org 
[lkml]   [2015]   [May]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH 4/4] netconsole: implement extended console support
From
From: Tejun Heo <tj@kernel.org>
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?


\
 
 \ /
  Last update: 2015-05-13 01:41    [W:0.047 / U:1.372 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site