summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/export-to-postgresql.py
diff options
context:
space:
mode:
authorBjørn Mork <bjorn@mork.no>2013-11-01 11:16:38 +0100
committerDavid S. Miller <davem@davemloft.net>2013-11-02 02:02:01 -0400
commit20572226fc789f9f515331d911a3bd3a0d24c67a (patch)
tree65f93c29fdc65bc5992e2c37466f8d8055c8f699 /tools/perf/scripts/python/export-to-postgresql.py
parentc1a2e95435976cb040db1f6c0afbe4287c3d2e28 (diff)
net: cdc_ncm: simplify and optimize frame padding
We can avoid the costly division for the common case where we pad the frame to tx_max size as long as we ensure that tx_max is either the device specified dwNtbOutMaxSize or not a multiplum of wMaxPacketSize. Using the preconverted 'maxpacket' field avoids converting wMaxPacketSize to CPU endianness for every transmitted frame And since we only will hit the one byte padding rule for short frames, we can drop testing the skb for tailroom. The change means that tx_max now represents the real maximum skb size, enabling us to allocate the correct size instead of always making room for one extra byte. Cc: Alexey Orishko <alexey.orishko@gmail.com> Signed-off-by: Bjørn Mork <bjorn@mork.no> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions