<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/net/netconsole.c, branch v5.14</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v5.14</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v5.14'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2020-11-04T00:40:09Z</updated>
<entry>
<title>net: netconsole: Add description for 'netconsole_target's extended attribute</title>
<updated>2020-11-04T00:40:09Z</updated>
<author>
<name>Lee Jones</name>
<email>lee.jones@linaro.org</email>
</author>
<published>2020-11-02T11:45:10Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=a8eb1a007cface8c48482d977d5831b273671f39'/>
<id>urn:sha1:a8eb1a007cface8c48482d977d5831b273671f39</id>
<content type='text'>
Fixes the following W=1 kernel build warning(s):

 drivers/net/netconsole.c:104: warning: Function parameter or member 'extended' not described in 'netconsole_target'

Signed-off-by: Lee Jones &lt;lee.jones@linaro.org&gt;
Link: https://lore.kernel.org/r/20201102114512.1062724-29-lee.jones@linaro.org
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</content>
</entry>
<entry>
<title>treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 153</title>
<updated>2019-05-30T18:26:32Z</updated>
<author>
<name>Thomas Gleixner</name>
<email>tglx@linutronix.de</email>
</author>
<published>2019-05-27T06:55:02Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=de6cc6515a445d5d81cad2dee899a0be1a6317f8'/>
<id>urn:sha1:de6cc6515a445d5d81cad2dee899a0be1a6317f8</id>
<content type='text'>
Based on 1 normalized pattern(s):

  this program is free software you can redistribute it and or modify
  it under the terms of the gnu general public license as published by
  the free software foundation either version 2 or at your option any
  later version this program is distributed in the hope that it will
  be useful but without any warranty without even the implied warranty
  of merchantability or fitness for a particular purpose see the gnu
  general public license for more details you should have received a
  copy of the gnu general public license along with this program if
  not write to the free software foundation inc 675 mass ave cambridge
  ma 02139 usa

extracted by the scancode license scanner the SPDX license identifier

  GPL-2.0-or-later

has been chosen to replace the boilerplate/reference in 77 file(s).

Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Reviewed-by: Allison Randal &lt;allison@lohutok.net&gt;
Reviewed-by: Armijn Hemel &lt;armijn@tjaldur.nl&gt;
Reviewed-by: Richard Fontana &lt;rfontana@redhat.com&gt;
Cc: linux-spdx@vger.kernel.org
Link: https://lkml.kernel.org/r/20190527070032.837555891@linutronix.de
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>netconsole: make config_item_type const</title>
<updated>2017-10-19T14:15:20Z</updated>
<author>
<name>Bhumika Goyal</name>
<email>bhumirks@gmail.com</email>
</author>
<published>2017-10-16T15:18:52Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=0d4a4406c4aabb4d2c9ac6a48f3c77afe36e36ed'/>
<id>urn:sha1:0d4a4406c4aabb4d2c9ac6a48f3c77afe36e36ed</id>
<content type='text'>
Make these structures const as they are either passed to the functions
having the argument as const or stored as a reference in the "ci_type"
const field of a config_item structure.

Done using Coccienlle.

Signed-off-by: Bhumika Goyal &lt;bhumirks@gmail.com&gt;
Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
</content>
</entry>
<entry>
<title>netconsole: Remove duplicate "netconsole: " logging prefix</title>
<updated>2017-06-13T16:57:40Z</updated>
<author>
<name>Joe Perches</name>
<email>joe@perches.com</email>
</author>
<published>2017-06-12T23:39:51Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=4a6a97e2650c7dd7b1380ba763e9038c814e220c'/>
<id>urn:sha1:4a6a97e2650c7dd7b1380ba763e9038c814e220c</id>
<content type='text'>
It's already added by pr_fmt so remove the explicit use.

Signed-off-by: Joe Perches &lt;joe@perches.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>netconsole: use per-attribute show and store methods</title>
<updated>2015-10-14T05:17:51Z</updated>
<author>
<name>Christoph Hellwig</name>
<email>hch@lst.de</email>
</author>
<published>2015-10-03T13:32:56Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=ea9ed9cff47e7932925982c8fdaf2d4d1708884f'/>
<id>urn:sha1:ea9ed9cff47e7932925982c8fdaf2d4d1708884f</id>
<content type='text'>
Note that the old code actually used the store_attributes method to do
locking, this is moved into the individual methods.

Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</content>
</entry>
<entry>
<title>netconsole: implement extended console support</title>
<updated>2015-06-26T00:00:39Z</updated>
<author>
<name>Tejun Heo</name>
<email>tj@kernel.org</email>
</author>
<published>2015-06-25T22:01:41Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=e2f15f9a79201ddd596727b84a85c419ee57ad5c'/>
<id>urn:sha1:e2f15f9a79201ddd596727b84a85c419ee57ad5c</id>
<content type='text'>
printk logbuf keeps various metadata and optional key=value dictionary for
structured messages, both of which are stripped when messages are handed
to regular console drivers.

It can be useful to have this metadata and dictionary available to
netconsole consumers.  This obviously makes logging via netconsole more
complete and the sequence number in particular is useful in environments
where messages may be lost or reordered in transit - e.g.  when netconsole
is used to collect messages in a large cluster where packets may have to
travel congested hops to reach the aggregator.  The lost and reordered
messages can easily be identified and handled accordingly using the
sequence numbers.

