Port-xen archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: feature-rx-copy support in domU xennet



On Sat, Oct 16, 2010 at 03:29:53AM +0200, Jean-Yves Migeon wrote:
> Hi list,
> 
> Based on Hideki ONO work [1] (whom I gratefully thank for it!) for
> proposing a patch implementing feature-rx-copy inside NetBSD's domU, I
> would appreciate to have a quick review-before-commit for mine (attached).
> 
> Although it looks big, the modifications are small; it is just a matter
> of putting if() in the right place, and replace xengnt_revoke_transfer
> with xengnt_revoke_access (or grant_transfer with grant_access). Mem
> barriers are already handled by the xennet handler.
> 
> The biggest differences between feature-rx-copy and flip being:
> - rx-copy is the only mode supported in dom0 pv_ops Linux kernel
> - rx-copy moves RX packet between dom0 and domU by copying them. The
> grant entries are based on access read/write rules.
> - flip moves pages between a dom0 and domU. Instead of copying, it
> updates PD/PT to map/unmap these pages. Grant entries for flip are based
> on transfer rights between domains.
> 
> According to some, rx-copy is supposed to perform better than flip.
> Frankly, I am not sure about it; I would rather say that it depends on
> the situation (large TCP windows may benefit from large page support, I
> guess, but I am not certain that Xen ring I/O can support that).
> 
> Anyway: opinions? Thanks!

Could you relace the
if (sc->sc_rx_feature == FEATURE_RX_FLIP) {
}
if (sc->sc_rx_feature == FEATURE_RX_COPY) {
}

with switch/case statements (and panic in the default case) ?
otherwise, looks good.
thanks !

-- 
Manuel Bouyer <bouyer%antioche.eu.org@localhost>
     NetBSD: 26 ans d'experience feront toujours la difference
--


Home | Main Index | Thread Index | Old Index