* [PATCH net 0/2] Aquantia various patches 2018-05
@ 2018-05-07 13:10 Igor Russkikh
2018-05-07 13:10 ` [PATCH net 1/2] net: aquantia: driver should correctly declare vlan_features bits Igor Russkikh
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Igor Russkikh @ 2018-05-07 13:10 UTC (permalink / raw)
To: David S . Miller; +Cc: netdev, David Arcari, Pavel Belous, Igor Russkikh
These are two patches covering issues found during test cycles:
First is that driver should declare valid vlan_features
Second fix is about correct allocation of MSI interrupts on some systems.
Igor Russkikh (2):
net: aquantia: driver should correctly declare vlan_features bits
net: aquantia: Limit number of vectors to actually allocated irqs
drivers/net/ethernet/aquantia/atlantic/aq_nic.c | 3 +++
drivers/net/ethernet/aquantia/atlantic/aq_nic.h | 1 +
drivers/net/ethernet/aquantia/atlantic/aq_pci_func.c | 20 ++++++++++----------
3 files changed, 14 insertions(+), 10 deletions(-)
--
2.7.4
^ permalink raw reply [flat|nested] 4+ messages in thread* [PATCH net 1/2] net: aquantia: driver should correctly declare vlan_features bits 2018-05-07 13:10 [PATCH net 0/2] Aquantia various patches 2018-05 Igor Russkikh @ 2018-05-07 13:10 ` Igor Russkikh 2018-05-07 13:10 ` [PATCH net 2/2] net: aquantia: Limit number of vectors to actually allocated irqs Igor Russkikh 2018-05-08 4:07 ` [PATCH net 0/2] Aquantia various patches 2018-05 David Miller 2 siblings, 0 replies; 4+ messages in thread From: Igor Russkikh @ 2018-05-07 13:10 UTC (permalink / raw) To: David S . Miller; +Cc: netdev, David Arcari, Pavel Belous, Igor Russkikh In particular, not reporting SG forced skbs to be linear for vlan interfaces over atlantic NIC. With this fix it is possible to enable SG feature on device and therefore optimize performance. Reported-by: Ma Yuying <yuma@redhat.com> Signed-off-by: Igor Russkikh <igor.russkikh@aquantia.com> --- drivers/net/ethernet/aquantia/atlantic/aq_nic.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/ethernet/aquantia/atlantic/aq_nic.c b/drivers/net/ethernet/aquantia/atlantic/aq_nic.c index 32f6d2e..720760d 100644 --- a/drivers/net/ethernet/aquantia/atlantic/aq_nic.c +++ b/drivers/net/ethernet/aquantia/atlantic/aq_nic.c @@ -246,6 +246,8 @@ void aq_nic_ndev_init(struct aq_nic_s *self) self->ndev->hw_features |= aq_hw_caps->hw_features; self->ndev->features = aq_hw_caps->hw_features; + self->ndev->vlan_features |= NETIF_F_HW_CSUM | NETIF_F_RXCSUM | + NETIF_F_RXHASH | NETIF_F_SG | NETIF_F_LRO; self->ndev->priv_flags = aq_hw_caps->hw_priv_flags; self->ndev->priv_flags |= IFF_LIVE_ADDR_CHANGE; -- 2.7.4 ^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH net 2/2] net: aquantia: Limit number of vectors to actually allocated irqs 2018-05-07 13:10 [PATCH net 0/2] Aquantia various patches 2018-05 Igor Russkikh 2018-05-07 13:10 ` [PATCH net 1/2] net: aquantia: driver should correctly declare vlan_features bits Igor Russkikh @ 2018-05-07 13:10 ` Igor Russkikh 2018-05-08 4:07 ` [PATCH net 0/2] Aquantia various patches 2018-05 David Miller 2 siblings, 0 replies; 4+ messages in thread From: Igor Russkikh @ 2018-05-07 13:10 UTC (permalink / raw) To: David S . Miller; +Cc: netdev, David Arcari, Pavel Belous, Igor Russkikh Driver should use pci_alloc_irq_vectors return value to correct number of allocated vectors and napi instances. Otherwise it'll panic later in pci_irq_vector. Driver also should allow more than one MSI vectors to be allocated. Error return path from pci_alloc_irq_vectors is also fixed to revert resources in a correct sequence when error happens. Reported-by: Long, Nicholas <nicholas.a.long@baesystems.com> Fixes: 23ee07a ("net: aquantia: Cleanup pci functions module") Signed-off-by: Igor Russkikh <igor.russkikh@aquantia.com> --- drivers/net/ethernet/aquantia/atlantic/aq_nic.c | 1 + drivers/net/ethernet/aquantia/atlantic/aq_nic.h | 1 + drivers/net/ethernet/aquantia/atlantic/aq_pci_func.c | 20 ++++++++++---------- 3 files changed, 12 insertions(+), 10 deletions(-) diff --git a/drivers/net/ethernet/aquantia/atlantic/aq_nic.c b/drivers/net/ethernet/aquantia/atlantic/aq_nic.c index 720760d..1a1a638 100644 --- a/drivers/net/ethernet/aquantia/atlantic/aq_nic.c +++ b/drivers/net/ethernet/aquantia/atlantic/aq_nic.c @@ -95,6 +95,7 @@ void aq_nic_cfg_start(struct aq_nic_s *self) /*rss rings */ cfg->vecs = min(cfg->aq_hw_caps->vecs, AQ_CFG_VECS_DEF); cfg->vecs = min(cfg->vecs, num_online_cpus()); + cfg->vecs = min(cfg->vecs, self->irqvecs); /* cfg->vecs should be power of 2 for RSS */ if (cfg->vecs >= 8U) cfg->vecs = 8U; diff --git a/drivers/net/ethernet/aquantia/atlantic/aq_nic.h b/drivers/net/ethernet/aquantia/atlantic/aq_nic.h index 219b550..faa533a 100644 --- a/drivers/net/ethernet/aquantia/atlantic/aq_nic.h +++ b/drivers/net/ethernet/aquantia/atlantic/aq_nic.h @@ -80,6 +80,7 @@ struct aq_nic_s { struct pci_dev *pdev; unsigned int msix_entry_mask; + u32 irqvecs; }; static inline struct device *aq_nic_get_dev(struct aq_nic_s *self) diff --git a/drivers/net/ethernet/aquantia/atlantic/aq_pci_func.c b/drivers/net/ethernet/aquantia/atlantic/aq_pci_func.c index ecc6306..a50e08b 100644 --- a/drivers/net/ethernet/aquantia/atlantic/aq_pci_func.c +++ b/drivers/net/ethernet/aquantia/atlantic/aq_pci_func.c @@ -267,16 +267,16 @@ static int aq_pci_probe(struct pci_dev *pdev, numvecs = min(numvecs, num_online_cpus()); /*enable interrupts */ #if !AQ_CFG_FORCE_LEGACY_INT - err = pci_alloc_irq_vectors(self->pdev, numvecs, numvecs, - PCI_IRQ_MSIX); - - if (err < 0) { - err = pci_alloc_irq_vectors(self->pdev, 1, 1, - PCI_IRQ_MSI | PCI_IRQ_LEGACY); - if (err < 0) - goto err_hwinit; + numvecs = pci_alloc_irq_vectors(self->pdev, 1, numvecs, + PCI_IRQ_MSIX | PCI_IRQ_MSI | + PCI_IRQ_LEGACY); + + if (numvecs < 0) { + err = numvecs; + goto err_hwinit; } #endif + self->irqvecs = numvecs; /* net device init */ aq_nic_cfg_start(self); @@ -298,9 +298,9 @@ static int aq_pci_probe(struct pci_dev *pdev, kfree(self->aq_hw); err_ioremap: free_netdev(ndev); -err_pci_func: - pci_release_regions(pdev); err_ndev: + pci_release_regions(pdev); +err_pci_func: pci_disable_device(pdev); return err; } -- 2.7.4 ^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH net 0/2] Aquantia various patches 2018-05 2018-05-07 13:10 [PATCH net 0/2] Aquantia various patches 2018-05 Igor Russkikh 2018-05-07 13:10 ` [PATCH net 1/2] net: aquantia: driver should correctly declare vlan_features bits Igor Russkikh 2018-05-07 13:10 ` [PATCH net 2/2] net: aquantia: Limit number of vectors to actually allocated irqs Igor Russkikh @ 2018-05-08 4:07 ` David Miller 2 siblings, 0 replies; 4+ messages in thread From: David Miller @ 2018-05-08 4:07 UTC (permalink / raw) To: igor.russkikh; +Cc: netdev, darcari, pavel.belous From: Igor Russkikh <igor.russkikh@aquantia.com> Date: Mon, 7 May 2018 16:10:37 +0300 > These are two patches covering issues found during test cycles: > > First is that driver should declare valid vlan_features > Second fix is about correct allocation of MSI interrupts on some systems. Series applied, thank you. ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2018-05-08 4:07 UTC | newest] Thread overview: 4+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2018-05-07 13:10 [PATCH net 0/2] Aquantia various patches 2018-05 Igor Russkikh 2018-05-07 13:10 ` [PATCH net 1/2] net: aquantia: driver should correctly declare vlan_features bits Igor Russkikh 2018-05-07 13:10 ` [PATCH net 2/2] net: aquantia: Limit number of vectors to actually allocated irqs Igor Russkikh 2018-05-08 4:07 ` [PATCH net 0/2] Aquantia various patches 2018-05 David Miller
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox