Netdev List
 help / color / mirror / Atom feed
* Re: [PATCH net-next 10/12] net/mlx5e: Create aRFS flow tables
From: Saeed Mahameed @ 2016-05-01  8:12 UTC (permalink / raw)
  To: Alexei Starovoitov
  Cc: Saeed Mahameed, David S. Miller, Linux Netdev List, Or Gerlitz,
	Tal Alon, Eran Ben Elisha, Maor Gottlieb
In-Reply-To: <20160501021845.GA10348@ast-mbp.thefacebook.com>

On Sun, May 1, 2016 at 5:18 AM, Alexei Starovoitov
<alexei.starovoitov@gmail.com> wrote:
> On Fri, Apr 29, 2016 at 01:36:40AM +0300, Saeed Mahameed wrote:
>> From: Maor Gottlieb <maorg@mellanox.com>
>>  mlx5_core-$(CONFIG_MLX5_CORE_EN_DCB) +=  en_dcbnl.o
>> +mlx5_core-$(CONFIG_RFS_ACCEL) +=  en_arfs.o
>
> this line breaks the build when RFS is on
> and CONFIG_MLX5_CORE_EN is off.
>

Will Fix.

Thank you Alexei.

^ permalink raw reply

* [PATCH] i40e: constify i40e_client_ops structure
From: Julia Lawall @ 2016-05-01 12:07 UTC (permalink / raw)
  To: linux-kernel-u79uwXL29TY76Z2rM5mHXA
  Cc: kernel-janitors-u79uwXL29TY76Z2rM5mHXA,
	linux-rdma-u79uwXL29TY76Z2rM5mHXA, Hal Rosenstock, Sean Hefty,
	Doug Ledford, Tatyana Nikolova, Shiraz Saleem, Mustafa Ismail,
	Chien Tin Tung, Faisal Latif, Jeff Kirsher, Jesse Brandeburg,
	Shannon Nelson, Carolyn Wyborny, Don Skidmore, Bruce Allan,
	John Ronciak, Mitch Williams,
	intel-wired-lan-qjLDD68F18P21nG7glBr7A,
	netdev-u79uwXL29TY76Z2rM5mHXA

The i40e_client_ops structure is never modified, so declare it as const.

Done with the help of Coccinelle.

Signed-off-by: Julia Lawall <Julia.Lawall-L2FTfq7BK8M@public.gmane.org>

---
 drivers/infiniband/hw/i40iw/i40iw_main.c      |    2 +-
 drivers/net/ethernet/intel/i40e/i40e_client.h |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/infiniband/hw/i40iw/i40iw_main.c b/drivers/infiniband/hw/i40iw/i40iw_main.c
index 90e5af2..e41fae24 100644
--- a/drivers/infiniband/hw/i40iw/i40iw_main.c
+++ b/drivers/infiniband/hw/i40iw/i40iw_main.c
@@ -1863,7 +1863,7 @@ static enum i40iw_status_code i40iw_virtchnl_send(struct i40iw_sc_dev *dev,
 }
 
 /* client interface functions */
