DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH 1/2] net/txgbe: fix driver exit
@ 2020-10-27  6:24 Jiawen Wu
  2020-10-27  6:24 ` [dpdk-dev] [PATCH 2/2] net/txgbe: remove library name from version map file name Jiawen Wu
  2020-10-27 10:53 ` [dpdk-dev] [PATCH 1/2] net/txgbe: fix driver exit Ferruh Yigit
  0 siblings, 2 replies; 4+ messages in thread
From: Jiawen Wu @ 2020-10-27  6:24 UTC (permalink / raw)
  To: dev; +Cc: Jiawen Wu

Replace the 'rte_panic()' with an error return.
Also change the type of the calling function.

Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
---
 drivers/net/txgbe/txgbe_ethdev.h |  2 +-
 drivers/net/txgbe/txgbe_pf.c     | 12 ++++++++----
 2 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/drivers/net/txgbe/txgbe_ethdev.h b/drivers/net/txgbe/txgbe_ethdev.h
index b708e6d43..fb1368890 100644
--- a/drivers/net/txgbe/txgbe_ethdev.h
+++ b/drivers/net/txgbe/txgbe_ethdev.h
@@ -290,7 +290,7 @@ void txgbe_configure_dcb(struct rte_eth_dev *dev);
 int
 txgbe_dev_link_update_share(struct rte_eth_dev *dev,
 		int wait_to_complete);
-void txgbe_pf_host_init(struct rte_eth_dev *eth_dev);
+int txgbe_pf_host_init(struct rte_eth_dev *eth_dev);
 
 void txgbe_pf_host_uninit(struct rte_eth_dev *eth_dev);
 
diff --git a/drivers/net/txgbe/txgbe_pf.c b/drivers/net/txgbe/txgbe_pf.c
index 67045fb01..ee7fa83fa 100644
--- a/drivers/net/txgbe/txgbe_pf.c
+++ b/drivers/net/txgbe/txgbe_pf.c
@@ -64,7 +64,7 @@ txgbe_mb_intr_setup(struct rte_eth_dev *dev)
 	return 0;
 }
 
-void txgbe_pf_host_init(struct rte_eth_dev *eth_dev)
+int txgbe_pf_host_init(struct rte_eth_dev *eth_dev)
 {
 	struct txgbe_vf_info **vfinfo = TXGBE_DEV_VFDATA(eth_dev);
 	struct txgbe_mirror_info *mirror_info = TXGBE_DEV_MR_INFO(eth_dev);
@@ -78,12 +78,14 @@ void txgbe_pf_host_init(struct rte_eth_dev *eth_dev)
 	RTE_ETH_DEV_SRIOV(eth_dev).active = 0;
 	vf_num = dev_num_vf(eth_dev);
 	if (vf_num == 0)
-		return;
+		return 0;
 
 	*vfinfo = rte_zmalloc("vf_info",
 			sizeof(struct txgbe_vf_info) * vf_num, 0);
-	if (*vfinfo == NULL)
-		rte_panic("Cannot allocate memory for private VF data\n");
+	if (*vfinfo == NULL) {
+		DEBUGOUT("Cannot allocate memory for private VF data\n");
+		return -ENOMEM;
+	}
 
 	rte_eth_switch_domain_alloc(&(*vfinfo)->switch_domain_id);
 
@@ -114,6 +116,8 @@ void txgbe_pf_host_init(struct rte_eth_dev *eth_dev)
 
 	/* set mb interrupt mask */
 	txgbe_mb_intr_setup(eth_dev);
+
+	return 0;
 }
 
 void txgbe_pf_host_uninit(struct rte_eth_dev *eth_dev)
-- 
2.21.0.windows.1




^ permalink raw reply	[flat|nested] 4+ messages in thread

* [dpdk-dev] [PATCH 2/2] net/txgbe: remove library name from version map file name
  2020-10-27  6:24 [dpdk-dev] [PATCH 1/2] net/txgbe: fix driver exit Jiawen Wu
