Netdev List
 help / color / mirror / Atom feed
* Re: [PATCH net-next v2 4/7] net: phy: mscc: read 'vsc8531,edge-slowdown' as an u32
From: Andrew Lunn @ 2018-09-03 20:05 UTC (permalink / raw)
  To: Quentin Schulz
  Cc: davem, robh+dt, mark.rutland, f.fainelli, allan.nielsen, netdev,
	devicetree, linux-kernel, thomas.petazzoni
In-Reply-To: <20180903133746.wsvezy3rbdivnjfs@qschulz>

> Just to be sure, we're talking here about making sure the value stored
> in the DT is not bigger than the specified value (here an u8)? If so,
> that isn't the reason why I'm suggesting those two patches.
> 
> Without /bits 8/ in the DT property, whatever were the values I put in
> the property, I'd always get a 0. So I need to fix it either in the DT
> (but Rob does not really like it) or in the driver.

Hi Quentin

Ah, you are fixing endian issues. That was not clear to me from the
commit message.

I don't know enough about how DT stores values in the blob. Is there
type info? Can the DT core tell if a value in the blob is a u8 or a
u32?  It would be nice if it warned about reading a u8 from a u32
blob.

Anyway, this change still removes some bounds checking. Are they
important? Do they need to be added back?

Thanks
	Andrew

^ permalink raw reply

* Re: [RFT net-next] net: stmmac: Rework coalesce timer and fix multi-queue races
From: Jose Abreu @ 2018-09-03 15:47 UTC (permalink / raw)
  To: Jerome Brunet, Jose Abreu, netdev
  Cc: Martin Blumenstingl, David S. Miller, Joao Pinto,
	Giuseppe Cavallaro, Alexandre Torgue
In-Reply-To: <2fc5f3da95e74368b280dacc9c9000e97e3da6a4.camel@baylibre.com>

On 03-09-2018 16:38, Jerome Brunet wrote:
> On Mon, 2018-09-03 at 16:22 +0100, Jose Abreu wrote:
>> On 03-09-2018 15:10, Jerome Brunet wrote:
>>> On Mon, 2018-09-03 at 12:47 +0100, Jose Abreu wrote:
>>>> On 03-09-2018 11:16, Jerome Brunet wrote:
>>>>> No notable change. Rx is fine but Tx:
>>>>> [  5]   3.00-4.00   sec  3.55 MBytes  29.8 Mbits/sec   51   12.7 KBytes
>>>>>
>>>>> I suppose the problem as something to do with the retries. When doing Tx test
>>>>> alone, we don't have such a things a throughput where we expect it to be.
>>>> Yeah, I just remembered you are not using GMAC4 so it wouldn't
>>>> make a difference. Is your version 3.710? If so please try adding
>>>> the following compatible to your DT bindings "snps,dwmac-3.710".
>>> According to the documentation, it is a 3.70a but I learn (the hard way) not to
>>> trust the documentation too much. Is there anyway to make sure which version we
>>> have. Like a register to read ?
>> It should be dumped at probe by a string like this one:
>>
>> "User ID: 0xXY, Synopsys ID: 0xXZ"
> User ID: 0x11, Synopsys ID: 0x37 ? What to does it map to ?

Its 3.7. As for the User ID this can be changed by final HW team
so I can't confirm what it means.

>
>>> Out of curiosity, I changed the compatible to "snps,dwmac-3.710" anyway. For
>>> some reason, the MDIO bus failed to register with this. Since it is not the
>>> documented version, I did not check why.
>> No you can't change. You need to add it. So it should stay like this:
>>
>> compatible = "amlogic,meson-gxbb-dwmac", "snps,dwmac",
>> "snps,dwmac-3.710";
> Adding "snps,dwmac-3.710" does not change anything for me.
> Having both Tx and Rx at the same time still wreck Tx throughput unfortunately 

Okay, so you said that there are lots of retries: can you disable
COE at all ? (it should be something like: ethtool -K eth0 rx off
tx off).

Thanks and Best Regards,
Jose Miguel Abreu

>
>> Thanks and Best Regards,
>> Jose Miguel Abreu
>>
>>>>> By the way, your mailer (and its auto 80 column rule I suppose) made the patch
>>>>> below a bit harder to apply
>>>> Sorry. Next time I will send as attachment.
>>> No worries
>>>
>>>> Thanks and Best Regards,
>>>> Jose Miguel Abreu
>>
>

^ permalink raw reply

* Re: [PATCH net-next] i40e: remove inline directive
From: Sergei Shtylyov @ 2018-09-03 16:05 UTC (permalink / raw)
  To: YueHaibing, davem, jeffrey.t.kirsher
  Cc: linux-kernel, netdev, intel-wired-lan
In-Reply-To: <20180903123621.8696-1-yuehaibing@huawei.com>

On 09/03/2018 03:36 PM, YueHaibing wrote:

> Fixes follow gcc warning:
> 
> drivers/net/ethernet/intel/i40e/i40e_ethtool.c: In function '__i40e_add_stat_strings':
> drivers/net/ethernet/intel/i40e/i40e_ethtool_stats.h:193:20: error: function '__i40e_add_stat_strings' can never be inlined because it uses variable argument lists
> 
> Fixes: 8fd75c58a09a ("i40e: move ethtool stats boiler plate code to i40e_ethtool_stats.h")
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
> ---
>  drivers/net/ethernet/intel/i40e/i40e_ethtool_stats.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/net/ethernet/intel/i40e/i40e_ethtool_stats.h b/drivers/net/ethernet/intel/i40e/i40e_ethtool_stats.h
> index bba1cb0..0290ade 100644
> --- a/drivers/net/ethernet/intel/i40e/i40e_ethtool_stats.h
> +++ b/drivers/net/ethernet/intel/i40e/i40e_ethtool_stats.h
> @@ -190,7 +190,7 @@ i40e_add_queue_stats(u64 **data, struct i40e_ring *ring)
>   * Format and copy the strings described by stats into the buffer pointed at
>   * by p.
>   **/
> -static inline void __i40e_add_stat_strings(u8 **p, const struct i40e_stats stats[],
> +static void __i40e_add_stat_strings(u8 **p, const struct i40e_stats stats[],
>  				    const unsigned int size, ...)
>  {
>  	unsigned int i;

   You now need to move this function to a .c file and leave here only its prototype.

MBR, Sergei

^ permalink raw reply

* [PATCH bpf] selftests/bpf: add missing executables to .gitignore
From: Mauricio Vasquez B @ 2018-09-03 16:05 UTC (permalink / raw)
  To: Alexei Starovoitov, Daniel Borkmann, Shuah Khan
  Cc: netdev, linux-kernel, linux-kselftest

Signed-off-by: Mauricio Vasquez B <mauricio.vasquez@polito.it>
---
 tools/testing/selftests/bpf/.gitignore | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/tools/testing/selftests/bpf/.gitignore b/tools/testing/selftests/bpf/.gitignore
index 49938d72cf63..4d789c1e5167 100644
--- a/tools/testing/selftests/bpf/.gitignore
+++ b/tools/testing/selftests/bpf/.gitignore
@@ -19,3 +19,7 @@ test_btf
 test_sockmap
 test_lirc_mode2_user
 get_cgroup_id_user
+test_skb_cgroup_id_user
+test_socket_cookie
+test_cgroup_storage
+test_select_reuseport
-- 
2.7.4

^ permalink raw reply related

* [PATCH v3 3/3] IB/ipoib: Log sysfs 'dev_id' accesses from userspace
From: Arseny Maslennikov @ 2018-09-03 16:13 UTC (permalink / raw)
  To: linux-rdma; +Cc: Arseny Maslennikov, Doug Ledford, Jason Gunthorpe, netdev
In-Reply-To: <20180903161316.25121-1-ar@cs.msu.ru>

Signed-off-by: Arseny Maslennikov <ar@cs.msu.ru>
---
 drivers/infiniband/ulp/ipoib/ipoib_main.c | 38 +++++++++++++++++++++++
 1 file changed, 38 insertions(+)

diff --git a/drivers/infiniband/ulp/ipoib/ipoib_main.c b/drivers/infiniband/ulp/ipoib/ipoib_main.c
index 30f840f874b3..7386e5bde3d3 100644
--- a/drivers/infiniband/ulp/ipoib/ipoib_main.c
+++ b/drivers/infiniband/ulp/ipoib/ipoib_main.c
@@ -2386,6 +2386,42 @@ int ipoib_add_pkey_attr(struct net_device *dev)
 	return device_create_file(&dev->dev, &dev_attr_pkey);
 }
 
+/*
+ * We erroneously exposed the iface's port number in the dev_id
+ * sysfs field long after dev_port was introduced for that purpose[1],
+ * and we need to stop everyone from relying on that.
+ * Let's overload the shower routine for the dev_id file here
+ * to gently bring the issue up.
+ *
+ * [1] https://www.spinics.net/lists/netdev/msg272123.html
+ */
+static ssize_t dev_id_show(struct device *dev,
+			   struct device_attribute *attr, char *buf)
+{
+	struct net_device *ndev = to_net_dev(dev);
+	ssize_t ret = -EINVAL;
+
+	if (ndev->dev_id == ndev->dev_port) {
+		netdev_info_once(ndev,
+			"\"%s\" wants to know my dev_id. "
+			"Should it look at dev_port instead?\n",
+			current->comm);
+		netdev_info_once(ndev,
+			"See Documentation/ABI/testing/sysfs-class-net for more info.\n");
+	}
+
+	ret = sprintf(buf, "%#x\n", ndev->dev_id);
+
+	return ret;
+}
+static DEVICE_ATTR_RO(dev_id);
+
+int ipoib_intercept_dev_id_attr(struct net_device *dev)
+{
+	device_remove_file(&dev->dev, &dev_attr_dev_id);
+	return device_create_file(&dev->dev, &dev_attr_dev_id);
+}
+
 static struct net_device *ipoib_add_port(const char *format,
 					 struct ib_device *hca, u8 port)
 {
@@ -2427,6 +2463,8 @@ static struct net_device *ipoib_add_port(const char *format,
 	 */
 	ndev->priv_destructor = ipoib_intf_free;
 
+	if (ipoib_intercept_dev_id_attr(ndev))
+		goto sysfs_failed;
 	if (ipoib_cm_add_mode_attr(ndev))
 		goto sysfs_failed;
 	if (ipoib_add_pkey_attr(ndev))
-- 
2.19.0.rc1

^ permalink raw reply related

* [PATCH v3 1/3] Documentation/ABI: document /sys/class/net/*/dev_port
From: Arseny Maslennikov @ 2018-09-03 16:13 UTC (permalink / raw)
  To: linux-rdma; +Cc: Arseny Maslennikov, Doug Ledford, Jason Gunthorpe, netdev
In-Reply-To: <20180903161316.25121-1-ar@cs.msu.ru>

The sysfs field was introduced 4 years ago along with fixes to various
drivers that erroneously used `dev_id' for that purpose, but it was not
properly documented anywhere.
See commit v3.14-rc3-739-g3f85944fe207.

Signed-off-by: Arseny Maslennikov <ar@cs.msu.ru>
---
 Documentation/ABI/testing/sysfs-class-net | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/Documentation/ABI/testing/sysfs-class-net b/Documentation/ABI/testing/sysfs-class-net
index 2f1788111cd9..ec2232f6a949 100644
--- a/Documentation/ABI/testing/sysfs-class-net
+++ b/Documentation/ABI/testing/sysfs-class-net
@@ -91,6 +91,24 @@ Description:
 		stacked (e.g: VLAN interfaces) but still have the same MAC
 		address as their parent device.
 
+What:		/sys/class/net/<iface>/dev_port
+Date:		February 2014
+KernelVersion:	3.15
+Contact:	netdev@vger.kernel.org
+Description:
+		Indicates the port number of this network device, formatted
+		as a decimal value. Some NICs have multiple independent ports
+		on the same PCI bus, device and function. This attribute allows
+		userspace to distinguish the respective interfaces.
+
+		Note: some device drivers started to use 'dev_id' for this
+		purpose since long before 3.15 and have not adopted the new
+		attribute ever since. To query the port number, some tools look
+		exclusively at 'dev_port', while others only consult 'dev_id'.
+		If a network device has multiple client adapter ports as
+		described in the previous paragraph and does not set this
+		attribute to its port number, it's a kernel bug.
+
 What:		/sys/class/net/<iface>/dormant
 Date:		March 2006
 KernelVersion:	2.6.17
-- 
2.19.0.rc1

^ permalink raw reply related

* [PATCH v3 0/3] IB/ipoib: Use dev_port to disambiguate port numbers
From: Arseny Maslennikov @ 2018-09-03 16:13 UTC (permalink / raw)
  To: linux-rdma; +Cc: Arseny Maslennikov, Doug Ledford, Jason Gunthorpe, netdev

Pre-3.15 userspace had trouble distinguishing different ports
of a NIC on a single PCI bus/device/function. To solve this,
a sysfs field `dev_port' was introduced quite a while ago
(commit v3.14-rc3-739-g3f85944fe207), and some relevant device
drivers were fixed to use it, but not in case of IPoIB.

The convention for some reason never got documented in the kernel, but
was immediately adopted by userspace (notably udev[1][2], biosdevname[3])

1/3 documents the sysfs field — that's why I'm CC-ing netdev.

This series was tested on and applies to 4.19-rc2.

[1] https://lists.freedesktop.org/archives/systemd-devel/2014-June/020788.html
[2] https://lists.freedesktop.org/archives/systemd-devel/2014-July/020804.html
[3] https://github.com/CloudAutomationNTools/biosdevname/blob/c795d51dd93a5309652f0d635f12a3ecfabfaa72/src/eths.c#L38

v1->v2: replace a line instead of inserting and then removing.
v2->v3: restore both attributes, output a notice of deprecation to kmsg.

Arseny Maslennikov (3):
  Documentation/ABI: document /sys/class/net/*/dev_port
  IB/ipoib: Use dev_port to expose network interface port numbers
  IB/ipoib: Log sysfs 'dev_id' accesses from userspace

 Documentation/ABI/testing/sysfs-class-net | 18 ++++++++++
 drivers/infiniband/ulp/ipoib/ipoib_main.c | 40 +++++++++++++++++++++++
 2 files changed, 58 insertions(+)

-- 
2.19.0.rc1

^ permalink raw reply

* [PATCH v3 2/3] IB/ipoib: Use dev_port to expose network interface port numbers
From: Arseny Maslennikov @ 2018-09-03 16:13 UTC (permalink / raw)
  To: linux-rdma; +Cc: Arseny Maslennikov, Doug Ledford, Jason Gunthorpe, netdev
In-Reply-To: <20180903161316.25121-1-ar@cs.msu.ru>

Some InfiniBand network devices have multiple ports on the same PCI
function. This initializes the `dev_port' sysfs field of those
network interfaces with their port number.

Prior to this the kernel erroneously used the `dev_id' sysfs
field of those network interfaces to convey the port number to userspace.

The use of `dev_id' was considered correct until Linux 3.15,
when another field, `dev_port', was defined for this particular
purpose and `dev_id' was reserved for distinguishing stacked ifaces
(e.g: VLANs) with the same hardware address as their parent device.

Similar fixes to net/mlx4_en and many other drivers, which started
exporting this information through `dev_id' before 3.15, were accepted
into the kernel 4 years ago.
See 76a066f2a2a0 (`net/mlx4_en: Expose port number through sysfs').

Signed-off-by: Arseny Maslennikov <ar@cs.msu.ru>
---
 drivers/infiniband/ulp/ipoib/ipoib_main.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/infiniband/ulp/ipoib/ipoib_main.c b/drivers/infiniband/ulp/ipoib/ipoib_main.c
index e3d28f9ad9c0..30f840f874b3 100644
--- a/drivers/infiniband/ulp/ipoib/ipoib_main.c
+++ b/drivers/infiniband/ulp/ipoib/ipoib_main.c
@@ -1880,6 +1880,8 @@ static int ipoib_parent_init(struct net_device *ndev)
 	       sizeof(union ib_gid));
 
 	SET_NETDEV_DEV(priv->dev, priv->ca->dev.parent);
+	priv->dev->dev_port = priv->port - 1;
+	/* Let's set this one too for backwards compatibility. */
 	priv->dev->dev_id = priv->port - 1;
 
 	return 0;
-- 
2.19.0.rc1

^ permalink raw reply related

* Re: [PATCH net-next 1/2] net: stmmac: Rework coalesce timer and fix multi-queue races
From: Jerome Brunet @ 2018-09-03 16:22 UTC (permalink / raw)
  To: Jose Abreu, netdev
  Cc: Martin Blumenstingl, David S. Miller, Joao Pinto,
	Giuseppe Cavallaro, Alexandre Torgue
In-Reply-To: <6bc7d443-845d-0d20-9902-bd15a6ca1c92@synopsys.com>

On Mon, 2018-09-03 at 16:19 +0100, Jose Abreu wrote:
> On 03-09-2018 15:07, Jerome Brunet wrote:
> > 
> > You had it on what you sent in the RFT, but this different.
> 
> Yeah, I had to fix the logic where tx queues != rx queues...
> 
> > 
> > Like with the RFT, the network breakdown we had is no longer reproduced.
> > However this patch wreck the Rx throughput (680MBps -> 35MBps)
> 
> Damn, thats low. And I cant reproduce it here :/
> 
> Strange because I barely messed around with RX path...
> 
> Can you try attached patch in top of this one please?

Situation is even worse with this.
I'm using an NFS root filesystem. With your fixup, I'm not reaching the prompt
anymore. Looks like a the same kind of network breakdown we had previously

> 
> > 
> > BTW, this patch and the RFT assume that 4ae0169fd1b3 ("net: stmmac: Do not keep
> > rearming the coalesce timer in stmmac_xmit") is still applied but I believe
> > David reverted the patch.
> > 
> > If you still need this change, you should include it back in your changeset.
> 
> Yes I know it was reverted but -net was not merged into -next yet...
> 
> Thanks and Best Regards,
> Jose Miguel Abreu
> 
> > 
> > > Thanks and Best Regards,
> > > Jose Miguel Abreu
> > > ---
> > >  drivers/net/ethernet/stmicro/stmmac/common.h      |   4 +-
> > >  drivers/net/ethernet/stmicro/stmmac/stmmac.h      |   7 +-
> > >  drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 177 +++++++++++++++-------
> > >  3 files changed, 126 insertions(+), 62 deletions(-)
> 
> 

^ permalink raw reply

* Re: [PATCH 2/2] ath10k: allow ATH10K_SNOC with COMPILE_TEST
From: Kalle Valo @ 2018-09-03 16:59 UTC (permalink / raw)
  To: Niklas Cassel
  Cc: David S. Miller, Niklas Cassel, ath10k, linux-wireless, netdev,
	linux-kernel
In-Reply-To: <20180612113907.15043-2-niklas.cassel@linaro.org>

Niklas Cassel <niklas.cassel@linaro.org> wrote:

> ATH10K_SNOC builds just fine with COMPILE_TEST, so make that possible.
> 
> Signed-off-by: Niklas Cassel <niklas.cassel@linaro.org>
> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>

Patch applied to ath-next branch of ath.git, thanks.

f1908735f141 ath10k: allow ATH10K_SNOC with COMPILE_TEST

-- 
https://patchwork.kernel.org/patch/10460103/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches

^ permalink raw reply

* [PATCH bpf] selftests/bpf/test_progs: do not check errno == 0
From: Mauricio Vasquez B @ 2018-09-03 17:01 UTC (permalink / raw)
  To: Alexei Starovoitov, Daniel Borkmann, Shuah Khan
  Cc: netdev, linux-kernel, linux-kselftest

The errno man page states: "The value in errno is significant only when
the return value of the call indicated an error..." then it is not correct
to check it, it could be different than zero even if the function
succeeded.

It causes some false positives if errno is set by a previous function.

Signed-off-by: Mauricio Vasquez B <mauricio.vasquez@polito.it>
---
 tools/testing/selftests/bpf/test_progs.c | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/tools/testing/selftests/bpf/test_progs.c b/tools/testing/selftests/bpf/test_progs.c
index 0ef68204c84b..63a671803ed6 100644
--- a/tools/testing/selftests/bpf/test_progs.c
+++ b/tools/testing/selftests/bpf/test_progs.c
@@ -112,13 +112,13 @@ static void test_pkt_access(void)
 
 	err = bpf_prog_test_run(prog_fd, 100000, &pkt_v4, sizeof(pkt_v4),
 				NULL, NULL, &retval, &duration);
-	CHECK(err || errno || retval, "ipv4",
+	CHECK(err || retval, "ipv4",
 	      "err %d errno %d retval %d duration %d\n",
 	      err, errno, retval, duration);
 
 	err = bpf_prog_test_run(prog_fd, 100000, &pkt_v6, sizeof(pkt_v6),
 				NULL, NULL, &retval, &duration);
-	CHECK(err || errno || retval, "ipv6",
+	CHECK(err || retval, "ipv6",
 	      "err %d errno %d retval %d duration %d\n",
 	      err, errno, retval, duration);
 	bpf_object__close(obj);
@@ -153,14 +153,14 @@ static void test_xdp(void)
 	err = bpf_prog_test_run(prog_fd, 1, &pkt_v4, sizeof(pkt_v4),
 				buf, &size, &retval, &duration);
 
-	CHECK(err || errno || retval != XDP_TX || size != 74 ||
+	CHECK(err || retval != XDP_TX || size != 74 ||
 	      iph->protocol != IPPROTO_IPIP, "ipv4",
 	      "err %d errno %d retval %d size %d\n",
 	      err, errno, retval, size);
 
 	err = bpf_prog_test_run(prog_fd, 1, &pkt_v6, sizeof(pkt_v6),
 				buf, &size, &retval, &duration);
-	CHECK(err || errno || retval != XDP_TX || size != 114 ||
+	CHECK(err || retval != XDP_TX || size != 114 ||
 	      iph6->nexthdr != IPPROTO_IPV6, "ipv6",
 	      "err %d errno %d retval %d size %d\n",
 	      err, errno, retval, size);
@@ -185,13 +185,13 @@ static void test_xdp_adjust_tail(void)
 	err = bpf_prog_test_run(prog_fd, 1, &pkt_v4, sizeof(pkt_v4),
 				buf, &size, &retval, &duration);
 
-	CHECK(err || errno || retval != XDP_DROP,
+	CHECK(err || retval != XDP_DROP,
 	      "ipv4", "err %d errno %d retval %d size %d\n",
 	      err, errno, retval, size);
 
 	err = bpf_prog_test_run(prog_fd, 1, &pkt_v6, sizeof(pkt_v6),
 				buf, &size, &retval, &duration);
-	CHECK(err || errno || retval != XDP_TX || size != 54,
+	CHECK(err || retval != XDP_TX || size != 54,
 	      "ipv6", "err %d errno %d retval %d size %d\n",
 	      err, errno, retval, size);
 	bpf_object__close(obj);
@@ -254,14 +254,14 @@ static void test_l4lb(const char *file)
 
 	err = bpf_prog_test_run(prog_fd, NUM_ITER, &pkt_v4, sizeof(pkt_v4),
 				buf, &size, &retval, &duration);
-	CHECK(err || errno || retval != 7/*TC_ACT_REDIRECT*/ || size != 54 ||
+	CHECK(err || retval != 7/*TC_ACT_REDIRECT*/ || size != 54 ||
 	      *magic != MAGIC_VAL, "ipv4",
 	      "err %d errno %d retval %d size %d magic %x\n",
 	      err, errno, retval, size, *magic);
 
 	err = bpf_prog_test_run(prog_fd, NUM_ITER, &pkt_v6, sizeof(pkt_v6),
 				buf, &size, &retval, &duration);
-	CHECK(err || errno || retval != 7/*TC_ACT_REDIRECT*/ || size != 74 ||
+	CHECK(err || retval != 7/*TC_ACT_REDIRECT*/ || size != 74 ||
 	      *magic != MAGIC_VAL, "ipv6",
 	      "err %d errno %d retval %d size %d magic %x\n",
 	      err, errno, retval, size, *magic);
@@ -343,14 +343,14 @@ static void test_xdp_noinline(void)
 
 	err = bpf_prog_test_run(prog_fd, NUM_ITER, &pkt_v4, sizeof(pkt_v4),
 				buf, &size, &retval, &duration);
-	CHECK(err || errno || retval != 1 || size != 54 ||
+	CHECK(err || retval != 1 || size != 54 ||
 	      *magic != MAGIC_VAL, "ipv4",
 	      "err %d errno %d retval %d size %d magic %x\n",
 	      err, errno, retval, size, *magic);
 
 	err = bpf_prog_test_run(prog_fd, NUM_ITER, &pkt_v6, sizeof(pkt_v6),
 				buf, &size, &retval, &duration);
-	CHECK(err || errno || retval != 1 || size != 74 ||
+	CHECK(err || retval != 1 || size != 74 ||
 	      *magic != MAGIC_VAL, "ipv6",
 	      "err %d errno %d retval %d size %d magic %x\n",
 	      err, errno, retval, size, *magic);
-- 
2.7.4

^ permalink raw reply related

* Re: [PATCH net-next] net: sched: action_ife: take reference to meta module
From: Cong Wang @ 2018-09-03 17:03 UTC (permalink / raw)
  To: Vlad Buslov
  Cc: Linux Kernel Network Developers, Jamal Hadi Salim, Jiri Pirko,
	David Miller
In-Reply-To: <1535958623-7050-1-git-send-email-vladbu@mellanox.com>

On Mon, Sep 3, 2018 at 12:10 AM Vlad Buslov <vladbu@mellanox.com> wrote:
>
> Recent refactoring of add_metainfo() caused use_all_metadata() to add
> metainfo to ife action metalist without taking reference to module. This
> causes warning in module_put called from ife action cleanup function.
>
> Implement add_metainfo_and_get_ops() function that returns with reference
> to module taken if metainfo was added successfully, and call it from
> use_all_metadata(), instead of calling __add_metainfo() directly.

Good catch!

I thought every entry in ifeoplist must hold a refcnt to its module, looks
like I was wrong.


>         read_lock(&ife_mod_lock);
>         list_for_each_entry(o, &ifeoplist, list) {
> -               rc = __add_metainfo(o, ife, o->metaid, NULL, 0, true, exists);
> +               rc = add_metainfo_and_get_ops(o, ife, o->metaid, NULL, 0, true,
> +                                             exists);
>                 if (rc == 0)
>                         installed += 1;

I am afraid you have to rollback on failure inside this loop, that is,
releasing all previous module refcnt properly on error.

^ permalink raw reply

* Re: [PATCH net-next] net: sched: action_ife: take reference to meta module
From: Vlad Buslov @ 2018-09-03 17:11 UTC (permalink / raw)
  To: Cong Wang
  Cc: Linux Kernel Network Developers, Jamal Hadi Salim, Jiri Pirko,
	David Miller
In-Reply-To: <CAM_iQpWr-jXGZ_FEHN7yZ77K0CHWvojDRKzuD9y6h70-Q0BM6g@mail.gmail.com>


On Mon 03 Sep 2018 at 17:03, Cong Wang <xiyou.wangcong@gmail.com> wrote:
> On Mon, Sep 3, 2018 at 12:10 AM Vlad Buslov <vladbu@mellanox.com> wrote:
>>
>> Recent refactoring of add_metainfo() caused use_all_metadata() to add
>> metainfo to ife action metalist without taking reference to module. This
>> causes warning in module_put called from ife action cleanup function.
>>
>> Implement add_metainfo_and_get_ops() function that returns with reference
>> to module taken if metainfo was added successfully, and call it from
>> use_all_metadata(), instead of calling __add_metainfo() directly.
>
> Good catch!
>
> I thought every entry in ifeoplist must hold a refcnt to its module, looks
> like I was wrong.
>
>
>>         read_lock(&ife_mod_lock);
>>         list_for_each_entry(o, &ifeoplist, list) {
>> -               rc = __add_metainfo(o, ife, o->metaid, NULL, 0, true, exists);
>> +               rc = add_metainfo_and_get_ops(o, ife, o->metaid, NULL, 0, true,
>> +                                             exists);
>>                 if (rc == 0)
>>                         installed += 1;
>
> I am afraid you have to rollback on failure inside this loop, that is,
> releasing all previous module refcnt properly on error.

Do I? This function looks like it is explicitly designed to succeed if
at least one metainfo was successfully added. And this is how it was
originally implemented before deadlock fix refactoring.

^ permalink raw reply

* [PATCH 3/4 next] net: lan78xx: Switch to SPDX identifier
From: Stefan Wahren @ 2018-09-03 17:12 UTC (permalink / raw)
  To: Woojung Huh
  Cc: Microchip Linux Driver Support, David S. Miller, netdev,
	linux-usb, linux-kernel, Stefan Wahren
In-Reply-To: <1535994759-8938-1-git-send-email-stefan.wahren@i2se.com>

Adopt the SPDX license identifier headers to ease license compliance
management.

Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
---
 drivers/net/usb/lan78xx.c | 18 ++----------------
 drivers/net/usb/lan78xx.h | 18 ++----------------
 2 files changed, 4 insertions(+), 32 deletions(-)

diff --git a/drivers/net/usb/lan78xx.c b/drivers/net/usb/lan78xx.c
index 3d505c2..a6e88a4 100644
--- a/drivers/net/usb/lan78xx.c
+++ b/drivers/net/usb/lan78xx.c
@@ -1,19 +1,5 @@
-/*
- * Copyright (C) 2015 Microchip Technology
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, see <http://www.gnu.org/licenses/>.
- */
+// SPDX-License-Identifier: GPL-2.0+
+/* Copyright (C) 2015 Microchip Technology */
 #include <linux/version.h>
 #include <linux/module.h>
 #include <linux/netdevice.h>
diff --git a/drivers/net/usb/lan78xx.h b/drivers/net/usb/lan78xx.h
index 25aa546..e65cb54 100644
--- a/drivers/net/usb/lan78xx.h
+++ b/drivers/net/usb/lan78xx.h
@@ -1,19 +1,5 @@
-/*
- * Copyright (C) 2015 Microchip Technology
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, see <http://www.gnu.org/licenses/>.
- */
+/* SPDX-License-Identifier: GPL-2.0+ */
+/* Copyright (C) 2015 Microchip Technology */
 #ifndef _LAN78XX_H
 #define _LAN78XX_H
 
-- 
2.7.4

^ permalink raw reply related

* [PATCH mlx5-next] net/mlx5: Add memic command opcode to command checker
From: Leon Romanovsky @ 2018-09-03 17:19 UTC (permalink / raw)
  To: Doug Ledford, Jason Gunthorpe
  Cc: Ariel Levkovich, RDMA mailing list, Saeed Mahameed, linux-netdev,
	Leon Romanovsky

From: Ariel Levkovich <lariel@mellanox.com>

Adding the alloc/dealloc memic FW command opcodes to
avoid "unknown command" prints in the command string
converter and internal error status handler.

Signed-off-by: Ariel Levkovich <lariel@mellanox.com>
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
---
 drivers/net/ethernet/mellanox/mlx5/core/cmd.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/net/ethernet/mellanox/mlx5/core/cmd.c b/drivers/net/ethernet/mellanox/mlx5/core/cmd.c
index 853240f5ae82..39750fca371d 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/cmd.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/cmd.c
@@ -312,6 +312,7 @@ static int mlx5_internal_err_ret_value(struct mlx5_core_dev *dev, u16 op,
 	case MLX5_CMD_OP_DEALLOC_MODIFY_HEADER_CONTEXT:
 	case MLX5_CMD_OP_FPGA_DESTROY_QP:
 	case MLX5_CMD_OP_DESTROY_GENERAL_OBJECT:
+	case MLX5_CMD_OP_DEALLOC_MEMIC:
 		return MLX5_CMD_STAT_OK;
 
 	case MLX5_CMD_OP_QUERY_HCA_CAP:
@@ -435,6 +436,7 @@ static int mlx5_internal_err_ret_value(struct mlx5_core_dev *dev, u16 op,
 	case MLX5_CMD_OP_CREATE_GENERAL_OBJECT:
 	case MLX5_CMD_OP_MODIFY_GENERAL_OBJECT:
 	case MLX5_CMD_OP_QUERY_GENERAL_OBJECT:
+	case MLX5_CMD_OP_ALLOC_MEMIC:
 		*status = MLX5_DRIVER_STATUS_ABORTED;
 		*synd = MLX5_DRIVER_SYND;
 		return -EIO;
@@ -617,6 +619,8 @@ const char *mlx5_command_str(int command)
 	MLX5_COMMAND_STR_CASE(MODIFY_GENERAL_OBJECT);
 	MLX5_COMMAND_STR_CASE(QUERY_GENERAL_OBJECT);
 	MLX5_COMMAND_STR_CASE(QUERY_MODIFY_HEADER_CONTEXT);
+	MLX5_COMMAND_STR_CASE(ALLOC_MEMIC);
+	MLX5_COMMAND_STR_CASE(DEALLOC_MEMIC);
 	default: return "unknown command opcode";
 	}
 }
-- 
2.14.4

^ permalink raw reply related

* [PATCH mlx5-next] net/mlx5: Fix atomic_mode enum values
From: Leon Romanovsky @ 2018-09-03 17:19 UTC (permalink / raw)
  To: Doug Ledford, Jason Gunthorpe
  Cc: Moni Shoua, RDMA mailing list, Artemy Kovalyov, Saeed Mahameed,
	linux-netdev, Leon Romanovsky

From: Moni Shoua <monis@mellanox.com>

The field atomic_mode is 4 bits wide and therefore can hold values
from 0x0 to 0xf. Remove the unnecessary 20 bit shift that made the values
be incorrect. While that, remove unused enum values.

Fixes: 57cda166bbe0 ("net/mlx5: Add DCT command interface")
Signed-off-by: Moni Shoua <monis@mellanox.com>
Reviewed-by: Artemy Kovalyov <artemyko@mellanox.com>
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
---
 include/linux/mlx5/driver.h | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/include/linux/mlx5/driver.h b/include/linux/mlx5/driver.h
index 66c1170500cf..89caed98ef0b 100644
--- a/include/linux/mlx5/driver.h
+++ b/include/linux/mlx5/driver.h
@@ -163,10 +163,7 @@ enum mlx5_dcbx_oper_mode {
 };
 
 enum mlx5_dct_atomic_mode {
-	MLX5_ATOMIC_MODE_DCT_OFF        = 20,
-	MLX5_ATOMIC_MODE_DCT_NONE       = 0 << MLX5_ATOMIC_MODE_DCT_OFF,
-	MLX5_ATOMIC_MODE_DCT_IB_COMP    = 1 << MLX5_ATOMIC_MODE_DCT_OFF,
-	MLX5_ATOMIC_MODE_DCT_CX         = 2 << MLX5_ATOMIC_MODE_DCT_OFF,
+	MLX5_ATOMIC_MODE_DCT_CX         = 2,
 };
 
 enum {
-- 
2.14.4

^ permalink raw reply related

* Re: [PATCH net-next 03/12] net: phy: bcm63xx: Allow to be built with COMPILE_TEST
From: Florian Fainelli @ 2018-09-03 17:28 UTC (permalink / raw)
  To: Andrew Lunn, David Miller; +Cc: netdev, maxime.chevallier
In-Reply-To: <1535908001-18593-4-git-send-email-andrew@lunn.ch>



On 9/2/2018 10:06 AM, Andrew Lunn wrote:
> There is nothing in this driver which prevents it to be compiled for
> other architectures. Add COMPILE_TEST so we get better compile test
> coverage.
> 
> Signed-off-by: Andrew Lunn <andrew@lunn.ch>

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

^ permalink raw reply

* Re: [PATCH net-next 04/12] net: ethernet: Use phy_set_max_speed() to limit advertised speed
From: Florian Fainelli @ 2018-09-03 17:31 UTC (permalink / raw)
  To: Andrew Lunn, David Miller; +Cc: netdev, maxime.chevallier
In-Reply-To: <1535908001-18593-5-git-send-email-andrew@lunn.ch>



On 9/2/2018 10:06 AM, Andrew Lunn wrote:
> Many Ethernet MAC drivers want to limit the PHY to only advertise a
> maximum speed of 100Mbs or 1Gbps. Rather than using a mask, make use
> of the helper function phy_set_max_speed().
> 
> Signed-off-by: Andrew Lunn <andrew@lunn.ch>

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

^ permalink raw reply

* Re: [PATCH net-next 05/12] net: ethernet: genet: Fix speed selection
From: Florian Fainelli @ 2018-09-03 17:32 UTC (permalink / raw)
  To: Andrew Lunn, David Miller; +Cc: netdev, maxime.chevallier
In-Reply-To: <1535908001-18593-6-git-send-email-andrew@lunn.ch>



On 9/2/2018 10:06 AM, Andrew Lunn wrote:
> The phy supported speed is being used to determine if the MAC should
> be configured to 100 or 1G. The masking logic is broken. Instead, look
> 1G supported speeds to enable 1G MAC support.
> 
> Signed-off-by: Andrew Lunn <andrew@lunn.ch>
> ---
>   drivers/net/ethernet/broadcom/genet/bcmmii.c | 7 +++----
>   1 file changed, 3 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/net/ethernet/broadcom/genet/bcmmii.c b/drivers/net/ethernet/broadcom/genet/bcmmii.c
> index 881e566730f3..69587a61e8d6 100644
> --- a/drivers/net/ethernet/broadcom/genet/bcmmii.c
> +++ b/drivers/net/ethernet/broadcom/genet/bcmmii.c
> @@ -220,11 +220,10 @@ int bcmgenet_mii_config(struct net_device *dev, bool init)
>   		 * capabilities, use that knowledge to also configure the
>   		 * Reverse MII interface correctly.
>   		 */
> -		if ((dev->phydev->supported & PHY_BASIC_FEATURES) ==
> -				PHY_BASIC_FEATURES)
> -			port_ctrl = PORT_MODE_EXT_RVMII_25;
> -		else
> +		if (dev->phydev->supported & PHY_1000BT_FEATURES)
>   			port_ctrl = PORT_MODE_EXT_RVMII_50;
> +		else
> +			port_ctrl = PORT_MODE_EXT_RVMII_25;

Your change is not wrong, but the driver was wrong previously, reverse 
MII is 10/100 only, but the reference clock selection (25Mhz or 50Mhz) 
cannot be automatically discovered and we need the help of Device 
Tree/platform data here. I will submit a separate patch for "net", and 
this one can go in for now.

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

^ permalink raw reply

* Re: [PATCH net-next 06/12] net: ethernet: Fix up drivers masking pause support
From: Florian Fainelli @ 2018-09-03 17:33 UTC (permalink / raw)
  To: Andrew Lunn, David Miller, michael.chan; +Cc: netdev, maxime.chevallier
In-Reply-To: <1535908001-18593-7-git-send-email-andrew@lunn.ch>



On 9/2/2018 10:06 AM, Andrew Lunn wrote:
> PHY drivers don't indicate they support pause. They expect MAC drivers
> to enable its support if the MAC has the needed hardware. Thus MAC
> drivers should not mask Pause support, but enable it.
> 
> Change a few ANDs to ORs.
> 
> Signed-off-by: Andrew Lunn <andrew@lunn.ch>

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

Adding Michael for tg3.c

> ---
>   drivers/net/ethernet/broadcom/tg3.c                     | 4 ++--
>   drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_mdio.c | 4 ++--
>   drivers/net/ethernet/mediatek/mtk_eth_soc.c             | 2 +-
>   drivers/net/ethernet/smsc/smsc911x.c                    | 2 +-
>   drivers/net/ethernet/smsc/smsc9420.c                    | 2 +-
>   5 files changed, 7 insertions(+), 7 deletions(-)
> 
> diff --git a/drivers/net/ethernet/broadcom/tg3.c b/drivers/net/ethernet/broadcom/tg3.c
> index cdc32724c9d9..eab00239a47a 100644
> --- a/drivers/net/ethernet/broadcom/tg3.c
> +++ b/drivers/net/ethernet/broadcom/tg3.c
> @@ -2123,14 +2123,14 @@ static int tg3_phy_init(struct tg3 *tp)
>   	case PHY_INTERFACE_MODE_RGMII:
>   		if (!(tp->phy_flags & TG3_PHYFLG_10_100_ONLY)) {
>   			phy_set_max_speed(phydev, SPEED_1000);
> -			phydev->supported &= (SUPPORTED_Pause |
> +			phydev->supported |= (SUPPORTED_Pause |
>   					      SUPPORTED_Asym_Pause);
>   			break;
>   		}
>   		/* fallthru */
>   	case PHY_INTERFACE_MODE_MII:
>   		phy_set_max_speed(phydev, SPEED_100);
> -		phydev->supported &= (SUPPORTED_Pause |
> +		phydev->supported |= (SUPPORTED_Pause |
>   				      SUPPORTED_Asym_Pause);
>   		break;
>   	default:
> diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_mdio.c b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_mdio.c
> index 398971a062f4..05b15d254e32 100644
> --- a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_mdio.c
> +++ b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_mdio.c
> @@ -10,8 +10,6 @@
>   
>   #define HCLGE_PHY_SUPPORTED_FEATURES	(SUPPORTED_Autoneg | \
>   					 SUPPORTED_TP | \
> -					 SUPPORTED_Pause | \
> -					 SUPPORTED_Asym_Pause | \
>   					 PHY_10BT_FEATURES | \
>   					 PHY_100BT_FEATURES | \
>   					 PHY_1000BT_FEATURES)
> @@ -213,6 +211,8 @@ int hclge_mac_connect_phy(struct hclge_dev *hdev)
>   	}
>   
>   	phydev->supported &= HCLGE_PHY_SUPPORTED_FEATURES;
> +	phydev->supported |= SUPPORTED_Pause | SUPPORTED_Asym_Pause;
> +
>   	phydev->advertising = phydev->supported;
>   
>   	return 0;
> diff --git a/drivers/net/ethernet/mediatek/mtk_eth_soc.c b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
> index e93b5375504b..db231bda7c2a 100644
> --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
> +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
> @@ -360,7 +360,7 @@ static int mtk_phy_connect(struct net_device *dev)
>   		SUPPORTED_Pause | SUPPORTED_Asym_Pause;
>   
>   	phy_set_max_speed(dev->phydev, SPEED_1000);
> -	dev->phydev->supported &= SUPPORTED_Pause | SUPPORTED_Asym_Pause;
> +	dev->phydev->supported |= SUPPORTED_Pause | SUPPORTED_Asym_Pause;
>   	dev->phydev->advertising = dev->phydev->supported |
>   				    ADVERTISED_Autoneg;
>   	phy_start_aneg(dev->phydev);
> diff --git a/drivers/net/ethernet/smsc/smsc911x.c b/drivers/net/ethernet/smsc/smsc911x.c
> index f84dbd0beb8e..3e34bf53f055 100644
> --- a/drivers/net/ethernet/smsc/smsc911x.c
> +++ b/drivers/net/ethernet/smsc/smsc911x.c
> @@ -1051,7 +1051,7 @@ static int smsc911x_mii_probe(struct net_device *dev)
>   	phy_set_max_speed(phydev, SPEED_100);
>   
>   	/* mask with MAC supported features */
> -	phydev->supported &= (SUPPORTED_Pause | SUPPORTED_Asym_Pause);
> +	phydev->supported |= (SUPPORTED_Pause | SUPPORTED_Asym_Pause);
>   	phydev->advertising = phydev->supported;
>   
>   	pdata->last_duplex = -1;
> diff --git a/drivers/net/ethernet/smsc/smsc9420.c b/drivers/net/ethernet/smsc/smsc9420.c
> index 795f60d92611..326177384544 100644
> --- a/drivers/net/ethernet/smsc/smsc9420.c
> +++ b/drivers/net/ethernet/smsc/smsc9420.c
> @@ -1138,7 +1138,7 @@ static int smsc9420_mii_probe(struct net_device *dev)
>   	phy_set_max_speed(phydev, SPEED_100);
>   
>   	/* mask with MAC supported features */
> -	phydev->supported &= (SUPPORTED_Pause | SUPPORTED_Asym_Pause);
> +	phydev->supported |= (SUPPORTED_Pause | SUPPORTED_Asym_Pause);
>   	phydev->advertising = phydev->supported;
>   
>   	phy_attached_info(phydev);
> 

-- 
Florian

^ permalink raw reply

* Re: [PATCH net-next 07/12] net: ethernet: Add helper to remove a supported link mode
From: Florian Fainelli @ 2018-09-03 17:35 UTC (permalink / raw)
  To: Andrew Lunn, David Miller; +Cc: netdev, maxime.chevallier
In-Reply-To: <1535908001-18593-8-git-send-email-andrew@lunn.ch>



On 9/2/2018 10:06 AM, Andrew Lunn wrote:
> Some MAC hardware cannot support a subset of link modes. e.g. often
> 1Gbps Full duplex is supported, but Half duplex is not. Add a helper
> to remove such a link mode.
> 
> Signed-off-by: Andrew Lunn <andrew@lunn.ch>

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

^ permalink raw reply

* Re: [PATCH net-next] net: sched: action_ife: take reference to meta module
From: Cong Wang @ 2018-09-03 17:36 UTC (permalink / raw)
  To: Vlad Buslov
  Cc: Linux Kernel Network Developers, Jamal Hadi Salim, Jiri Pirko,
	David Miller
In-Reply-To: <vbfin3mwlnm.fsf@reg-r-vrt-018-180.mtr.labs.mlnx>

On Mon, Sep 3, 2018 at 10:12 AM Vlad Buslov <vladbu@mellanox.com> wrote:
>
>
> On Mon 03 Sep 2018 at 17:03, Cong Wang <xiyou.wangcong@gmail.com> wrote:
> > On Mon, Sep 3, 2018 at 12:10 AM Vlad Buslov <vladbu@mellanox.com> wrote:
> >>
> >> Recent refactoring of add_metainfo() caused use_all_metadata() to add
> >> metainfo to ife action metalist without taking reference to module. This
> >> causes warning in module_put called from ife action cleanup function.
> >>
> >> Implement add_metainfo_and_get_ops() function that returns with reference
> >> to module taken if metainfo was added successfully, and call it from
> >> use_all_metadata(), instead of calling __add_metainfo() directly.
> >
> > Good catch!
> >
> > I thought every entry in ifeoplist must hold a refcnt to its module, looks
> > like I was wrong.
> >
> >
> >>         read_lock(&ife_mod_lock);
> >>         list_for_each_entry(o, &ifeoplist, list) {
> >> -               rc = __add_metainfo(o, ife, o->metaid, NULL, 0, true, exists);
> >> +               rc = add_metainfo_and_get_ops(o, ife, o->metaid, NULL, 0, true,
> >> +                                             exists);
> >>                 if (rc == 0)
> >>                         installed += 1;
> >
> > I am afraid you have to rollback on failure inside this loop, that is,
> > releasing all previous module refcnt properly on error.
>
> Do I? This function looks like it is explicitly designed to succeed if
> at least one metainfo was successfully added. And this is how it was
> originally implemented before deadlock fix refactoring.

Hmm, well, it is taken care by tcf_idr_release() via _tcf_ife_cleanup()...

So, your patch should be fine.

^ permalink raw reply

* Re: [PATCH net-next 08/12] net: ethernet: Add helper for MACs which support asym pause
From: Florian Fainelli @ 2018-09-03 17:38 UTC (permalink / raw)
  To: Andrew Lunn, David Miller; +Cc: netdev, maxime.chevallier
In-Reply-To: <1535908001-18593-9-git-send-email-andrew@lunn.ch>



On 9/2/2018 10:06 AM, Andrew Lunn wrote:
> Rather than have the MAC drivers manipulate phydev members to indicate
> they support Asym Pause, add a helper function.
> 
> Signed-off-by: Andrew Lunn <andrew@lunn.ch>

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

Just one nit in tg3.c:

> diff --git a/drivers/net/ethernet/broadcom/tg3.c b/drivers/net/ethernet/broadcom/tg3.c
> index eab00239a47a..9aa7955d5d31 100644
> --- a/drivers/net/ethernet/broadcom/tg3.c
> +++ b/drivers/net/ethernet/broadcom/tg3.c
> @@ -2123,15 +2123,13 @@ static int tg3_phy_init(struct tg3 *tp)
>   	case PHY_INTERFACE_MODE_RGMII:
>   		if (!(tp->phy_flags & TG3_PHYFLG_10_100_ONLY)) {
>   			phy_set_max_speed(phydev, SPEED_1000);
> -			phydev->supported |= (SUPPORTED_Pause |
> -					      SUPPORTED_Asym_Pause);
> +			phy_support_asym_pause(phydev);
>   			break;
>   		}
>   		/* fallthru */
>   	case PHY_INTERFACE_MODE_MII:
>   		phy_set_max_speed(phydev, SPEED_100);
> -		phydev->supported |= (SUPPORTED_Pause |
> -				      SUPPORTED_Asym_Pause);
> +			phy_support_asym_pause(phydev);

Your indentation is off by a tab here.
-- 
Florian

^ permalink raw reply

* Re: [PATCH net-next 09/12] net: ethernet: Add helper for MACs which support pause
From: Florian Fainelli @ 2018-09-03 17:39 UTC (permalink / raw)
  To: Andrew Lunn, David Miller; +Cc: netdev, maxime.chevallier
In-Reply-To: <1535908001-18593-10-git-send-email-andrew@lunn.ch>



On 9/2/2018 10:06 AM, Andrew Lunn wrote:
> Rather than have the MAC drivers manipulate phydev members, add a
> helper function for MACs supporting Pause, but not Asym Pause.
> 
> Signed-off-by: Andrew Lunn <andrew@lunn.ch>

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

I wonder if this would be better named phy_support_sym_pause() as 
opposed to asym_pause()?

^ permalink raw reply

* Cut out for the images
From: Jason Jones @ 2018-09-03 11:33 UTC (permalink / raw)
  To: netdev

Hi,

I would like to take the chance to speak with the person who handle your
images in your company?

Our ability of imaging editing.
Cutting out for your images
Clipping path for your images
Masking for your images
Retouching for your images
Retouching for the Portraits images

We have 17 photo editors in house and daily basis 700 images can be done.

We can give testing for your photos if you send us one or two to start
working.

Thanks,
Jason Jones

^ 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