Hi, > -----Original Message----- > From: Yigit, Ferruh <ferruh.yi...@intel.com> > Sent: Thursday, April 22, 2021 00:21 > To: Igor Russkikh <igor.russk...@aquantia.com>; Pavel Belous > <pavel.bel...@aquantia.com>; Somalapuram Amaranath > <asoma...@amd.com>; Ajit Khaparde <ajit.khapa...@broadcom.com>; > Somnath Kotur <somnath.ko...@broadcom.com>; Hemant Agrawal > <hemant.agra...@nxp.com>; Sachin Saxena > <sachin.sax...@oss.nxp.com>; Guo, Jia <jia....@intel.com>; Wang, Haiyue > <haiyue.w...@intel.com>; Daley, John <johnd...@cisco.com>; Hyong Youb > Kim <hyon...@cisco.com>; Min Hu (Connor) <humi...@huawei.com>; > Yisen Zhuang <yisen.zhu...@huawei.com>; Lijun Ou > <ouli...@huawei.com>; Xing, Beilei <beilei.x...@intel.com>; Yang, Qiming > <qiming.y...@intel.com>; Zhang, Qi Z <qi.z.zh...@intel.com>; Andrew > Boyer <abo...@pensando.io>; Jerin Jacob <jer...@marvell.com>; Nithin > Dabilpuram <ndabilpu...@marvell.com>; Kiran Kumar K > <kirankum...@marvell.com>; Rasesh Mody <rm...@marvell.com>; > Devendra Singh Rawat <dsinghra...@marvell.com>; Andrew Rybchenko > <andrew.rybche...@oktetlabs.ru>; Jiawen Wu > <jiawe...@trustnetic.com>; Jian Wang <jianw...@trustnetic.com>; > Thomas Monjalon <tho...@monjalon.net>; Selwin Sebastian > <selwin.sebast...@amd.com>; Remy Horton <remy.hor...@intel.com>; > Chunsong Feng <fengchuns...@huawei.com>; Huisong Li > <lihuis...@huawei.com>; Hao Chen <chenhao...@huawei.com>; Wei Hu > (Xavier) <xavier.hu...@huawei.com>; Wu, Jingjing > <jingjing...@intel.com>; Lu, Wenzhuo <wenzhuo...@intel.com>; Li, > Xiaoyun <xiaoyun...@intel.com>; Zhang, AlvinX <alvinx.zh...@intel.com>; > Shannon Nelson <snel...@pensando.io>; Alfredo Cardigliano > <cardigli...@ntop.org>; Vamsi Attunuru <vattun...@marvell.com>; Yash > Sharma <ysha...@marvell.com>; Ivan Malov <ivan.ma...@oktetlabs.ru>; > Andrew Lee <a...@solarflare.com> > Cc: Yigit, Ferruh <ferruh.yi...@intel.com>; dev@dpdk.org; sta...@dpdk.org > Subject: [PATCH] drivers/net: fix FW version get > > Fixes a few different things: > * Remove 'fw_version' NULL checks, it is allowed if the 'fw_size' is > zero, 'fw_version' being NULL but 'fw_size' not zero condition checked > in ethdev layer > * Be sure required buffer size is returned if provided one is not big > enough, instead of returning success (0) > * Document in doxygen comment the '-EINVAL' is a valid return type > * Take into account that 'snprintf' can return negative value > * Cast length to 'size_t' to compare it with 'fw_size' > > Fixes: bb42aa9ffe4e ("net/atlantic: configure device start/stop") > Fixes: ff70acdf4299 ("net/axgbe: support reading FW version") > Fixes: e2652b0a20a0 ("net/bnxt: support get FW version") > Fixes: cf0fab1d2ca5 ("net/dpaa: support firmware version get API") > Fixes: 748eccb97cdc ("net/dpaa2: add support for firmware version get") > Fixes: b883c0644a24 ("net/e1000: add firmware version get") > Fixes: 293430677e9c ("net/enic: add handler to return firmware version") > Fixes: 1f5ca0b460cd ("net/hns3: support some device operations") > Fixes: bd5b86732bc7 ("net/hns3: modify format for firmware version") > Fixes: ed0dfdd0e976 ("net/i40e: add firmware version get") > Fixes: e31cb9a36298 ("net/ice: support FW version getting") > Fixes: 4f09bc55ac3d ("net/igc: implement device base operations") > Fixes: eec10fb0ce6b ("net/ionic: support FW version") > Fixes: 8b0b56574269 ("net/ixgbe: add firmware version get") > Fixes: 4d9f5b8adc02 ("net/octeontx2: add FW version get operation") > Fixes: f97b56f9f12e ("net/qede: support FW version query") > Fixes: 83fef46a22b2 ("net/sfc: add callback to retrieve FW version") > Fixes: bc84ac0fadef ("net/txgbe: support getting FW version") > Fixes: 21913471202f ("ethdev: add firmware version get") > Cc: sta...@dpdk.org > > Signed-off-by: Ferruh Yigit <ferruh.yi...@intel.com> > --- > Cc: pavel.bel...@aquantia.com > Cc: selwin.sebast...@amd.com > Cc: hemant.agra...@nxp.com > Cc: qiming.y...@intel.com > Cc: hyon...@cisco.com > Cc: xavier.hu...@huawei.com > Cc: wenzhuo...@intel.com > Cc: alvinx.zh...@intel.com > Cc: cardigli...@ntop.org > Cc: vattun...@marvell.com > Cc: rm...@marvell.com > Cc: ivan.ma...@oktetlabs.ru > Cc: jiawe...@trustnetic.com > --- > drivers/net/atlantic/atl_ethdev.c | 7 ++++--- > drivers/net/axgbe/axgbe_rxtx.c | 4 ---- > drivers/net/bnxt/bnxt_ethdev.c | 4 +++- > drivers/net/dpaa/dpaa_ethdev.c | 6 ++++-- > drivers/net/dpaa2/dpaa2_ethdev.c | 4 +++- > drivers/net/e1000/igb_ethdev.c | 4 +++- > drivers/net/enic/enic_ethdev.c | 15 ++++++++++----- > drivers/net/hns3/hns3_ethdev.c | 5 ++++- > drivers/net/hns3/hns3_ethdev_vf.c | 5 ++++- > drivers/net/i40e/i40e_ethdev.c | 4 +++- > drivers/net/ice/ice_ethdev.c | 4 +++- > drivers/net/igc/igc_ethdev.c | 4 +++- > drivers/net/ionic/ionic_ethdev.c | 15 +++++++++------ > drivers/net/ixgbe/ixgbe_ethdev.c | 4 +++- > drivers/net/octeontx2/otx2_ethdev_ops.c | 2 +- > drivers/net/qede/qede_ethdev.c | 3 --- > drivers/net/sfc/sfc_ethdev.c | 8 -------- > drivers/net/txgbe/txgbe_ethdev.c | 4 +++- > lib/librte_ethdev/rte_ethdev.h | 1 + > 19 files changed, 61 insertions(+), 42 deletions(-) >
For ice driver, Acked-by: Qiming Yang <qiming.y...@intel.com>