HomeFreeBSD

mlx4, mlx5: Eliminate redundent NULL check for packet filter

Description

mlx4, mlx5: Eliminate redundent NULL check for packet filter

mlx4 and mlx5 are Ethernet devices and ether_ifattach() does an
unconditional bpfattach(). From commit 16d878cc99ef [1] and on, we
should not check ifp->if_bpf to tell us whether or not we have any bpf
peers that might be interested in receiving packets. And since commit
2b9600b4497b [2], ifp->if_bpf can not be NULL even after the network
interface has been detached.

No functional change intended.

  1. 16d878cc99ef Fix the following bpf(4) race condition which can result in a panic
  2. 2b9600b4497b Add dead_bpf_if structure, that should be used as fake bpf_if during ifnet detach

Reviewed by: kp, kib
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D45196

(cherry picked from commit 2439ae948352766f6b993c5103a4c516376bec28)
(cherry picked from commit d98ced6588b522e8833888bc99b7b9468312b221)

Details

Provenance
zleiAuthored on Tue, May 28, 4:46 AM
Reviewer
kp
Differential Revision
D45196: mlx4, mlx5: Eliminate redundent check for NULL packet filter
Parents
rGa30b941ea739: Don't package /var/db/locate.database
Branches
Unknown
Tags
Unknown