Netdev List
 help / color / mirror / Atom feed
* I wait for your prompt response.
From: Aziz Dake @ 2018-10-23 12:10 UTC (permalink / raw)


Good day,

I am Mr. Aziz Dake, from Burkina Faso  a Minister confide on me to
look for foreign partner who will assist him to invest the sum of
Thirty  Million  Dollars  ($30,000,000) in your country.

He has investment interest in mining, exotic properties for commercial
resident, development properties, hotels and any other viable
investment opportunities in your country based on your recommendation
will be highly welcomed.

Hence your co -operation is highly needed to actualize this investment project

I wait for your prompt response.

Sincerely yours

Mr Aziz Dake.

^ permalink raw reply

* Re: [RFC PATCH v2 00/10] udp: implement GRO support
From: Paolo Abeni @ 2018-10-23 12:22 UTC (permalink / raw)
  To: Steffen Klassert; +Cc: netdev, Willem de Bruijn
In-Reply-To: <20181023121000.GP3823@gauss3.secunet.de>

Hi,

On Tue, 2018-10-23 at 14:10 +0200, Steffen Klassert wrote:
> On Fri, Oct 19, 2018 at 04:25:10PM +0200, Paolo Abeni wrote:
> > This series implements GRO support for UDP sockets, as the RX counterpart
> > of commit bec1f6f69736 ("udp: generate gso with UDP_SEGMENT").
> > The core functionality is implemented by the second patch, introducing a new
> > sockopt to enable UDP_GRO, while patch 3 implements support for passing the
> > segment size to the user space via a new cmsg.
> > UDP GRO performs a socket lookup for each ingress packets and aggregate datagram
> > directed to UDP GRO enabled sockets with constant l4 tuple.
> > 
> > UDP GRO packets can land on non GRO-enabled sockets, e.g. due to iptables NAT
> > rules, and that could potentially confuse existing applications.
> > 
> > The solution adopted here is to de-segment the GRO packet before enqueuing
> > as needed. Since we must cope with packet reinsertion after de-segmentation,
> > the relevant code is factored-out in ipv4 and ipv6 specific helpers and exposed
> > to UDP usage.
> > 
> > While the current code can probably be improved, this safeguard ,implemented in
> > the patches 4-7, allows future enachements to enable UDP GSO offload on more
> > virtual devices eventually even on forwarded packets.
> 
> I was curious what I get with this when doing packet forwarding.
> So I added forwarding support with the patch below (on top of
> your patchset). While the packet processing could work the way
> I do it in this patch, I'm not sure about the way I enable
> UDP GRO on forwarding. Maybe there it a better way than just
> do UDP GRO if forwarding is enabled on the receiving device.

My idea/hope is slightly different: ensure that UDP GRO + UDP input
path + UDP desegmentation on socket enqueue is safe and as fast as
plain UDP input path and then enable UDP GRO without socket lookup, for
each incoming frame (!!!).

If we land on the input path on a non UDP GRO enabled socket, the
packet is de-segment before enqueuing.

Socket lookup would be needed only if tunnels are enabled, to check if
the ingress frame match a tunnel. We will use UDP tunnel GRO in that
case.

> Some quick benchmark numbers with UDP packet forwarding
> (1460 byte packets) through two gateways:
> 
> net-next: 16.4 Gbps
> 
> net-next + UDP GRO: 20.3 Gbps

uhmmm... what do you think about this speed-up ?

I hoped that without the socket lookup we can get measurably better
figures.

Cheers,

Paolo

^ permalink raw reply

* Re: CRC errors between mvneta and macb
From: Richard Genoud @ 2018-10-23 12:37 UTC (permalink / raw)
  To: Andrew Lunn
  Cc: Willy Tarreau, linux-kernel, Thomas Petazzoni, Antoine Tenart,
	Gregory CLEMENT, Yelena Krivosheev, Maxime Chevallier,
	Nicolas Ferre, netdev
In-Reply-To: <20181022181918.GF24112@lunn.ch>

Le 22/10/2018 à 20:19, Andrew Lunn a écrit :
>> I dug more on the subject, and I think I found what Marvell's PHY/MAC
>> doesn't like.
> 
> Hi Richard
> 
> What PHY is being used?
> 
>> After analyzing the ethernet frame on the Davicom PHY's output (pin
>> TX+), I find out that the FCS errors occurs when the ethernet preamble
>> is longer than 56bits. (something like 58 or 60 bits)
> 
> Some Marvell PHYs have a register bit which might be of interest: Page
> 2, register 16, bit 6.
> 
> 0 = Pad odd nibble preambles in copper receive packets.
> 1 = Pass as is and do not pad odd nibble preambles in
It doesn't seem to change anything.

But the problem really seems to be between the 88E1512 and mvneta.

In mvneta_rx_swbm() I dumped the data received, in both cases, I've got
the same thing:
0000 0000 0000 0000 0004 a3d2 a7ef 0800
dead beef 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 8a86 ce78
The 2 first bytes are the marvell header, and 4 last the CRC
In one case the MVNETA_RXD_ERR_SUMMARY status bit is set, and not in the
other case.

But I don't have access to the Marvell documentation to know exactly
what is the status "MVNETA_RXD_ERR_CRC".

Richard

^ permalink raw reply

* Re: [PATCH net-next 3/4] net: phy-c45: Implement reset/suspend/resume callbacks
From: Andrew Lunn @ 2018-10-23 12:38 UTC (permalink / raw)
  To: Jose Abreu
  Cc: Russell King - ARM Linux, Florian Fainelli, netdev,
	David S. Miller, Joao Pinto
In-Reply-To: <d7abcce6-e935-8897-0307-8c5a8afd0990@synopsys.com>

> If it's okay for Generic 10G driver I can submit only this and
> manually reset PHY in stmmac driver so that I don't need to
> implement custom PHY driver ...

Hi Jose

That is a bad idea. What happens when somebody uses a different PHY
which uses a different reset sequence? Please keep with the
abstraction. Anything touching the PHY needs to be in a PHY driver, or
phylib.

   Andrew

^ permalink raw reply

* RE: [PATCH net-next 6/7] net: hns3: Add enable and process hw errors from PPP
From: Salil Mehta @ 2018-10-23 21:37 UTC (permalink / raw)
  To: Dan Carpenter, kbuild@01.org
  Cc: kbuild-all@01.org, davem@davemloft.net, Zhuangyuzeng (Yisen),
	lipeng (Y), mehta.salil@opnsrc.net, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org, Linuxarm, Shiju Jose
In-Reply-To: <20181023112852.4pmcezetrudduvna@mwanda>

Hi Dan,
Thanks for letting us know about this. We have a fix for this
but I guess now net-next is closed and David might not accept
the fix for the below problem. It looks problematic case 
might rarely hit so we might be safe deferring it for next cycle.


Best regards

