Submit #3126
closedBring in BIOC{S,G}FEEDBACK
Added by tuxillo over 6 years ago. Updated over 6 years ago.
100%
Description
Hi,
The port net/vde2 uses a ioctl command BIOCFEEDBACK for FreeBSD to allow host-guest communication in a vde switch. The attached patch is the initial attempt to bring that ioctl command from NetBSD.
It compiles but it's untested until I figure out how to test it.
I'd need some pointers though:
- Is it okay to use directly ifp->if_input directly? Isn't there a mechanism similar to the one used in bpfwrite() > bpf_output_dispatch but for input? If it's okay to use ifp->if_input directly, wouldn't it need some locking?
Cheers,
Antonio Huete
Files
bpf_biocfeedback.patch (3.37 KB) bpf_biocfeedback.patch | tuxillo, 04/18/2018 01:39 AM |
Updated by sepherosa over 6 years ago
This is wrong. You should move the change to bpf_output_dispatch().
And before calling if_input, make sure to clear the M_HASH on the
duplicated mbuf's m_flags.
On Sat, Mar 31, 2018 at 8:13 AM,
<bugtracker-admin@leaf.dragonflybsd.org> wrote:
Issue #3126 has been reported by tuxillo.
----------------------------------------
Submit #3126: Bring in BIOC{S,G}FEEDBACK
http://bugs.dragonflybsd.org/issues/3126
- Author: tuxillo
- Status: New
- Priority: Normal
- Assignee:
- Category:
- Target version:
----------------------------------------
Hi,The port net/vde2 uses a ioctl command BIOCFEEDBACK for FreeBSD to allow host-guest communication in a vde switch. The attached patch is the initial attempt to bring that ioctl command from NetBSD.
It compiles but it's untested until I figure out how to test it.I'd need some pointers though:
- Is it okay to use directly ifp->if_input directly? Isn't there a mechanism similar to the one used in bpfwrite()
> bpf_output_dispatch but for input?If it's okay to use ifp->if_input directly, wouldn't it need some locking?Cheers,
Antonio Huete---Files--------------------------------
bpf_biocfeedback.patch (3.28 KB)--
You have received this notification because you have either subscribed to it, or are involved in it.
To change your notification preferences, please click here: http://bugs.dragonflybsd.org/my/account
--
Tomorrow Will Never Die
Updated by tuxillo over 6 years ago
- File bpf_biocfeedback.patch added
- Category set to net
- Status changed from New to In Progress
- Assignee set to tuxillo
Hi Sephe,
See attached the new patch, I've deleted the previous one.
Regards,
Antonio Huete
Updated by sepherosa over 6 years ago
Line 607~608 are wrong, they probably should be:
if (mc != NULL) {
if (error == 0) {
/* the if_input part */
} else {
m_freem(mc);
}
}
Line 658~659 are wrong, you will have to unconditionally initialize nm_feedback.
Thanks,
sephe
On Wed, Apr 4, 2018 at 1:50 AM, <bugtracker-admin@leaf.dragonflybsd.org> wrote:
Issue #3126 has been updated by tuxillo.
File bpf_biocfeedback.patch added
Category set to net
Status changed from New to In Progress
Assignee set to tuxilloHi Sephe,
See attached the new patch, I've deleted the previous one.
Regards,
Antonio Huete----------------------------------------
Submit #3126: Bring in BIOC{S,G}FEEDBACK
http://bugs.dragonflybsd.org/issues/3126#change-13400
- Author: tuxillo
- Status: In Progress
- Priority: Normal
- Assignee: tuxillo
- Category: net
- Target version:
----------------------------------------
Hi,The port net/vde2 uses a ioctl command BIOCFEEDBACK for FreeBSD to allow host-guest communication in a vde switch. The attached patch is the initial attempt to bring that ioctl command from NetBSD.
It compiles but it's untested until I figure out how to test it.I'd need some pointers though:
- Is it okay to use directly ifp->if_input directly? Isn't there a mechanism similar to the one used in bpfwrite()
> bpf_output_dispatch but for input?If it's okay to use ifp->if_input directly, wouldn't it need some locking?Cheers,
Antonio Huete---Files--------------------------------
bpf_biocfeedback.patch (3.33 KB)--
You have received this notification because you have either subscribed to it, or are involved in it.
To change your notification preferences, please click here: http://bugs.dragonflybsd.org/my/account
--
Tomorrow Will Never Die
Updated by tuxillo over 6 years ago
- File bpf_biocfeedback.patch bpf_biocfeedback.patch added
Attached the patch with the corrections. By the way, who frees the mc mbuf which is passed to ifp->if_input ?
Updated by sepherosa over 6 years ago
network stack :)
On Wed, Apr 18, 2018 at 4:40 PM,
<bugtracker-admin@leaf.dragonflybsd.org> wrote:
Issue #3126 has been updated by tuxillo.
File bpf_biocfeedback.patch added
Attached the patch with the corrections. By the way, who frees the mc mbuf which is passed to ifp->if_input ?
----------------------------------------
Submit #3126: Bring in BIOC{S,G}FEEDBACK
http://bugs.dragonflybsd.org/issues/3126#change-13413
- Author: tuxillo
- Status: In Progress
- Priority: Normal
- Assignee: tuxillo
- Category: net
- Target version:
----------------------------------------
Hi,The port net/vde2 uses a ioctl command BIOCFEEDBACK for FreeBSD to allow host-guest communication in a vde switch. The attached patch is the initial attempt to bring that ioctl command from NetBSD.
It compiles but it's untested until I figure out how to test it.I'd need some pointers though:
- Is it okay to use directly ifp->if_input directly? Isn't there a mechanism similar to the one used in bpfwrite()
> bpf_output_dispatch but for input?If it's okay to use ifp->if_input directly, wouldn't it need some locking?Cheers,
Antonio Huete---Files--------------------------------
bpf_biocfeedback.patch (3.37 KB)--
You have received this notification because you have either subscribed to it, or are involved in it.
To change your notification preferences, please click here: http://bugs.dragonflybsd.org/my/account
--
Tomorrow Will Never Die
Updated by sepherosa over 6 years ago
Patch looks good. Commit it!
On Wed, Apr 18, 2018 at 4:45 PM, Sepherosa Ziehau <sepherosa@gmail.com> wrote:
network stack :)
On Wed, Apr 18, 2018 at 4:40 PM,
<bugtracker-admin@leaf.dragonflybsd.org> wrote:Issue #3126 has been updated by tuxillo.
File bpf_biocfeedback.patch added
Attached the patch with the corrections. By the way, who frees the mc mbuf which is passed to ifp->if_input ?
----------------------------------------
Submit #3126: Bring in BIOC{S,G}FEEDBACK
http://bugs.dragonflybsd.org/issues/3126#change-13413
- Author: tuxillo
- Status: In Progress
- Priority: Normal
- Assignee: tuxillo
- Category: net
- Target version:
----------------------------------------
Hi,The port net/vde2 uses a ioctl command BIOCFEEDBACK for FreeBSD to allow host-guest communication in a vde switch. The attached patch is the initial attempt to bring that ioctl command from NetBSD.
It compiles but it's untested until I figure out how to test it.I'd need some pointers though:
- Is it okay to use directly ifp->if_input directly? Isn't there a mechanism similar to the one used in bpfwrite()
> bpf_output_dispatch but for input?If it's okay to use ifp->if_input directly, wouldn't it need some locking?Cheers,
Antonio Huete---Files--------------------------------
bpf_biocfeedback.patch (3.37 KB)--
You have received this notification because you have either subscribed to it, or are involved in it.
To change your notification preferences, please click here: http://bugs.dragonflybsd.org/my/account--
Tomorrow Will Never Die
--
Tomorrow Will Never Die
Updated by tuxillo over 6 years ago
- Status changed from In Progress to Closed
- % Done changed from 0 to 100
Applied in changeset 25d01c1b8476383c05d72376b14eebd47c934708.