summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python
diff options
context:
space:
mode:
authorSebastian Andrzej Siewior <bigeasy@linutronix.de>2020-11-30 13:09:45 +0300
committerJakub Kicinski <kuba@kernel.org>2020-12-02 03:56:01 +0300
commit94e0028a052ad3df1c0229f66104eff16525da11 (patch)
tree47439a0e387145cc102f7f40c7eabdd4f1e015e8 /tools/perf/scripts/python
parent2bf7d3776b7492a3585c876ab595254b2756437e (diff)
downloadlinux-94e0028a052ad3df1c0229f66104eff16525da11.tar.xz
s390/ctcm: Avoid temporary allocation of struct th_header and th_sweep.
The size of struct th_header is 8 byte and the size of struct th_sweep is 16 byte. The memory for is allocated, initialized, used and deallocated a few lines later. It is more efficient to avoid the allocation/free dance and assign the values directly to skb's data part instead of using memcpy() for it. Avoid an allocation of struct th_sweep/th_header and use the resulting skb pointer instead. Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> [jwi: use skb_put_zero(), instead of skb_put() + memset to 0] Signed-off-by: Julian Wiedmann <jwi@linux.ibm.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions