/[base]
ViewVC logotype

Revision 325730


Jump to revision: Previous Next
Author: truckman
Date: Sun Nov 12 01:26:43 2017 UTC (6 years, 6 months ago)
Changed paths: 10
Log Message:
MFC r325008

Fix Dummynet AQM packet marking function ecn_mark() and fq_codel /
fq_pie schedulers packet classification functions in layer2 (bridge mode).

Dummynet AQM packet marking function ecn_mark() and fq_codel/fq_pie
schedulers packet classification functions (fq_codel_classify_flow()
and fq_pie_classify_flow()) assume mbuf is pointing at L3 (IP)
packet. However, this assumption is incorrect if ipfw/dummynet is
used to manage layer2 traffic (bridge mode) since mbuf will point
at L2 frame.  This patch solves this problem by identifying the
source of the frame/packet (L2 or L3) and adding ETHER_HDR_LEN
offset when converting an mbuf pointer to ip pointer if the traffic
is from layer2.  More specifically, in dummynet packet tagging
function, tag_mbuf(), iphdr_off is set to ETHER_HDR_LEN if the
traffic is from layer2 and set to zero otherwise. Whenever an access
to IP header is required, mtodo(m, dn_tag_get(m)->iphdr_off) is
used instead of mtod(m, struct ip *) to correctly convert mbuf
pointer to ip pointer in both L2 and L3 traffic.

Submitted by:	lstewart
Relnotes:	yes
Differential Revision:	https://reviews.freebsd.org/D12506


Changed paths

Path Details
Directorystable/11/ modified , props changed
Directorystable/11/sys/netpfil/ipfw/dn_sched_fifo.c modified , text changed
Directorystable/11/sys/netpfil/ipfw/dn_sched_fq_codel.c modified , text changed
Directorystable/11/sys/netpfil/ipfw/dn_sched_fq_pie.c modified , text changed
Directorystable/11/sys/netpfil/ipfw/dn_sched_prio.c modified , text changed
Directorystable/11/sys/netpfil/ipfw/dn_sched_qfq.c modified , text changed
Directorystable/11/sys/netpfil/ipfw/dn_sched_rr.c modified , text changed
Directorystable/11/sys/netpfil/ipfw/dn_sched_wf2q.c modified , text changed
Directorystable/11/sys/netpfil/ipfw/ip_dn_io.c modified , text changed
Directorystable/11/sys/netpfil/ipfw/ip_dn_private.h modified , text changed

  ViewVC Help
Powered by ViewVC 1.1.27