Re: [PATCH v2] backports: add spatch to handle IFF_NO_QUEUE

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

 



On Wed, Sep 9, 2015 at 2:27 AM, Johannes Berg <johannes@xxxxxxxxxxxxxxxx> wrote:
> From: Johannes Berg <johannes.berg@xxxxxxxxx>
>
> This flag doesn't exist on newer kernels, but replaced the tx_queue_len
> assignment, so can't just be backported to have no effect. Instead, add
> a semantic patch that puts back the tx_queue_len=0 assignment on older
> kernel versions.
>
> Signed-off-by: Johannes Berg <johannes.berg@xxxxxxxxx>
> ---
>  patches/collateral-evolutions/network/0062-iff-no-queue.cocci | 9 +++++++++
>  1 file changed, 9 insertions(+)
>  create mode 100644 patches/collateral-evolutions/network/0062-iff-no-queue.cocci
>
> diff --git a/patches/collateral-evolutions/network/0062-iff-no-queue.cocci b/patches/collateral-evolutions/network/0062-iff-no-queue.cocci
> new file mode 100644
> index 000000000000..9c95b853df18
> --- /dev/null
> +++ b/patches/collateral-evolutions/network/0062-iff-no-queue.cocci
> @@ -0,0 +1,9 @@
> +@@
> +expression E;
> +@@
> +
> ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,3,0)
> + E->priv_flags |= IFF_NO_QUEUE;
> ++#else
> ++E->tx_queue_len = 0;
> ++#endif

Interesting so although priv_flags may be a member name prevalent in
*many* data structures the SmPL rule here is very specific about the
use of IFF_NO_QUEUE as a flag, and since we know that is unique to one
use case we take the liberty over using expression here. Replying just
to annotate this practice and Cc Julia on her thoughts.

 Luis
--
To unsubscribe from this list: send the line "unsubscribe backports" in



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux