From: Potnuri Bharat Teja Date: Thu, 3 Mar 2016 22:25:45 +0000 (-0800) Subject: cxgb4: RHEL7.2 backports X-Git-Tag: vofed-3.18-2-rc1~4 X-Git-Url: https://openfabrics.org/gitweb/?a=commitdiff_plain;h=974fa8fd913a75ad5cfc48724ab31ea4b48aa2ab;p=~tnikolova%2Fcompat-rdma%2F.git cxgb4: RHEL7.2 backports Signed-off-by: Potnuri Bharat Teja Signed-off-by: Steve Wise --- diff --git a/patches/0038_BACKPORT_cxgb4_RHEL7_2.patch b/patches/0038_BACKPORT_cxgb4_RHEL7_2.patch new file mode 100755 index 0000000..77d3a1c --- /dev/null +++ b/patches/0038_BACKPORT_cxgb4_RHEL7_2.patch @@ -0,0 +1,80 @@ +diff --git a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c +index 279873c..670f7dd 100644 +--- a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c ++++ b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c +@@ -70,7 +70,9 @@ + #include "cxgb4_dcb.h" + #include "l2t.h" + +-#include <../drivers/net/bonding/bonding.h> ++#ifdef HAVE_BONDING_H ++#include ++#endif + + #ifdef DRV_VERSION + #undef DRV_VERSION +@@ -3014,26 +3016,58 @@ static u32 get_rss_table_size(struct net_device *dev) + return pi->rss_size; + } + +-static int get_rss_table(struct net_device *dev, u32 *p, u8 *key) ++static int get_rss_table(struct net_device *dev, u32 *p, ++#ifdef HAVE_ETH_SS_RSS_HASH_FUNCS ++ u8 *key, u8 *hfunc) ++#else ++ u8 *key) ++#endif + { + const struct port_info *pi = netdev_priv(dev); + unsigned int n = pi->rss_size; + ++#ifdef HAVE_ETH_SS_RSS_HASH_FUNCS ++ if (hfunc) ++ *hfunc = ETH_RSS_HASH_TOP; ++#endif ++ if (!p) ++ return 0; ++ + while (n--) + p[n] = pi->rss[n]; + return 0; + } + +-static int set_rss_table(struct net_device *dev, const u32 *p, const u8 *key) ++static int set_rss_table(struct net_device *dev, const u32 *p, ++#ifdef HAVE_ETH_SS_RSS_HASH_FUNCS ++ const u8 *key, const u8 hfunc) ++#else ++ const u8 *key) ++#endif + { + unsigned int i; + struct port_info *pi = netdev_priv(dev); + +- for (i = 0; i < pi->rss_size; i++) +- pi->rss[i] = p[i]; +- if (pi->adapter->flags & FULL_INIT_DONE) ++#ifdef HAVE_ETH_SS_RSS_HASH_FUNCS ++ /* We require at least one supported parameter to be changed and no ++ * change in any of the unsupported parameters ++ */ ++ if (key || ++ (hfunc != ETH_RSS_HASH_NO_CHANGE && hfunc != ETH_RSS_HASH_TOP)) ++ return -EOPNOTSUPP; ++#endif ++ if (!p) ++ return 0; ++ ++ /* Interface must be brought up atleast once */ ++ if (pi->adapter->flags & FULL_INIT_DONE) { ++ for (i = 0; i < pi->rss_size; i++) ++ pi->rss[i] = p[i]; ++ + return write_rss(pi, pi->rss); +- return 0; ++ } ++ ++ return -EPERM; + } + + static int get_rxnfc(struct net_device *dev, struct ethtool_rxnfc *info,