https://github.com/torvalds/linux
Revision 878e2405710aacfeeb19364c300f38b7a9abfe8f authored by Sean Anderson on 20 September 2022, 23:50:18 UTC, committed by Jakub Kicinski on 22 September 2022, 13:44:28 UTC
There is a separate receive path for small packets (under 256 bytes).
Instead of allocating a new dma-capable skb to be used for the next packet,
this path allocates a skb and copies the data into it (reusing the existing
sbk for the next packet). There are two bytes of junk data at the beginning
of every packet. I believe these are inserted in order to allow aligned DMA
and IP headers. We skip over them using skb_reserve. Before copying over
the data, we must use a barrier to ensure we see the whole packet. The
current code only synchronizes len bytes, starting from the beginning of
the packet, including the junk bytes. However, this leaves off the final
two bytes in the packet. Synchronize the whole packet.

To reproduce this problem, ping a HME with a payload size between 17 and
214

	$ ping -s 17 <hme_address>

which will complain rather loudly about the data mismatch. Small packets
(below 60 bytes on the wire) do not have this issue. I suspect this is
related to the padding added to increase the minimum packet size.

Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Link: https://lore.kernel.org/r/20220920235018.1675956-1-seanga2@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
1 parent db39dfd
History
Tip revision: 878e2405710aacfeeb19364c300f38b7a9abfe8f authored by Sean Anderson on 20 September 2022, 23:50:18 UTC
net: sunhme: Fix packet reception for len < RX_COPY_THRESHOLD
Tip revision: 878e240
File Mode Size
9p
bluetooth
caif
iucv
netfilter
netns
nfc
phonet
sctp
tc_act
6lowpan.h -rw-r--r-- 10.0 KB
Space.h -rw-r--r-- 737 bytes
act_api.h -rw-r--r-- 9.2 KB
addrconf.h -rw-r--r-- 14.0 KB
af_ieee802154.h -rw-r--r-- 1.2 KB
af_rxrpc.h -rw-r--r-- 2.6 KB
af_unix.h -rw-r--r-- 2.8 KB
af_vsock.h -rw-r--r-- 7.4 KB
ah.h -rw-r--r-- 382 bytes
amt.h -rw-r--r-- 8.3 KB
arp.h -rw-r--r-- 2.0 KB
atmclip.h -rw-r--r-- 1.5 KB
ax25.h -rw-r--r-- 15.0 KB
ax88796.h -rw-r--r-- 1.4 KB
bareudp.h -rw-r--r-- 333 bytes
bond_3ad.h -rw-r--r-- 9.4 KB
bond_alb.h -rw-r--r-- 6.1 KB
bond_options.h -rw-r--r-- 4.7 KB
bonding.h -rw-r--r-- 20.9 KB
bpf_sk_storage.h -rw-r--r-- 1.7 KB
busy_poll.h -rw-r--r-- 4.3 KB
calipso.h -rw-r--r-- 1.6 KB
cfg80211-wext.h -rw-r--r-- 1.8 KB
cfg80211.h -rw-r--r-- 310.1 KB
cfg802154.h -rw-r--r-- 11.0 KB
checksum.h -rw-r--r-- 4.9 KB
cipso_ipv4.h -rw-r--r-- 7.4 KB
cls_cgroup.h -rw-r--r-- 2.0 KB
codel.h -rw-r--r-- 5.9 KB
codel_impl.h -rw-r--r-- 8.3 KB
codel_qdisc.h -rw-r--r-- 3.0 KB
compat.h -rw-r--r-- 2.5 KB
datalink.h -rw-r--r-- 688 bytes
dcbevent.h -rw-r--r-- 766 bytes
dcbnl.h -rw-r--r-- 4.2 KB
devlink.h -rw-r--r-- 64.5 KB
dn.h -rw-r--r-- 6.9 KB
dn_dev.h -rw-r--r-- 5.4 KB
dn_fib.h -rw-r--r-- 4.0 KB
dn_neigh.h -rw-r--r-- 996 bytes
dn_nsp.h -rw-r--r-- 5.5 KB
dn_route.h -rw-r--r-- 4.0 KB
dropreason.h -rw-r--r-- 10.1 KB
dsa.h -rw-r--r-- 42.3 KB
dsfield.h -rw-r--r-- 1.1 KB
dst.h -rw-r--r-- 14.5 KB
dst_cache.h -rw-r--r-- 3.0 KB
dst_metadata.h -rw-r--r-- 5.4 KB
dst_ops.h -rw-r--r-- 2.1 KB
erspan.h -rw-r--r-- 9.0 KB
esp.h -rw-r--r-- 1.2 KB
espintcp.h -rw-r--r-- 966 bytes
ethoc.h -rw-r--r-- 439 bytes
failover.h -rw-r--r-- 1.2 KB
fib_notifier.h -rw-r--r-- 1.4 KB
fib_rules.h -rw-r--r-- 5.4 KB
firewire.h -rw-r--r-- 599 bytes
flow.h -rw-r--r-- 5.7 KB
flow_dissector.h -rw-r--r-- 10.8 KB
flow_offload.h -rw-r--r-- 16.7 KB
fou.h -rw-r--r-- 549 bytes
fq.h -rw-r--r-- 2.5 KB
fq_impl.h -rw-r--r-- 7.9 KB
garp.h -rw-r--r-- 2.7 KB
gen_stats.h -rw-r--r-- 3.0 KB
genetlink.h -rw-r--r-- 13.5 KB
geneve.h -rw-r--r-- 1.9 KB
gre.h -rw-r--r-- 3.3 KB
gro.h -rw-r--r-- 11.8 KB
gro_cells.h -rw-r--r-- 443 bytes
gtp.h -rw-r--r-- 1.5 KB
gue.h -rw-r--r-- 3.3 KB
hwbm.h -rw-r--r-- 995 bytes
icmp.h -rw-r--r-- 1.9 KB
ieee80211_radiotap.h -rw-r--r-- 13.2 KB
ieee802154_netdev.h -rw-r--r-- 9.8 KB
if_inet6.h -rw-r--r-- 6.7 KB
ife.h -rw-r--r-- 1.0 KB
ila.h -rw-r--r-- 308 bytes
inet6_connection_sock.h -rw-r--r-- 794 bytes
inet6_hashtables.h -rw-r--r-- 3.6 KB
inet_common.h -rw-r--r-- 2.7 KB
inet_connection_sock.h -rw-r--r-- 11.0 KB
inet_dscp.h -rw-r--r-- 1.6 KB
inet_ecn.h -rw-r--r-- 7.8 KB
inet_frag.h -rw-r--r-- 5.1 KB
inet_hashtables.h -rw-r--r-- 11.9 KB
inet_sock.h -rw-r--r-- 10.1 KB
inet_timewait_sock.h -rw-r--r-- 3.6 KB
inetpeer.h -rw-r--r-- 3.3 KB
ioam6.h -rw-r--r-- 1.2 KB
ip.h -rw-r--r-- 22.1 KB
ip6_checksum.h -rw-r--r-- 2.3 KB
ip6_fib.h -rw-r--r-- 15.8 KB
ip6_route.h -rw-r--r-- 10.0 KB
ip6_tunnel.h -rw-r--r-- 5.0 KB
ip_fib.h -rw-r--r-- 16.0 KB
ip_tunnels.h -rw-r--r-- 13.9 KB
ip_vs.h -rw-r--r-- 49.6 KB
ipcomp.h -rw-r--r-- 705 bytes
ipconfig.h -rw-r--r-- 837 bytes
ipv6.h -rw-r--r-- 36.7 KB
ipv6_frag.h -rw-r--r-- 3.3 KB
ipv6_stubs.h -rw-r--r-- 3.2 KB
iw_handler.h -rw-r--r-- 20.9 KB
kcm.h -rw-r--r-- 4.8 KB
l3mdev.h -rw-r--r-- 7.0 KB
lag.h -rw-r--r-- 409 bytes
lapb.h -rw-r--r-- 4.8 KB
lib80211.h -rw-r--r-- 3.9 KB
llc.h -rw-r--r-- 4.4 KB
llc_c_ac.h -rw-r--r-- 9.4 KB
llc_c_ev.h -rw-r--r-- 10.7 KB
llc_c_st.h -rw-r--r-- 1.8 KB
llc_conn.h -rw-r--r-- 4.1 KB
llc_if.h -rw-r--r-- 2.2 KB
llc_pdu.h -rw-r--r-- 14.4 KB
llc_s_ac.h -rw-r--r-- 1.6 KB
llc_s_ev.h -rw-r--r-- 2.2 KB
llc_s_st.h -rw-r--r-- 1.0 KB
llc_sap.h -rw-r--r-- 1.1 KB
lwtunnel.h -rw-r--r-- 6.5 KB
mac80211.h -rw-r--r-- 278.3 KB
mac802154.h -rw-r--r-- 16.2 KB
macsec.h -rw-r--r-- 6.9 KB
mctp.h -rw-r--r-- 8.0 KB
mctpdevice.h -rw-r--r-- 1.3 KB
mip6.h -rw-r--r-- 1016 bytes
mld.h -rw-r--r-- 2.8 KB
mpls.h -rw-r--r-- 943 bytes
mpls_iptunnel.h -rw-r--r-- 481 bytes
mptcp.h -rw-r--r-- 6.7 KB
mrp.h -rw-r--r-- 3.1 KB
ncsi.h -rw-r--r-- 1.9 KB
ndisc.h -rw-r--r-- 14.8 KB
neighbour.h -rw-r--r-- 16.9 KB
net_debug.h -rw-r--r-- 5.1 KB
net_failover.h -rw-r--r-- 1023 bytes
net_namespace.h -rw-r--r-- 13.0 KB
net_ratelimit.h -rw-r--r-- 220 bytes
net_trackers.h -rw-r--r-- 424 bytes
netevent.h -rw-r--r-- 1.0 KB
netlabel.h -rw-r--r-- 20.1 KB
netlink.h -rw-r--r-- 60.2 KB
netprio_cgroup.h -rw-r--r-- 1.0 KB
netrom.h -rw-r--r-- 7.7 KB
nexthop.h -rw-r--r-- 12.3 KB
nl802154.h -rw-r--r-- 12.1 KB
nsh.h -rw-r--r-- 12.3 KB
p8022.h -rw-r--r-- 504 bytes
page_pool.h -rw-r--r-- 11.8 KB
pie.h -rw-r--r-- 3.6 KB
ping.h -rw-r--r-- 2.9 KB
pkt_cls.h -rw-r--r-- 25.1 KB
pkt_sched.h -rw-r--r-- 5.5 KB
pptp.h -rw-r--r-- 604 bytes
protocol.h -rw-r--r-- 3.8 KB
psample.h -rw-r--r-- 1.1 KB
psnap.h -rw-r--r-- 430 bytes
raw.h -rw-r--r-- 2.3 KB
rawv6.h -rw-r--r-- 856 bytes
red.h -rw-r--r-- 11.4 KB
regulatory.h -rw-r--r-- 10.7 KB
request_sock.h -rw-r--r-- 6.5 KB
rose.h -rw-r--r-- 7.7 KB
route.h -rw-r--r-- 11.3 KB
rpl.h -rw-r--r-- 972 bytes
rsi_91x.h -rw-r--r-- 1.7 KB
rtnetlink.h -rw-r--r-- 7.0 KB
rtnh.h -rw-r--r-- 859 bytes
sch_generic.h -rw-r--r-- 32.5 KB
scm.h -rw-r--r-- 3.5 KB
secure_seq.h -rw-r--r-- 868 bytes
seg6.h -rw-r--r-- 2.2 KB
seg6_hmac.h -rw-r--r-- 1.4 KB
seg6_local.h -rw-r--r-- 644 bytes
selftests.h -rw-r--r-- 582 bytes
slhc_vj.h -rw-r--r-- 6.7 KB
smc.h -rw-r--r-- 2.6 KB
snmp.h -rw-r--r-- 5.1 KB
sock.h -rw-r--r-- 82.6 KB
sock_reuseport.h -rw-r--r-- 1.7 KB
stp.h -rw-r--r-- 412 bytes
strparser.h -rw-r--r-- 4.2 KB
switchdev.h -rw-r--r-- 14.9 KB
tcp.h -rw-r--r-- 73.8 KB
tcp_states.h -rw-r--r-- 1.2 KB
timewait_sock.h -rw-r--r-- 925 bytes
tipc.h -rw-r--r-- 2.3 KB
tls.h -rw-r--r-- 13.4 KB
tls_toe.h -rw-r--r-- 2.9 KB
transp_v6.h -rw-r--r-- 2.0 KB
tso.h -rw-r--r-- 566 bytes
tun_proto.h -rw-r--r-- 1015 bytes
udp.h -rw-r--r-- 15.5 KB
udp_tunnel.h -rw-r--r-- 11.9 KB
udplite.h -rw-r--r-- 2.5 KB
vsock_addr.h -rw-r--r-- 662 bytes
vxlan.h -rw-r--r-- 15.0 KB
wext.h -rw-r--r-- 1.5 KB
x25.h -rw-r--r-- 9.5 KB
x25device.h -rw-r--r-- 387 bytes
xdp.h -rw-r--r-- 11.4 KB
xdp_priv.h -rw-r--r-- 427 bytes
xdp_sock.h -rw-r--r-- 2.1 KB
xdp_sock_drv.h -rw-r--r-- 6.5 KB
xfrm.h -rw-r--r-- 55.1 KB
xsk_buff_pool.h -rw-r--r-- 6.5 KB

back to top