Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make bpf interop consistent with if_loop #876

Closed
wants to merge 1 commit into from

Conversation

PHSpline
Copy link
Contributor

@PHSpline PHSpline commented Oct 22, 2023

The pseudo_AF_HDRCMPLT check is already being done in if_loop and just needed to be ported over to if_ic, if_wg, if_disc, if_gif, if_gre, if_me, if_tuntap and ng_iface. This is needed in order to allow these interfaces to work properly with e.g., tcpreplay.

PR: 256587

@markjdb
Copy link
Member

markjdb commented Nov 2, 2023

I think this patch looks good. I wonder why we set a special sa_family to begin with - it looks like BPF can just set bd_hdrcmplt and avoid using pseudo_AF_HDRCMPLT. That would let us avoid adding these new branches to the data path.

@bsdimp
Copy link
Member

bsdimp commented Apr 11, 2024

I think this patch looks good. I wonder why we set a special sa_family to begin with - it looks like BPF can just set bd_hdrcmplt and avoid using pseudo_AF_HDRCMPLT. That would let us avoid adding these new branches to the data path.

I'm a little unclear what you are saying here @markjdb. Are you requesting this change? Or are you saying this change is good and that might be a good followup?

@bsdimp bsdimp self-assigned this Apr 11, 2024
@bsdimp
Copy link
Member

bsdimp commented Apr 11, 2024

(I ticked needs-review so I'll check back for Mark's answer later)

The pseudo_AF_HDRCMPLT check is already being done in if_loop and
just needed to be ported over to if_ic, if_wg, if_disc, if_gif,
if_gre, if_me, if_tuntap and ng_iface.  This is needed in order to
allow these interfaces to work properly with e.g., tcpreplay.

PR:	256587
@markjdb
Copy link
Member

markjdb commented Apr 19, 2024

I think this patch looks good. I wonder why we set a special sa_family to begin with - it looks like BPF can just set bd_hdrcmplt and avoid using pseudo_AF_HDRCMPLT. That would let us avoid adding these new branches to the data path.

I'm a little unclear what you are saying here @markjdb. Are you requesting this change? Or are you saying this change is good and that might be a good followup?

I'm not requesting the change, I just think it's a better way to go in the future. I'll merge this patch now.

@markjdb
Copy link
Member

markjdb commented Apr 19, 2024

Merged, thank you.

@markjdb markjdb closed this Apr 19, 2024
freebsd-git pushed a commit that referenced this pull request Apr 19, 2024
The pseudo_AF_HDRCMPLT check is already being done in if_loop and
just needed to be ported over to if_ic, if_wg, if_disc, if_gif,
if_gre, if_me, if_tuntap and ng_iface.  This is needed in order to
allow these interfaces to work properly with e.g., tcpreplay.

PR:		256587
Reviewed by:	markj
MFC after:	2 weeks
Pull Request:	#876
@PHSpline PHSpline deleted the fixbpf branch April 19, 2024 22:40
freebsd-git pushed a commit that referenced this pull request May 8, 2024
The pseudo_AF_HDRCMPLT check is already being done in if_loop and
just needed to be ported over to if_ic, if_wg, if_disc, if_gif,
if_gre, if_me, if_tuntap and ng_iface.  This is needed in order to
allow these interfaces to work properly with e.g., tcpreplay.

PR:		256587
Reviewed by:	markj
MFC after:	2 weeks
Pull Request:	#876

(cherry picked from commit 2cb0fce)
fichtner pushed a commit to opnsense/src that referenced this pull request May 29, 2024
The pseudo_AF_HDRCMPLT check is already being done in if_loop and
just needed to be ported over to if_ic, if_wg, if_disc, if_gif,
if_gre, if_me, if_tuntap and ng_iface.  This is needed in order to
allow these interfaces to work properly with e.g., tcpreplay.

PR:		256587
Reviewed by:	markj
MFC after:	2 weeks
Pull Request:	freebsd/freebsd-src#876

(cherry picked from commit 2cb0fce)
fichtner pushed a commit to opnsense/src that referenced this pull request Jun 3, 2024
The pseudo_AF_HDRCMPLT check is already being done in if_loop and
just needed to be ported over to if_ic, if_wg, if_disc, if_gif,
if_gre, if_me, if_tuntap and ng_iface.  This is needed in order to
allow these interfaces to work properly with e.g., tcpreplay.

PR:		256587
Reviewed by:	markj
MFC after:	2 weeks
Pull Request:	freebsd/freebsd-src#876

(cherry picked from commit 2cb0fce)
bsdjhb pushed a commit to bsdjhb/cheribsd that referenced this pull request Aug 9, 2024
The pseudo_AF_HDRCMPLT check is already being done in if_loop and
just needed to be ported over to if_ic, if_wg, if_disc, if_gif,
if_gre, if_me, if_tuntap and ng_iface.  This is needed in order to
allow these interfaces to work properly with e.g., tcpreplay.

PR:		256587
Reviewed by:	markj
MFC after:	2 weeks
Pull Request:	freebsd/freebsd-src#876
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants