Re: [PATCH v3 net-next 3/4] ixgbe: Add support for ndo_ll_poll

From: Or Gerlitz
Date: Mon May 20 2013 - 16:20:11 EST


On Mon, May 20, 2013 at 1:16 PM, Eliezer Tamir
<eliezer.tamir@xxxxxxxxxxxxxxx> wrote:
> Add the ixgbe driver code implementing ndo_ll_poll.
> It should be easy for other drivers to do something similar
> in order to enable support for CONFIG_INET_LL_RX_POLL

I am not sure,


> --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
> +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
[...]
> @@ -144,6 +145,14 @@ static int debug = -1;
> module_param(debug, int, 0);
> MODULE_PARM_DESC(debug, "Debug level (0=none,...,16=all)");
>
> +#ifdef CONFIG_INET_LL_RX_POLL
> +static int allow_unsafe_removal;
> +static int unsafe_to_remove;
> +module_param(allow_unsafe_removal, int, 0);
> +MODULE_PARM_DESC(allow_unsafe_removal,
> + "Allow removal of module after low latency receive was used");
> +#endif

what?!

[...]

> +#ifdef CONFIG_INET_LL_RX_POLL
> +/* must be called with local_bh_disable()d */
> +static int ixgbe_low_latency_recv(struct napi_struct *napi)
> +{
> + struct ixgbe_q_vector *q_vector =
> + container_of(napi, struct ixgbe_q_vector, napi);
> + struct ixgbe_adapter *adapter = q_vector->adapter;
> + struct ixgbe_ring *ring;
> + int found;
> +
> + if (unlikely(!unsafe_to_remove)) {
> + unsafe_to_remove = 1;
> + if (!allow_unsafe_removal) {
> + pr_info("module may no longer be removed\n");
> + try_module_get(THIS_MODULE);
> + }
> + }

guys, so what is going here, you were asking to put this series in
net-next, and you expect each other driver implementing this ndo to
follow this undocumented hack? or maybe this code was just left here
by mistake from previous implementations and just needed to be
removed? please clarify.

Or.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/