-static struct i40e_client_ops i40e_ops = {
+static const struct i40e_client_ops i40e_ops = {
 	.open = i40iw_open,
 	.close = i40iw_close,
 	.l2_param_change = i40iw_l2param_change,
diff --git a/drivers/net/ethernet/intel/i40e/i40e_client.h b/drivers/net/ethernet/intel/i40e/i40e_client.h
index bf6b453..a4601d9 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_client.h
+++ b/drivers/net/ethernet/intel/i40e/i40e_client.h
@@ -217,7 +217,7 @@ struct i40e_client {
 #define I40E_CLIENT_FLAGS_LAUNCH_ON_PROBE	BIT(0)
 #define I40E_TX_FLAGS_NOTIFY_OTHER_EVENTS	BIT(2)
 	enum i40e_client_type type;
-	struct i40e_client_ops *ops;	/* client ops provided by the client */
+	const struct i40e_client_ops *ops; /* client ops provided by the client */
 };
 
 static inline bool i40e_client_is_registered(struct i40e_client *client)

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related

* [PATCH] drivers: net: xgene: constify xgene_cle_ops structure
From: Julia Lawall @ 2016-05-01 12:36 UTC (permalink / raw)
  To: Iyappan Subramanian; +Cc: kernel-janitors, Keyur Chudgar, netdev, linux-kernel

The xgene_cle_ops structure is never modified, so declare it as const.

Done with the help of Coccinelle.

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>

---
 drivers/net/ethernet/apm/xgene/xgene_enet_cle.c  |    2 +-
 drivers/net/ethernet/apm/xgene/xgene_enet_cle.h  |    2 +-
 drivers/net/ethernet/apm/xgene/xgene_enet_main.h |    2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/net/ethernet/apm/xgene/xgene_enet_cle.c b/drivers/net/ethernet/apm/xgene/xgene_enet_cle.c
index b2124886..6479288 100644
--- a/drivers/net/ethernet/apm/xgene/xgene_enet_cle.c
+++ b/drivers/net/ethernet/apm/xgene/xgene_enet_cle.c
@@ -729,6 +729,6 @@ static int xgene_enet_cle_init(struct xgene_enet_pdata *pdata)
 	return xgene_cle_setup_ptree(pdata, enet_cle);
 }
 
-struct xgene_cle_ops xgene_cle3in_ops = {
+const struct xgene_cle_ops xgene_cle3in_ops = {
 	.cle_init = xgene_enet_cle_init,
 };
diff --git a/drivers/net/ethernet/apm/xgene/xgene_enet_cle.h b/drivers/net/ethernet/apm/xgene/xgene_enet_cle.h
index 29a17ab..13e829a 100644
--- a/drivers/net/ethernet/apm/xgene/xgene_enet_cle.h
+++ b/drivers/net/ethernet/apm/xgene/xgene_enet_cle.h
@@ -290,6 +290,6 @@ struct xgene_enet_cle {
 	u32 jump_bytes;
 };
 
-extern struct xgene_cle_ops xgene_cle3in_ops;
+extern const struct xgene_cle_ops xgene_cle3in_ops;
 
 #endif /* __XGENE_ENET_CLE_H__ */
diff --git a/drivers/net/ethernet/apm/xgene/xgene_enet_main.h b/drivers/net/ethernet/apm/xgene/xgene_enet_main.h
index 175d188..0a2887b 100644
--- a/drivers/net/ethernet/apm/xgene/xgene_enet_main.h
+++ b/drivers/net/ethernet/apm/xgene/xgene_enet_main.h
@@ -191,7 +191,7 @@ struct xgene_enet_pdata {
 	const struct xgene_mac_ops *mac_ops;
 	const struct xgene_port_ops *port_ops;
 	struct xgene_ring_ops *ring_ops;
-	struct xgene_cle_ops *cle_ops;
+	const struct xgene_cle_ops *cle_ops;
 	struct delayed_work link_work;
 	u32 port_id;
 	u8 cpu_bufnum;

^ permalink raw reply related

* [PATCH] VSOCK: constify vsock_transport structure
From: Julia Lawall @ 2016-05-01 12:49 UTC (permalink / raw)
  To: David S. Miller
  Cc: kernel-janitors, Ray Jui, Scott Branden, Jon Mason, netdev,
	linux-arm-kernel, bcm-kernel-feedback-list, linux-kernel

The vsock_transport structure is never modified, so declare it as const.

Done with the help of Coccinelle.

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>

---
 net/vmw_vsock/vmci_transport.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/vmw_vsock/vmci_transport.c b/net/vmw_vsock/vmci_transport.c
index 5621473..4120b7a 100644
--- a/net/vmw_vsock/vmci_transport.c
+++ b/net/vmw_vsock/vmci_transport.c
@@ -2051,7 +2051,7 @@ static u32 vmci_transport_get_local_cid(void)
 	return vmci_get_context_id();
 }
 
-static struct vsock_transport vmci_transport = {
+static const struct vsock_transport vmci_transport = {
 	.init = vmci_transport_socket_init,
 	.destruct = vmci_transport_destruct,
 	.release = vmci_transport_release,

^ permalink raw reply related

* Q: How to disable vlan strip in Intel igb driver ?
From: Ran Shalit @ 2016-05-01 13:13 UTC (permalink / raw)
  To: netdev

Hello,


I am using intel igb driver in Linux.

The driver strip the packet from vlan inofmation. But we need this
information in the packet.

We tried to change build flag, or see if there is any feature with
ethtool that can disable this feature, but nothing helps.


Is there any way to achive this ?

Regards,

Ran

^ permalink raw reply

* [Question] Should `CAP_NET_ADMIN` be needed when opening `/dev/ppp`?
From: Wang Shanker @ 2016-05-01 13:38 UTC (permalink / raw)
  To: netdev; +Cc: linux-kernel

Hi, all.

                                                                               
I’ve recently met some problems when trying to create a pppoe network link 
inside a unprivileged container. There is a uid namespace which maps root 
inside to a normal user outside. There is also a separate net namespace in the 
container. I create a dev node inside the container and set right 
permission.    

However, `/dev/ppp` cannot get opened since the mapped normal user does not 
have `CAP_NET_ADMIN`. The related code is in `drivers/net/ppp/ppp_generic.c`: 
`int ppp_open()` 

```
static int ppp_open(struct inode *inode, struct file *file)
{
	/*
	 * This could (should?) be enforced by the permissions on /dev/ppp.
	 */
	if (!capable(CAP_NET_ADMIN))
		return -EPERM;
	return 0;
}
```

I wonder why CAP_NET_ADMIN is needed here, rather than leaving it to the
permission of the device node. If there is no need, I suggest that the 
CAP_NET_ADMIN check be removed. 

^ permalink raw reply

* Re: [PATCH net-next] ravb: Remove rx buffer ALIGN
From: Yoshihiro Kaneko @ 2016-05-01 14:29 UTC (permalink / raw)
  To: Sergei Shtylyov
  Cc: netdev, David S. Miller, Simon Horman, Magnus Damm,
	linux-renesas-soc
In-Reply-To: <571FBE21.4050908@cogentembedded.com>

Hi Sergei,

Sorry for the late reply.

2016-04-27 4:14 GMT+09:00 Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>:
> Hello.
>
> On 04/24/2016 07:16 PM, Yoshihiro Kaneko wrote:
>
>> From: Kazuya Mizuguchi <kazuya.mizuguchi.ks@renesas.com>
>>
>> Aligning the reception data size is not required.
>
>
>    OK, the gen 2/3 manuals indeed don't require this. I assume the patch has
> been tested...
>
>> Signed-off-by: Kazuya Mizuguchi <kazuya.mizuguchi.ks@renesas.com>
>> Signed-off-by: Yoshihiro Kaneko <ykaneko0929@gmail.com>
>
>
>    I have a few comments though...
>
>> diff --git a/drivers/net/ethernet/renesas/ravb_main.c
>> b/drivers/net/ethernet/renesas/ravb_main.c
>> index 238b56f..66ed80c 100644
>> --- a/drivers/net/ethernet/renesas/ravb_main.c
>> +++ b/drivers/net/ethernet/renesas/ravb_main.c
>> @@ -246,10 +246,10 @@ static void ravb_ring_format(struct net_device
>> *ndev, int q)
>>         for (i = 0; i < priv->num_rx_ring[q]; i++) {
>>                 /* RX descriptor */
>>                 rx_desc = &priv->rx_ring[q][i];
>> -               /* The size of the buffer should be on 16-byte boundary.
>> */
>> -               rx_desc->ds_cc = cpu_to_le16(ALIGN(PKT_BUF_SZ, 16));
>> -               dma_addr = dma_map_single(ndev->dev.parent,
>> priv->rx_skb[q][i]->data,
>> -                                         ALIGN(PKT_BUF_SZ, 16),
>> +               rx_desc->ds_cc = cpu_to_le16(PKT_BUF_SZ);
>> +               dma_addr = dma_map_single(ndev->dev.parent,
>> +                                         priv->rx_skb[q][i]->data,
>
>
>    Please don't reformat the lines above.

Got it.

>
>> +                                         PKT_BUF_SZ,
>>                                           DMA_FROM_DEVICE);
>>                 /* We just set the data size to 0 for a failed mapping
>> which
>>                  * should prevent DMA from happening...
>> @@ -557,8 +557,9 @@ static bool ravb_rx(struct net_device *ndev, int
>> *quota, int q)
>>
>>                         skb = priv->rx_skb[q][entry];
>>                         priv->rx_skb[q][entry] = NULL;
>> -                       dma_unmap_single(ndev->dev.parent,
>> le32_to_cpu(desc->dptr),
>> -                                        ALIGN(PKT_BUF_SZ, 16),
>> +                       dma_unmap_single(ndev->dev.parent,
>> +                                        le32_to_cpu(desc->dptr),
>
>
>   Same here.

Likewise.

>
> [...]
>
> MBR, Sergei
>

Thanks,
kaneko

^ permalink raw reply

* Re: [PATCH net-next] ravb: Remove rx buffer ALIGN
From: Yoshihiro Kaneko @ 2016-05-01 14:34 UTC (permalink / raw)
  To: Simon Horman
  Cc: Sergei Shtylyov, netdev, David S. Miller, Magnus Damm,
	linux-renesas-soc
In-Reply-To: <20160428233456.GC18128@verge.net.au>

Hi Simon-san,

Thank you for testing this patch!

Thanks,
kaneko

2016-04-29 8:34 GMT+09:00 Simon Horman <horms@verge.net.au>:
> Hi Sergei, Hi Kaneko-san,
>
> On Tue, Apr 26, 2016 at 10:14:41PM +0300, Sergei Shtylyov wrote:
>> Hello.
>>
>> On 04/24/2016 07:16 PM, Yoshihiro Kaneko wrote:
>>
>> >From: Kazuya Mizuguchi <kazuya.mizuguchi.ks@renesas.com>
>> >
>> >Aligning the reception data size is not required.
>>
>>    OK, the gen 2/3 manuals indeed don't require this. I assume the patch has
>> been tested...
>
> This morning I tested this patch applied on net-next using the
> r8a7795/salvator-x  (Gen-3). My test was to boot to a user-space prompt
> using NFS root which was successful. I can run further tests on this setup
> if it would be useful.
>
> Unfortunately I do not have access to hardware to allow me to test this
> on Gen-2.
>
>> >Signed-off-by: Kazuya Mizuguchi <kazuya.mizuguchi.ks@renesas.com>
>> >Signed-off-by: Yoshihiro Kaneko <ykaneko0929@gmail.com>
>
> Tested-by: Simon Horman <horms+renesas@verge.net.au>
>
>>    I have a few comments though...
>
> [...]

^ permalink raw reply

* [PATCH 1/4] net: ethernet: gianfar: move to new ethtool api {get|set}_link_ksettings
From: Philippe Reynes @ 2016-05-01 15:08 UTC (permalink / raw)
  To: pantelis.antoniou, vbordug, claudiu.manoil, leoli, treding, davem
  Cc: netdev, linux-kernel, linuxppc-dev, Philippe Reynes

The ethtool api {get|set}_settings is deprecated.
We move the gianfar driver to new api {get|set}_link_ksettings.

Signed-off-by: Philippe Reynes <tremyfr@gmail.com>
---
 drivers/net/ethernet/freescale/gianfar_ethtool.c |   25 +++++++---------------
 1 files changed, 8 insertions(+), 17 deletions(-)

diff --git a/drivers/net/ethernet/freescale/gianfar_ethtool.c b/drivers/net/ethernet/freescale/gianfar_ethtool.c
index 4b0ee85..2c45c80 100644
--- a/drivers/net/ethernet/freescale/gianfar_ethtool.c
+++ b/drivers/net/ethernet/freescale/gianfar_ethtool.c
@@ -185,7 +185,8 @@ static void gfar_gdrvinfo(struct net_device *dev,
 }
 
 
-static int gfar_ssettings(struct net_device *dev, struct ethtool_cmd *cmd)
+static int gfar_set_ksettings(struct net_device *dev,
+			      const struct ethtool_link_ksettings *cmd)
 {
 	struct gfar_private *priv = netdev_priv(dev);
 	struct phy_device *phydev = priv->phydev;
@@ -193,29 +194,19 @@ static int gfar_ssettings(struct net_device *dev, struct ethtool_cmd *cmd)
 	if (NULL == phydev)
 		return -ENODEV;
 
-	return phy_ethtool_sset(phydev, cmd);
+	return phy_ethtool_ksettings_set(phydev, cmd);
 }
 
-
-/* Return the current settings in the ethtool_cmd structure */
-static int gfar_gsettings(struct net_device *dev, struct ethtool_cmd *cmd)
+static int gfar_get_ksettings(struct net_device *dev,
+			      struct ethtool_link_ksettings *cmd)
 {
 	struct gfar_private *priv = netdev_priv(dev);
 	struct phy_device *phydev = priv->phydev;
-	struct gfar_priv_rx_q *rx_queue = NULL;
-	struct gfar_priv_tx_q *tx_queue = NULL;
 
 	if (NULL == phydev)
 		return -ENODEV;
-	tx_queue = priv->tx_queue[0];
-	rx_queue = priv->rx_queue[0];
-
-	/* etsec-1.7 and older versions have only one txic
-	 * and rxic regs although they support multiple queues */
-	cmd->maxtxpkt = get_icft_value(tx_queue->txic);
-	cmd->maxrxpkt = get_icft_value(rx_queue->rxic);
 
-	return phy_ethtool_gset(phydev, cmd);
+	return phy_ethtool_ksettings_get(phydev, cmd);
 }
 
 /* Return the length of the register structure */
@@ -1565,8 +1556,6 @@ static int gfar_get_ts_info(struct net_device *dev,
 }
 
 const struct ethtool_ops gfar_ethtool_ops = {
-	.get_settings = gfar_gsettings,
-	.set_settings = gfar_ssettings,
 	.get_drvinfo = gfar_gdrvinfo,
 	.get_regs_len = gfar_reglen,
 	.get_regs = gfar_get_regs,
@@ -1589,4 +1578,6 @@ const struct ethtool_ops gfar_ethtool_ops = {
 	.set_rxnfc = gfar_set_nfc,
 	.get_rxnfc = gfar_get_nfc,
 	.get_ts_info = gfar_get_ts_info,
+	.get_link_ksettings = gfar_get_ksettings,
+	.set_link_ksettings = gfar_set_ksettings,
 };
-- 
1.7.4.4

^ permalink raw reply related

* [PATCH 2/4] net: ethernet: ucc: move to new ethtool api {get|set}_link_ksettings
From: Philippe Reynes @ 2016-05-01 15:08 UTC (permalink / raw)
  To: pantelis.antoniou, vbordug, claudiu.manoil, leoli, treding, davem
  Cc: netdev, linux-kernel, linuxppc-dev, Philippe Reynes
In-Reply-To: <1462115291-11372-1-git-send-email-tremyfr@gmail.com>

The ethtool api {get|set}_settings is deprecated.
We move the ucc driver to new api {get|set}_link_ksettings.

Signed-off-by: Philippe Reynes <tremyfr@gmail.com>
---
 drivers/net/ethernet/freescale/ucc_geth_ethtool.c |   17 +++++++----------
 1 files changed, 7 insertions(+), 10 deletions(-)

diff --git a/drivers/net/ethernet/freescale/ucc_geth_ethtool.c b/drivers/net/ethernet/freescale/ucc_geth_ethtool.c
index 89714f5..812a968 100644
--- a/drivers/net/ethernet/freescale/ucc_geth_ethtool.c
+++ b/drivers/net/ethernet/freescale/ucc_geth_ethtool.c
@@ -105,23 +105,20 @@ static const char rx_fw_stat_gstrings[][ETH_GSTRING_LEN] = {
 #define UEC_RX_FW_STATS_LEN ARRAY_SIZE(rx_fw_stat_gstrings)
 
 static int
-uec_get_settings(struct net_device *netdev, struct ethtool_cmd *ecmd)
+uec_get_ksettings(struct net_device *netdev, struct ethtool_link_ksettings *cmd)
 {
 	struct ucc_geth_private *ugeth = netdev_priv(netdev);
 	struct phy_device *phydev = ugeth->phydev;
-	struct ucc_geth_info *ug_info = ugeth->ug_info;
 
 	if (!phydev)
 		return -ENODEV;
 
-	ecmd->maxtxpkt = 1;
-	ecmd->maxrxpkt = ug_info->interruptcoalescingmaxvalue[0];
-
-	return phy_ethtool_gset(phydev, ecmd);
+	return phy_ethtool_ksettings_get(phydev, cmd);
 }
 
 static int
-uec_set_settings(struct net_device *netdev, struct ethtool_cmd *ecmd)
+uec_set_ksettings(struct net_device *netdev,
+		  const struct ethtool_link_ksettings *cmd)
 {
 	struct ucc_geth_private *ugeth = netdev_priv(netdev);
 	struct phy_device *phydev = ugeth->phydev;
@@ -129,7 +126,7 @@ uec_set_settings(struct net_device *netdev, struct ethtool_cmd *ecmd)
 	if (!phydev)
 		return -ENODEV;
 
-	return phy_ethtool_sset(phydev, ecmd);
+	return phy_ethtool_ksettings_set(phydev, cmd);
 }
 
 static void
@@ -392,8 +389,6 @@ static int uec_set_wol(struct net_device *netdev, struct ethtool_wolinfo *wol)
 #endif /* CONFIG_PM */
 
 static const struct ethtool_ops uec_ethtool_ops = {
-	.get_settings           = uec_get_settings,
-	.set_settings           = uec_set_settings,
 	.get_drvinfo            = uec_get_drvinfo,
 	.get_regs_len           = uec_get_regs_len,
 	.get_regs               = uec_get_regs,
@@ -411,6 +406,8 @@ static const struct ethtool_ops uec_ethtool_ops = {
 	.get_wol		= uec_get_wol,
 	.set_wol		= uec_set_wol,
 	.get_ts_info		= ethtool_op_get_ts_info,
+	.get_link_ksettings	= uec_get_ksettings,
+	.set_link_ksettings	= uec_set_ksettings,
 };
 
 void uec_set_ethtool_ops(struct net_device *netdev)
-- 
1.7.4.4

^ permalink raw reply related

* [PATCH 3/4] net: ethernet: fs-enet: move to new ethtool api {get|set}_link_ksettings
From: Philippe Reynes @ 2016-05-01 15:08 UTC (permalink / raw)
  To: pantelis.antoniou, vbordug, claudiu.manoil, leoli, treding, davem
  Cc: netdev, linux-kernel, linuxppc-dev, Philippe Reynes
In-Reply-To: <1462115291-11372-1-git-send-email-tremyfr@gmail.com>

The ethtool api {get|set}_settings is deprecated.
We move the fs-enet driver to new api {get|set}_link_ksettings.

Signed-off-by: Philippe Reynes <tremyfr@gmail.com>
---
 .../net/ethernet/freescale/fs_enet/fs_enet-main.c  |   16 ++++++++++------
 1 files changed, 10 insertions(+), 6 deletions(-)

diff --git a/drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c b/drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c
index 48a9c17..da90b5a 100644
--- a/drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c
+++ b/drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c
@@ -847,24 +847,28 @@ static void fs_get_regs(struct net_device *dev, struct ethtool_regs *regs,
 		regs->version = 0;
 }
 
-static int fs_get_settings(struct net_device *dev, struct ethtool_cmd *cmd)
+static int fs_get_ksettings(struct net_device *dev,
+			    struct ethtool_link_ksettings *cmd)
 {
 	struct fs_enet_private *fep = netdev_priv(dev);
+	struct phy_device *phydev = fep->phydev;
 
 	if (!fep->phydev)
 		return -ENODEV;
 
-	return phy_ethtool_gset(fep->phydev, cmd);
+	return phy_ethtool_ksettings_get(phydev, cmd);
 }
 
-static int fs_set_settings(struct net_device *dev, struct ethtool_cmd *cmd)
+static int fs_set_ksettings(struct net_device *dev,
+			    const struct ethtool_link_ksettings *cmd)
 {
 	struct fs_enet_private *fep = netdev_priv(dev);
+	struct phy_device *phydev = fep->phydev;
 
 	if (!fep->phydev)
 		return -ENODEV;
 
-	return phy_ethtool_sset(fep->phydev, cmd);
+	return phy_ethtool_ksettings_set(phydev, cmd);
 }
 
 static int fs_nway_reset(struct net_device *dev)
@@ -887,14 +891,14 @@ static void fs_set_msglevel(struct net_device *dev, u32 value)
 static const struct ethtool_ops fs_ethtool_ops = {
 	.get_drvinfo = fs_get_drvinfo,
 	.get_regs_len = fs_get_regs_len,
-	.get_settings = fs_get_settings,
-	.set_settings = fs_set_settings,
 	.nway_reset = fs_nway_reset,
 	.get_link = ethtool_op_get_link,
 	.get_msglevel = fs_get_msglevel,
 	.set_msglevel = fs_set_msglevel,
 	.get_regs = fs_get_regs,
 	.get_ts_info = ethtool_op_get_ts_info,
+	.get_link_ksettings = fs_get_ksettings,
+	.set_link_ksettings = fs_set_ksettings,
 };
 
 static int fs_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
-- 
1.7.4.4

^ permalink raw reply related

* [PATCH 4/4] net: ethernet: fec_mpc52xx: move to new ethtool api {get|set}_link_ksettings
From: Philippe Reynes @ 2016-05-01 15:08 UTC (permalink / raw)
  To: pantelis.antoniou, vbordug, claudiu.manoil, leoli, treding, davem
  Cc: netdev, linux-kernel, linuxppc-dev, Philippe Reynes
In-Reply-To: <1462115291-11372-1-git-send-email-tremyfr@gmail.com>

The ethtool api {get|set}_settings is deprecated.
We move the fec_mpc52xx driver to new api {get|set}_link_ksettings.

Signed-off-by: Philippe Reynes <tremyfr@gmail.com>
---
 drivers/net/ethernet/freescale/fec_mpc52xx.c |   16 ++++++++++------
 1 files changed, 10 insertions(+), 6 deletions(-)

diff --git a/drivers/net/ethernet/freescale/fec_mpc52xx.c b/drivers/net/ethernet/freescale/fec_mpc52xx.c
index 25553ee..f444714 100644
--- a/drivers/net/ethernet/freescale/fec_mpc52xx.c
+++ b/drivers/net/ethernet/freescale/fec_mpc52xx.c
@@ -763,24 +763,28 @@ static void mpc52xx_fec_reset(struct net_device *dev)
 
 /* ethtool interface */
 
-static int mpc52xx_fec_get_settings(struct net_device *dev, struct ethtool_cmd *cmd)
+static int mpc52xx_fec_get_ksettings(struct net_device *dev,
+				     struct ethtool_link_ksettings *cmd)
 {
 	struct mpc52xx_fec_priv *priv = netdev_priv(dev);
+	struct phy_device *phydev = priv->phydev;
 
 	if (!priv->phydev)
 		return -ENODEV;
 
-	return phy_ethtool_gset(priv->phydev, cmd);
+	return phy_ethtool_ksettings_get(phydev, cmd);
 }
 
-static int mpc52xx_fec_set_settings(struct net_device *dev, struct ethtool_cmd *cmd)
+static int mpc52xx_fec_set_ksettings(struct net_device *dev,
+				     const struct ethtool_link_ksettings *cmd)
 {
 	struct mpc52xx_fec_priv *priv = netdev_priv(dev);
+	struct phy_device *phydev = priv->phydev;
 
 	if (!priv->phydev)
 		return -ENODEV;
 
-	return phy_ethtool_sset(priv->phydev, cmd);
+	return phy_ethtool_ksettings_set(phydev, cmd);
 }
 
 static u32 mpc52xx_fec_get_msglevel(struct net_device *dev)
@@ -796,12 +800,12 @@ static void mpc52xx_fec_set_msglevel(struct net_device *dev, u32 level)
 }
 
 static const struct ethtool_ops mpc52xx_fec_ethtool_ops = {
-	.get_settings = mpc52xx_fec_get_settings,
-	.set_settings = mpc52xx_fec_set_settings,
 	.get_link = ethtool_op_get_link,
 	.get_msglevel = mpc52xx_fec_get_msglevel,
 	.set_msglevel = mpc52xx_fec_set_msglevel,
 	.get_ts_info = ethtool_op_get_ts_info,
+	.get_link_ksettings = mpc52xx_fec_get_ksettings,
+	.set_link_ksettings = mpc52xx_fec_set_ksettings,
 };
 
 
-- 
1.7.4.4

^ permalink raw reply related

* [PATCH net-next v2] ravb: Remove rx buffer ALIGN
From: Yoshihiro Kaneko @ 2016-05-01 15:19 UTC (permalink / raw)
  To: netdev
  Cc: David S. Miller, Sergei Shtylyov, Simon Horman, Magnus Damm,
	linux-renesas-soc

From: Kazuya Mizuguchi <kazuya.mizuguchi.ks@renesas.com>

Aligning the reception data size is not required.

Signed-off-by: Kazuya Mizuguchi <kazuya.mizuguchi.ks@renesas.com>
Signed-off-by: Yoshihiro Kaneko <ykaneko0929@gmail.com>
Tested-by: Simon Horman <horms+renesas@verge.net.au>
---

This patch is based on the master branch of David Miller's next networking
tree.

v2 [Yoshihiro Kaneko]
* As suggested by Sergei Shtylyov
  remove re-formattings which is not related to the subject of this patch.

 drivers/net/ethernet/renesas/ravb_main.c | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/drivers/net/ethernet/renesas/ravb_main.c b/drivers/net/ethernet/renesas/ravb_main.c
index 238b56f..34066e0 100644
--- a/drivers/net/ethernet/renesas/ravb_main.c
+++ b/drivers/net/ethernet/renesas/ravb_main.c
@@ -246,10 +246,9 @@ static void ravb_ring_format(struct net_device *ndev, int q)
 	for (i = 0; i < priv->num_rx_ring[q]; i++) {
 		/* RX descriptor */
 		rx_desc = &priv->rx_ring[q][i];
-		/* The size of the buffer should be on 16-byte boundary. */
-		rx_desc->ds_cc = cpu_to_le16(ALIGN(PKT_BUF_SZ, 16));
+		rx_desc->ds_cc = cpu_to_le16(PKT_BUF_SZ);
 		dma_addr = dma_map_single(ndev->dev.parent, priv->rx_skb[q][i]->data,
-					  ALIGN(PKT_BUF_SZ, 16),
+					  PKT_BUF_SZ,
 					  DMA_FROM_DEVICE);
 		/* We just set the data size to 0 for a failed mapping which
 		 * should prevent DMA from happening...
@@ -558,7 +557,7 @@ static bool ravb_rx(struct net_device *ndev, int *quota, int q)
 			skb = priv->rx_skb[q][entry];
 			priv->rx_skb[q][entry] = NULL;
 			dma_unmap_single(ndev->dev.parent, le32_to_cpu(desc->dptr),
-					 ALIGN(PKT_BUF_SZ, 16),
+					 PKT_BUF_SZ,
 					 DMA_FROM_DEVICE);
 			get_ts &= (q == RAVB_NC) ?
 					RAVB_RXTSTAMP_TYPE_V2_L2_EVENT :
@@ -588,8 +587,7 @@ static bool ravb_rx(struct net_device *ndev, int *quota, int q)
 	for (; priv->cur_rx[q] - priv->dirty_rx[q] > 0; priv->dirty_rx[q]++) {
 		entry = priv->dirty_rx[q] % priv->num_rx_ring[q];
 		desc = &priv->rx_ring[q][entry];
-		/* The size of the buffer should be on 16-byte boundary. */
-		desc->ds_cc = cpu_to_le16(ALIGN(PKT_BUF_SZ, 16));
+		desc->ds_cc = cpu_to_le16(PKT_BUF_SZ);
 
 		if (!priv->rx_skb[q][entry]) {
 			skb = netdev_alloc_skb(ndev,
-- 
1.9.1

^ permalink raw reply related

* Re: [PATCH net-next] drivers/net: add 6WIND SHULTI support
From: Jiri Pirko @ 2016-05-01 15:24 UTC (permalink / raw)
  To: Nicolas Dichtel; +Cc: David Miller, fw, netdev
In-Reply-To: <5721FB26.6070305@6wind.com>

Thu, Apr 28, 2016 at 01:59:34PM CEST, nicolas.dichtel@6wind.com wrote:
>Le 27/04/2016 18:55, David Miller a écrit :
>> From: Jiri Pirko <jiri@resnulli.us>
>[snip]
>>> The difference is that it this tries to allow userspace crap to mirror
>>> setting user does for bridge/ovs. Basically this looks to me like an
>>> attempt to enable userspace SDKs and such.
>> 
>> +1
>I don't think so because a userspace can receive all the bridge/ovs settings by
>mean of netlink mirror, without the need for this driver at all.

Okay, so what is the different is your words? I asked about purpose and
userspace for this "driver", but you didn't provide that.

I see what I see.

Also, if you say you don't need this driver at all, why are you pushing
it? Userspace apps can glean on netlink messages and act accordingly. In
fact, this is what people are doing (for example Cumulus).

I must be missing something there... (unfortunatelly, I'm pretty sure I'm not).

^ permalink raw reply

* Re: [PATCH net-next] drivers/net: add 6WIND SHULTI support
From: Jiri Pirko @ 2016-05-01 15:27 UTC (permalink / raw)
  To: Nicolas Dichtel; +Cc: David Miller, fw, netdev
In-Reply-To: <57231FD1.2080907@6wind.com>

Fri, Apr 29, 2016 at 10:48:17AM CEST, nicolas.dichtel@6wind.com wrote:
>Le 28/04/2016 17:54, David Miller a écrit :
>[snip]
>> You can say whatever you want, but the facilities you are adding to
>> this driver enables proprietary userland SDK components.
>> 
>> And this is precisely what we are trying to avoid by having a clean,
>> fully featured switch device model in the kernel.
>> 
>> It is against your interestes of upstreaming your driver to continue
>> denying what your changes facilitate.
>Ok, I will rework this patch to remove the controversial parts and custom APIs.

I'm pretty sure that means removing the whole patch... Seriously, this
is wrong.

^ permalink raw reply

* Re: [PATCH v1 net] net/mlx4: Avoid wrong virtual mappings
From: Sinan Kaya @ 2016-05-01 15:43 UTC (permalink / raw)
  To: Haggai Abramovsky, David S. Miller, Doug Ledford
  Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA, netdev-u79uwXL29TY76Z2rM5mHXA,
	Timur Tabi, Eli Cohen, Or Gerlitz, Eran Ben Elisha, Yishai Hadas,
	Tal Alon, Saeed Mahameed
In-Reply-To: <1461740820-15386-1-git-send-email-hagaya-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>

On 4/27/2016 3:07 AM, Haggai Abramovsky wrote:
> The dma_alloc_coherent() function returns a virtual address which can
> be used for coherent access to the underlying memory.  On some
> architectures, like arm64, undefined behavior results if this memory is
> also accessed via virtual mappings that are not coherent.  Because of
> their undefined nature, operations like virt_to_page() return garbage
> when passed virtual addresses obtained from dma_alloc_coherent().  Any
> subsequent mappings via vmap() of the garbage page values are unusable
> and result in bad things like bus errors (synchronous aborts in ARM64
> speak).
> 
> The mlx4 driver contains code that does the equivalent of:
> vmap(virt_to_page(dma_alloc_coherent)), this results in an OOPs when the
> device is opened.
> 
> Prevent Ethernet driver to run this problematic code by forcing it to
> allocate contiguous memory. As for the Infiniband driver, at first we
> are trying to allocate contiguous memory, but in case of failure roll
> back to work with fragmented memory.
> 
> Signed-off-by: Haggai Abramovsky <hagaya-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
> Signed-off-by: Yishai Hadas <yishaih-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
> Reported-by: David Daney <david.daney-YGCgFSpz5w/QT0dZR+AlfA@public.gmane.org>
> Tested-by: Sinan Kaya <okaya-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
> ---
> Changes from v0:
> 	Fix indentation error raised by LeonR
> 
>  drivers/infiniband/hw/mlx4/qp.c                   | 26 +++++--
>  drivers/net/ethernet/mellanox/mlx4/alloc.c        | 93 ++++++++++-------------
>  drivers/net/ethernet/mellanox/mlx4/en_cq.c        |  9 +--
>  drivers/net/ethernet/mellanox/mlx4/en_netdev.c    |  2 +-
>  drivers/net/ethernet/mellanox/mlx4/en_resources.c | 31 --------
>  drivers/net/ethernet/mellanox/mlx4/en_rx.c        | 11 +--
>  drivers/net/ethernet/mellanox/mlx4/en_tx.c        | 14 +---
>  drivers/net/ethernet/mellanox/mlx4/mlx4_en.h      |  2 -
>  include/linux/mlx4/device.h                       |  4 +-
>  9 files changed, 67 insertions(+), 125 deletions(-)
> 
> diff --git a/drivers/infiniband/hw/mlx4/qp.c b/drivers/infiniband/hw/mlx4/qp.c
> index fd97534..842a6da 100644
> --- a/drivers/infiniband/hw/mlx4/qp.c
> +++ b/drivers/infiniband/hw/mlx4/qp.c
> @@ -419,7 +419,8 @@ static int set_rq_size(struct mlx4_ib_dev *dev, struct ib_qp_cap *cap,
>  }
>  
>  static int set_kernel_sq_size(struct mlx4_ib_dev *dev, struct ib_qp_cap *cap,
> -			      enum mlx4_ib_qp_type type, struct mlx4_ib_qp *qp)
> +			      enum mlx4_ib_qp_type type, struct mlx4_ib_qp *qp,
> +			      int shrink_wqe)
>  {
>  	int s;
>  
> @@ -477,7 +478,7 @@ static int set_kernel_sq_size(struct mlx4_ib_dev *dev, struct ib_qp_cap *cap,
>  	 * We set WQE size to at least 64 bytes, this way stamping
>  	 * invalidates each WQE.
>  	 */
> -	if (dev->dev->caps.fw_ver >= MLX4_FW_VER_WQE_CTRL_NEC &&
> +	if (shrink_wqe && dev->dev->caps.fw_ver >= MLX4_FW_VER_WQE_CTRL_NEC &&
>  	    qp->sq_signal_bits && BITS_PER_LONG == 64 &&
>  	    type != MLX4_IB_QPT_SMI && type != MLX4_IB_QPT_GSI &&
>  	    !(type & (MLX4_IB_QPT_PROXY_SMI_OWNER | MLX4_IB_QPT_PROXY_SMI |
> @@ -642,6 +643,7 @@ static int create_qp_common(struct mlx4_ib_dev *dev, struct ib_pd *pd,
>  {
>  	int qpn;
>  	int err;
> +	struct ib_qp_cap backup_cap;
>  	struct mlx4_ib_sqp *sqp;
>  	struct mlx4_ib_qp *qp;
>  	enum mlx4_ib_qp_type qp_type = (enum mlx4_ib_qp_type) init_attr->qp_type;
> @@ -775,7 +777,8 @@ static int create_qp_common(struct mlx4_ib_dev *dev, struct ib_pd *pd,
>  				goto err;
>  		}
>  
> -		err = set_kernel_sq_size(dev, &init_attr->cap, qp_type, qp);
> +		memcpy(&backup_cap, &init_attr->cap, sizeof(backup_cap));
> +		err = set_kernel_sq_size(dev, &init_attr->cap, qp_type, qp, 1);
>  		if (err)
>  			goto err;
>  
> @@ -787,9 +790,20 @@ static int create_qp_common(struct mlx4_ib_dev *dev, struct ib_pd *pd,
>  			*qp->db.db = 0;
>  		}
>  
> -		if (mlx4_buf_alloc(dev->dev, qp->buf_size, PAGE_SIZE * 2, &qp->buf, gfp)) {
> -			err = -ENOMEM;
> -			goto err_db;
> +		if (mlx4_buf_alloc(dev->dev, qp->buf_size, qp->buf_size,
> +				   &qp->buf, gfp)) {
> +			memcpy(&init_attr->cap, &backup_cap,
> +			       sizeof(backup_cap));
> +			err = set_kernel_sq_size(dev, &init_attr->cap, qp_type,
> +						 qp, 0);
> +			if (err)
> +				goto err_db;
> +
> +			if (mlx4_buf_alloc(dev->dev, qp->buf_size,
> +					   PAGE_SIZE * 2, &qp->buf, gfp)) {
> +				err = -ENOMEM;
> +				goto err_db;
> +			}
>  		}
>  
>  		err = mlx4_mtt_init(dev->dev, qp->buf.npages, qp->buf.page_shift,
> diff --git a/drivers/net/ethernet/mellanox/mlx4/alloc.c b/drivers/net/ethernet/mellanox/mlx4/alloc.c
> index 0c51c69..249a458 100644
> --- a/drivers/net/ethernet/mellanox/mlx4/alloc.c
> +++ b/drivers/net/ethernet/mellanox/mlx4/alloc.c
> @@ -576,41 +576,48 @@ out:
>  
>  	return res;
>  }
> -/*
> - * Handling for queue buffers -- we allocate a bunch of memory and
> - * register it in a memory region at HCA virtual address 0.  If the
> - * requested size is > max_direct, we split the allocation into
> - * multiple pages, so we don't require too much contiguous memory.
> - */
>  
> -int mlx4_buf_alloc(struct mlx4_dev *dev, int size, int max_direct,
> -		   struct mlx4_buf *buf, gfp_t gfp)
> +static int mlx4_buf_direct_alloc(struct mlx4_dev *dev, int size,
> +				 struct mlx4_buf *buf, gfp_t gfp)
>  {
>  	dma_addr_t t;
>  
> -	if (size <= max_direct) {
> -		buf->nbufs        = 1;
> -		buf->npages       = 1;
> -		buf->page_shift   = get_order(size) + PAGE_SHIFT;
> -		buf->direct.buf   = dma_alloc_coherent(&dev->persist->pdev->dev,
> -						       size, &t, gfp);
> -		if (!buf->direct.buf)
> -			return -ENOMEM;
> +	buf->nbufs        = 1;
> +	buf->npages       = 1;
> +	buf->page_shift   = get_order(size) + PAGE_SHIFT;
> +	buf->direct.buf   =
> +		dma_zalloc_coherent(&dev->persist->pdev->dev,
> +				    size, &t, gfp);
> +	if (!buf->direct.buf)
> +		return -ENOMEM;
>  
> -		buf->direct.map = t;
> +	buf->direct.map = t;
>  
> -		while (t & ((1 << buf->page_shift) - 1)) {
> -			--buf->page_shift;
> -			buf->npages *= 2;
> -		}
> +	while (t & ((1 << buf->page_shift) - 1)) {
> +		--buf->page_shift;
> +		buf->npages *= 2;
> +	}
>  
> -		memset(buf->direct.buf, 0, size);
> +	return 0;
> +}
> +
> +/* Handling for queue buffers -- we allocate a bunch of memory and
> + * register it in a memory region at HCA virtual address 0. If the
> + *  requested size is > max_direct, we split the allocation into
> + *  multiple pages, so we don't require too much contiguous memory.
> + */
> +int mlx4_buf_alloc(struct mlx4_dev *dev, int size, int max_direct,
> +		   struct mlx4_buf *buf, gfp_t gfp)
> +{
> +	if (size <= max_direct) {
> +		return mlx4_buf_direct_alloc(dev, size, buf, gfp);
>  	} else {
> +		dma_addr_t t;
>  		int i;
>  
> -		buf->direct.buf  = NULL;
> -		buf->nbufs       = (size + PAGE_SIZE - 1) / PAGE_SIZE;
> -		buf->npages      = buf->nbufs;
> +		buf->direct.buf = NULL;
> +		buf->nbufs	= (size + PAGE_SIZE - 1) / PAGE_SIZE;
> +		buf->npages	= buf->nbufs;
>  		buf->page_shift  = PAGE_SHIFT;
>  		buf->page_list   = kcalloc(buf->nbufs, sizeof(*buf->page_list),
>  					   gfp);
> @@ -619,28 +626,12 @@ int mlx4_buf_alloc(struct mlx4_dev *dev, int size, int max_direct,
>  
>  		for (i = 0; i < buf->nbufs; ++i) {
>  			buf->page_list[i].buf =
> -				dma_alloc_coherent(&dev->persist->pdev->dev,
> -						   PAGE_SIZE,
> -						   &t, gfp);
> +				dma_zalloc_coherent(&dev->persist->pdev->dev,
> +						    PAGE_SIZE, &t, gfp);
>  			if (!buf->page_list[i].buf)
>  				goto err_free;
>  
>  			buf->page_list[i].map = t;
> -
> -			memset(buf->page_list[i].buf, 0, PAGE_SIZE);
> -		}
> -
> -		if (BITS_PER_LONG == 64) {
> -			struct page **pages;
> -			pages = kmalloc(sizeof *pages * buf->nbufs, gfp);
> -			if (!pages)
> -				goto err_free;
> -			for (i = 0; i < buf->nbufs; ++i)
> -				pages[i] = virt_to_page(buf->page_list[i].buf);
> -			buf->direct.buf = vmap(pages, buf->nbufs, VM_MAP, PAGE_KERNEL);
> -			kfree(pages);
> -			if (!buf->direct.buf)
> -				goto err_free;
>  		}
>  	}
>  
> @@ -655,15 +646,11 @@ EXPORT_SYMBOL_GPL(mlx4_buf_alloc);
>  
>  void mlx4_buf_free(struct mlx4_dev *dev, int size, struct mlx4_buf *buf)
>  {
> -	int i;
> -
> -	if (buf->nbufs == 1)
> +	if (buf->nbufs == 1) {
>  		dma_free_coherent(&dev->persist->pdev->dev, size,
> -				  buf->direct.buf,
> -				  buf->direct.map);
> -	else {
> -		if (BITS_PER_LONG == 64)
> -			vunmap(buf->direct.buf);
> +				  buf->direct.buf, buf->direct.map);
> +	} else {
> +		int i;
>  
>  		for (i = 0; i < buf->nbufs; ++i)
>  			if (buf->page_list[i].buf)
> @@ -789,7 +776,7 @@ void mlx4_db_free(struct mlx4_dev *dev, struct mlx4_db *db)
>  EXPORT_SYMBOL_GPL(mlx4_db_free);
>  
>  int mlx4_alloc_hwq_res(struct mlx4_dev *dev, struct mlx4_hwq_resources *wqres,
> -		       int size, int max_direct)
> +		       int size)
>  {
>  	int err;
>  
> @@ -799,7 +786,7 @@ int mlx4_alloc_hwq_res(struct mlx4_dev *dev, struct mlx4_hwq_resources *wqres,
>  
>  	*wqres->db.db = 0;
>  
> -	err = mlx4_buf_alloc(dev, size, max_direct, &wqres->buf, GFP_KERNEL);
> +	err = mlx4_buf_direct_alloc(dev, size, &wqres->buf, GFP_KERNEL);
>  	if (err)
>  		goto err_db;
>  
> diff --git a/drivers/net/ethernet/mellanox/mlx4/en_cq.c b/drivers/net/ethernet/mellanox/mlx4/en_cq.c
> index af975a2..132cea6 100644
> --- a/drivers/net/ethernet/mellanox/mlx4/en_cq.c
> +++ b/drivers/net/ethernet/mellanox/mlx4/en_cq.c
> @@ -73,22 +73,16 @@ int mlx4_en_create_cq(struct mlx4_en_priv *priv,
>  	 */
>  	set_dev_node(&mdev->dev->persist->pdev->dev, node);
>  	err = mlx4_alloc_hwq_res(mdev->dev, &cq->wqres,
> -				cq->buf_size, 2 * PAGE_SIZE);
> +				cq->buf_size);
>  	set_dev_node(&mdev->dev->persist->pdev->dev, mdev->dev->numa_node);
>  	if (err)
>  		goto err_cq;
>  
> -	err = mlx4_en_map_buffer(&cq->wqres.buf);
> -	if (err)
> -		goto err_res;
> -
>  	cq->buf = (struct mlx4_cqe *)cq->wqres.buf.direct.buf;
>  	*pcq = cq;
>  
>  	return 0;
>  
> -err_res:
> -	mlx4_free_hwq_res(mdev->dev, &cq->wqres, cq->buf_size);
>  err_cq:
>  	kfree(cq);
>  	*pcq = NULL;
> @@ -177,7 +171,6 @@ void mlx4_en_destroy_cq(struct mlx4_en_priv *priv, struct mlx4_en_cq **pcq)
>  	struct mlx4_en_dev *mdev = priv->mdev;
>  	struct mlx4_en_cq *cq = *pcq;
>  
> -	mlx4_en_unmap_buffer(&cq->wqres.buf);
>  	mlx4_free_hwq_res(mdev->dev, &cq->wqres, cq->buf_size);
>  	if (mlx4_is_eq_vector_valid(mdev->dev, priv->port, cq->vector) &&
>  	    cq->is_tx == RX)
> diff --git a/drivers/net/ethernet/mellanox/mlx4/en_netdev.c b/drivers/net/ethernet/mellanox/mlx4/en_netdev.c
> index b4b258c..5b19178 100644
> --- a/drivers/net/ethernet/mellanox/mlx4/en_netdev.c
> +++ b/drivers/net/ethernet/mellanox/mlx4/en_netdev.c
> @@ -2907,7 +2907,7 @@ int mlx4_en_init_netdev(struct mlx4_en_dev *mdev, int port,
>  
>  	/* Allocate page for receive rings */
>  	err = mlx4_alloc_hwq_res(mdev->dev, &priv->res,
> -				MLX4_EN_PAGE_SIZE, MLX4_EN_PAGE_SIZE);
> +				MLX4_EN_PAGE_SIZE);
>  	if (err) {
>  		en_err(priv, "Failed to allocate page for rx qps\n");
>  		goto out;
> diff --git a/drivers/net/ethernet/mellanox/mlx4/en_resources.c b/drivers/net/ethernet/mellanox/mlx4/en_resources.c
> index 02e925d..a6b0db0 100644
> --- a/drivers/net/ethernet/mellanox/mlx4/en_resources.c
> +++ b/drivers/net/ethernet/mellanox/mlx4/en_resources.c
> @@ -107,37 +107,6 @@ int mlx4_en_change_mcast_lb(struct mlx4_en_priv *priv, struct mlx4_qp *qp,
>  	return ret;
>  }
>  
> -int mlx4_en_map_buffer(struct mlx4_buf *buf)
> -{
> -	struct page **pages;
> -	int i;
> -
> -	if (BITS_PER_LONG == 64 || buf->nbufs == 1)
> -		return 0;
> -
> -	pages = kmalloc(sizeof *pages * buf->nbufs, GFP_KERNEL);
> -	if (!pages)
> -		return -ENOMEM;
> -
> -	for (i = 0; i < buf->nbufs; ++i)
> -		pages[i] = virt_to_page(buf->page_list[i].buf);
> -
> -	buf->direct.buf = vmap(pages, buf->nbufs, VM_MAP, PAGE_KERNEL);
> -	kfree(pages);
> -	if (!buf->direct.buf)
> -		return -ENOMEM;
> -
> -	return 0;
> -}
> -
> -void mlx4_en_unmap_buffer(struct mlx4_buf *buf)
> -{
> -	if (BITS_PER_LONG == 64 || buf->nbufs == 1)
> -		return;
> -
> -	vunmap(buf->direct.buf);
> -}
> -
>  void mlx4_en_sqp_event(struct mlx4_qp *qp, enum mlx4_event event)
>  {
>      return;
> diff --git a/drivers/net/ethernet/mellanox/mlx4/en_rx.c b/drivers/net/ethernet/mellanox/mlx4/en_rx.c
> index 7d25bc9..89775bb 100644
> --- a/drivers/net/ethernet/mellanox/mlx4/en_rx.c
> +++ b/drivers/net/ethernet/mellanox/mlx4/en_rx.c
> @@ -394,17 +394,11 @@ int mlx4_en_create_rx_ring(struct mlx4_en_priv *priv,
>  
>  	/* Allocate HW buffers on provided NUMA node */
>  	set_dev_node(&mdev->dev->persist->pdev->dev, node);
> -	err = mlx4_alloc_hwq_res(mdev->dev, &ring->wqres,
> -				 ring->buf_size, 2 * PAGE_SIZE);
> +	err = mlx4_alloc_hwq_res(mdev->dev, &ring->wqres, ring->buf_size);
>  	set_dev_node(&mdev->dev->persist->pdev->dev, mdev->dev->numa_node);
>  	if (err)
>  		goto err_info;
>  
> -	err = mlx4_en_map_buffer(&ring->wqres.buf);
> -	if (err) {
> -		en_err(priv, "Failed to map RX buffer\n");
> -		goto err_hwq;
> -	}
>  	ring->buf = ring->wqres.buf.direct.buf;
>  
>  	ring->hwtstamp_rx_filter = priv->hwtstamp_config.rx_filter;
> @@ -412,8 +406,6 @@ int mlx4_en_create_rx_ring(struct mlx4_en_priv *priv,
>  	*pring = ring;
>  	return 0;
>  
> -err_hwq:
> -	mlx4_free_hwq_res(mdev->dev, &ring->wqres, ring->buf_size);
>  err_info:
>  	vfree(ring->rx_info);
>  	ring->rx_info = NULL;
> @@ -517,7 +509,6 @@ void mlx4_en_destroy_rx_ring(struct mlx4_en_priv *priv,
>  	struct mlx4_en_dev *mdev = priv->mdev;
>  	struct mlx4_en_rx_ring *ring = *pring;
>  
> -	mlx4_en_unmap_buffer(&ring->wqres.buf);
>  	mlx4_free_hwq_res(mdev->dev, &ring->wqres, size * stride + TXBB_SIZE);
>  	vfree(ring->rx_info);
>  	ring->rx_info = NULL;
> diff --git a/drivers/net/ethernet/mellanox/mlx4/en_tx.c b/drivers/net/ethernet/mellanox/mlx4/en_tx.c
> index c0d7b72..b9ab646 100644
> --- a/drivers/net/ethernet/mellanox/mlx4/en_tx.c
> +++ b/drivers/net/ethernet/mellanox/mlx4/en_tx.c
> @@ -93,20 +93,13 @@ int mlx4_en_create_tx_ring(struct mlx4_en_priv *priv,
>  
>  	/* Allocate HW buffers on provided NUMA node */
>  	set_dev_node(&mdev->dev->persist->pdev->dev, node);
> -	err = mlx4_alloc_hwq_res(mdev->dev, &ring->wqres, ring->buf_size,
> -				 2 * PAGE_SIZE);
> +	err = mlx4_alloc_hwq_res(mdev->dev, &ring->wqres, ring->buf_size);
>  	set_dev_node(&mdev->dev->persist->pdev->dev, mdev->dev->numa_node);
>  	if (err) {
>  		en_err(priv, "Failed allocating hwq resources\n");
>  		goto err_bounce;
>  	}
>  
> -	err = mlx4_en_map_buffer(&ring->wqres.buf);
> -	if (err) {
> -		en_err(priv, "Failed to map TX buffer\n");
> -		goto err_hwq_res;
> -	}
> -
>  	ring->buf = ring->wqres.buf.direct.buf;
>  
>  	en_dbg(DRV, priv, "Allocated TX ring (addr:%p) - buf:%p size:%d buf_size:%d dma:%llx\n",
> @@ -117,7 +110,7 @@ int mlx4_en_create_tx_ring(struct mlx4_en_priv *priv,
>  				    MLX4_RESERVE_ETH_BF_QP);
>  	if (err) {
>  		en_err(priv, "failed reserving qp for TX ring\n");
> -		goto err_map;
> +		goto err_hwq_res;
>  	}
>  
>  	err = mlx4_qp_alloc(mdev->dev, ring->qpn, &ring->qp, GFP_KERNEL);
> @@ -154,8 +147,6 @@ int mlx4_en_create_tx_ring(struct mlx4_en_priv *priv,
>  
>  err_reserve:
>  	mlx4_qp_release_range(mdev->dev, ring->qpn, 1);
> -err_map:
> -	mlx4_en_unmap_buffer(&ring->wqres.buf);
>  err_hwq_res:
>  	mlx4_free_hwq_res(mdev->dev, &ring->wqres, ring->buf_size);
>  err_bounce:
> @@ -182,7 +173,6 @@ void mlx4_en_destroy_tx_ring(struct mlx4_en_priv *priv,
>  	mlx4_qp_remove(mdev->dev, &ring->qp);
>  	mlx4_qp_free(mdev->dev, &ring->qp);
>  	mlx4_qp_release_range(priv->mdev->dev, ring->qpn, 1);
> -	mlx4_en_unmap_buffer(&ring->wqres.buf);
>  	mlx4_free_hwq_res(mdev->dev, &ring->wqres, ring->buf_size);
>  	kfree(ring->bounce_buf);
>  	ring->bounce_buf = NULL;
> diff --git a/drivers/net/ethernet/mellanox/mlx4/mlx4_en.h b/drivers/net/ethernet/mellanox/mlx4/mlx4_en.h
> index d12ab6a..a70e2d0 100644
> --- a/drivers/net/ethernet/mellanox/mlx4/mlx4_en.h
> +++ b/drivers/net/ethernet/mellanox/mlx4/mlx4_en.h
> @@ -671,8 +671,6 @@ void mlx4_en_fill_qp_context(struct mlx4_en_priv *priv, int size, int stride,
>  		int is_tx, int rss, int qpn, int cqn, int user_prio,
>  		struct mlx4_qp_context *context);
>  void mlx4_en_sqp_event(struct mlx4_qp *qp, enum mlx4_event event);
> -int mlx4_en_map_buffer(struct mlx4_buf *buf);
> -void mlx4_en_unmap_buffer(struct mlx4_buf *buf);
>  int mlx4_en_change_mcast_lb(struct mlx4_en_priv *priv, struct mlx4_qp *qp,
>  			    int loopback);
>  void mlx4_en_calc_rx_buf(struct net_device *dev);
> diff --git a/include/linux/mlx4/device.h b/include/linux/mlx4/device.h
> index 8541a91..72da65f 100644
> --- a/include/linux/mlx4/device.h
> +++ b/include/linux/mlx4/device.h
> @@ -1051,7 +1051,7 @@ int mlx4_buf_alloc(struct mlx4_dev *dev, int size, int max_direct,
>  void mlx4_buf_free(struct mlx4_dev *dev, int size, struct mlx4_buf *buf);
>  static inline void *mlx4_buf_offset(struct mlx4_buf *buf, int offset)
>  {
> -	if (BITS_PER_LONG == 64 || buf->nbufs == 1)
> +	if (buf->nbufs == 1)
>  		return buf->direct.buf + offset;
>  	else
>  		return buf->page_list[offset >> PAGE_SHIFT].buf +
> @@ -1091,7 +1091,7 @@ int mlx4_db_alloc(struct mlx4_dev *dev, struct mlx4_db *db, int order,
>  void mlx4_db_free(struct mlx4_dev *dev, struct mlx4_db *db);
>  
>  int mlx4_alloc_hwq_res(struct mlx4_dev *dev, struct mlx4_hwq_resources *wqres,
> -		       int size, int max_direct);
> +		       int size);
>  void mlx4_free_hwq_res(struct mlx4_dev *mdev, struct mlx4_hwq_resources *wqres,
>  		       int size);
>  
> 

Can we get this queued for 4.7? Mellanox with arm64 has been broken over 1.5 years.

-- 
Sinan Kaya
Qualcomm Technologies, Inc. on behalf of Qualcomm Innovation Center, Inc.
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply

* Re: [PATCH] macb: fix mdiobus_scan() error check
From: Florian Fainelli @ 2016-05-01 16:03 UTC (permalink / raw)
  To: Sergei Shtylyov, netdev, nicolas.ferre
In-Reply-To: <2317306.aZN9iKAKYz@wasted.cogentembedded.com>

Le 30/04/2016 15:47, Sergei Shtylyov a écrit :
> Now mdiobus_scan() returns ERR_PTR(-ENODEV) instead of NULL if the PHY
> device ID was read as all ones. As this was not  an error before, this
> value  should be filtered out now in this driver.
> 
> Fixes: b74766a0a0fe ("phylib: don't return NULL from get_phy_device()")
> Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>

Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
-- 
Florian

^ permalink raw reply

* Re: [PATCH] pxa168_eth: fix mdiobus_scan() error check
From: Florian Fainelli @ 2016-05-01 16:05 UTC (permalink / raw)
  To: Sergei Shtylyov, netdev; +Cc: arnd
In-Reply-To: <6024241.YxM8l6DPJo@wasted.cogentembedded.com>

Le 30/04/2016 13:35, Sergei Shtylyov a écrit :
> Since mdiobus_scan() returns either an error code or NULL on error, the
> driver should check  for both,  not only for NULL, otherwise a crash is
> imminent...
> 
> Reported-by: Arnd Bergmann <arnd@arndb.de>
> Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
> 
> ---
> The patch is against DaveM's 'net.git' repo.
> 
>  drivers/net/ethernet/marvell/pxa168_eth.c |    2 ++
>  1 file changed, 2 insertions(+)
> 
> Index: net/drivers/net/ethernet/marvell/pxa168_eth.c
> ===================================================================
> --- net.orig/drivers/net/ethernet/marvell/pxa168_eth.c
> +++ net/drivers/net/ethernet/marvell/pxa168_eth.c
> @@ -979,6 +979,8 @@ static int pxa168_init_phy(struct net_de
>  		return 0;
>  
>  	pep->phy = mdiobus_scan(pep->smi_bus, pep->phy_addr);
> +	if (IS_ERR(pep->phy))
> +		return PTR_ERR(pep->phy);
>  	if (!pep->phy)
>  		return -ENODEV;

Should not this check be removed too and converted to a
PTR_ERR(pep->phy) != -ENODEV?
-- 
Florian

^ permalink raw reply

* Re: Q: How to disable vlan strip in Intel igb driver ?
From: Alexander Duyck @ 2016-05-01 17:08 UTC (permalink / raw)
  To: Ran Shalit, e1000-devel@lists.sourceforge.net; +Cc: Netdev
In-Reply-To: <CAJ2oMhKyMbgLZiGSGQxRGVdbGARvMHeO3=vpgO0uOzOBqvf79Q@mail.gmail.com>

On Sun, May 1, 2016 at 6:13 AM, Ran Shalit <ranshalit@gmail.com> wrote:
> Hello,
>
>
> I am using intel igb driver in Linux.
>
> The driver strip the packet from vlan inofmation. But we need this
> information in the packet.
>
> We tried to change build flag, or see if there is any feature with
> ethtool that can disable this feature, but nothing helps.
>
>
> Is there any way to achive this ?
>
> Regards,
>
> Ran

You should be able to turn off the offload by setting
"rx-vlan-offload" to "off" via "ethtool -K".

- Alex

^ permalink raw reply

* Re: Q: How to disable vlan strip in Intel igb driver ?
From: Peter Palúch @ 2016-05-01 18:22 UTC (permalink / raw)
  To: Ran Shalit, netdev
In-Reply-To: <CAJ2oMhKyMbgLZiGSGQxRGVdbGARvMHeO3=vpgO0uOzOBqvf79Q@mail.gmail.com>

Ran,

How are you accessing the VLAN tag information - and how do you know 
that the VLAN tag is not being passed through? Are you using AF_PACKET 
socket in your application?

Best regards,
Peter


On 01.05.2016 15:13, Ran Shalit wrote:
> Hello,
>
>
> I am using intel igb driver in Linux.
>
> The driver strip the packet from vlan inofmation. But we need this
> information in the packet.
>
> We tried to change build flag, or see if there is any feature with
> ethtool that can disable this feature, but nothing helps.
>
>
> Is there any way to achive this ?
>
> Regards,
>
> Ran

^ permalink raw reply

* Re: Q: How to disable vlan strip in Intel igb driver ?
From: Ran Shalit @ 2016-05-01 18:48 UTC (permalink / raw)
  To: Peter Palúch; +Cc: netdev, alexander.duyck
In-Reply-To: <afa69dcb-0905-a556-0208-49a2363ae818@fri.uniza.sk>

>> Ran
>
> You should be able to turn off the offload by setting
> "rx-vlan-offload" to "off" via "ethtool -K".
>
> - Alex

Alex,
I don't see rx-vlan-offload option in my ethtool. strange, maybe it is
not available in all ethtool versions ?



On Sun, May 1, 2016 at 9:22 PM, Peter Palúch <Peter.Paluch@fri.uniza.sk> wrote:
> Ran,
>
> How are you accessing the VLAN tag information - and how do you know that
> the VLAN tag is not being passed through? Are you using AF_PACKET socket in
> your application?
>
> Best regards,
> Peter
>
>
Hi Peter,

Yes, I'm using AF_PACKET (I can't validate it now for 100%, but I
quite sure about it).
I'm accessing the ethernet header, and it always gives me non extended
ethernet header (without vlan information).
I can see the vlan tag in vlan_tci field in sk_buff, but this is not
exactly what I need, I need the header AS-IS with the original
(extended) ethernet header.

Thanks.
Ran
>
> On 01.05.2016 15:13, Ran Shalit wrote:
>>
>> Hello,
>>
>>
>> I am using intel igb driver in Linux.
>>
>> The driver strip the packet from vlan inofmation. But we need this
>> information in the packet.
>>
>> We tried to change build flag, or see if there is any feature with
>> ethtool that can disable this feature, but nothing helps.
>>
>>
>> Is there any way to achive this ?
>>
>> Regards,
>>
>> Ran
>
>

^ permalink raw reply

* Re: Cannot use NFS with linux-next 20160429
From: Chuck Lever @ 2016-05-01 19:52 UTC (permalink / raw)
  To: Fabio Estevam
  Cc: Trond Myklebust, netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	Linux NFS Mailing List
In-Reply-To: <CAOMZO5D9dTFRbT0CMOdM3aGb1cLd+n8udQQH0K=onZ7Z-4onmw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>

Hi Fabio-

> On Apr 29, 2016, at 7:18 PM, Fabio Estevam <festevam-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
> 
> Hi,
> 
> NFS is not working on a imx6q-sabresd board running linux-next 20160429:
> 
> [   15.753317]   #0: wm8962-audio
> [   15.759437] Root-NFS: no NFS server address

At a glance, that looks like the NFSROOT mount options are
invalid? First, confirm what is specified on the kernel
cmdline.

I'm not aware of any recent changes to NFSROOT. Often
these NFSROOT problems turn out to be related to churn in
the underlying Ethernet drivers or the generic code that
handles mounting the root filesystem at boot time.

Thus a second suggestion would be to use "git bisect".


> [   15.763649] VFS: Unable to mount root fs via NFS, trying floppy.
> [   15.774223] VFS: Cannot open root device "nfs" or
> unknown-block(2,0): error -6
> [   15.781540] Please append a correct "root=" boot option; here are
> the available partitions:
> [   15.790145] 0100           65536 ram0  (driver?)
> [   15.794837] 0101           65536 ram1  (driver?)
> [   15.799576] 0102           65536 ram2  (driver?)
> [   15.804262] 0103           65536 ram3  (driver?)
> [   15.809023] 0104           65536 ram4  (driver?)
> [   15.813710] 0105           65536 ram5  (driver?)
> [   15.818392] 0106           65536 ram6  (driver?)
> [   15.823121] 0107           65536 ram7  (driver?)
> [   15.827804] 0108           65536 ram8  (driver?)
> [   15.832531] 0109           65536 ram9  (driver?)
> [   15.837213] 010a           65536 ram10  (driver?)
> [   15.841989] 010b           65536 ram11  (driver?)
> [   15.846729] 010c           65536 ram12  (driver?)
> [   15.851491] 010d           65536 ram13  (driver?)
> [   15.856228] 010e           65536 ram14  (driver?)
> [   15.860992] 010f           65536 ram15  (driver?)
> [   15.865742] 1f00            4096 mtdblock0  (driver?)
> [   15.870853] b300         3872256 mmcblk1  driver: mmcblk
> [   15.876199] b308         7757824 mmcblk2  driver: mmcblk
> [   15.881570] b320             128 mmcblk2rpmb  (driver?)
> [   15.886830] b318            1024 mmcblk2boot1  (driver?)
> [   15.892201] b310            1024 mmcblk2boot0  (driver?)
> [   15.897541] Kernel panic - not syncing: VFS: Unable to mount root
> fs on unknown-block(2,0)
> [   15.905978] CPU0: stopping
> [   15.908704] CPU: 0 PID: 0 Comm: swapper/0 Not tainted
> 4.6.0-rc5-next-20160429 #349
> [   15.916284] Hardware name: Freescale i.MX6 Quad/DualLite (Device Tree)
> [   15.922818] Backtrace:
> [   15.925316] [<c010b6f8>] (dump_backtrace) from [<c010b894>]
> (show_stack+0x18/0x1c)
> [   15.932893]  r6:60000193 r5:ffffffff r4:00000000 r3:00000000
> [   15.938649] [<c010b87c>] (show_stack) from [<c03df190>]
> (dump_stack+0xb0/0xe8)
> [   15.945889] [<c03df0e0>] (dump_stack) from [<c010edec>]
> (handle_IPI+0x174/0x1a4)
> [   15.953292]  r8:c0d01f08 r7:c0c746ec r6:00000000 r5:c0d02b10
> r4:00000000 r3:c0d05e80
> [   15.961147] [<c010ec78>] (handle_IPI) from [<c0101618>]
> (gic_handle_irq+0x8c/0x9c)
> [   15.968722]  r8:c0d21f80 r7:c0d02c58 r6:c0d01f08 r5:f400010c
> r4:f4000100 r3:00000c04
> [   15.976573] [<c010158c>] (gic_handle_irq) from [<c010c4b8>]
> (__irq_svc+0x58/0x78)
> [   15.984065] Exception stack(0xc0d01f08 to 0xc0d01f50)
> [   15.989129] 1f00:                   00000001 00000001 00000000
> c011b920 00000000 c0d02984
> [   15.997318] 1f20: 00000000 00000000 c0c757b8 c0d029d8 c0d029d0
> c0d01f64 c0d01f28 c0d01f58
> [   16.005505] 1f40: c016d120 c01089e0 20000013 ffffffff
> [   16.010563]  r10:c0d029d0 r9:c0d029d8 r8:c0c757b8 r7:c0d01f3c
> r6:ffffffff r5:20000013
> [   16.018495]  r4:c01089e0 r3:c0d05e80
> [   16.022130] [<c01089b8>] (arch_cpu_idle) from [<c01661a0>]
> (default_idle_call+0x28/0x38)
> [   16.030236] [<c0166178>] (default_idle_call) from [<c0166378>]
> (cpu_startup_entry+0x1c8/0x24c)
> [   16.038864] [<c01661b0>] (cpu_startup_entry) from [<c08edd78>]
> (rest_init+0x12c/0x16c)
> [   16.046788]  r7:c0c5da48 r3:00000000
> [   16.050417] [<c08edc4c>] (rest_init) from [<c0c00cbc>]
> (start_kernel+0x340/0x3b0)
> [   16.057906]  r5:ffffffff r4:c0d6e050
> [   16.061532] [<c0c0097c>] (start_kernel) from [<1000807c>] (0x1000807c)
> [   16.068067]  r10:00000000 r8:1000406a r7:c0d0780c r6:c0c5da44
> r5:c0d0296c r4:c0d6e294
> [   16.076002] CPU2: stopping
> [   16.078725] CPU: 2 PID: 0 Comm: swapper/2 Not tainted
> 4.6.0-rc5-next-20160429 #349
> [   16.086302] Hardware name: Freescale i.MX6 Quad/DualLite (Device Tree)
> [   16.092836] Backtrace:
> [   16.095320] [<c010b6f8>] (dump_backtrace) from [<c010b894>]
> (show_stack+0x18/0x1c)
> [   16.102897]  r6:60000193 r5:ffffffff r4:00000000 r3:00000000
> [   16.108646] [<c010b87c>] (show_stack) from [<c03df190>]
> (dump_stack+0xb0/0xe8)
> [   16.115883] [<c03df0e0>] (dump_stack) from [<c010edec>]
> (handle_IPI+0x174/0x1a4)
> [   16.123286]  r8:ef0a5f58 r7:c0c746ec r6:00000000 r5:c0d02b10
> r4:00000002 r3:ef0a8000
> [   16.131138] [<c010ec78>] (handle_IPI) from [<c0101618>]
> (gic_handle_irq+0x8c/0x9c)
> [   16.138713]  r8:c0d21f80 r7:c0d02c58 r6:ef0a5f58 r5:f400010c
> r4:f4000100 r3:00000c04
> [   16.146562] [<c010158c>] (gic_handle_irq) from [<c010c4b8>]
> (__irq_svc+0x58/0x78)
> [   16.154052] Exception stack(0xef0a5f58 to 0xef0a5fa0)
> [   16.159112] 5f40:
>    00000001 00000001
> [   16.167301] 5f60: 00000000 c011b920 00000000 c0d02984 00000000
> 00000000 c0c757b8 c0d029d8
> [   16.175489] 5f80: c0d029d0 ef0a5fb4 ef0a5f78 ef0a5fa8 c016d120
> c01089e0 20000013 ffffffff
> [   16.183672]  r10:c0d029d0 r9:c0d029d8 r8:c0c757b8 r7:ef0a5f8c
> r6:ffffffff r5:20000013
> [   16.191601]  r4:c01089e0 r3:ef0a8000
> [   16.195230] [<c01089b8>] (arch_cpu_idle) from [<c01661a0>]
> (default_idle_call+0x28/0x38)
> [   16.203334] [<c0166178>] (default_idle_call) from [<c0166378>]
> (cpu_startup_entry+0x1c8/0x24c)
> [   16.211959] [<c01661b0>] (cpu_startup_entry) from [<c010ea14>]
> (secondary_start_kernel+0x130/0x154)
> [   16.221010]  r7:c0d6e388 r3:00000004
> [   16.224633] [<c010e8e4>] (secondary_start_kernel) from [<101016cc>]
> (0x101016cc)
> [   16.232035]  r5:00000051 r4:3f08806a
> [   16.235656] CPU1: stopping
> [   16.238378] CPU: 1 PID: 0 Comm: swapper/1 Not tainted
> 4.6.0-rc5-next-20160429 #349
> [   16.245954] Hardware name: Freescale i.MX6 Quad/DualLite (Device Tree)
> [   16.252487] Backtrace:
> [   16.254970] [<c010b6f8>] (dump_backtrace) from [<c010b894>]
> (show_stack+0x18/0x1c)
> [   16.262545]  r6:60000193 r5:ffffffff r4:00000000 r3:00000000
> [   16.268291] [<c010b87c>] (show_stack) from [<c03df190>]
> (dump_stack+0xb0/0xe8)
> [   16.275529] [<c03df0e0>] (dump_stack) from [<c010edec>]
> (handle_IPI+0x174/0x1a4)
> [   16.282931]  r8:ef0a3f58 r7:c0c746ec r6:00000000 r5:c0d02b10
> r4:00000001 r3:ef076c00
> [   16.290777] [<c010ec78>] (handle_IPI) from [<c0101618>]
> (gic_handle_irq+0x8c/0x9c)
> [   16.298353]  r8:c0d21f80 r7:c0d02c58 r6:ef0a3f58 r5:f400010c
> r4:f4000100 r3:00000c04
> [   16.306199] [<c010158c>] (gic_handle_irq) from [<c010c4b8>]
> (__irq_svc+0x58/0x78)
> [   16.313688] Exception stack(0xef0a3f58 to 0xef0a3fa0)
> [   16.318747] 3f40:
>    00000001 00000001
> [   16.326935] 3f60: 00000000 c011b920 00000000 c0d02984 00000000
> 00000000 c0c757b8 c0d029d8
> [   16.335123] 3f80: c0d029d0 ef0a3fb4 ef0a3f78 ef0a3fa8 c016d120
> c01089e0 20000013 ffffffff
> [   16.343304]  r10:c0d029d0 r9:c0d029d8 r8:c0c757b8 r7:ef0a3f8c
> r6:ffffffff r5:20000013
> [   16.351230]  r4:c01089e0 r3:ef076c00
> [   16.354856] [<c01089b8>] (arch_cpu_idle) from [<c01661a0>]
> (default_idle_call+0x28/0x38)
> [   16.362961] [<c0166178>] (default_idle_call) from [<c0166378>]
> (cpu_startup_entry+0x1c8/0x24c)
> [   16.371585] [<c01661b0>] (cpu_startup_entry) from [<c010ea14>]
> (secondary_start_kernel+0x130/0x154)
> [   16.380635]  r7:c0d6e388 r3:00000002
> [   16.384256] [<c010e8e4>] (secondary_start_kernel) from [<101016cc>]
> (0x101016cc)
> [   16.391657]  r5:00000051 r4:3f08806a
> [   16.395300] ---[ end Kernel panic - not syncing: VFS: Unable to
> mount root fs on unknown-block(2,0)
> 
> Any ideas? Thanks
> --
> To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
> the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

--
Chuck Lever



--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply

* Re: [PATCH net-next] drivers/net: add 6WIND SHULTI support
From: Jiri Pirko @ 2016-05-01 19:53 UTC (permalink / raw)
  To: David Miller; +Cc: nicolas.dichtel, fw, netdev
In-Reply-To: <20160428.115419.1831238411921569629.davem@davemloft.net>

Thu, Apr 28, 2016 at 05:54:19PM CEST, davem@davemloft.net wrote:
>From: Nicolas Dichtel <nicolas.dichtel@6wind.com>
>Date: Thu, 28 Apr 2016 13:59:34 +0200
>
>> Le 27/04/2016 18:55, David Miller a écrit :
>>> From: Jiri Pirko <jiri@resnulli.us>
>> [snip]
>>>> The difference is that it this tries to allow userspace crap to mirror
>>>> setting user does for bridge/ovs. Basically this looks to me like an
>>>> attempt to enable userspace SDKs and such.
>>> 
>>> +1
>> I don't think so because a userspace can receive all the bridge/ovs settings by
>> mean of netlink mirror, without the need for this driver at all.
>
>You can say whatever you want, but the facilities you are adding to
>this driver enables proprietary userland SDK components.
>
>And this is precisely what we are trying to avoid by having a clean,
>fully featured switch device model in the kernel.
>
>It is against your interestes of upstreaming your driver to continue
>denying what your changes facilitate.

+1

Nicolas, your driver is big a step back. Just do what you need to do,
properly, in kernel. There's a lot of people to help you with that
around.

^ permalink raw reply

* [PATCH] rtlwifi: rtl818x: constify rtl_intf_ops structures
From: Julia Lawall @ 2016-05-01 19:57 UTC (permalink / raw)
  To: Larry Finger
  Cc: kernel-janitors, Chaoming Li, Kalle Valo, linux-wireless, netdev,
	linux-kernel

The rtl_intf_ops structures are never modified, so declare them as const.

Done with the help of Coccinelle.

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>

---
 drivers/net/wireless/realtek/rtlwifi/pci.c  |    2 +-
 drivers/net/wireless/realtek/rtlwifi/pci.h  |    2 +-
 drivers/net/wireless/realtek/rtlwifi/usb.c  |    2 +-
 drivers/net/wireless/realtek/rtlwifi/wifi.h |    2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/net/wireless/realtek/rtlwifi/pci.c b/drivers/net/wireless/realtek/rtlwifi/pci.c
index 1ac41b8..66030ea 100644
--- a/drivers/net/wireless/realtek/rtlwifi/pci.c
+++ b/drivers/net/wireless/realtek/rtlwifi/pci.c
@@ -2456,7 +2456,7 @@ int rtl_pci_resume(struct device *dev)
 EXPORT_SYMBOL(rtl_pci_resume);
 #endif /* CONFIG_PM_SLEEP */
 
-struct rtl_intf_ops rtl_pci_ops = {
+const struct rtl_intf_ops rtl_pci_ops = {
 	.read_efuse_byte = read_efuse_byte,
 	.adapter_start = rtl_pci_start,
 	.adapter_stop = rtl_pci_stop,
diff --git a/drivers/net/wireless/realtek/rtlwifi/pci.h b/drivers/net/wireless/realtek/rtlwifi/pci.h
index 5da6703..b951eba 100644
--- a/drivers/net/wireless/realtek/rtlwifi/pci.h
+++ b/drivers/net/wireless/realtek/rtlwifi/pci.h
@@ -286,7 +286,7 @@ struct rtl_pci_priv {
 
 int rtl_pci_reset_trx_ring(struct ieee80211_hw *hw);
 
-extern struct rtl_intf_ops rtl_pci_ops;
+extern const struct rtl_intf_ops rtl_pci_ops;
 
 int rtl_pci_probe(struct pci_dev *pdev,
 			    const struct pci_device_id *id);
diff --git a/drivers/net/wireless/realtek/rtlwifi/usb.c b/drivers/net/wireless/realtek/rtlwifi/usb.c
index aac1ed3..41617b7 100644
--- a/drivers/net/wireless/realtek/rtlwifi/usb.c
+++ b/drivers/net/wireless/realtek/rtlwifi/usb.c
@@ -1049,7 +1049,7 @@ static void rtl_fill_h2c_cmd_work_callback(struct work_struct *work)
 	rtlpriv->cfg->ops->fill_h2c_cmd(hw, H2C_RA_MASK, 5, rtlpriv->rate_mask);
 }
 
-static struct rtl_intf_ops rtl_usb_ops = {
+static const struct rtl_intf_ops rtl_usb_ops = {
 	.adapter_start = rtl_usb_start,
 	.adapter_stop = rtl_usb_stop,
 	.adapter_tx = rtl_usb_tx,
diff --git a/drivers/net/wireless/realtek/rtlwifi/wifi.h b/drivers/net/wireless/realtek/rtlwifi/wifi.h
index 11d9c23..4e0ab4d 100644
--- a/drivers/net/wireless/realtek/rtlwifi/wifi.h
+++ b/drivers/net/wireless/realtek/rtlwifi/wifi.h
@@ -2593,7 +2593,7 @@ struct rtl_priv {
 	 *intf_ops : for diff interrface usb/pcie
 	 */
 	struct rtl_hal_cfg *cfg;
-	struct rtl_intf_ops *intf_ops;
+	const struct rtl_intf_ops *intf_ops;
 
 	/*this var will be set by set_bit,
 	   and was used to indicate status of


^ permalink raw reply related

* [PATCH net 0/4] Mellanox 100G mlx5 fixes for 4.6-rc
From: Saeed Mahameed @ 2016-05-01 19:59 UTC (permalink / raw)
  To: David S. Miller
  Cc: netdev, Or Gerlitz, Tal Alon, Eran Ben Elisha, Saeed Mahameed

Hi Dave,

This small series provides some bug fixes for mlx5 driver.
 
A small bug fix for iounmap of a null pointer, which dumps a warning on some archs.

One patch to fix the VXLAN/MLX5_EN dependency issue reported by Arnd.

Two patches to fix the scheduling while atomic issue for ndo_add/del_vxlan_port 
NDOs.  The first will add an internal mlx5e workqueue and the second will 
delegate vxlan ports add/del requests to that workqueue.

Note: ('net/mlx5: Kconfig: Fix MLX5_EN/VXLAN build issue') is only needed for net 
and not net-next as the issue was globally fixed for all device drivers by:
b7aade15485a ('vxlan: break dependency with netdev drivers') in net-next.

Applied on top: f27337e16f2d ('ip_tunnel: fix preempt warning in ip tunnel creation/updating')

Gal Pressman (1):
  net/mlx5: Unmap only the relevant IO memory mapping

Matthew Finlay (3):
  net/mlx5: Kconfig: Fix MLX5_EN/VXLAN build issue
  net/mlx5e: Implement a mlx5e workqueue
  net/mlx5e: Use workqueue for vxlan ops

 drivers/net/ethernet/mellanox/mlx5/core/Kconfig   |  1 +
 drivers/net/ethernet/mellanox/mlx5/core/en.h      |  1 +
 drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 34 +++++++++------
 drivers/net/ethernet/mellanox/mlx5/core/uar.c     |  6 ++-
 drivers/net/ethernet/mellanox/mlx5/core/vxlan.c   | 50 +++++++++++++++++------
 drivers/net/ethernet/mellanox/mlx5/core/vxlan.h   | 11 ++++-
 6 files changed, 74 insertions(+), 29 deletions(-)

-- 
2.8.0

^ permalink raw reply


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox