<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.freebsd.org/bugzilla/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.freebsd.org/bugzilla/"
          
          maintainer="bugmeister@FreeBSD.org"
>

    <bug>
          <bug_id>198868</bug_id>
          
          <creation_ts>2015-03-24 13:42:53 +0000</creation_ts>
          <short_desc>pf brakes tcp checksum if enabled for ue adapter</short_desc>
          <delta_ts>2016-12-22 19:54:00 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>Base System</product>
          <component>kern</component>
          <version>10.1-RELEASE</version>
          <rep_platform>Any</rep_platform>
          <op_sys>Any</op_sys>
          <bug_status>Closed</bug_status>
          <resolution>Unable to Reproduce</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>---</priority>
          <bug_severity>Affects Only Me</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Dmitry Samersoff">dms</reporter>
          <assigned_to name="Kristof Provost">kp</assigned_to>
          <cc>dewayne</cc>
    
    <cc>hiren</cc>
    
    <cc>pf</cc>
          

      

      

      <flag name="mfc-stable10"
          id="8002"
          type_id="6"
          status="+"
          setter="koobs"
    />
    <flag name="mfc-stable9"
          id="8001"
          type_id="5"
          status="+"
          setter="koobs"
    />

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>816655</commentid>
    <comment_count>0</comment_count>
    <who name="Dmitry Samersoff">dms</who>
    <bug_when>2015-03-24 13:42:53 +0000</bug_when>
    <thetext>When pf is enabled on ue0 interface, tcp connection to this interface is not possible. tcpdump shows incorrect tcp checksum

dmseg:

axe0: &lt;vendor 0x0b95 product 0x7e2b, rev 2.00/0.01, addr 2&gt; on usbus3
miibus1: &lt;MII bus&gt; on axe0
ukphy0: &lt;Generic IEEE 802.3u media interface&gt; PHY 16 on miibus1
ukphy0:  none, 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto, auto-flow
ue0: &lt;USB Ethernet&gt; on axe0
ue0: Ethernet address: 9c:eb:e8:06:c4:a7

pf.conf:

pass log quick on lo0
pass log quick on ue0


tcpdump output:

16:42:03.742071 IP (tos 0x0, ttl 64, id 759, offset 0, flags [DF], proto TCP (6), length 52)
    192.168.0.85.ssh &gt; 192.168.0.77.57379: Flags [F.], cksum 0x8219 (incorrect -&gt; 0x3432), seq 2656523414, ack 3256801674, win 1040, options [nop,nop,TS val 2997057078 ecr 124263796], length 0</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>816704</commentid>
    <comment_count>1</comment_count>
    <who name="Dmitry Samersoff">dms</who>
    <bug_when>2015-03-24 17:32:06 +0000</bug_when>
    <thetext>The problem is not reproducible:

With 9.2 on the same hardware
Witn 10.1 but different USB ethernet card or non usb-ethernet card.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>826962</commentid>
    <comment_count>2</comment_count>
    <who name="Dmitry Samersoff">dms</who>
    <bug_when>2015-06-08 12:07:24 +0000</bug_when>
    <thetext>Any updates?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>844001</commentid>
    <comment_count>3</comment_count>
    <who name="">commit-hook</who>
    <bug_when>2015-10-14 16:22:15 +0000</bug_when>
    <thetext>A commit references this bug:

Author: kp
Date: Wed Oct 14 16:21:42 UTC 2015
New revision: 289316
URL: https://svnweb.freebsd.org/changeset/base/289316

Log:
  pf: Fix TSO issues

  In certain configurations (mostly but not exclusively as a VM on Xen) pf
  produced packets with an invalid TCP checksum.

  The problem was that pf could only handle packets with a full checksum. The
  FreeBSD IP stack produces TCP packets with a pseudo-header checksum (only
  addresses, length and protocol).
  Certain network interfaces expect to see the pseudo-header checksum, so they
  end up producing packets with invalid checksums.

  To fix this stop calculating the full checksum and teach pf to only update TCP
  checksums if TSO is disabled or the change affects the pseudo-header checksum.

  PR:		154428, 193579, 198868
  Reviewed by:	sbruno
  MFC after:	1 week
  Relnotes:	yes
  Sponsored by:	RootBSD
  Differential Revision:	https://reviews.freebsd.org/D3779

