mbox series

[net-next,v3,0/2] net: update netdev_rx_csum_fault() print dump only once

Message ID 20210628135007.1358909-1-tannerlove.kernel@gmail.com
Headers show
Series net: update netdev_rx_csum_fault() print dump only once | expand

Message

Tanner Love June 28, 2021, 1:50 p.m. UTC
From: Tanner Love <tannerlove@google.com>

First patch implements DO_ONCE_LITE to abstract uses of the ".data.once"
trick. It is defined in its own, new header file  -- rather than
alongside the existing DO_ONCE in include/linux/once.h -- because
include/linux/once.h includes include/linux/jump_label.h, and this
causes the build to break for some architectures if
include/linux/once.h is included in include/linux/printk.h or
include/asm-generic/bug.h.

Second patch uses DO_ONCE_LITE in netdev_rx_csum_fault to print dump
only once.

Tanner Love (2):
  once: implement DO_ONCE_LITE for non-fast-path "do once" functionality
  net: update netdev_rx_csum_fault() print dump only once

 fs/xfs/xfs_message.h      | 13 +++----------
 include/asm-generic/bug.h | 37 +++++++------------------------------
 include/linux/once_lite.h | 24 ++++++++++++++++++++++++
 include/linux/printk.h    | 23 +++--------------------
 kernel/trace/trace.h      | 13 +++----------
 net/core/dev.c            | 14 +++++++++-----
 6 files changed, 49 insertions(+), 75 deletions(-)
 create mode 100644 include/linux/once_lite.h

Comments

Petr Mladek June 29, 2021, 7:33 a.m. UTC | #1
On Mon 2021-06-28 11:14:46, Steven Rostedt wrote:
> On Mon, 28 Jun 2021 09:50:06 -0400

> Tanner Love <tannerlove.kernel@gmail.com> wrote:

> 

> > Certain uses of "do once" functionality reside outside of fast path,

> > and so do not require jump label patching via static keys, making

> > existing DO_ONCE undesirable in such cases.

> > 

> > Replace uses of __section(".data.once") with DO_ONCE_LITE(_IF)?

> 

> I hate the name "_LITE" but can't come up with something better.

> 

> Maybe: DO_ONCE_SLOW() ??


Or rename the original DO_ONCE() to DO_ONCE_FAST() because it is
more tricky to be fast. And call the "normal" implementation DO_ONCE().

> Anyway, besides my bike-shedding comment above...


Same here :-)

Acked-by: Petr Mladek <pmladek@suse.com>


Best Regards,
Petr