From: "De Lara Guarch, Pablo" <pablo.de.lara.guarch@intel.com>
To: Thomas Monjalon <thomas.monjalon@6wind.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH] kni: fix compilation issue on kernel 3.19
Date: Sun, 22 Mar 2015 18:03:23 +0000 [thread overview]
Message-ID: <E115CCD9D858EF4F90C690B0DCB4D8972727A68C@IRSMSX108.ger.corp.intel.com> (raw)
In-Reply-To: <1426891155.RSIx7FYEKj@xps13>
Hi Thomas,
> -----Original Message-----
> From: Thomas Monjalon [mailto:thomas.monjalon@6wind.com]
> Sent: Friday, March 20, 2015 9:23 PM
> To: De Lara Guarch, Pablo
> Cc: dev@dpdk.org
> Subject: Re: [dpdk-dev] [PATCH] kni: fix compilation issue on kernel 3.19
>
> Hi Pablo,
>
> 2015-03-12 17:24, Pablo de Lara:
> > Due to API changes in functions ndo_dflt_bridge_getlink
> > and igb_ndo_fdb_add in kernel 3.19, DPDK would not build.
>
> Please provide the Linux commit id for this change.
>
> > This patch solves the problem, by checking the kernel version
> > and adding the necessary new parameters
> >
> > Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
> > ---
> > lib/librte_eal/linuxapp/kni/ethtool/igb/igb_main.c | 7 +++++++
> > lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h | 3 +++
> > 2 files changed, 10 insertions(+), 0 deletions(-)
> >
> > diff --git a/lib/librte_eal/linuxapp/kni/ethtool/igb/igb_main.c
> b/lib/librte_eal/linuxapp/kni/ethtool/igb/igb_main.c
> > index a802a02..24b147d 100644
> > --- a/lib/librte_eal/linuxapp/kni/ethtool/igb/igb_main.c
> > +++ b/lib/librte_eal/linuxapp/kni/ethtool/igb/igb_main.c
> > @@ -2103,6 +2103,9 @@ static int igb_set_features(struct net_device
> *netdev,
> > static int igb_ndo_fdb_add(struct ndmsg *ndm, struct nlattr *tb[],
> > struct net_device *dev,
> > const unsigned char *addr,
> > +#ifdef HAVE_NDO_FDB_ADD_VID
> > + u16 vid,
> > +#endif
> > u16 flags)
> > #else
>
> You should explain in commit message why the change is not needed in
> #else
> (!USE_CONST_DEV_UC_CHAR for version < 3.7).
>
> > static int igb_ndo_fdb_add(struct ndmsg *ndm,
> > @@ -2259,7 +2262,11 @@ static int igb_ndo_bridge_getlink(struct sk_buff
> *skb, u32 pid, u32 seq,
> > else
> > mode = BRIDGE_MODE_VEPA;
> >
> > +#ifdef HAVE_NDO_FDB_ADD_VID
> > + return ndo_dflt_bridge_getlink(skb, pid, seq, dev, mode, 0, 0);
> > +#else
> > return ndo_dflt_bridge_getlink(skb, pid, seq, dev, mode);
> > +#endif /* HAVE_NDO_FDB_ADD_VID */
> > }
> > #endif /* HAVE_BRIDGE_ATTRIBS */
> > #endif /* NTF_SELF */
> > diff --git a/lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h
> b/lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h
> > index 1213cc6..5c799e9 100644
> > --- a/lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h
> > +++ b/lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h
> > @@ -3881,4 +3881,7 @@ skb_set_hash(struct sk_buff *skb, __u32 hash,
> __always_unused int type)
> > #define HAVE_VF_MIN_MAX_TXRATE 1
> > #endif /* >= 3.16.0 */
> >
> > +#if ( LINUX_VERSION_CODE >= KERNEL_VERSION(3,19,0) )
> > +#define HAVE_NDO_FDB_ADD_VID
> > +#endif /* >= 3.19.0 */
> > #endif /* _KCOMPAT_H_ */
>
> A blank line is missing here.
> Are you sure there is no macro defined in the Linux changes which could be
> checked instead of version number? I dislike version checks because of
> backport problems.
I am not aware of such macro in the kernel, unfortunately.
I just sent a v2.
Thanks,
Pablo
next prev parent reply other threads:[~2015-03-22 18:03 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-12 17:24 Pablo de Lara
2015-03-20 21:23 ` Thomas Monjalon
2015-03-22 18:03 ` De Lara Guarch, Pablo [this message]
2015-05-04 21:46 Pablo de Lara
2015-05-05 11:28 ` De Lara Guarch, Pablo
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=E115CCD9D858EF4F90C690B0DCB4D8972727A68C@IRSMSX108.ger.corp.intel.com \
--to=pablo.de.lara.guarch@intel.com \
--cc=dev@dpdk.org \
--cc=thomas.monjalon@6wind.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).