Changes:
  head/sys/net/pfvar.h
  head/sys/netpfil/pf/pf.c
  head/sys/netpfil/pf/pf_ioctl.c
  head/sys/netpfil/pf/pf_norm.c</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>845208</commentid>
    <comment_count>4</comment_count>
    <who name="">commit-hook</who>
    <bug_when>2015-10-21 15:33:25 +0000</bug_when>
    <thetext>A commit references this bug:

Author: kp
Date: Wed Oct 21 15:32:21 UTC 2015
New revision: 289703
URL: https://svnweb.freebsd.org/changeset/base/289703

Log:
  MFC r289316:

  pf: Fix TSO issues

  In certain configurations (mostly but not exclusively as a VM on Xen) pf
  produced packets with an invalid TCP checksum.

  The problem was that pf could only handle packets with a full checksum. The
  FreeBSD IP stack produces TCP packets with a pseudo-header checksum (only
  addresses, length and protocol).
  Certain network interfaces expect to see the pseudo-header checksum, so they
  end up producing packets with invalid checksums.

  To fix this stop calculating the full checksum and teach pf to only update TCP
  checksums if TSO is disabled or the change affects the pseudo-header checksum.

  PR:             154428, 193579, 198868
  Relnotes:       yes
  Sponsored by:   RootBSD

Changes:
_U  stable/10/
  stable/10/sys/net/pfvar.h
  stable/10/sys/netpfil/pf/pf.c
  stable/10/sys/netpfil/pf/pf_ioctl.c
  stable/10/sys/netpfil/pf/pf_norm.c</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>855487</commentid>
    <comment_count>5</comment_count>
    <who name="">commit-hook</who>
    <bug_when>2015-12-25 15:13:13 +0000</bug_when>
    <thetext>A commit references this bug:

Author: kp
Date: Fri Dec 25 15:12:12 UTC 2015
New revision: 292731
URL: https://svnweb.freebsd.org/changeset/base/292731

Log:
  pf: Fix TSO issues

  In certain configurations (mostly but not exclusively as a VM on Xen) pf
  produced packets with an invalid TCP checksum.

  The problem was that pf could only handle packets with a full checksum. The
  FreeBSD IP stack produces TCP packets with a pseudo-header checksum (only
  addresses, length and protocol).
  Certain network interfaces expect to see the pseudo-header checksum, so they
  end up producing packets with invalid checksums.

  To fix this stop calculating the full checksum and teach pf to only update TCP
  checksums if TSO is disabled or the change affects the pseudo-header checksum.

  PR:             154428, 193579, 198868
  Sponsored by:   RootBSD

Changes:
  stable/9/sys/contrib/pf/net/pf.c
  stable/9/sys/contrib/pf/net/pf_ioctl.c
  stable/9/sys/contrib/pf/net/pf_norm.c
  stable/9/sys/contrib/pf/net/pfvar.h</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>855492</commentid>
    <comment_count>6</comment_count>
    <who name="Kubilay Kocak">koobs</who>
    <bug_when>2015-12-25 15:53:57 +0000</bug_when>
    <thetext>Assign to committer that&apos;s taking care of (resolving) this issue</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>857212</commentid>
    <comment_count>7</comment_count>
    <who name="Kristof Provost">kp</who>
    <bug_when>2016-01-04 22:51:41 +0000</bug_when>
    <thetext>Can anyone who&apos;s affected by this (or PR170081) list the device they&apos;re using?

Unfortunately I do not appear to have any affected hardware, which makes debugging this a little tricky.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>857398</commentid>
    <comment_count>8</comment_count>
      <attachid>165123</attachid>
    <who name="Kristof Provost">kp</who>
    <bug_when>2016-01-05 21:18:45 +0000</bug_when>
    <thetext>Created attachment 165123
Test-patch