@ 2020-10-27  6:24 ` Jiawen Wu
  2020-10-27 10:54   ` Ferruh Yigit
  2020-10-27 10:53 ` [dpdk-dev] [PATCH 1/2] net/txgbe: fix driver exit Ferruh Yigit
  1 sibling, 1 reply; 4+ messages in thread
From: Jiawen Wu @ 2020-10-27  6:24 UTC (permalink / raw)
  To: dev; +Cc: Jiawen Wu

Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
---
 drivers/net/txgbe/{rte_pmd_txgbe_version.map => version.map} | 0
 1 file changed, 0 insertions(+), 0 deletions(-)
 rename drivers/net/txgbe/{rte_pmd_txgbe_version.map => version.map} (100%)

diff --git a/drivers/net/txgbe/rte_pmd_txgbe_version.map b/drivers/net/txgbe/version.map
similarity index 100%
rename from drivers/net/txgbe/rte_pmd_txgbe_version.map
rename to drivers/net/txgbe/version.map
-- 
2.21.0.windows.1




^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [dpdk-dev] [PATCH 1/2] net/txgbe: fix driver exit
  2020-10-27  6:24 [dpdk-dev] [PATCH 1/2] net/txgbe: fix driver exit Jiawen Wu
  2020-10-27  6:24 ` [dpdk-dev] [PATCH 2/2] net/txgbe: remove library name from version map file name Jiawen Wu
@ 2020-10-27 10:53 ` Ferruh Yigit
  1 sibling, 0 replies; 4+ messages in thread
From: Ferruh Yigit @ 2020-10-27 10:53 UTC (permalink / raw)
  To: Jiawen Wu, dev

On 10/27/2020 6:24 AM, Jiawen Wu wrote:
> Replace the 'rte_panic()' with an error return.
> Also change the type of the calling function.
> 
> Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
> ---
>   drivers/net/txgbe/txgbe_ethdev.h |  2 +-
>   drivers/net/txgbe/txgbe_pf.c     | 12 ++++++++----
>   2 files changed, 9 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/net/txgbe/txgbe_ethdev.h b/drivers/net/txgbe/txgbe_ethdev.h
> index b708e6d43..fb1368890 100644
> --- a/drivers/net/txgbe/txgbe_ethdev.h
> +++ b/drivers/net/txgbe/txgbe_ethdev.h
> @@ -290,7 +290,7 @@ void txgbe_configure_dcb(struct rte_eth_dev *dev);
>   int
>   txgbe_dev_link_update_share(struct rte_eth_dev *dev,
>   		int wait_to_complete);
> -void txgbe_pf_host_init(struct rte_eth_dev *eth_dev);
> +int txgbe_pf_host_init(struct rte_eth_dev *eth_dev);

Better to update where 'txgbe_pf_host_init()' is called and check the return type.

Can you please check the following patch as sample:
https://patches.dpdk.org/patch/81576/


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [dpdk-dev] [PATCH 2/2] net/txgbe: remove library name from version map file name
  2020-10-27  6:24 ` [dpdk-dev] [PATCH 2/2] net/txgbe: remove library name from version map file name Jiawen Wu
@ 2020-10-27 10:54   ` Ferruh Yigit
  0 siblings, 0 replies; 4+ messages in thread
From: Ferruh Yigit @ 2020-10-27 10:54 UTC (permalink / raw)
  To: Jiawen Wu, dev

On 10/27/2020 6:24 AM, Jiawen Wu wrote:
> Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
> ---
>   drivers/net/txgbe/{rte_pmd_txgbe_version.map => version.map} | 0
>   1 file changed, 0 insertions(+), 0 deletions(-)
>   rename drivers/net/txgbe/{rte_pmd_txgbe_version.map => version.map} (100%)
> 
> diff --git a/drivers/net/txgbe/rte_pmd_txgbe_version.map b/drivers/net/txgbe/version.map
> similarity index 100%
> rename from drivers/net/txgbe/rte_pmd_txgbe_version.map
> rename to drivers/net/txgbe/version.map
> 

This is already done in next-net while merging, this patch can be dropped.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-10-27 10:54 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-27  6:24 [dpdk-dev] [PATCH 1/2] net/txgbe: fix driver exit Jiawen Wu
2020-10-27  6:24 ` [dpdk-dev] [PATCH 2/2] net/txgbe: remove library name from version map file name Jiawen Wu
2020-10-27 10:54   ` Ferruh Yigit
2020-10-27 10:53 ` [dpdk-dev] [PATCH 1/2] net/txgbe: fix driver exit Ferruh Yigit

DPDK patches and discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://inbox.dpdk.org/dev/0 dev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 dev dev/ https://inbox.dpdk.org/dev \
		dev@dpdk.org
	public-inbox-index dev

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.dev


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git