DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] mlx4: check if port is configured for Ethernet
@ 2016-03-22 10:34 Adrien Mazarguil
  2016-03-24 12:12 ` Bruce Richardson
  0 siblings, 1 reply; 2+ messages in thread
From: Adrien Mazarguil @ 2016-03-22 10:34 UTC (permalink / raw)
  To: dev

Notify user otherwise. A similar check has already been added to mlx5 in
commit "mlx5: check port is configured as ethernet device".

Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
---
 drivers/net/mlx4/mlx4.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/drivers/net/mlx4/mlx4.c b/drivers/net/mlx4/mlx4.c
index cc4e9aa..fbbabf6 100644
--- a/drivers/net/mlx4/mlx4.c
+++ b/drivers/net/mlx4/mlx4.c
@@ -5463,6 +5463,13 @@ mlx4_pci_devinit(struct rte_pci_driver *pci_drv, struct rte_pci_device *pci_dev)
 			ERROR("port query failed: %s", strerror(err));
 			goto port_error;
 		}
+
+		if (port_attr.link_layer != IBV_LINK_LAYER_ETHERNET) {
+			ERROR("port %d is not configured in Ethernet mode",
+			      port);
+			goto port_error;
+		}
+
 		if (port_attr.state != IBV_PORT_ACTIVE)
 			DEBUG("port %d is not active: \"%s\" (%d)",
 			      port, ibv_port_state_str(port_attr.state),
-- 
2.1.4

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

* Re: [dpdk-dev] [PATCH] mlx4: check if port is configured for Ethernet
  2016-03-22 10:34 [dpdk-dev] [PATCH] mlx4: check if port is configured for Ethernet Adrien Mazarguil
@ 2016-03-24 12:12 ` Bruce Richardson
  0 siblings, 0 replies; 2+ messages in thread
From: Bruce Richardson @ 2016-03-24 12:12 UTC (permalink / raw)
  To: Adrien Mazarguil; +Cc: dev

On Tue, Mar 22, 2016 at 11:34:26AM +0100, Adrien Mazarguil wrote:
> Notify user otherwise. A similar check has already been added to mlx5 in
> commit "mlx5: check port is configured as ethernet device".
> 
> Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
> ---
Applied to dpdk-next-net/rel_16_04

/Bruce

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

end of thread, other threads:[~2016-03-24 12:12 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-03-22 10:34 [dpdk-dev] [PATCH] mlx4: check if port is configured for Ethernet Adrien Mazarguil
2016-03-24 12:12 ` Bruce Richardson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).