Here&apos;s a pretty quick patch which simply disables handling partial checksum offloading in pf. I.e. we treat a partially offloaded checksum as if there&apos;s no checksum offloading at all.

The downside is that we&apos;ll spend CPU time calculating something the interface itself already calculated, but it should fix this problem.
As far as I can tell this would only affect a handful of older cards anyway, and as I don&apos;t have any affected hardware this is likely the best I can do.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>857419</commentid>
    <comment_count>9</comment_count>
    <who name="">dewayne</who>
    <bug_when>2016-01-05 23:55:58 +0000</bug_when>
    <thetext>(In reply to Kristof Provost from comment #8)
Hi Kristof,
I&apos;ve just inserted two, recently purchased new, usb interface cards from J5Create into a 10.2Stable box.  They are recognised as follows:

# Card 1: This is a J5Create JUE125 USB2.0 Ethernet adapter (that I bought new a few weeks ago)
ugen0.4: &lt;vendor 0x0b95&gt; at usbus0
axe0: &lt;vendor 0x0b95 product 0x772b, rev 2.00/0.02, addr 3&gt; on usbus0
miibus0: &lt;MII bus&gt; on axe0
ukphy0: &lt;Generic IEEE 802.3u media interface&gt; PHY 16 on miibus0
ukphy0:  none, 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto, auto-flow
ue0: &lt;USB Ethernet&gt; on axe0
ue0: Ethernet address: 00:05:1b:a4:9f:1c
ue0: link state changed to DOWN
ue0: link state changed to UP

ue0: flags=8802&lt;BROADCAST,SIMPLEX,MULTICAST&gt; metric 0 mtu 1500
        options=8000b&lt;RXCSUM,TXCSUM,VLAN_MTU,LINKSTATE&gt;
        ether 00:05:1b:a4:9f:1c
        nd6 options=29&lt;PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL&gt;
        media: Ethernet autoselect (100baseTX &lt;full-duplex&gt;)
        status: active


# Card 2: J5Create JUE130 USB3.0 Gigabit Ethernet adapter (as above)
ugen0.5: &lt;ASIX Elec.&gt; at usbus0
axge0: &lt;NetworkInterface&gt; on usbus0
miibus1: &lt;MII bus&gt; on axge0
rgephy0: &lt;RTL8169S/8110S/8211 1000BASE-T media interface&gt; PHY 3 on miibus1
rgephy0:  none, 10baseT, 10baseT-FDX, 10baseT-FDX-flow, 100baseTX, 100baseTX-FDX, 100baseTX-FDX-flow, 1000baseT-FDX, 1000baseT-FDX-master, 1000baseT-FDX-flow, 1000baseT-FDX-flow-master, auto, auto-flow
ue1: &lt;USB Ethernet&gt; on axge0
ue1: Ethernet address: 00:05:1b:a1:79:76
ue1: link state changed to DOWN

ue1: flags=8802&lt;BROADCAST,SIMPLEX,MULTICAST&gt; metric 0 mtu 1500
        options=8000b&lt;RXCSUM,TXCSUM,VLAN_MTU,LINKSTATE&gt;
        ether 00:05:1b:a1:79:76
        nd6 options=29&lt;PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL&gt;
        media: Ethernet autoselect (none)
        status: no carrier

The following demonstrates the difference between em1: &lt;Intel(R) PRO/1000 Network Connection 7.4.2&gt; and ue0 that is axe0: &lt;vendor 0x0b95 product 0x772b, rev 2.00/0.02, addr 3&gt;

The source box running pf and 10.2Stable (FreeBSD hathor 10.2-STABLE FreeBSD 10.2-STABLE #0 r293123M: Mon Jan  4 17:36:12 AEDT 2016     root@hathor:/usr/obj/prod/100201/D/K8/pd3/src/sys/hqdev-amd64-smp-vga                  amd64 1002505 1002505)

Source IP: 10.0.7.91 (and jail 10.0.7.92)
Destination: 10.0.7.6 (Running FreeBSD92 and ipfw)

Using a working interface (em1) to a box one hop away and using incorrect ssh key, I&apos;ve listed the first six lines from tcpdump for a negotation between 
A) Using em1 interface between a base system (10.0.7.91) and a remote node
B) Using em1 interface from within a jail (10.0.7.92) 
C) Using ue0 between base 10.0.7.91 
D) Using ue0 between jail 10.0.7.92 

