Re: [PATCH net] qmi_wwan: Clone the skb when in pass-through mode
flat view
From: Kristian Evensen <hidden>
Date: 2021-06-15 10:52:06
Hi Bjørn, On Tue, Jun 15, 2021 at 12:04 PM Bjørn Mork [off-list ref] wrote:
Yes, FLAG_MULTI_PACKET is only applicable to the qmimux case. But I think Jakub is right that we should set it anyway. There is no way to return from rx_fixup without an error or further processing of the skb, unless we set FLAG_MULTI_PACKET. Or invent something else. But setting that flag and then add the necessary usnet_sb_return call doesn't look too bad?
Just so that I am sure that we are on the same page. What you are suggesting is something like: * Update FLAG_MULTI_PACKET when qmimux is set/unset. * Replace the call to netif_rx() inside qmimux_rx_fixup() with a call to usbnet_skb_return. * I guess we need to keep the code that updates the qmimux interface counters. I guess we can just call this code unconditionally? I think this would be a really nice solution. The same (at least FLAG_MULTI_PACKET + usbnet_skb_return) could be applied to pass through as well, giving us consistent handling of aggregated packets. While we might not save a huge number of lines, I believe the resulting code will be easier to understand. If we agree that this is a good way forward, I can prepare a patch. I have everything set up and ready to go. Kristian