Message ID | 1536655505-14387-6-git-send-email-vasundhara-v.volam@broadcom.com |
---|---|
State | Changes Requested, archived |
Delegated to: | David Miller |
Headers | show |
Series | bnxt_en: devlink param updates | expand |
Hi Vasundhara, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on net-next/master] url: https://github.com/0day-ci/linux/commits/Vasundhara-Volam/bnxt_en-devlink-param-updates/20180914-141937 config: powerpc-allyesconfig (attached as .config) compiler: powerpc64-linux-gnu-gcc (Debian 7.2.0-11) 7.2.0 reproduce: wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # save the attached .config to linux build tree GCC_VERSION=7.2.0 make.cross ARCH=powerpc Note: it may well be a FALSE warning. FWIW you are at least aware of it now. http://gcc.gnu.org/wiki/Better_Uninitialized_Warnings All warnings (new ones prefixed by >>): drivers/net//ethernet/broadcom/bnxt/bnxt_devlink.c: In function 'bnxt_hwrm_nvm_req.constprop': drivers/net//ethernet/broadcom/bnxt/bnxt_devlink.c:38:27: warning: 'nvm_param.num_bits' may be used uninitialized in this function [-Wmaybe-uninitialized] struct bnxt_dl_nvm_param nvm_param; ^~~~~~~~~ drivers/net//ethernet/broadcom/bnxt/bnxt_devlink.c:53:5: warning: 'nvm_param.dir_type' may be used uninitialized in this function [-Wmaybe-uninitialized] if (nvm_param.dir_type == BNXT_NVM_PORT_CFG) ^ In file included from include/linux/byteorder/big_endian.h:5:0, from arch/powerpc/include/uapi/asm/byteorder.h:14, from include/asm-generic/bitops/le.h:6, from arch/powerpc/include/asm/bitops.h:247, from include/linux/bitops.h:19, from include/linux/kernel.h:11, from include/linux/list.h:9, from include/linux/pci.h:26, from drivers/net//ethernet/broadcom/bnxt/bnxt_devlink.c:10: >> include/uapi/linux/byteorder/big_endian.h:35:27: warning: 'nvm_param.offset' may be used uninitialized in this function [-Wmaybe-uninitialized] #define __cpu_to_le16(x) ((__force __le16)__swab16((x))) ^ drivers/net//ethernet/broadcom/bnxt/bnxt_devlink.c:38:27: note: 'nvm_param.offset' was declared here struct bnxt_dl_nvm_param nvm_param; ^~~~~~~~~ -- drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c: In function 'bnxt_hwrm_nvm_req.constprop': drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c:38:27: warning: 'nvm_param.num_bits' may be used uninitialized in this function [-Wmaybe-uninitialized] struct bnxt_dl_nvm_param nvm_param; ^~~~~~~~~ drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c:53:5: warning: 'nvm_param.dir_type' may be used uninitialized in this function [-Wmaybe-uninitialized] if (nvm_param.dir_type == BNXT_NVM_PORT_CFG) ^ In file included from include/linux/byteorder/big_endian.h:5:0, from arch/powerpc/include/uapi/asm/byteorder.h:14, from include/asm-generic/bitops/le.h:6, from arch/powerpc/include/asm/bitops.h:247, from include/linux/bitops.h:19, from include/linux/kernel.h:11, from include/linux/list.h:9, from include/linux/pci.h:26, from drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c:10: >> include/uapi/linux/byteorder/big_endian.h:35:27: warning: 'nvm_param.offset' may be used uninitialized in this function [-Wmaybe-uninitialized] #define __cpu_to_le16(x) ((__force __le16)__swab16((x))) ^ drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c:38:27: note: 'nvm_param.offset' was declared here struct bnxt_dl_nvm_param nvm_param; ^~~~~~~~~ vim +35 include/uapi/linux/byteorder/big_endian.h 5921e6f8 David Howells 2012-10-13 14 5921e6f8 David Howells 2012-10-13 15 #define __constant_htonl(x) ((__force __be32)(__u32)(x)) 5921e6f8 David Howells 2012-10-13 16 #define __constant_ntohl(x) ((__force __u32)(__be32)(x)) 5921e6f8 David Howells 2012-10-13 17 #define __constant_htons(x) ((__force __be16)(__u16)(x)) 5921e6f8 David Howells 2012-10-13 18 #define __constant_ntohs(x) ((__force __u16)(__be16)(x)) 5921e6f8 David Howells 2012-10-13 19 #define __constant_cpu_to_le64(x) ((__force __le64)___constant_swab64((x))) 5921e6f8 David Howells 2012-10-13 20 #define __constant_le64_to_cpu(x) ___constant_swab64((__force __u64)(__le64)(x)) 5921e6f8 David Howells 2012-10-13 21 #define __constant_cpu_to_le32(x) ((__force __le32)___constant_swab32((x))) 5921e6f8 David Howells 2012-10-13 22 #define __constant_le32_to_cpu(x) ___constant_swab32((__force __u32)(__le32)(x)) 5921e6f8 David Howells 2012-10-13 23 #define __constant_cpu_to_le16(x) ((__force __le16)___constant_swab16((x))) 5921e6f8 David Howells 2012-10-13 24 #define __constant_le16_to_cpu(x) ___constant_swab16((__force __u16)(__le16)(x)) 5921e6f8 David Howells 2012-10-13 25 #define __constant_cpu_to_be64(x) ((__force __be64)(__u64)(x)) 5921e6f8 David Howells 2012-10-13 26 #define __constant_be64_to_cpu(x) ((__force __u64)(__be64)(x)) 5921e6f8 David Howells 2012-10-13 27 #define __constant_cpu_to_be32(x) ((__force __be32)(__u32)(x)) 5921e6f8 David Howells 2012-10-13 28 #define __constant_be32_to_cpu(x) ((__force __u32)(__be32)(x)) 5921e6f8 David Howells 2012-10-13 29 #define __constant_cpu_to_be16(x) ((__force __be16)(__u16)(x)) 5921e6f8 David Howells 2012-10-13 30 #define __constant_be16_to_cpu(x) ((__force __u16)(__be16)(x)) 5921e6f8 David Howells 2012-10-13 31 #define __cpu_to_le64(x) ((__force __le64)__swab64((x))) 5921e6f8 David Howells 2012-10-13 32 #define __le64_to_cpu(x) __swab64((__force __u64)(__le64)(x)) 5921e6f8 David Howells 2012-10-13 33 #define __cpu_to_le32(x) ((__force __le32)__swab32((x))) 5921e6f8 David Howells 2012-10-13 34 #define __le32_to_cpu(x) __swab32((__force __u32)(__le32)(x)) 5921e6f8 David Howells 2012-10-13 @35 #define __cpu_to_le16(x) ((__force __le16)__swab16((x))) 5921e6f8 David Howells 2012-10-13 36 #define __le16_to_cpu(x) __swab16((__force __u16)(__le16)(x)) 5921e6f8 David Howells 2012-10-13 37 #define __cpu_to_be64(x) ((__force __be64)(__u64)(x)) 5921e6f8 David Howells 2012-10-13 38 #define __be64_to_cpu(x) ((__force __u64)(__be64)(x)) 5921e6f8 David Howells 2012-10-13 39 #define __cpu_to_be32(x) ((__force __be32)(__u32)(x)) 5921e6f8 David Howells 2012-10-13 40 #define __be32_to_cpu(x) ((__force __u32)(__be32)(x)) 5921e6f8 David Howells 2012-10-13 41 #define __cpu_to_be16(x) ((__force __be16)(__u16)(x)) 5921e6f8 David Howells 2012-10-13 42 #define __be16_to_cpu(x) ((__force __u16)(__be16)(x)) 5921e6f8 David Howells 2012-10-13 43 :::::: The code at line 35 was first introduced by commit :::::: 5921e6f8809b1616932ca4afd40fe449faa8fd88 UAPI: (Scripted) Disintegrate include/linux/byteorder :::::: TO: David Howells <dhowells@redhat.com> :::::: CC: David Howells <dhowells@redhat.com> --- 0-DAY kernel test infrastructure Open Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation
diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c b/drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c index f3b9fbc..582e5b5 100644 --- a/drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c +++ b/drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c @@ -24,6 +24,10 @@ static const struct bnxt_dl_nvm_param nvm_params[] = { {DEVLINK_PARAM_GENERIC_ID_ENABLE_SRIOV, NVM_OFF_ENABLE_SRIOV, BNXT_NVM_SHARED_CFG, 1}, + {DEVLINK_PARAM_GENERIC_ID_HW_TC_OFFLOAD, NVM_OFF_HW_TC_OFFLOAD, + BNXT_NVM_SHARED_CFG, 1}, + {DEVLINK_PARAM_GENERIC_ID_IGNORE_ARI, NVM_OFF_IGNORE_ARI, + BNXT_NVM_SHARED_CFG, 1}, }; static int bnxt_hwrm_nvm_req(struct bnxt *bp, u32 param_id, void *msg, @@ -105,6 +109,14 @@ static int bnxt_dl_nvm_param_set(struct devlink *dl, u32 id, BIT(DEVLINK_PARAM_CMODE_PERMANENT), bnxt_dl_nvm_param_get, bnxt_dl_nvm_param_set, NULL), + DEVLINK_PARAM_GENERIC(HW_TC_OFFLOAD, + BIT(DEVLINK_PARAM_CMODE_PERMANENT), + bnxt_dl_nvm_param_get, bnxt_dl_nvm_param_set, + NULL), + DEVLINK_PARAM_GENERIC(IGNORE_ARI, + BIT(DEVLINK_PARAM_CMODE_PERMANENT), + bnxt_dl_nvm_param_get, bnxt_dl_nvm_param_set, + NULL), }; int bnxt_dl_register(struct bnxt *bp) diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.h b/drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.h index 2f68dc0..da146492 100644 --- a/drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.h +++ b/drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.h @@ -33,6 +33,8 @@ static inline void bnxt_link_bp_to_dl(struct bnxt *bp, struct devlink *dl) } } +#define NVM_OFF_IGNORE_ARI 164 +#define NVM_OFF_HW_TC_OFFLOAD 170 #define NVM_OFF_ENABLE_SRIOV 401 enum bnxt_nvm_dir_type {
This patch adds support for following generic permanent mode devlink parameters. Both are disabled by default. They can be enabled using devlink param commands. hw_tc_offload - Enable/Disable TC flower offload in the device. ignore_ari - Device ignores ARI(Alternate Routing ID) capability, even when platforms has the support and creates same number of partitions when platform does not support ARI capability. Signed-off-by: Vasundhara Volam <vasundhara-v.volam@broadcom.com> --- drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c | 12 ++++++++++++ drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.h | 2 ++ 2 files changed, 14 insertions(+)