A) 
# tcpdump -s1518 -vni em1 host 10.0.7.6 and port 22
tcpdump: listening on em1, link-type EN10MB (Ethernet), capture size 1518 bytes
09:19:25.943098 IP (tos 0x0, ttl 48, id 26320, offset 0, flags [DF], proto TCP (6), length 60)
    10.0.7.91.52418 &gt; 10.0.7.6.22: Flags [S], cksum 0x228f (incorrect -&gt; 0xef75), seq 2076369872, win 65535, options [mss 1460,nop,wscale 6,sackOK,TS val 90899540 ecr 0], length 0
09:19:25.943317 IP (tos 0x0, ttl 64, id 45550, offset 0, flags [DF], proto TCP (6), length 60)
    10.0.7.6.22 &gt; 10.0.7.91.52418: Flags [S.], cksum 0xef96 (correct), seq 1751036782, ack 2076369873, win 65535, options [mss 1460,nop,wscale 5,sackOK,TS val 324653224 ecr 90899540], length 0
09:19:25.943354 IP (tos 0x0, ttl 48, id 48994, offset 0, flags [DF], proto TCP (6), length 52)
    10.0.7.91.52418 &gt; 10.0.7.6.22: Flags [.], cksum 0x2287 (incorrect -&gt; 0x1653), ack 1, win 2058, options [nop,nop,TS val 90899544 ecr 324653224], length 0
09:19:25.943574 IP (tos 0x0, ttl 64, id 45551, offset 0, flags [DF], proto TCP (6), length 52)
    10.0.7.6.22 &gt; 10.0.7.91.52418: Flags [.], cksum 0x0e48 (correct), ack 1, win 4117, options [nop,nop,TS val 324653224 ecr 90899544], length 0
09:19:25.943862 IP (tos 0x0, ttl 48, id 25543, offset 0, flags [DF], proto TCP (6), length 81)
    10.0.7.91.52418 &gt; 10.0.7.6.22: Flags [P.], cksum 0x22a4 (incorrect -&gt; 0x1540), seq 1:30, ack 1, win 2058, options [nop,nop,TS val 90899544 ecr 324653224], length 29
09:19:26.043316 IP (tos 0x0, ttl 64, id 45552, offset 0, flags [DF], proto TCP (6), length 52)
    10.0.7.6.22 &gt; 10.0.7.91.52418: Flags [.], cksum 0x0dc8 (correct), ack 30, win 4116, options [nop,nop,TS val 324653324 ecr 90899544], length 0

And from a jail using the same interface to a jail
B)
# tcpdump -s1518 -vni em1 host 10.0.7.6 and port 22
tcpdump: listening on em1, link-type EN10MB (Ethernet), capture size 1518 bytes
09:24:12.271961 IP (tos 0x0, ttl 48, id 24663, offset 0, flags [DF], proto TCP (6), length 60)
    10.0.7.92.11369 &gt; 10.0.7.6.22: Flags [S], cksum 0x2290 (incorrect -&gt; 0x81ba), seq 3957334854, win 65535, options [mss 1460,nop,wscale 6,sackOK,TS val 91185872 ecr 0], length 0
09:24:12.272467 IP (tos 0x0, ttl 64, id 45639, offset 0, flags [DF], proto TCP (6), length 60)
    10.0.7.6.22 &gt; 10.0.7.92.11369: Flags [S.], cksum 0x1a60 (correct), seq 2844259951, ack 3957334855, win 65535, options [mss 1460,nop,wscale 5,sackOK,TS val 3406822466 ecr 91185872], length 0
09:24:12.272488 IP (tos 0x0, ttl 48, id 39982, offset 0, flags [DF], proto TCP (6), length 52)
    10.0.7.92.11369 &gt; 10.0.7.6.22: Flags [.], cksum 0x2288 (incorrect -&gt; 0x4120), ack 1, win 2058, options [nop,nop,TS val 91185872 ecr 3406822466], length 0
