Bug 233607 - [ix] netmap's pkt-gen can not stop transmission at ix0 (same as PR233022)
Summary: [ix] netmap's pkt-gen can not stop transmission at ix0 (same as PR233022)
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: CURRENT
Hardware: Any Any
: --- Affects Only Me
Assignee: Stephen Hurd
URL: https://reviews.freebsd.org/D18368
Keywords: IntelNetworking
Depends on:
Blocks:
 
Reported: 2018-11-28 13:24 UTC by Lev A. Serebryakov
Modified: 2018-12-03 15:19 UTC (History)
1 user (show)

See Also:
koobs: mfc-stable12?


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Lev A. Serebryakov freebsd_committer freebsd_triage 2018-11-28 13:24:18 UTC
I have same problem with ix (X520-DA1) as I had with em/igb (https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=233022)

070.647811 main_thread [2464] 0 pps (0 pkts 0 bps in 1002979 usec) 0.00 avg_batch 99999 min_space
071.000000 sender_body [1647] pending tx tail 316 head 318 on ring 0
071.000020 sender_body [1647] pending tx tail 316 head 318 on ring 0
071.000031 sender_body [1647] pending tx tail 316 head 318 on ring 0
071.000042 sender_body [1647] pending tx tail 316 head 318 on ring 0
071.000052 sender_body [1647] pending tx tail 316 head 318 on ring 0
071.648690 main_thread [2464] 0 pps (0 pkts 0 bps in 1000879 usec) 0.00 avg_batch 99999 min_space
072.000002 sender_body [1647] pending tx tail 316 head 318 on ring 0
072.000020 sender_body [1647] pending tx tail 316 head 318 on ring 0
072.000032 sender_body [1647] pending tx tail 316 head 318 on ring 0
072.000042 sender_body [1647] pending tx tail 316 head 318 on ring 0
072.000052 sender_body [1647] pending tx tail 316 head 318 on ring 0
072.649762 main_thread [2464] 0 pps (0 pkts 0 bps in 1001072 usec) 0.00 avg_batch 99999 min_space
073.000002 sender_body [1647] pending tx tail 316 head 318 on ring 0
073.000014 sender_body [1647] pending tx tail 316 head 318 on ring 0
073.000024 sender_body [1647] pending tx tail 316 head 318 on ring 0
073.000034 sender_body [1647] pending tx tail 316 head 318 on ring 0
073.000044 sender_body [1647] pending tx tail 316 head 318 on ring 0
073.650790 main_thread [2464] 0 pps (0 pkts 0 bps in 1001028 usec) 0.00 avg_batch 99999 min_space
Comment 1 Stephen Hurd freebsd_committer freebsd_triage 2018-11-28 15:25:48 UTC
Yeah, looks like the same issue here too.

Review here: https://reviews.freebsd.org/D18368
Please test, thanks!
Comment 2 Lev A. Serebryakov freebsd_committer freebsd_triage 2018-11-28 15:28:31 UTC
(In reply to Stephen Hurd from comment #1)
I could say, that it helps, as I've did this "fix" two hours ago myself :-)
Comment 3 commit-hook freebsd_committer freebsd_triage 2018-11-28 17:38:06 UTC
A commit references this bug:

Author: shurd
Date: Wed Nov 28 17:37:18 UTC 2018
New revision: 341156
URL: https://svnweb.freebsd.org/changeset/base/341156

Log:
  Fix first-packet completion

  The first packet after the ring is initialized was never
  completed as isc_txd_credits_update() would not include it in the
  count of completed packets. This caused netmap to never complete
  a batch. See PR 233022 for more details.

  This is the same fix as the r340310 for e1000

  PR:		233607
  Reported by:	lev
  Reviewed by:	lev
  MFC after:	3 days
  Sponsored by:	Limelight Networks
  Differential Revision:	https://reviews.freebsd.org/D18368

Changes:
  head/sys/dev/ixgbe/ix_txrx.c
  head/sys/dev/ixl/ixl_txrx.c
Comment 4 commit-hook freebsd_committer freebsd_triage 2018-12-03 15:19:17 UTC
A commit references this bug:

Author: shurd
Date: Mon Dec  3 15:18:35 UTC 2018
New revision: 341427
URL: https://svnweb.freebsd.org/changeset/base/341427

Log:
  MFC r341156:

  Fix first-packet completion

  The first packet after the ring is initialized was never
  completed as isc_txd_credits_update() would not include it in the
  count of completed packets. This caused netmap to never complete
  a batch. See PR 233022 for more details.

  This is the same fix as the r340310 for e1000

  PR:		233607
  Reported by:	lev
  Reviewed by:	lev
  Sponsored by:	Limelight Networks
  Differential Revision:	https://reviews.freebsd.org/D18368

Changes:
_U  stable/12/
  stable/12/sys/dev/ixgbe/ix_txrx.c
  stable/12/sys/dev/ixl/ixl_txrx.c