The current bridge utility doesn't seem to support packets which has been
split into multiple fragments.
Presence of multiple fragments is indicated by NS_MOREFRAG flag.
Differential D27877
Support for NS_MOREFRAG in Netmap bridge utility rajesh1.kumar_amd.com on Jan 1 2021, 12:16 PM. Authored by Tags None Referenced Files
Subscribers
Details The current bridge utility doesn't seem to support packets which has been Presence of multiple fragments is indicated by NS_MOREFRAG flag. Can be tested with any driver which splits the packets into multiple
Diff Detail
Event TimelineComment Actions Good catch, thanks. However, I think the change you proposed for the copy case (no zerocopy) is not correct, because there is no guarantee that you have space in the destination netmap buffer (txbuf). You could add some boundary check, but in any case this would change the program semantics and add complexity. I prepared a much simpler patch that should fix your problem: Comment Actions @vmaffione, Thanks for the simplified patch. Network bridging with and without zerocopy is working properly (it needs D27799 netmap_txsync changes) Actually, the changes to the non-zerocopy case has been done before making the iflib changes in netmap_txsync. So, we retained those changes. Anyway, we can change it to your simplified change. Will you be pushing in that change? Just a question regarding the destination netmap buffer size. In my case, I verified this copy case changes with axgbe driver where split header is enabled. So, the fragments in this case, will sum up to maximum of receive buffer size (which is by default 2048 when MTU is 1500 and 4096 when MTU is 9000). So, Is it possible for other drivers to have sum of all fragments larger than the receive buffer size? If not, we may not run into a situation where destination buffer doesn't suffice right? Comment Actions Il giorno mer 6 gen 2021 alle ore 20:01 rajesh1.kumar_amd.com (Rajesh
independently on D27799, although of course you need the latter to perform
Done. We should therefore close this review.
When supported by the driver, the NS_MOREFRAG allows your netmap
Comment Actions
Sure. I am Abandoning this Revision. Let me know if any further action is needed.
Thanks for the explanation @vmaffione Sorry about a confusion here. The fragmentation I meant here is in case of split header. I understand sum of all fragments split based on MTU size/receive buffer size will be more than a single receive buffer size. But I meant about a single fragment being split again on split header case. For Eg: If Receive buffer is configured as 4K. I may receive a 9K packet split into 3 fragments (4K, 4K & 1K roughly). But each of these fragments can again be split into two fragments in case of split header (256B header+ Rest of 4K data, 0B header+ 4K data, 0B header + 1K data roughly). I meant about this fragmentation. In my netmap bridging test, the fragments which I am handling here is the split header fragments. So, I thought sum of these fragments will not exceed the receive buffer size and made those "copy" path changes. So, can we use NS_MOREFRAG for these fragments or should they be handled at iflib/driver level? Since I am abandoning this revision, shall we take this discussion to D27799 thread? Comment Actions Abandoning this revision as the necessary fix is done as part of D27980. Thanks @vmaffione for the review and fix. Comment Actions Il giorno ven 8 gen 2021 alle ore 10:37 rajesh1.kumar_amd.com (Rajesh
You are always free to write/fork a custom applications which does
useful (once the panics are gone), irrespectively on axgbe.
|