09:24:12.272710 IP (tos 0x0, ttl 64, id 45640, offset 0, flags [DF], proto TCP (6), length 52)
    10.0.7.6.22 &gt; 10.0.7.92.11369: Flags [.], cksum 0x3915 (correct), ack 1, win 4117, options [nop,nop,TS val 3406822466 ecr 91185872], length 0
09:24:12.273335 IP (tos 0x0, ttl 48, id 54149, offset 0, flags [DF], proto TCP (6), length 81)
    10.0.7.92.11369 &gt; 10.0.7.6.22: Flags [P.], cksum 0x22a5 (incorrect -&gt; 0x400d), seq 1:30, ack 1, win 2058, options [nop,nop,TS val 91185872 ecr 3406822466], length 29
09:24:12.373101 IP (tos 0x0, ttl 64, id 45641, offset 0, flags [DF], proto TCP (6), length 52)
    10.0.7.6.22 &gt; 10.0.7.92.11369: Flags [.], cksum 0x3894 (correct), ack 30, win 4116, options [nop,nop,TS val 3406822567 ecr 91185872], length 0

Disconnecting the cable from that interface and inserting into ue0, changing the external interface in pf and restarting, ue0 has this
C) 
# tcpdump -s1518 -vni ue0 host 10.0.7.6 and port 22
tcpdump: listening on ue0, link-type EN10MB (Ethernet), capture size 1518 bytes
09:33:13.585464 IP (tos 0x0, ttl 48, id 641, offset 0, flags [DF], proto TCP (6), length 60, bad cksum 0 (-&gt;25db)!)
    10.0.7.91.29122 &gt; 10.0.7.6.22: Flags [S], cksum 0x228f (incorrect -&gt; 0xdaf0), seq 1199433362, win 65535, options [mss 1460,nop,wscale 6,sackOK,TS val 91727184 ecr 0], length 0
09:33:13.587153 IP (tos 0x0, ttl 64, id 45967, offset 0, flags [DF], proto TCP (6), length 60)
    10.0.7.6.22 &gt; 10.0.7.91.29122: Flags [S.], cksum 0xe549 (correct), seq 3082007530, ack 1199433363, win 65535, options [mss 1460,nop,wscale 5,sackOK,TS val 4112225500 ecr 91727184], length 0
09:33:13.587175 IP (tos 0x0, ttl 48, id 5810, offset 0, flags [DF], proto TCP (6), length 52, bad cksum 0 (-&gt;11b2)!)
    10.0.7.91.29122 &gt; 10.0.7.6.22: Flags [.], cksum 0x2287 (incorrect -&gt; 0x0c06), ack 1, win 2058, options [nop,nop,TS val 91727188 ecr 4112225500], length 0
09:33:13.587504 IP (tos 0x0, ttl 48, id 39472, offset 0, flags [DF], proto TCP (6), length 81, bad cksum 0 (-&gt;8e16)!)
    10.0.7.91.29122 &gt; 10.0.7.6.22: Flags [P.], cksum 0x22a4 (incorrect -&gt; 0x0af3), seq 1:30, ack 1, win 2058, options [nop,nop,TS val 91727188 ecr 4112225500], length 29
09:33:13.588820 IP (tos 0x0, ttl 64, id 45968, offset 0, flags [DF], proto TCP (6), length 52)
    10.0.7.6.22 &gt; 10.0.7.91.29122: Flags [.], cksum 0x03f9 (correct), ack 1, win 4117, options [nop,nop,TS val 4112225502 ecr 91727188], length 0
09:33:13.688305 IP (tos 0x0, ttl 64, id 45969, offset 0, flags [DF], proto TCP (6), length 52)
    10.0.7.6.22 &gt; 10.0.7.91.29122: Flags [.], cksum 0x0379 (correct), ack 30, win 4116, options [nop,nop,TS val 4112225602 ecr 91727188], length 0