printk recently added extended console support which can be selected by
setting CON_EXTENDED flag.  From console driver side, not much changes.
The only difference is that the text passed to the write callback is
formatted the same way as /dev/kmsg.

This patch implements extended console support for netconsole which can be
enabled by either prepending "+" to a netconsole boot param entry or
echoing 1 to "extended" file in configfs.  When enabled, netconsole
transmits extended log messages with headers identical to /dev/kmsg
output.

There's one complication due to message fragments.  netconsole limits the
maximum message size to 1k and messages longer than that are split into
multiple fragments.  As all extended console messages should carry
matching headers and be uniquely identifiable, each extended message
fragment carries full copy of the metadata and an extra header field to
identify the specific fragment.  The optional header is of the form
"ncfrag=OFF/LEN" where OFF is the byte offset into the message body and
LEN is the total length.

To avoid unnecessarily making printk format extended messages, Extended
netconsole is registered with printk when the first extended netconsole is
configured.

Signed-off-by: Tejun Heo &lt;tj@kernel.org&gt;
Cc: David Miller &lt;davem@davemloft.net&gt;
Cc: Kay Sievers &lt;kay@vrfy.org&gt;
Cc: Petr Mladek &lt;pmladek@suse.cz&gt;
Cc: Tetsuo Handa &lt;penguin-kernel@I-love.SAKURA.ne.jp&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>netconsole: make all dynamic netconsoles share a mutex</title>
<updated>2015-06-26T00:00:39Z</updated>
<author>
<name>Tejun Heo</name>
<email>tj@kernel.org</email>
</author>
<published>2015-06-25T22:01:38Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=369e5a888179f31dcd7cc8e02d695e6481a66075'/>
<id>urn:sha1:369e5a888179f31dcd7cc8e02d695e6481a66075</id>
<content type='text'>
Currently, each dynamic netconsole_target uses its own separate mutex to
synchronize the configuration operations.

This patch replaces the per-netconsole_target mutexes with a single
mutex - dynamic_netconsole_mutex.  The reduced granularity doesn't hurt
anything, the code is minutely simpler and this'd allow adding
operations which should be synchronized across all dynamic netconsoles.

Signed-off-by: Tejun Heo &lt;tj@kernel.org&gt;
Cc: David Miller &lt;davem@davemloft.net&gt;
Cc: Kay Sievers &lt;kay@vrfy.org&gt;
Cc: Petr Mladek &lt;pmladek@suse.cz&gt;
Cc: Tetsuo Handa &lt;penguin-kernel@I-love.SAKURA.ne.jp&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>netconsole: make netconsole_target-&gt;enabled a bool</title>
<updated>2015-06-26T00:00:39Z</updated>
<author>
<name>Tejun Heo</name>
<email>tj@kernel.org</email>
</author>
<published>2015-06-25T22:01:36Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=698cf1c6163a2f2752d2d3e511a26c688f5778f3'/>
<id>urn:sha1:698cf1c6163a2f2752d2d3e511a26c688f5778f3</id>
<content type='text'>
netconsole uses both bool and int for boolean values.  Let's convert
nt-&gt;enabled to bool for consistency.

Signed-off-by: Tejun Heo &lt;tj@kernel.org&gt;
Cc: David Miller &lt;davem@davemloft.net&gt;
Cc: Kay Sievers &lt;kay@vrfy.org&gt;
Cc: Petr Mladek &lt;pmladek@suse.cz&gt;
Cc: Tetsuo Handa &lt;penguin-kernel@I-love.SAKURA.ne.jp&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>netconsole: remove unnecessary netconsole_target_get/out() from write_msg()</title>
<updated>2015-06-26T00:00:39Z</updated>
<author>
<name>Tejun Heo</name>
<email>tj@kernel.org</email>
</author>
<published>2015-06-25T22:01:33Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=a6d403ac96893cb5c5812c2d75de082795f02e5f'/>
<id>urn:sha1:a6d403ac96893cb5c5812c2d75de082795f02e5f</id>
<content type='text'>
write_msg() grabs target_list_lock and walks target_list invoking
netpool_send_udp() on each target.  Curiously, it protects each iteration
with netconsole_target_get/put() even though it never releases
target_list_lock which protects all the members.

While this doesn't harm anything, it doesn't serve any purpose either.
The items on the list can't go away while target_list_lock is held.
Remove the unnecessary get/put pair.

Signed-off-by: Tejun Heo &lt;tj@kernel.org&gt;
Cc: David Miller &lt;davem@davemloft.net&gt;
Cc: Kay Sievers &lt;kay@vrfy.org&gt;
Cc: Petr Mladek &lt;pmladek@suse.cz&gt;
Cc: Tetsuo Handa &lt;penguin-kernel@I-love.SAKURA.ne.jp&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>netconsole: Use eth_&lt;foo&gt;_addr instead of memset</title>
<updated>2015-03-03T22:01:37Z</updated>
<author>
<name>Joe Perches</name>
<email>joe@perches.com</email>
</author>
<published>2015-03-03T03:54:50Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=1667c942e72346df1f41d4171de5a647b6b22dfc'/>
<id>urn:sha1:1667c942e72346df1f41d4171de5a647b6b22dfc</id>
<content type='text'>
Use the built-in function instead of memset.

Miscellanea:

Add #include &lt;linux/etherdevice.h&gt;

Signed-off-by: Joe Perches &lt;joe@perches.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
</feed>
