Bug 248869

Summary: e1000: unsolicited promisc mode during init (post iflib)
Product: Base System Reporter: Franco Fichtner <franco>
Component: kernAssignee: Eric Joyner <erj>
Status: Closed FIXED    
Severity: Affects Some People CC: emaste, erj, net, raul.munoz
Priority: --- Keywords: IntelNetworking, regression
Version: 12.0-RELEASEFlags: erj: maintainer-feedback+
erj: maintainer-feedback+
koobs: mfc-stable12+
koobs: mfc-stable11-
Hardware: Any   
OS: Any   
See Also: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=249191
Attachments:
Description Flags
flags fix none

Description Franco Fichtner 2020-08-24 06:55:23 UTC
Created attachment 217479 [details]
flags fix

Hi,

The iflib rewrite forced the promisc flag but it was not reported to the system.  Noticed on a stock VM that went into unsolicited promisc mode when dhclient was started during bootup.

This also affects CURRENT and is present since 12.0, but marking this as a 12.1-RELEASE issue.

Patch is attached to restore the previous behaviour.


Cheers,
Franco
Comment 1 Kubilay Kocak freebsd_committer freebsd_triage 2020-08-24 11:38:32 UTC
Thanks for the report and patch Franco
Comment 2 Eric Joyner freebsd_committer freebsd_triage 2020-08-26 16:47:23 UTC
This looks good to me. This would match the behavior of em_set_promisc() in  em_init() in the non-iflib version of em(4).
Comment 3 Franco Fichtner 2020-08-26 18:02:48 UTC
Thanks!  Is there any chance to get this into 12.1-RELEASE as errata as well?

As a related issue hw.em.sbp changed defaults at the same time:

https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=248934


Cheers,
Franco
Comment 4 Eric Joyner freebsd_committer freebsd_triage 2020-09-15 17:09:25 UTC
I guess I should take care of committing this then? I doubt we'll do a 12.1 errata because 12.2 is so close to release. I can work on getting this merged there.
Comment 5 Franco Fichtner 2020-09-15 17:57:09 UTC
Sorry, I'm not a FreeBSD committer.

12.2 sounds fine.  Thanks!
Comment 6 commit-hook freebsd_committer freebsd_triage 2020-09-15 21:08:01 UTC
A commit references this bug:

Author: erj
Date: Tue Sep 15 21:07:30 UTC 2020
New revision: 365776
URL: https://svnweb.freebsd.org/changeset/base/365776

Log:
  e1000: Properly retain promisc flag

  From Franco:
  The iflib rewrite forced the promisc flag but it was not reported
  to the system.  Noticed on a stock VM that went into unsolicited
  promisc mode when dhclient was started during bootup.

  PR:		248869
  Submitted by:	Franco Fichtner <franco@opnsense.org>
  Reviewed by:	erj@
  MFC after:	3 days

Changes:
  head/sys/dev/e1000/if_em.c
Comment 7 commit-hook freebsd_committer freebsd_triage 2020-09-21 22:53:46 UTC
A commit references this bug:

Author: erj
Date: Mon Sep 21 22:52:58 UTC 2020
New revision: 365983
URL: https://svnweb.freebsd.org/changeset/base/365983

Log:
  MFC r365774 and r365776

  These two commits fix issues in em(4)/igb(4):
  - Fix define and includes with RSS option enabled
  - Properly retain promisc flag in init

  PR:		249191, 248869
  MFC after:	1 day

Changes:
_U  stable/12/
  stable/12/sys/dev/e1000/if_em.c
  stable/12/sys/dev/e1000/if_em.h
Comment 8 commit-hook freebsd_committer freebsd_triage 2020-09-23 23:57:05 UTC
A commit references this bug:

Author: erj
Date: Wed Sep 23 23:56:50 UTC 2020
New revision: 366097
URL: https://svnweb.freebsd.org/changeset/base/366097

Log:
  MFS r365983

  Contains fixes for issues in em(4)/igb(4):
  - Fix define and includes with RSS option enabled
  - Properly retain promisc flag in init

  PR:		249191, 248869
  Approved by:	re (gjb@)

Changes:
_U  releng/12.2/
  releng/12.2/sys/dev/e1000/if_em.c
  releng/12.2/sys/dev/e1000/if_em.h
Comment 9 Kubilay Kocak freebsd_committer freebsd_triage 2020-09-25 08:36:29 UTC
^Triage : If there are no further commits or merges, please resolve -> FIXED

Thanks Eric
Comment 10 Eric Joyner freebsd_committer freebsd_triage 2020-09-25 22:10:57 UTC
Thanks for the patch, Franco.