And from a jail
D) 
# tcpdump -s1518 -vni ue0 host 10.0.7.6 and port 22
tcpdump: listening on ue0, link-type EN10MB (Ethernet), capture size 1518 bytes
09:34:25.701515 IP (tos 0x0, ttl 48, id 7850, offset 0, flags [DF], proto TCP (6), length 60, bad cksum 0 (-&gt;9b1)!)
    10.0.7.92.58725 &gt; 10.0.7.6.22: Flags [S], cksum 0x2290 (incorrect -&gt; 0x9b31), seq 2136629531, win 65535, options [mss 1460,nop,wscale 6,sackOK,TS val 91799300 ecr 0], length 0
09:34:25.703204 IP (tos 0x0, ttl 64, id 46014, offset 0, flags [DF], proto TCP (6), length 60)
    10.0.7.6.22 &gt; 10.0.7.92.58725: Flags [S.], cksum 0x47ef (correct), seq 2091274476, ack 2136629532, win 65535, options [mss 1460,nop,wscale 5,sackOK,TS val 269251987 ecr 91799300], length 0
09:34:25.703224 IP (tos 0x0, ttl 48, id 4000, offset 0, flags [DF], proto TCP (6), length 52, bad cksum 0 (-&gt;18c3)!)
    10.0.7.92.58725 &gt; 10.0.7.6.22: Flags [.], cksum 0x2288 (incorrect -&gt; 0x6eab), ack 1, win 2058, options [nop,nop,TS val 91799304 ecr 269251987], length 0
09:34:25.703539 IP (tos 0x0, ttl 48, id 41112, offset 0, flags [DF], proto TCP (6), length 81, bad cksum 0 (-&gt;87ad)!)
    10.0.7.92.58725 &gt; 10.0.7.6.22: Flags [P.], cksum 0x22a5 (incorrect -&gt; 0x6d98), seq 1:30, ack 1, win 2058, options [nop,nop,TS val 91799304 ecr 269251987], length 29
09:34:25.704871 IP (tos 0x0, ttl 64, id 46015, offset 0, flags [DF], proto TCP (6), length 52)
    10.0.7.6.22 &gt; 10.0.7.92.58725: Flags [.], cksum 0x669e (correct), ack 1, win 4117, options [nop,nop,TS val 269251989 ecr 91799304], length 0
09:34:25.804852 IP (tos 0x0, ttl 64, id 46016, offset 0, flags [DF], proto TCP (6), length 52)
    10.0.7.6.22 &gt; 10.0.7.92.58725: Flags [.], cksum 0x661e (correct), ack 30, win 4116, options [nop,nop,TS val 269252089 ecr 91799304], length 0


These dumps are from a failed ssh connection between two nodes so we can see the handshaking experience.  I&apos;ve compressed the content (attached) and provide an abridged content for the PR.

I hope that this provides some clarification that this doesn&apos;t apply to old interfaces, nor complex vm setups ;)

