diff options
author | Wei Liu <wei.liu2@citrix.com> | 2013-05-07 16:54:56 +0200 |
---|---|---|
committer | Jan Beulich <jbeulich@suse.com> | 2013-05-07 16:54:56 +0200 |
commit | 723a375f4e283f2d2b730e98cf6f6cc226423a7f (patch) | |
tree | 726d2611bd7ecf67316dd7a105be146d76e3b0fb | |
parent | df76bf093ee29324b57267154232d0d792c8de43 (diff) | |
download | xen-723a375f4e283f2d2b730e98cf6f6cc226423a7f.tar.gz xen-723a375f4e283f2d2b730e98cf6f6cc226423a7f.tar.bz2 xen-723a375f4e283f2d2b730e98cf6f6cc226423a7f.zip |
netif: define XEN_NETIF_NR_SLOTS_MIN in public header
Xen network protocol has implicit dependency on MAX_SKB_FRAGS. In order to
remove dependency on MAX_SKB_FRAGS, we derive a constant from historical
MAX_SKB_FRAGS for future reference.
Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Keir Fraser <keir@xen.org>
-rw-r--r-- | xen/include/public/io/netif.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/xen/include/public/io/netif.h b/xen/include/public/io/netif.h index ccde53b3af..9664998f05 100644 --- a/xen/include/public/io/netif.h +++ b/xen/include/public/io/netif.h @@ -31,6 +31,24 @@ #include "../grant_table.h" /* + * Older implementation of Xen network frontend / backend has an + * implicit dependency on the MAX_SKB_FRAGS as the maximum number of + * ring slots a skb can use. Netfront / netback may not work as + * expected when frontend and backend have different MAX_SKB_FRAGS. + * + * A better approach is to add mechanism for netfront / netback to + * negotiate this value. However we cannot fix all possible + * frontends, so we need to define a value which states the minimum + * slots backend must support. + * + * The minimum value derives from older Linux kernel's MAX_SKB_FRAGS + * (18), which is proved to work with most frontends. Any new backend + * which doesn't negotiate with frontend should expect frontend to + * send a valid packet using slots up to this value. + */ +#define XEN_NETIF_NR_SLOTS_MIN 18 + +/* * Notifications after enqueuing any type of message should be conditional on * the appropriate req_event or rsp_event field in the shared ring. * If the client sends notification for rx requests then it should specify |