All of lore.kernel.org
 help / color / mirror / Atom feed
From: Hauke Mehrtens <hauke@hauke-m.de>
To: Stefan Assmann <sassmann@kpanic.de>, backports@vger.kernel.org
Cc: mcgrof@do-not-panic.com
Subject: Re: [PATCH 1/4] backports: replace igb skb->no_fcs patch with semantic patch
Date: Wed, 03 Jun 2015 22:13:09 +0200	[thread overview]
Message-ID: <556F5FD5.4070003@hauke-m.de> (raw)
In-Reply-To: <1433330756-22733-2-git-send-email-sassmann@kpanic.de>

On 06/03/2015 01:25 PM, Stefan Assmann wrote:
> Signed-off-by: Stefan Assmann <sassmann@kpanic.de>
> ---
>  .../network/0035-skb_no_fcs/igb_skb_no_fcs.patch           | 14 --------------
>  .../network/0035-skb_no_fcs/skb_no_fcs.cocci               |  7 +++++++
>  2 files changed, 7 insertions(+), 14 deletions(-)
>  delete mode 100644 patches/collateral-evolutions/network/0035-skb_no_fcs/igb_skb_no_fcs.patch
>  create mode 100644 patches/collateral-evolutions/network/0035-skb_no_fcs/skb_no_fcs.cocci
> 
> diff --git a/patches/collateral-evolutions/network/0035-skb_no_fcs/igb_skb_no_fcs.patch b/patches/collateral-evolutions/network/0035-skb_no_fcs/igb_skb_no_fcs.patch
> deleted file mode 100644
> index f659bfd..0000000
> --- a/patches/collateral-evolutions/network/0035-skb_no_fcs/igb_skb_no_fcs.patch
> +++ /dev/null
> @@ -1,14 +0,0 @@
> ---- a/drivers/net/ethernet/intel/igb/igb_main.c
> -+++ b/drivers/net/ethernet/intel/igb/igb_main.c
> -@@ -4782,9 +4782,10 @@ static u32 igb_tx_cmd_type(struct sk_buf
> - 	cmd_type |= IGB_SET_FLAG(tx_flags, IGB_TX_FLAGS_TSTAMP,
> - 				 (E1000_ADVTXD_MAC_TSTAMP));
> - 
> -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0)
> - 	/* insert frame checksum */
> - 	cmd_type ^= IGB_SET_FLAG(skb->no_fcs, 1, E1000_ADVTXD_DCMD_IFCS);
> --
> -+#endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0) */
> - 	return cmd_type;
> - }
> - 
> diff --git a/patches/collateral-evolutions/network/0035-skb_no_fcs/skb_no_fcs.cocci b/patches/collateral-evolutions/network/0035-skb_no_fcs/skb_no_fcs.cocci
> new file mode 100644
> index 0000000..703c227
> --- /dev/null
> +++ b/patches/collateral-evolutions/network/0035-skb_no_fcs/skb_no_fcs.cocci
> @@ -0,0 +1,7 @@
> +@r1@
> +expression E1,E2;
> +struct sk_buff *skb;
> +@@
> ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,18,0)
> + E1 ^= E2(..., skb->no_fcs, ...)
> ++#endif /* if LINUX_VERSION_CODE >= KERNEL_VERSION(3,18,0) */
> 

Is it always save to just remove something which accesses skb->no_fcs in
all cases? I think sometimes some special handling for older kernel
version could be needed. This also looks very specific to the igb usage.

Hauke

  reply	other threads:[~2015-06-03 20:13 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-03 11:25 [PATCH 0/4] backports: more generic ethernet patches Stefan Assmann
2015-06-03 11:25 ` [PATCH 1/4] backports: replace igb skb->no_fcs patch with semantic patch Stefan Assmann
2015-06-03 20:13   ` Hauke Mehrtens [this message]
2015-06-04  9:08     ` Stefan Assmann
2015-06-08 22:09       ` Luis R. Rodriguez
2015-06-09  6:46         ` Stefan Assmann
2015-06-09 18:24           ` Luis R. Rodriguez
2015-06-09 21:46             ` Hauke Mehrtens
2015-06-09 22:12               ` Luis R. Rodriguez
2015-06-03 11:25 ` [PATCH 2/4] backports: replace igb ethtool_cmd_mdix " Stefan Assmann
2015-06-03 11:25 ` [PATCH 3/4] backports: replace igb xmit_more " Stefan Assmann
2015-06-03 11:25 ` [PATCH 4/4] backports: replace igb pfmemalloc " Stefan Assmann
2015-06-09 22:15 ` [PATCH 0/4] backports: more generic ethernet patches Luis R. Rodriguez

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=556F5FD5.4070003@hauke-m.de \
    --to=hauke@hauke-m.de \
    --cc=backports@vger.kernel.org \
    --cc=mcgrof@do-not-panic.com \
    --cc=sassmann@kpanic.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.