Page MenuHomeFreeBSD

net: Remove unneeded NULL check for the allocated ifnet
ClosedPublic

Authored by zlei on Jun 26 2024, 8:58 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Nov 30, 9:00 PM
Unknown Object (File)
Nov 25 2024, 8:16 AM
Unknown Object (File)
Nov 23 2024, 2:17 AM
Unknown Object (File)
Nov 17 2024, 6:11 PM
Unknown Object (File)
Nov 17 2024, 10:31 AM
Unknown Object (File)
Nov 8 2024, 1:40 PM
Unknown Object (File)
Nov 8 2024, 1:36 PM
Unknown Object (File)
Nov 8 2024, 11:43 AM

Details

Summary

Change 4787572d0580 made if_alloc_domain() never fail, then also does the
wrappers if_alloc(), if_alloc_dev() and if_gethandle().

No functional change intended.

MFC after: ???

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

zlei requested review of this revision.Jun 26 2024, 8:58 AM

The full diff is quite large ( about 7 megabytes ). See my dev branch https://github.com/gmshake/freebsd-src/tree/main_if_alloc instead, or I can upload the full diff if requested.

sys/dev/bxe/bxe.c
12988

if_gethandle() was introduced in change 62d76917b867 . In FreeBSD net stack it is just a thin wrapper around if_alloc(). Since 4787572d0580 is a behavior change, I doubt the net stack of Juniper Networks will follow.

Can @glebius comment on that ?

The full diff is quite large ( about 7 megabytes ). See my dev branch https://github.com/gmshake/freebsd-src/tree/main_if_alloc instead, or I can upload the full diff if requested.

I'm not from Juniper :) I would guess Juniper is fine with the proposed changes. They care about IfAPI hiding 'struct ifnet' better and better as time goes by, they don't have a requirement for the API to be never ever changing. I'll add Stephen to reviewers to correct me.

Looks good. I can't answer the wrapper question definitively, but I suspect it will be fine.

The full diff is quite large ( about 7 megabytes ). See my dev branch https://github.com/gmshake/freebsd-src/tree/main_if_alloc instead, or I can upload the full diff if requested.

I'm not from Juniper :) I would guess Juniper is fine with the proposed changes. They care about IfAPI hiding 'struct ifnet' better and better as time goes by, they don't have a requirement for the API to be never ever changing. I'll add Stephen to reviewers to correct me.

Yes, this change is fine.

Landed as aa3860851b9f but it seems Phabricator got fooled.

This revision was not accepted when it landed; it landed in state Needs Review.Jul 1 2024, 5:01 PM
This revision was automatically updated to reflect the committed changes.