Happy to assist further, as I was about to change our firewall from ipfw to pf but we do use ue (devices)...
Regards, Dewayne.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>857469</commentid>
    <comment_count>10</comment_count>
    <who name="Kristof Provost">kp</who>
    <bug_when>2016-01-06 07:38:24 +0000</bug_when>
    <thetext>(In reply to dewayne from comment #9)
Thanks for the report! It&apos;s useful to know what hardware is affected.
I haven&apos;t yet found a place that&apos;ll sell one to me though.

Can you give the patch a try? It&apos;d be useful to confirm that this really does fix the problem. If nothing else, it&apos;s a good temporary fix, because things will at least start working. We can worry about actually using the partial checksum offloading later, when I get my hands on hardware.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>857629</commentid>
    <comment_count>11</comment_count>
    <who name="">dewayne</who>
    <bug_when>2016-01-06 21:54:40 +0000</bug_when>
    <thetext>(In reply to Kristof Provost from comment #10)

My apologies Kristof, I&apos;m unable to add any value here.

I&apos;m using product ID=0x772b (ASIX Electronics Corporation, an AX88772B 10/100) while Dmitry is using 0x7e2b (we&apos;re using the same vendor 0x0b95), and both devices are regarded as AX88772B.  Unfortunately I was responding to the interface ue0 as being the problem. Regardless, we aren&apos;t comparing apples to oranges - as I am getting successful connections albeit with bad cksums; which I continue to get after disabling pf (via pfctl -d)

References:
Note from /usr/src/sys/dev/usb/net/if_axereg.h
 * This driver does not enable partial checksum feature which will
 * compute 16bit checksum from 14th byte to the end of the frame.  If
 * this feature is enabled, computed checksum value is embedded into
 * RX header which in turn means it uses different RX header format.

Linux drivers are here: http://www.asix.com.tw/download.php?sub=driverdetail&amp;PItemID=86
Documentation: http://www.asix.com.tw/download.php?sub=briefdetail&amp;PItemID=105</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>857632</commentid>
    <comment_count>12</comment_count>
    <who name="Kristof Provost">kp</who>
    <bug_when>2016-01-06 22:19:44 +0000</bug_when>
    <thetext>(In reply to dewayne from comment #11)
Oh, right, I should have caught that too.

It&apos;s pretty normal to see incorrect checkums on outbound packets. The checksum is done by the hardware, so at the point that tcpdump captures them it&apos;s still not calculated.

The bug here (at least to the best of my understanding) is about inbound packets</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>864081</commentid>
    <comment_count>13</comment_count>
    <who name="Kristof Provost">kp</who>
    <bug_when>2016-02-08 20:33:21 +0000</bug_when>
    <thetext>I got my hands on a couple of AX88772 based USB ethernet devices:
&gt; ugen1.2: &lt;vendor 0x0fe6&gt; at usbus1
&gt; udav0: &lt;vendor 0x0fe6 USB 2.0 10100M Ethernet Adaptor, class 0/0, rev 1.10/1.01, add 1&gt; on usbus1
&gt; ue0: &lt;USB Ethernet&gt; on udav0
&gt; ue0: Ethernet address: 00:e0:4c:53:44:58

and:

&gt; ugen1.2: &lt;vendor 0x0b95&gt; at usbus1
&gt; axe0: &lt;vendor 0x0b95 product 0x772b, rev 2.00/0.01, addr 1&gt; on usbus1
&gt; miibus0: &lt;MII bus&gt; on axe0
&gt; ukphy0: &lt;Generic IEEE 802.3u media interface&gt; PHY 16 on miibus0
&gt; ukphy0:  none, 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto, auto-flow
&gt; ue0: &lt;USB Ethernet&gt; on axe0
&gt; ue0: Ethernet address: 00:00:00:00:14:7e

Unfortunately I&apos;m still unable to reproduce this problem. I&apos;m afraid I don&apos;t know what else to do at the moment.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>912925</commentid>
    <comment_count>14</comment_count>
    <who name="Hiren Panchasara">hiren</who>
    <bug_when>2016-12-22 19:54:00 +0000</bug_when>
    <thetext>Agreed upon by kp@.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>165123</attachid>
            <date>2016-01-05 21:18:45 +0000</date>
            <delta_ts>2016-01-05 21:18:45 +0000</delta_ts>
            <desc>Test-patch</desc>
            <filename>pf_fxp_csum.patch</filename>
            <type>text/plain</type>
            <size>1945</size>
            <attacher name="Kristof Provost">kp</attacher>
            
              <data encoding="base64">ZGlmZiAtLWdpdCBhL3N5cy9uZXRwZmlsL3BmL3BmLmMgYi9zeXMvbmV0cGZpbC9wZi9wZi5jCmlu
ZGV4IDU3ZTc4ZTguLmE5MWE2ZmYgMTAwNjQ0Ci0tLSBhL3N5cy9uZXRwZmlsL3BmL3BmLmMKKysr
IGIvc3lzL25ldHBmaWwvcGYvcGYuYwpAQCAtNTYyMyw2ICs1NjIzLDggQEAgYmFkOgogICogIG5l
dHdvcmsgZHJpdmVyIHBlcmZvcm1lZCBja3N1bSwgbmVlZHMgdG8gYWRkaXRpb25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