On 11/14/2018 6:17 PM, Mody, Rasesh wrote: > Reduced number of INFO logs in BNX2X PMD by converting some INFO > logs to DEBUG and few NOTICE logs to INFO, removing extra new lines, > printing banner bar once for the adapter and device specific info. > > Fixes: ba7eeb035a5f ("net/bnx2x: fix logging to include device name") > Fixes: 540a211084a7 ("bnx2x: driver core") > Cc: sta...@dpdk.org > > Signed-off-by: Rasesh Mody <rasesh.m...@cavium.com>
<...> > + PMD_INIT_FUNC_TRACE(sc); > + offset = offsetof(struct shmem_region, > + dev_info.port_hw_config[0].external_phy_config); > + if (sc->link_vars.phy_flags & PHY_XGXS_FLAG) > + ext_phy_type = ELINK_XGXS_EXT_PHY_TYPE(REG_RD(sc, > + sc-> > + devinfo. > + shmem_base > + + offset)); > + else > + ext_phy_type = ELINK_SERDES_EXT_PHY_TYPE(REG_RD(sc, > + sc-> > + devinfo. > + shmem_base > + + offset)); This looks ugly and hard to read, to avoid multi line derefernce, What do you think: reg_val = REG_RD(sc, sc->devinfo.shmem_base + offset); ext_phy_type = ELINK_SERDES_EXT_PHY_TYPE(reg_val);