> From: Dan Carpenter [mailto:dan.carpenter@oracle.com]
> Sent: Tuesday, October 23, 2018 12:29 PM
> To: kbuild@01.org; Salil Mehta <salil.mehta@huawei.com>
> Cc: kbuild-all@01.org; davem@davemloft.net; Salil Mehta
> <salil.mehta@huawei.com>; Zhuangyuzeng (Yisen) <yisen.zhuang@huawei.com>;
> lipeng (Y) <lipeng321@huawei.com>; mehta.salil@opnsrc.net;
> netdev@vger.kernel.org; linux-kernel@vger.kernel.org; Linuxarm
> <linuxarm@huawei.com>; Shiju Jose <shiju.jose@huawei.com>
> Subject: Re: [PATCH net-next 6/7] net: hns3: Add enable and process hw
> errors from PPP
> 
> Hi Shiju,
> 
> Thank you for the patch! Perhaps something to improve:
> 
> url:    https://github.com/0day-ci/linux/commits/Salil-Mehta/Adds-
> support-of-RAS-Error-Handling-in-HNS3-Driver/20181021-183911
> 
> smatch warnings:
> drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_err.c:700
> hclge_log_and_clear_ppp_error() error: uninitialized symbol
> 'hw_err_lst3'.
> 
> # https://github.com/0day-
> ci/linux/commit/9a8545e85954ec55367e8881d18cc2ae95c56d98
> git remote add linux-review https://github.com/0day-ci/linux
> git remote update linux-review
> git checkout 9a8545e85954ec55367e8881d18cc2ae95c56d98
> vim +/hw_err_lst3 +700
> drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_err.c
> 
> 19049622e Shiju Jose 2018-10-19  653
> 9a8545e85 Shiju Jose 2018-10-19  654  static int
> hclge_log_and_clear_ppp_error(struct hclge_dev *hdev, u32 cmd,
> 9a8545e85 Shiju Jose 2018-10-19  655
> enum hclge_err_int_type int_type)
> 9a8545e85 Shiju Jose 2018-10-19  656  {
> 9a8545e85 Shiju Jose 2018-10-19  657  	enum hnae3_reset_type
> reset_level = HNAE3_NONE_RESET;
> 9a8545e85 Shiju Jose 2018-10-19  658  	struct device *dev = &hdev-
> >pdev->dev;
> 9a8545e85 Shiju Jose 2018-10-19  659  	const struct hclge_hw_error
> *hw_err_lst1, *hw_err_lst2, *hw_err_lst3;
> 9a8545e85 Shiju Jose 2018-10-19  660  	struct hclge_desc desc[2];
> 9a8545e85 Shiju Jose 2018-10-19  661  	u32 err_sts;
> 9a8545e85 Shiju Jose 2018-10-19  662  	int ret;
> 9a8545e85 Shiju Jose 2018-10-19  663
> 9a8545e85 Shiju Jose 2018-10-19  664  	/* read PPP INT sts */
> 9a8545e85 Shiju Jose 2018-10-19  665  	ret =
> hclge_cmd_query_error(hdev, &desc[0], cmd,
> 9a8545e85 Shiju Jose 2018-10-19  666
> HCLGE_CMD_FLAG_NEXT, 5, int_type);
> 9a8545e85 Shiju Jose 2018-10-19  667  	if (ret) {
> 9a8545e85 Shiju Jose 2018-10-19  668  		dev_err(dev,
> "failed(=%d) to query PPP interrupt status\n",
> 9a8545e85 Shiju Jose 2018-10-19  669  			ret);
> 9a8545e85 Shiju Jose 2018-10-19  670  		return -EIO;
> 9a8545e85 Shiju Jose 2018-10-19  671  	}
> 9a8545e85 Shiju Jose 2018-10-19  672
> 9a8545e85 Shiju Jose 2018-10-19  673  	/* log error */
> 9a8545e85 Shiju Jose 2018-10-19  674  	if (cmd ==
> HCLGE_PPP_CMD0_INT_CMD) {
> 9a8545e85 Shiju Jose 2018-10-19  675  		hw_err_lst1 =
> &hclge_ppp_mpf_int0[0];
> 9a8545e85 Shiju Jose 2018-10-19  676  		hw_err_lst2 =
> &hclge_ppp_mpf_int1[0];
> 9a8545e85 Shiju Jose 2018-10-19  677  		hw_err_lst3 =
> &hclge_ppp_pf_int[0];
> 9a8545e85 Shiju Jose 2018-10-19  678  	} else if (cmd ==
> HCLGE_PPP_CMD1_INT_CMD) {
> 9a8545e85 Shiju Jose 2018-10-19  679  		hw_err_lst1 =
> &hclge_ppp_mpf_int2[0];
> 9a8545e85 Shiju Jose 2018-10-19  680  		hw_err_lst2 =
> &hclge_ppp_mpf_int3[0];
> 
> Not set here.
> 
> 9a8545e85 Shiju Jose 2018-10-19  681  	} else {
> 9a8545e85 Shiju Jose 2018-10-19  682  		dev_err(dev, "invalid
> command(=%d)\n", cmd);
> 9a8545e85 Shiju Jose 2018-10-19  683  		return -EINVAL;
> 9a8545e85 Shiju Jose 2018-10-19  684  	}
> 9a8545e85 Shiju Jose 2018-10-19  685
> 9a8545e85 Shiju Jose 2018-10-19  686  	err_sts =
> le32_to_cpu(desc[0].data[2]);
> 9a8545e85 Shiju Jose 2018-10-19  687  	if (err_sts) {
> 9a8545e85 Shiju Jose 2018-10-19  688  		hclge_log_error(dev,
> hw_err_lst1, err_sts);
> 9a8545e85 Shiju Jose 2018-10-19  689  		reset_level =
> HNAE3_FUNC_RESET;
> 9a8545e85 Shiju Jose 2018-10-19  690  	}
> 9a8545e85 Shiju Jose 2018-10-19  691
> 9a8545e85 Shiju Jose 2018-10-19  692  	err_sts =
> le32_to_cpu(desc[0].data[3]);
> 9a8545e85 Shiju Jose 2018-10-19  693  	if (err_sts) {
> 9a8545e85 Shiju Jose 2018-10-19  694  		hclge_log_error(dev,
> hw_err_lst2, err_sts);
> 9a8545e85 Shiju Jose 2018-10-19  695  		reset_level =
> HNAE3_FUNC_RESET;
> 9a8545e85 Shiju Jose 2018-10-19  696  	}
> 9a8545e85 Shiju Jose 2018-10-19  697
> 9a8545e85 Shiju Jose 2018-10-19  698  	err_sts =
> (le32_to_cpu(desc[0].data[4]) >> 8) & 0x3;
> 9a8545e85 Shiju Jose 2018-10-19  699  	if (err_sts) {
> 9a8545e85 Shiju Jose 2018-10-19 @700  		hclge_log_error(dev,
> hw_err_lst3, err_sts);
> 
> ^^^^^^^^^^^
> Uninitialized.
> 
> 9a8545e85 Shiju Jose 2018-10-19  701  		reset_level =
> HNAE3_FUNC_RESET;
> 9a8545e85 Shiju Jose 2018-10-19  702  	}
> 9a8545e85 Shiju Jose 2018-10-19  703
> 9a8545e85 Shiju Jose 2018-10-19  704  	/* clear PPP INT */
> 9a8545e85 Shiju Jose 2018-10-19  705  	ret =
> hclge_cmd_clear_error(hdev, &desc[0], NULL, 0,
> 9a8545e85 Shiju Jose 2018-10-19  706
> HCLGE_CMD_FLAG_NEXT);
> 9a8545e85 Shiju Jose 2018-10-19  707  	if (ret) {
> 9a8545e85 Shiju Jose 2018-10-19  708  		dev_err(dev,
> "failed(=%d) to clear PPP interrupt status\n",
> 9a8545e85 Shiju Jose 2018-10-19  709  			ret);
> 9a8545e85 Shiju Jose 2018-10-19  710  		return -EIO;
> 9a8545e85 Shiju Jose 2018-10-19  711  	}
> 9a8545e85 Shiju Jose 2018-10-19  712
> 9a8545e85 Shiju Jose 2018-10-19  713  	return 0;
> 9a8545e85 Shiju Jose 2018-10-19  714  }
> 9a8545e85 Shiju Jose 2018-10-19  715
> 
> ---
> 0-DAY kernel test infrastructure                Open Source Technology
> Center
> https://lists.01.org/pipermail/kbuild-all                   Intel
> Corporation

^ permalink raw reply

* Re: [PATCH v3 net-next 03/11] net: dsa: microchip: Initialize mutex before use
From: Andrew Lunn @ 2018-10-23 13:15 UTC (permalink / raw)
  To: Tristram.Ha
  Cc: Florian Fainelli, Pavel Machek, Ruediger Schmitt,
	Arkadi Sharshevsky, UNGLinuxDriver, netdev
In-Reply-To: <1540261575-1889-4-git-send-email-Tristram.Ha@microchip.com>

On Mon, Oct 22, 2018 at 07:26:07PM -0700, Tristram.Ha@microchip.com wrote:
> From: Tristram Ha <Tristram.Ha@microchip.com>
> 
> Initialize mutex before use.

Hi Tristram

This seems like a fix for the driver, not simple refactoring.

Please could you rebase this on net, add a fixes: tag, and send it to
netdev for merging. Dave will take fixes anytime.

Thanks
	Andrew

^ permalink raw reply

* [PATCH net-next v2 0/6] net/ncsi: Allow enabling multiple packages & channels
From: Samuel Mendoza-Jonas @ 2018-10-23 21:51 UTC (permalink / raw)
  To: netdev
  Cc: Samuel Mendoza-Jonas, David S . Miller, Justin.Lee1, linux-kernel,
	openbmc

This series extends the NCSI driver to configure multiple packages
and/or channels simultaneously. Since the RFC series this includes a few
extra changes to fix areas in the driver that either made this harder or
were roadblocks due to deviations from the NCSI specification.

Patches 1 & 2 fix two issues where the driver made assumptions about the
capabilities of the NCSI topology.
Patches 3 & 4 change some internal semantics slightly to make multi-mode
easier.
Patch 5 introduces a cleaner way of reconfiguring the NCSI configuration
and keeping track of channel states.
Patch 6 implements the main multi-package/multi-channel configuration,
configured via the Netlink interface.

Readers who have an interesting NCSI setup - especially multi-package
with HWA - please test! I think I've covered all permutations but I
don't have infinite hardware to test on.

Changes in v2:
- Updated use of the channel lock in ncsi_reset_dev(), making the
channel invisible and leaving the monitor check to
ncsi_stop_channel_monitor().
- Fixed ncsi_channel_is_tx() to consider the state of channels in other
packages.


Samuel Mendoza-Jonas (6):
  net/ncsi: Don't enable all channels when HWA available
  net/ncsi: Probe single packages to avoid conflict
  net/ncsi: Don't deselect package in suspend if active
  net/ncsi: Don't mark configured channels inactive
  net/ncsi: Reset channel state in ncsi_start_dev()
  net/ncsi: Configure multi-package, multi-channel modes with failover

 include/uapi/linux/ncsi.h |  15 ++
 net/ncsi/internal.h       |  19 +-
 net/ncsi/ncsi-aen.c       |  63 ++++--
 net/ncsi/ncsi-manage.c    | 453 +++++++++++++++++++++++++-------------
 net/ncsi/ncsi-netlink.c   | 229 ++++++++++++++++---
 net/ncsi/ncsi-rsp.c       |   2 +-
 6 files changed, 578 insertions(+), 203 deletions(-)

-- 
2.19.1

^ permalink raw reply

* [PATCH net-next v2 2/6] net/ncsi: Probe single packages to avoid conflict
From: Samuel Mendoza-Jonas @ 2018-10-23 21:51 UTC (permalink / raw)
  To: netdev
  Cc: Samuel Mendoza-Jonas, David S . Miller, Justin.Lee1, linux-kernel,
	openbmc
In-Reply-To: <20181023215201.27315-1-sam@mendozajonas.com>

Currently the NCSI driver sends a select-package command to all possible
packages simultaneously to discover what packages are available. However
at this stage in the probe process the driver does not know if
hardware arbitration is available: if it isn't then this process could
cause collisions on the RMII bus when packages try to respond.

Update the probe loop to probe each package one by one, and once
complete check if HWA is universally supported.

Signed-off-by: Samuel Mendoza-Jonas <sam@mendozajonas.com>
---
 net/ncsi/internal.h    |  1 +
 net/ncsi/ncsi-manage.c | 88 ++++++++++++++----------------------------
 2 files changed, 31 insertions(+), 58 deletions(-)

diff --git a/net/ncsi/internal.h b/net/ncsi/internal.h
index 1dae77c54009..ec65778c41f3 100644
--- a/net/ncsi/internal.h
+++ b/net/ncsi/internal.h
@@ -292,6 +292,7 @@ struct ncsi_dev_priv {
 #if IS_ENABLED(CONFIG_IPV6)
 	unsigned int        inet6_addr_num;  /* Number of IPv6 addresses   */
 #endif
+	unsigned int        package_probe_id;/* Current ID during probe    */
 	unsigned int        package_num;     /* Number of packages         */
 	struct list_head    packages;        /* List of packages           */
 	struct ncsi_channel *hot_channel;    /* Channel was ever active    */
diff --git a/net/ncsi/ncsi-manage.c b/net/ncsi/ncsi-manage.c
index 4da051f90974..6c62aae10205 100644
--- a/net/ncsi/ncsi-manage.c
+++ b/net/ncsi/ncsi-manage.c
@@ -1079,70 +1079,28 @@ static void ncsi_probe_channel(struct ncsi_dev_priv *ndp)
 		nd->state = ncsi_dev_state_probe_package;
 		break;
 	case ncsi_dev_state_probe_package:
-		ndp->pending_req_num = 16;
+		ndp->pending_req_num = 1;
 
-		/* Select all possible packages */
 		nca.type = NCSI_PKT_CMD_SP;
 		nca.bytes[0] = 1;
+		nca.package = ndp->package_probe_id;
 		nca.channel = NCSI_RESERVED_CHANNEL;
-		for (index = 0; index < 8; index++) {
-			nca.package = index;
-			ret = ncsi_xmit_cmd(&nca);
-			if (ret)
-				goto error;
-		}
-
-		/* Disable all possible packages */
-		nca.type = NCSI_PKT_CMD_DP;
-		for (index = 0; index < 8; index++) {
-			nca.package = index;
-			ret = ncsi_xmit_cmd(&nca);
-			if (ret)
-				goto error;
-		}
-
+		ret = ncsi_xmit_cmd(&nca);
+		if (ret)
+			goto error;
 		nd->state = ncsi_dev_state_probe_channel;
 		break;
 	case ncsi_dev_state_probe_channel:
-		if (!ndp->active_package)
-			ndp->active_package = list_first_or_null_rcu(
-				&ndp->packages, struct ncsi_package, node);
-		else if (list_is_last(&ndp->active_package->node,
-				      &ndp->packages))
-			ndp->active_package = NULL;
-		else
-			ndp->active_package = list_next_entry(
-				ndp->active_package, node);
-
-		/* All available packages and channels are enumerated. The
-		 * enumeration happens for once when the NCSI interface is
-		 * started. So we need continue to start the interface after
-		 * the enumeration.
-		 *
-		 * We have to choose an active channel before configuring it.
-		 * Note that we possibly don't have active channel in extreme
-		 * situation.
-		 */
+		ndp->active_package = ncsi_find_package(ndp,
+							ndp->package_probe_id);
 		if (!ndp->active_package) {
-			ndp->flags |= NCSI_DEV_PROBED;
-			if (ncsi_check_hwa(ndp))
-				ncsi_enable_hwa(ndp);
-			else
-				ncsi_choose_active_channel(ndp);
-			return;
+			/* No response */
+			nd->state = ncsi_dev_state_probe_dp;
+			schedule_work(&ndp->work);
+			break;
 		}
-
-		/* Select the active package */
-		ndp->pending_req_num = 1;
-		nca.type = NCSI_PKT_CMD_SP;
-		nca.bytes[0] = 1;
-		nca.package = ndp->active_package->id;
-		nca.channel = NCSI_RESERVED_CHANNEL;
-		ret = ncsi_xmit_cmd(&nca);
-		if (ret)
-			goto error;
-
 		nd->state = ncsi_dev_state_probe_cis;
+		schedule_work(&ndp->work);
 		break;
 	case ncsi_dev_state_probe_cis:
 		ndp->pending_req_num = NCSI_RESERVED_CHANNEL;
@@ -1191,22 +1149,35 @@ static void ncsi_probe_channel(struct ncsi_dev_priv *ndp)
 	case ncsi_dev_state_probe_dp:
 		ndp->pending_req_num = 1;
 
-		/* Deselect the active package */
+		/* Deselect the current package */
 		nca.type = NCSI_PKT_CMD_DP;
-		nca.package = ndp->active_package->id;
+		nca.package = ndp->package_probe_id;
 		nca.channel = NCSI_RESERVED_CHANNEL;
 		ret = ncsi_xmit_cmd(&nca);
 		if (ret)
 			goto error;
 
-		/* Scan channels in next package */
-		nd->state = ncsi_dev_state_probe_channel;
+		/* Probe next package */
+		ndp->package_probe_id++;
+		if (ndp->package_probe_id >= 8) {
+			/* Probe finished */
+			ndp->flags |= NCSI_DEV_PROBED;
+			break;
+		}
+		nd->state = ncsi_dev_state_probe_package;
+		ndp->active_package = NULL;
 		break;
 	default:
 		netdev_warn(nd->dev, "Wrong NCSI state 0x%0x in enumeration\n",
 			    nd->state);
 	}
 
+	if (ndp->flags & NCSI_DEV_PROBED) {
+		/* Check if all packages have HWA support */
+		ncsi_check_hwa(ndp);
+		ncsi_choose_active_channel(ndp);
+	}
+
 	return;
 error:
 	netdev_err(ndp->ndev.dev,
@@ -1567,6 +1538,7 @@ int ncsi_start_dev(struct ncsi_dev *nd)
 		return -ENOTTY;
 
 	if (!(ndp->flags & NCSI_DEV_PROBED)) {
+		ndp->package_probe_id = 0;
 		nd->state = ncsi_dev_state_probe;
 		schedule_work(&ndp->work);
 		return 0;
-- 
2.19.1

^ permalink raw reply related

* [PATCH net-next v2 3/6] net/ncsi: Don't deselect package in suspend if active
From: Samuel Mendoza-Jonas @ 2018-10-23 21:51 UTC (permalink / raw)
  To: netdev
  Cc: Samuel Mendoza-Jonas, David S . Miller, Justin.Lee1, linux-kernel,
	openbmc
In-Reply-To: <20181023215201.27315-1-sam@mendozajonas.com>

When a package is deselected all channels of that package cease
communication. If there are other channels active on the package of the
suspended channel this will disable them as well, so only send a
deselect-package command if no other channels are active.

Signed-off-by: Samuel Mendoza-Jonas <sam@mendozajonas.com>
---
 net/ncsi/ncsi-manage.c | 15 +++++++++++++--
 1 file changed, 13 insertions(+), 2 deletions(-)

diff --git a/net/ncsi/ncsi-manage.c b/net/ncsi/ncsi-manage.c
index 6c62aae10205..013437b42e94 100644
--- a/net/ncsi/ncsi-manage.c
+++ b/net/ncsi/ncsi-manage.c
@@ -440,12 +440,14 @@ static void ncsi_request_timeout(struct timer_list *t)
 static void ncsi_suspend_channel(struct ncsi_dev_priv *ndp)
 {
 	struct ncsi_dev *nd = &ndp->ndev;
-	struct ncsi_package *np = ndp->active_package;
-	struct ncsi_channel *nc = ndp->active_channel;
+	struct ncsi_package *np;
+	struct ncsi_channel *nc, *tmp;
 	struct ncsi_cmd_arg nca;
 	unsigned long flags;
 	int ret;
 
+	np = ndp->active_package;
+	nc = ndp->active_channel;
 	nca.ndp = ndp;
 	nca.req_flags = NCSI_REQ_FLAG_EVENT_DRIVEN;
 	switch (nd->state) {
@@ -521,6 +523,15 @@ static void ncsi_suspend_channel(struct ncsi_dev_priv *ndp)
 		if (ret)
 			goto error;
 
+		NCSI_FOR_EACH_CHANNEL(np, tmp) {
+			/* If there is another channel active on this package
+			 * do not deselect the package.
+			 */
+			if (tmp != nc && tmp->state == NCSI_CHANNEL_ACTIVE) {
+				nd->state = ncsi_dev_state_suspend_done;
+				break;
+			}
+		}
 		break;
 	case ncsi_dev_state_suspend_deselect:
 		ndp->pending_req_num = 1;
-- 
2.19.1

^ permalink raw reply related

* [PATCH net-next v2 4/6] net/ncsi: Don't mark configured channels inactive
From: Samuel Mendoza-Jonas @ 2018-10-23 21:51 UTC (permalink / raw)
  To: netdev
  Cc: Samuel Mendoza-Jonas, David S . Miller, Justin.Lee1, linux-kernel,
	openbmc
In-Reply-To: <20181023215201.27315-1-sam@mendozajonas.com>

The concepts of a channel being 'active' and it having link are slightly
muddled in the NCSI driver. Tweak this slightly so that
NCSI_CHANNEL_ACTIVE represents a channel that has been configured and
enabled, and NCSI_CHANNEL_INACTIVE represents a de-configured channel.
This distinction is important because a channel can be 'active' but have
its link down; in this case the channel may still need to be configured
so that it may receive AEN link-state-change packets.

Signed-off-by: Samuel Mendoza-Jonas <sam@mendozajonas.com>
---
 net/ncsi/ncsi-aen.c    | 17 +++++++++++------
 net/ncsi/ncsi-manage.c |  3 +--
 2 files changed, 12 insertions(+), 8 deletions(-)

diff --git a/net/ncsi/ncsi-aen.c b/net/ncsi/ncsi-aen.c
index 65f47a648be3..57f77e5d381a 100644
--- a/net/ncsi/ncsi-aen.c
+++ b/net/ncsi/ncsi-aen.c
@@ -57,6 +57,7 @@ static int ncsi_aen_handler_lsc(struct ncsi_dev_priv *ndp,
 	int state;
 	unsigned long old_data, data;
 	unsigned long flags;
+	bool had_link, has_link;
 
 	/* Find the NCSI channel */
 	ncsi_find_package_and_channel(ndp, h->common.channel, NULL, &nc);
@@ -73,6 +74,9 @@ static int ncsi_aen_handler_lsc(struct ncsi_dev_priv *ndp,
 	ncm->data[2] = data;
 	ncm->data[4] = ntohl(lsc->oem_status);
 
+	had_link = !!(old_data & 0x1);
+	has_link = !!(data & 0x1);
+
 	netdev_dbg(ndp->ndev.dev, "NCSI: LSC AEN - channel %u state %s\n",
 		   nc->id, data & 0x1 ? "up" : "down");
 
@@ -80,15 +84,16 @@ static int ncsi_aen_handler_lsc(struct ncsi_dev_priv *ndp,
 	state = nc->state;
 	spin_unlock_irqrestore(&nc->lock, flags);
 
-	if (!((old_data ^ data) & 0x1) || chained)
-		return 0;
-	if (!(state == NCSI_CHANNEL_INACTIVE && (data & 0x1)) &&
-	    !(state == NCSI_CHANNEL_ACTIVE && !(data & 0x1)))
+	if (state == NCSI_CHANNEL_INACTIVE)
+		netdev_warn(ndp->ndev.dev,
+			    "NCSI: Inactive channel %u received AEN!\n",
+			    nc->id);
+
+	if ((had_link == has_link) || chained)
 		return 0;
 
-	if (state == NCSI_CHANNEL_ACTIVE)
+	if (had_link)
 		ndp->flags |= NCSI_DEV_RESHUFFLE;
-
 	ncsi_stop_channel_monitor(nc);
 	spin_lock_irqsave(&ndp->lock, flags);
 	list_add_tail_rcu(&nc->link, &ndp->channel_queue);
diff --git a/net/ncsi/ncsi-manage.c b/net/ncsi/ncsi-manage.c
index 013437b42e94..014321ad31d3 100644
--- a/net/ncsi/ncsi-manage.c
+++ b/net/ncsi/ncsi-manage.c
@@ -916,12 +916,11 @@ static void ncsi_configure_channel(struct ncsi_dev_priv *ndp)
 			break;
 		}
 
+		nc->state = NCSI_CHANNEL_ACTIVE;
 		if (nc->modes[NCSI_MODE_LINK].data[2] & 0x1) {
 			hot_nc = nc;
-			nc->state = NCSI_CHANNEL_ACTIVE;
 		} else {
 			hot_nc = NULL;
-			nc->state = NCSI_CHANNEL_INACTIVE;
 			netdev_dbg(ndp->ndev.dev,
 				   "NCSI: channel %u link down after config\n",
 				   nc->id);
-- 
2.19.1

^ permalink raw reply related

* [PATCH net 1/1] net/smc: save link group ptr before calling smc_buf_unuse
From: Ursula Braun @ 2018-10-23 13:48 UTC (permalink / raw)
  To: davem; +Cc: netdev, linux-s390, schwidefsky, heiko.carstens, raspl, ubraun

From: Karsten Graul <kgraul@linux.ibm.com>

The pointer to the link group is unset in the smc connection structure
right before the call to smc_buf_unuse. Save the pointer and provide it
to smc_buf_unuse.

Fixes: a6920d1d130c ("net/smc: handle unregistered buffers")
Signed-off-by: Karsten Graul <kgraul@linux.ibm.com>
Signed-off-by: Ursula Braun <ubraun@linux.ibm.com>
---
 net/smc/smc_core.c | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/net/smc/smc_core.c b/net/smc/smc_core.c
index e871368500e3..12d8493f72f4 100644
--- a/net/smc/smc_core.c
+++ b/net/smc/smc_core.c
@@ -291,7 +291,8 @@ static int smc_lgr_create(struct smc_sock *smc, bool is_smcd,
 	return rc;
 }
 
-static void smc_buf_unuse(struct smc_connection *conn)
+static void smc_buf_unuse(struct smc_connection *conn,
+			  struct smc_link_group *lgr)
 {
 	if (conn->sndbuf_desc)
 		conn->sndbuf_desc->used = 0;
@@ -301,8 +302,6 @@ static void smc_buf_unuse(struct smc_connection *conn)
 			conn->rmb_desc->used = 0;
 		} else {
 			/* buf registration failed, reuse not possible */
-			struct smc_link_group *lgr = conn->lgr;
-
 			write_lock_bh(&lgr->rmbs_lock);
 			list_del(&conn->rmb_desc->list);
 			write_unlock_bh(&lgr->rmbs_lock);
@@ -315,6 +314,8 @@ static void smc_buf_unuse(struct smc_connection *conn)
 /* remove a finished connection from its link group */
 void smc_conn_free(struct smc_connection *conn)
 {
+	struct smc_link_group *lgr;
+
 	if (!conn->lgr)
 		return;
 	if (conn->lgr->is_smcd) {
@@ -323,8 +324,9 @@ void smc_conn_free(struct smc_connection *conn)
 	} else {
 		smc_cdc_tx_dismiss_slots(conn);
 	}
+	lgr = conn->lgr; /* smc_lgr_unregister_conn() unsets lgr */
 	smc_lgr_unregister_conn(conn);
-	smc_buf_unuse(conn);
+	smc_buf_unuse(conn, lgr);
 }
 
 static void smc_link_clear(struct smc_link *lnk)
-- 
2.16.4

^ permalink raw reply related

* Re: Improving accuracy of PHC readings
From: Miroslav Lichvar @ 2018-10-23 14:07 UTC (permalink / raw)
  To: Richard Cochran; +Cc: netdev, Keller, Jacob E
In-Reply-To: <20181022224802.5injr523fgw2c4qz@localhost>

On Mon, Oct 22, 2018 at 03:48:02PM -0700, Richard Cochran wrote:
> On Fri, Oct 19, 2018 at 11:51:37AM +0200, Miroslav Lichvar wrote:
> > The extra timestamp doesn't fit the API of the PTP_SYS_OFFSET ioctl,
> > so it would need to shift the timestamp it returns by the missing
> > intervals (assuming the frequency offset between the PHC and system
> > clock is small), or a new ioctl could be introduced that would return
> > all timestamps in an array looking like this:
> > 
> > 	[sys, phc, sys, sys, phc, sys, ...]
> 
> How about a new ioctl with number of trials as input and single offset
> as output?

The difference between the system timestamps is important as it gives
an upper bound on the error in the offset, so I think the output
should be at least a pair of offset and delay.

The question is from which triplet should be the offset and delay
calculated. The one with the minimum delay is a good choice, but it's
not the only option. For instance, an average or median from all
triplets that have delay smaller than the minimum + 30 nanoseconds may
give a more stable offset.

This is not that different from an NTP client filtering measurements
made over network. I'm not sure if we should try to solve it in the
kernel or drivers. My preference would be to give the user space all
the data and process it there.

If the increased size of the array is an issue, we can reduce the
maximum number of readings.

Does that make sense?

-- 
Miroslav Lichvar

^ permalink raw reply

* [PATCH nf] netfilter: ipv6: fix oops when defragmenting locally generated fragments
From: Florian Westphal @ 2018-10-23 14:47 UTC (permalink / raw)
  To: netfilter-devel
  Cc: lorenzo, zenczykowski, edumazet, netdev, maze, Florian Westphal
In-Reply-To: <CANP3RGeX5=c=Lb+Pkg89zD7zQ_Z1T8oPJRCkorNCdghmofYXxg@mail.gmail.com>

Unlike ipv4 and normal ipv6 defrag, netfilter ipv6 defragmentation did
not save/restore skb->dst.

This causes oops when handling locally generated ipv6 fragments, as
output path needs a valid dst.

Reported-by: Maciej Żenczykowski <zenczykowski@gmail.com>
Fixes: 84379c9afe01 ("netfilter: ipv6: nf_defrag: drop skb dst before queueing")
Signed-off-by: Florian Westphal <fw@strlen.de>
---
 net/ipv6/netfilter/nf_conntrack_reasm.c | 13 +++++++++----
 1 file changed, 9 insertions(+), 4 deletions(-)

diff --git a/net/ipv6/netfilter/nf_conntrack_reasm.c b/net/ipv6/netfilter/nf_conntrack_reasm.c
index 8f68a518d9db..f76bd4d15704 100644
--- a/net/ipv6/netfilter/nf_conntrack_reasm.c
+++ b/net/ipv6/netfilter/nf_conntrack_reasm.c
@@ -587,11 +587,16 @@ int nf_ct_frag6_gather(struct net *net, struct sk_buff *skb, u32 user)
 	 */
 	ret = -EINPROGRESS;
 	if (fq->q.flags == (INET_FRAG_FIRST_IN | INET_FRAG_LAST_IN) &&
-	    fq->q.meat == fq->q.len &&
-	    nf_ct_frag6_reasm(fq, skb, dev))
-		ret = 0;
-	else
+	    fq->q.meat == fq->q.len) {
+		unsigned long orefdst = skb->_skb_refdst;
+
+		skb->_skb_refdst = 0UL;
+		if (nf_ct_frag6_reasm(fq, skb, dev))
+			ret = 0;
+		skb->_skb_refdst = orefdst;
+	} else {
 		skb_dst_drop(skb);
+	}
 
 out_unlock:
 	spin_unlock_bh(&fq->q.lock);
-- 
2.18.1

^ permalink raw reply related

* Re: [PATCH nf] netfilter: ipv6: fix oops when defragmenting locally generated fragments
From: Eric Dumazet @ 2018-10-23 14:54 UTC (permalink / raw)
  To: Florian Westphal
  Cc: netfilter-devel, Lorenzo Colitti, zenczykowski, netdev,
	Maciej Żenczykowski
In-Reply-To: <20181023144716.19746-1-fw@strlen.de>

On Tue, Oct 23, 2018 at 7:48 AM Florian Westphal <fw@strlen.de> wrote:
>
> Unlike ipv4 and normal ipv6 defrag, netfilter ipv6 defragmentation did
> not save/restore skb->dst.
>
> This causes oops when handling locally generated ipv6 fragments, as
> output path needs a valid dst.
>
> Reported-by: Maciej Żenczykowski <zenczykowski@gmail.com>
> Fixes: 84379c9afe01 ("netfilter: ipv6: nf_defrag: drop skb dst before queueing")
> Signed-off-by: Florian Westphal <fw@strlen.de>

Reviewed-by: Eric Dumazet <edumazet@google.com>

^ permalink raw reply

* [PATCH net 1/1] qed: Fix static checker warning
From: Rahul Verma @ 2018-10-23 15:04 UTC (permalink / raw)
  To: davem; +Cc: netdev, Ariel.Elior, Dept-EngEverestLinuxL2, Rahul Verma

From: Rahul Verma <Rahul.Verma@cavium.com>

	Static Checker Warnings:
	drivers/net/ethernet/qlogic/qed/qed_main.c:1510 qed_fill_link_capability()
	error: uninitialized symbol 'tcvr_state'.
	drivers/net/ethernet/qlogic/qed/qed_mcp.c:1951 qed_mcp_trans_speed_mask()
	error: uninitialized symbol 'transceiver_state'.
	drivers/net/ethernet/qlogic/qed/qed_mcp.c:1951 qed_mcp_trans_speed_mask()
	error: uninitialized symbol 'transceiver_type'.

	Symbols tcvr_state, transceiver_state and transceiver_type
	are initialized with respective default state.

Fixes: c56a8be7e7aa (qed: Add supported link and advertise link to display in ethtool.)
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Rahul Verma <Rahul.Verma@cavium.com>
---
 drivers/net/ethernet/qlogic/qed/qed_mcp.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/net/ethernet/qlogic/qed/qed_mcp.c b/drivers/net/ethernet/qlogic/qed/qed_mcp.c
index 386ee54..f40f654 100644
--- a/drivers/net/ethernet/qlogic/qed/qed_mcp.c
+++ b/drivers/net/ethernet/qlogic/qed/qed_mcp.c
@@ -1900,6 +1900,9 @@ int qed_mcp_get_transceiver_data(struct qed_hwfn *p_hwfn,
 {
 	u32 transceiver_info;
 
+	*p_transceiver_type = ETH_TRANSCEIVER_TYPE_NONE;
+	*p_transceiver_state = ETH_TRANSCEIVER_STATE_UPDATING;
+
 	if (IS_VF(p_hwfn->cdev))
 		return -EINVAL;
 
@@ -1908,9 +1911,6 @@ int qed_mcp_get_transceiver_data(struct qed_hwfn *p_hwfn,
 		return -EBUSY;
 	}
 
-	*p_transceiver_type = ETH_TRANSCEIVER_TYPE_NONE;
-	*p_transceiver_state = ETH_TRANSCEIVER_STATE_UPDATING;
-
 	transceiver_info = qed_rd(p_hwfn, p_ptt,
 				  p_hwfn->mcp_info->port_addr +
 				  offsetof(struct public_port,
-- 
1.8.3.1

^ permalink raw reply related

* Re: [PATCH] bonding:avoid repeated display of same link status change
From: Mahesh Bandewar (महेश बंडेवार) @ 2018-10-23 15:54 UTC (permalink / raw)
  To: mk.singh
  Cc: linux-netdev, Jay Vosburgh, Veaceslav Falico, Andy Gospodarek,
	David S. Miller, linux-kernel
In-Reply-To: <20181023152924.24033-1-mk.singh@oracle.com>

On Tue, Oct 23, 2018 at 8:29 AM,  <mk.singh@oracle.com> wrote:
> From: Manish Kumar Singh <mk.singh@oracle.com>
>
> When link status change needs to be committed and rtnl lock couldn't be
> taken, avoid redisplay of same link status change message.
>
> Signed-off-by: Manish Kumar Singh <mk.singh@oracle.com>
> ---
>  drivers/net/bonding/bond_main.c | 6 ++++--
>  include/net/bonding.h           | 1 +
>  2 files changed, 5 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
> index 2b01180be834..af9ef889a429 100644
> --- a/drivers/net/bonding/bond_main.c
> +++ b/drivers/net/bonding/bond_main.c
> @@ -2096,7 +2096,7 @@ static int bond_miimon_inspect(struct bonding *bond)
>                         bond_propose_link_state(slave, BOND_LINK_FAIL);
>                         commit++;
>                         slave->delay = bond->params.downdelay;
> -                       if (slave->delay) {
> +                       if (slave->delay && !atomic_read(&bond->rtnl_needed)) {
Atomic operations are expensive (on certain architectures) and miimon
runs quite frequently. Is the added cost of these atomic operations
even worth just to avoid *duplicate info* messages? This seems like a
overkill!

>                                 netdev_info(bond->dev, "link status down for %sinterface %s, disabling it in %d ms\n",
>                                             (BOND_MODE(bond) ==
>                                              BOND_MODE_ACTIVEBACKUP) ?
> @@ -2136,7 +2136,7 @@ static int bond_miimon_inspect(struct bonding *bond)
>                         commit++;
>                         slave->delay = bond->params.updelay;
>
> -                       if (slave->delay) {
> +                       if (slave->delay && !atomic_read(&bond->rtnl_needed)) {
>                                 netdev_info(bond->dev, "link status up for interface %s, enabling it in %d ms\n",
>                                             slave->dev->name,
>                                             ignore_updelay ? 0 :
> @@ -2310,9 +2310,11 @@ static void bond_mii_monitor(struct work_struct *work)
>                 if (!rtnl_trylock()) {
>                         delay = 1;
>                         should_notify_peers = false;
> +                       atomic_set(&bond->rtnl_needed, 1);
>                         goto re_arm;
>                 }
>
> +               atomic_set(&bond->rtnl_needed, 0);
>                 bond_for_each_slave(bond, slave, iter) {
>                         bond_commit_link_state(slave, BOND_SLAVE_NOTIFY_LATER);
>                 }
> diff --git a/include/net/bonding.h b/include/net/bonding.h
> index a4f116f06c50..a4353506bb4f 100644
> --- a/include/net/bonding.h
> +++ b/include/net/bonding.h
> @@ -229,6 +229,7 @@ struct bonding {
>         struct   dentry *debug_dir;
>  #endif /* CONFIG_DEBUG_FS */
>         struct rtnl_link_stats64 bond_stats;
> +       atomic_t rtnl_needed;
>  };
>
>  #define bond_slave_get_rcu(dev) \
> --
> 2.14.1
>

^ permalink raw reply

* Re: [PATCH v2] rtlwifi: remove set but not used variable 'radiob_array_table' and 'radiob_arraylen'
From: Pkshih @ 2018-10-24  0:52 UTC (permalink / raw)
  To: joe@perches.com, zhongjiang@huawei.com, kvalo@codeaurora.org
  Cc: linux-wireless@vger.kernel.org, davem@davemloft.net,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org
In-Reply-To: <19b16ca89b5cde607338513638d4ef8e3a3d2802.camel@perches.com>

On Tue, 2018-10-23 at 12:33 -0700, Joe Perches wrote:
> On Tue, 2018-10-23 at 16:28 +0800, zhong jiang wrote:
> > radiob_array_table' and 'radiob_arraylen' are not used after setting its
> value.
> > It is safe to remove the unused variable. Meanwhile, radio B radio should be
> > removed as well. because it will no longer be referenced.
> 
> The patch subject is a bit off and too generic here.
> 
> This is specific to rtl8723ae and not rtlwifi so it is
> probably better for the subject to be something like:
> 
> [PATCH] rtl8723ae: Remove set but not used variables and #defines

I'd like 'rtlwifi: rtl8723ae: ' as subject prefix.

> 
> > Signed-off-by: zhong jiang <zhongjiang@huawei.com>
> > ---
> >  drivers/net/wireless/realtek/rtlwifi/rtl8723ae/phy.c   | 5 +----
> >  drivers/net/wireless/realtek/rtlwifi/rtl8723ae/table.c | 4 ----
> >  drivers/net/wireless/realtek/rtlwifi/rtl8723ae/table.h | 2 --
> 
> 
> ------Please consider the environment before printing this e-mail.

^ permalink raw reply

* Re: Improving accuracy of PHC readings
From: Miroslav Lichvar @ 2018-10-23 16:48 UTC (permalink / raw)
  To: Keller, Jacob E; +Cc: netdev@vger.kernel.org, Richard Cochran
In-Reply-To: <02874ECE860811409154E81DA85FBB5884CDD9F4@ORSMSX115.amr.corp.intel.com>

On Fri, Oct 19, 2018 at 04:52:13PM +0000, Keller, Jacob E wrote:
> > This should significantly improve the accuracy of the synchronization,
> > reduce the uncertainty in the readings to less than a half or third,
> > and also reduce the jitter as there are fewer register reads sensitive
> > to the PCIe delay.
> > 
> > What do you think?
> > 
> 
> Nice! I think this is good. I'd love to see some data to back it up, but it makes sense to me.

I tried a quick hack with an X550 and I219. The delay dropped from
about 2940 ns to 1040 ns on the first port of the X550, from 1920 ns
to 660 ns on the second port of the X550, and from 2500 ns to 1300 ns
on the I219.

The I219 supports the SYS_OFFSET_PRECISE ioctl (cross timestamping),
which we can use for comparison. The difference between the offsets
calculated using the two ioctls was about 500-600 ns before and now it
is about -50--150 ns.

I was not able to find any information on how accurate cross
timestamping on this HW is actually supposed to be, so I'm wondering
which of the two is closer to the truth.

Here is an output from phc2sys with the I219:

Before:
phc offset       -59 s2 freq     +40 delay   2527
phc offset        19 s2 freq    +101 delay   2526
phc offset       -23 s2 freq     +64 delay   2522
phc offset        46 s2 freq    +126 delay   2535
phc offset       -32 s2 freq     +62 delay   2530
phc offset       -10 s2 freq     +75 delay   2526
phc offset       102 s2 freq    +184 delay   2523

After:
phc offset        17 s2 freq    +105 delay   1298
phc offset        47 s2 freq    +140 delay   1299
phc offset       -42 s2 freq     +65 delay   1293
phc offset        -6 s2 freq     +88 delay   1299
phc offset        34 s2 freq    +127 delay   1300
phc offset       -14 s2 freq     +89 delay   1301
phc offset       -86 s2 freq     +13 delay   1296
phc offset       -21 s2 freq     +52 delay   1298

-- 
Miroslav Lichvar

^ permalink raw reply

* ethernet "bus" number in DTS ?
From: Joakim Tjernlund @ 2018-10-23 16:49 UTC (permalink / raw)
  To: linuxppc-dev@lists.ozlabs.org, netdev@vger.kernel.org

SPI (and others) has a way to define bus number in a aliases:
	aliases {
		ethernet4 = &enet4;
		ethernet0 = &enet0;
		ethernet1 = &enet1;
		ethernet2 = &enet2;
		ethernet3 = &enet3;
		spi0 = &spi0
	};
The 0 in the spi0 alias will translate to bus num 0 so one can control the /dev nodes, like /dev/spidev0
I am looking for the same for ethernet devices:
 ethernet4 = &enet4;  /* should become eth4 */
 ethernet0 = &enet0;  /* should become eth0 */
but I cannot find something like that for eth devices.

Could such functionality be added?

 Jocke

^ permalink raw reply

* Re: ethernet "bus" number in DTS ?
From: Florian Fainelli @ 2018-10-23 17:03 UTC (permalink / raw)
  To: Joakim Tjernlund, linuxppc-dev@lists.ozlabs.org,
	netdev@vger.kernel.org
  Cc: andrew
In-Reply-To: <88328977dfeaf667a98d791074b721fe730d285b.camel@infinera.com>

On 10/23/18 9:49 AM, Joakim Tjernlund wrote:
> SPI (and others) has a way to define bus number in a aliases:
> 	aliases {
> 		ethernet4 = &enet4;
> 		ethernet0 = &enet0;
> 		ethernet1 = &enet1;
> 		ethernet2 = &enet2;
> 		ethernet3 = &enet3;
> 		spi0 = &spi0
> 	};
> The 0 in the spi0 alias will translate to bus num 0 so one can control the /dev nodes, like /dev/spidev0
> I am looking for the same for ethernet devices:
>  ethernet4 = &enet4;  /* should become eth4 */
>  ethernet0 = &enet0;  /* should become eth0 */
> but I cannot find something like that for eth devices.
> 
> Could such functionality be added?

It could, do we want and need to, no. You have the Ethernet alias in
/sys/class/net/*/device/uevent already that would allow you to perform
that (re)naming in user-space:

# cat /sys/class/net/eth0/device/uevent
DRIVER=bcmgenet
OF_NAME=ethernet
OF_FULLNAME=/rdb/ethernet@f0480000
OF_TYPE=network
OF_COMPATIBLE_0=brcm,genet-v5
OF_COMPATIBLE_N=1
OF_ALIAS_0=eth0			<==================
MODALIAS=of:NethernetTnetworkCbrcm,genet-v5
-- 
Florian

^ permalink raw reply

* Re: ethernet "bus" number in DTS ?
From: Andrew Lunn @ 2018-10-23 17:08 UTC (permalink / raw)
  To: Joakim Tjernlund; +Cc: linuxppc-dev@lists.ozlabs.org, netdev@vger.kernel.org
In-Reply-To: <88328977dfeaf667a98d791074b721fe730d285b.camel@infinera.com>

On Tue, Oct 23, 2018 at 04:49:59PM +0000, Joakim Tjernlund wrote:
> SPI (and others) has a way to define bus number in a aliases:
> 	aliases {
> 		ethernet4 = &enet4;
> 		ethernet0 = &enet0;
> 		ethernet1 = &enet1;
> 		ethernet2 = &enet2;
> 		ethernet3 = &enet3;
> 		spi0 = &spi0
> 	};
> The 0 in the spi0 alias will translate to bus num 0 so one can control the /dev nodes, like /dev/spidev0
> I am looking for the same for ethernet devices:
>  ethernet4 = &enet4;  /* should become eth4 */
>  ethernet0 = &enet0;  /* should become eth0 */
> but I cannot find something like that for eth devices.
> 
> Could such functionality be added?

Hi Jocke

This has been discussed before. Take a look at
arch/arm/boot/dts/armada-38x.dtsi

                        /*
                         * As a special exception to the "order by
                         * register address" rule, the eth0 node is
                         * placed here to ensure that it gets
                         * registered as the first interface, since
                         * the network subsystem doesn't allow naming
                         * interfaces using DT aliases. Without this,
                         * the ordering of interfaces is different
                         * from the one used in U-Boot and the
                         * labeling of interfaces on the boards, which
                         * is very confusing for users.
                         */

You should be able to find the discuss about this, and why aliases
cannot be used.

       Andrew

^ permalink raw reply

* Re: [iproute PATCH v2] tc: htb: Print default value in hex
From: Stephen Hemminger @ 2018-10-23 17:09 UTC (permalink / raw)
  To: Phil Sutter; +Cc: netdev
In-Reply-To: <20181023103624.6263-1-phil@nwl.cc>

On Tue, 23 Oct 2018 12:36:24 +0200
Phil Sutter <phil@nwl.cc> wrote:

> Value of 'default' is assumed to be hexadecimal when parsing, so
> consequently it should be printed in hex as well. This is a regression
> introduced when adding JSON output.
> 
> As requested, also change JSON output to print the value as hex string.
> 
> Fixes: f354fa6aa5ff0 ("tc: jsonify htb qdisc")
> Signed-off-by: Phil Sutter <phil@nwl.cc>

Thanks, applied.

^ permalink raw reply

* Re: [PATCH v2] rtlwifi: remove set but not used variable 'radiob_array_table' and 'radiob_arraylen'
From: zhong jiang @ 2018-10-24  2:04 UTC (permalink / raw)
  To: Pkshih, joe@perches.com
  Cc: kvalo@codeaurora.org, linux-wireless@vger.kernel.org,
	davem@davemloft.net, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org
In-Reply-To: <1540342331.2495.1.camel@realtek.com>

On 2018/10/24 8:52, Pkshih wrote:
> On Tue, 2018-10-23 at 12:33 -0700, Joe Perches wrote:
>> On Tue, 2018-10-23 at 16:28 +0800, zhong jiang wrote:
>>> radiob_array_table' and 'radiob_arraylen' are not used after setting its
>> value.
>>> It is safe to remove the unused variable. Meanwhile, radio B radio should be
>>> removed as well. because it will no longer be referenced.
>> The patch subject is a bit off and too generic here.
>>
>> This is specific to rtl8723ae and not rtlwifi so it is
>> probably better for the subject to be something like:
>>
>> [PATCH] rtl8723ae: Remove set but not used variables and #defines
> I'd like 'rtlwifi: rtl8723ae: ' as subject prefix.
Thanks for your suggestion. Will change the subject and resend.

[PATCH] rtlwifi: rtl8723ae: Remove set but not used variables and #defines


Thanks,
zhong jiang
>>> Signed-off-by: zhong jiang <zhongjiang@huawei.com>
>>> ---
>>>   drivers/net/wireless/realtek/rtlwifi/rtl8723ae/phy.c   | 5 +----
>>>   drivers/net/wireless/realtek/rtlwifi/rtl8723ae/table.c | 4 ----
>>>   drivers/net/wireless/realtek/rtlwifi/rtl8723ae/table.h | 2 --
>>
>> ------Please consider the environment before printing this e-mail.

^ permalink raw reply

* [ANNOUNCE] iproute2 4.19
From: Stephen Hemminger @ 2018-10-23 17:49 UTC (permalink / raw)
  To: netdev; +Cc: linux-kernel

Release of iproute2 for Linux 4.19

Lastest version iproute2 utility to support new features in Linux 4.19
such as CAKE qdisc. In addition to the usual manual page fixes and
other cleanups.

The tarball can be downloaded from:
    https://www.kernel.org/pub/linux/utils/net/iproute2/iproute2-4.19.0.tar.xz

The upstream repositories for master and net-next branch are now
split. Master branch is at:
  git://git.kernel.org/pub/scm/network/iproute2/iproute2.git

and patches for next release are in (master branch):
  git://git.kernel.org/pub/scm/network/iproute2/iproute2-next.git

Report problems (or enhancements) to the netdev@vger.kernel.org mailing list.

---
Alex Vesker (1):
      devlink: Add support for devlink-region access

Caleb Raitto (2):
      man: Change numtc to num_tc
      tc/mqprio: Print extra info on invalid args.

Cong Wang (1):
      ss: add UNIX_DIAG_VFS and UNIX_DIAG_ICONS for unix sockets

Daniel Borkmann (4):
      bpf: move bpf_elf_map fixup notification under verbose
      bpf: remove strict dependency on af_alg
      bpf: implement bpf to bpf calls support
      bpf: implement btf handling and map annotation

David Ahern (6):
      Update kernel headers
      Update kernel headers
      Import btf.h from kernel headers
      Update kernel headers
      Update kernel headers
      Update kernel headers

Eran Ben Elisha (1):
      ip: Add violation counters to VF statisctics

Florent Fourcot (1):
      tc/htb: remove unused variable

Guillaume Nault (3):
      l2tp: drop data_seq
      l2tp: drop mtu
      l2tp: drop lns_mode

Hangbin Liu (3):
      bridge/mdb: fix missing new line when show bridge mdb
      iplink: fix incorrect any address handling for ip tunnels
      vxlan: show correct ttl inherit info

Hoang Le (2):
      tipc: JSON support for showing nametable
      tipc: JSON support for tipc link printouts

Jakub Kicinski (2):
      iplink: add support for reporting multiple XDP programs
      tc: jsonify output of q_fifo

Jesus Sanchez-Palencia (1):
      man: Add initial manpage for tc-etf(8)

Jianbo Liu (1):
      tc: flower: Add support for QinQ

Jiri Pirko (1):
      tc: introduce support for chain templates

Keara Leibovitz (2):
      tc: jsonify nat action
      tc: fix bugs for tcp_flags and ip_attr hex output

Leon Romanovsky (1):
      rdma: Fix representation of PortInfo CapabilityMask

Lorenzo Bianconi (3):
      iplink_vxlan: take into account preferred_family creating vxlan device
      uapi: add snmp header file
      utils: fix get_rtnl_link_stats_rta stats parsing

Luca Boccassi (3):
      testsuite: remove all temp files and implement make clean
      testsuite: let make compile build the netlink helper
      testsuite: run dmesg with sudo

Mahesh Bandewar (2):
      ipmaddr: use preferred_family when given
      iproute: make clang happy

Moshe Shemesh (1):
      devlink: Add param command support

Nikolay Aleksandrov (1):
      bridge: add support for isolated option

Nishanth Devarajan (1):
      Add SKB Priority qdisc support in tc(8)

Or Gerlitz (2):
      tc/act_tunnel_key: Enable setup of tos and ttl
      tc/flower: Add match on encapsulating tos/ttl

Petr Vorel (5):
      testsuite: Fix missing generate_nlmsg
      testsuite: Generate generate_nlmsg when needed
      testsuite: Warn about empty $(IPVERS)
      Makefile: Add check target
      testsuite: Fix make check when need build generate_nlmsg

Phil Sutter (30):
      tc: Fix typo in check for colored output
      bridge: Fix check for colored output
      Merge common code for conditionally colored output
      man: ip-route: Clarify referenced versions are Linux ones
      ss: Review ssfilter
      testsuite: Prepare for ss tests
      testsuite: Add a first ss test validating ssfilter
      man: bridge.8: Document -oneline option
      bridge: trivial: Make help text consistent
      devlink: trivial: Make help text consistent
      man: devlink.8: Document -verbose option
      genl: Fix help text
      man: ifstat.8: Document --json and --pretty options
      man: rtacct.8: Fix nstat options
      rtmon: List options in help text
      man: ss.8: Describe --events option
      ip: Add missing -M flag to help text
      Make colored output configurable
      lib: Make check_enable_color() return boolean
      ip-route: Fix segfault with many nexthops
      bridge: fdb: Fix for missing keywords in non-JSON output
      ip-addrlabel: Fix printing of label value
      devlink: Fix error reporting in cmd_resource_set()
      rdma: Fix for ineffective check in add_filter()
      ip-route: Fix for memleak in error path
      rdma: Don't pass garbage to rd_check_is_filtered()
      ip-route: Fix parse_encap_seg6() srh parsing
      tipc: Drop unused variable 'genl'
      tc: Remove pointless assignments in batch()
      tc: htb: Print default value in hex

Qiaobin Fu (1):
      net:sched: add action inheritdsfield to skbedit

Roopa Prabhu (1):
      ipneigh: exclude NTF_EXT_LEARNED from default filter

Sabrina Dubroca (2):
      json: make 0xhex handle u64
      macsec: fix off-by-one when parsing attributes

Simon Horman (1):
      tc: m_tunnel_key: Add tunnel option support to act_tunnel_key

Stefan Bader (2):
      testsuite: Handle large number of kernel options
      iprule: Fix destination prefix output

Stephen Hemminger (30):
      ip: show min and max mtu
      ip: show min and max mtu
      ip: convert monitor to switch
      ipmonitor: decode DELNETCONF message
      genl: code cleanup
      ip: drop extern from function prototype
      bridge: drop extern from function prototypes
      genl: drop extern from function prototypes
      tc: drop extern from function prototypes
      uapi: update bpf headers
      uapi: update ib_verbs
      bridge: minor change to mdb print
      bridge: use print_json for some outputs
      bridge: fix vlan show formatting
      tc/fifo: remove unnecessary prototype
      genl: remove unnecessary extern
      lib: introduce print_nl
      libnetlink: fix leak and using unused memory on error
      Makefile: add help target
      testsuite: add libmnl
      libnetlink: don't return error on success
      libnetlink: use local variable
      doc/man: spelling fixes
      examples: fix spelling errors
      config: spelling fixes
      tc: spelling fixes
      ip: spelling fixes
      tipc: spelling fix
      util: spelling fix
      v4.19.0

Subash Abhinov Kasiviswanathan (1):
      ip-xfrm: Add support for OUTPUT_MARK

Toke Høiland-Jørgensen (6):
      Add support for CAKE qdisc
      q_cake: Rename autorate_ingress parameter to use dash as word separator
      sch_cake: Make gso-splitting configurable
      q_cake: Add description of the tc filter override mechanism to man page
      q_cake: Add printing of no-split-gso option
      q_cake: Also print nonat, nowash and no-ack-filter keywords

Vinicius Costa Gomes (1):
      tc: Add support for the ETF Qdisc

Vlad Buslov (1):
      libnetlink: fix use-after-free of message buf

^ permalink raw reply

* Re: [PATCH v3 1/4] net: emac: implement 802.1Q VLAN TX tagging support
From: David Miller @ 2018-10-23 17:54 UTC (permalink / raw)
  To: chunkeey; +Cc: netdev
In-Reply-To: <f4acff06dde1a69a3c3f4fdd27014de3a3bd51cb.1540289031.git.chunkeey@gmail.com>


Sorry, net-next is closed.

Please resubmit this when net-next opens back up.

Thank you.

^ 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