[dpdk-dev,4/8] cxgbe: don't refer to eth_dev->pci_dev

Message ID 20170107181756.1944-5-sthemmin@microsoft.com (mailing list archive)
State Changes Requested, archived
Delegated to: Thomas Monjalon
Headers

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel compilation success Compilation OK

Commit Message

Stephen Hemminger Jan. 7, 2017, 6:17 p.m. UTC
  Later patches remove pci_dev from the ethernet device structure.
Fix the cxgbe code to just use it's own name when forming zone name.

Signed-off-by: Stephen Hemminger <sthemmin@microsoft.com>
---
 drivers/net/cxgbe/sge.c | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)
  

Comments

Jan Blunck Jan. 10, 2017, 12:12 p.m. UTC | #1
On Sat, Jan 7, 2017 at 7:17 PM, Stephen Hemminger
<stephen@networkplumber.org> wrote:
> Later patches remove pci_dev from the ethernet device structure.
> Fix the cxgbe code to just use it's own name when forming zone name.
>
> Signed-off-by: Stephen Hemminger <sthemmin@microsoft.com>
> ---
>  drivers/net/cxgbe/sge.c | 9 +++------
>  1 file changed, 3 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/net/cxgbe/sge.c b/drivers/net/cxgbe/sge.c
> index 736f08ce..e935dc42 100644
> --- a/drivers/net/cxgbe/sge.c
> +++ b/drivers/net/cxgbe/sge.c
> @@ -1644,8 +1644,7 @@ int t4_sge_alloc_rxq(struct adapter *adap, struct sge_rspq *iq, bool fwevtq,
>         /* Size needs to be multiple of 16, including status entry. */
>         iq->size = cxgbe_roundup(iq->size, 16);
>
> -       snprintf(z_name, sizeof(z_name), "%s_%s_%d_%d",
> -                eth_dev->driver->pci_drv.driver.name,
> +       snprintf(z_name, sizeof(z_name), "cxgbe_%s_%d_%d",

The driver is called 'net_cxgbe'.


>                  fwevtq ? "fwq_ring" : "rx_ring",
>                  eth_dev->data->port_id, queue_id);
>         snprintf(z_name_sw, sizeof(z_name_sw), "%s_sw_ring", z_name);
> @@ -1697,8 +1696,7 @@ int t4_sge_alloc_rxq(struct adapter *adap, struct sge_rspq *iq, bool fwevtq,
>                         fl->size = s->fl_starve_thres - 1 + 2 * 8;
>                 fl->size = cxgbe_roundup(fl->size, 8);
>
> -               snprintf(z_name, sizeof(z_name), "%s_%s_%d_%d",
> -                        eth_dev->driver->pci_drv.driver.name,
> +               snprintf(z_name, sizeof(z_name), "cxgbe_%s_%d_%d",
>                          fwevtq ? "fwq_ring" : "fl_ring",
>                          eth_dev->data->port_id, queue_id);
>                 snprintf(z_name_sw, sizeof(z_name_sw), "%s_sw_ring", z_name);
> @@ -1893,8 +1891,7 @@ int t4_sge_alloc_eth_txq(struct adapter *adap, struct sge_eth_txq *txq,
>         /* Add status entries */
>         nentries = txq->q.size + s->stat_len / sizeof(struct tx_desc);
>
> -       snprintf(z_name, sizeof(z_name), "%s_%s_%d_%d",
> -                eth_dev->driver->pci_drv.driver.name, "tx_ring",
> +       snprintf(z_name, sizeof(z_name), "cxgbe_%d_%d",
>                  eth_dev->data->port_id, queue_id);
>         snprintf(z_name_sw, sizeof(z_name_sw), "%s_sw_ring", z_name);
>
> --
> 2.11.0
>
  

Patch

diff --git a/drivers/net/cxgbe/sge.c b/drivers/net/cxgbe/sge.c
index 736f08ce..e935dc42 100644
--- a/drivers/net/cxgbe/sge.c
+++ b/drivers/net/cxgbe/sge.c
@@ -1644,8 +1644,7 @@  int t4_sge_alloc_rxq(struct adapter *adap, struct sge_rspq *iq, bool fwevtq,
 	/* Size needs to be multiple of 16, including status entry. */
 	iq->size = cxgbe_roundup(iq->size, 16);
 
-	snprintf(z_name, sizeof(z_name), "%s_%s_%d_%d",
-		 eth_dev->driver->pci_drv.driver.name,
+	snprintf(z_name, sizeof(z_name), "cxgbe_%s_%d_%d",
 		 fwevtq ? "fwq_ring" : "rx_ring",
 		 eth_dev->data->port_id, queue_id);
 	snprintf(z_name_sw, sizeof(z_name_sw), "%s_sw_ring", z_name);
@@ -1697,8 +1696,7 @@  int t4_sge_alloc_rxq(struct adapter *adap, struct sge_rspq *iq, bool fwevtq,
 			fl->size = s->fl_starve_thres - 1 + 2 * 8;
 		fl->size = cxgbe_roundup(fl->size, 8);
 
-		snprintf(z_name, sizeof(z_name), "%s_%s_%d_%d",
-			 eth_dev->driver->pci_drv.driver.name,
+		snprintf(z_name, sizeof(z_name), "cxgbe_%s_%d_%d",
 			 fwevtq ? "fwq_ring" : "fl_ring",
 			 eth_dev->data->port_id, queue_id);
 		snprintf(z_name_sw, sizeof(z_name_sw), "%s_sw_ring", z_name);
@@ -1893,8 +1891,7 @@  int t4_sge_alloc_eth_txq(struct adapter *adap, struct sge_eth_txq *txq,
 	/* Add status entries */
 	nentries = txq->q.size + s->stat_len / sizeof(struct tx_desc);
 
-	snprintf(z_name, sizeof(z_name), "%s_%s_%d_%d",
-		 eth_dev->driver->pci_drv.driver.name, "tx_ring",
+	snprintf(z_name, sizeof(z_name), "cxgbe_%d_%d",
 		 eth_dev->data->port_id, queue_id);
 	snprintf(z_name_sw, sizeof(z_name_sw), "%s_sw_ring", z_name);