Netdev List
 help / color / mirror / Atom feed
* Re: [PATCH net-next] net: report netlink extack only if set
From: Willem de Bruijn @ 2018-08-06  1:40 UTC (permalink / raw)
  To: David Miller; +Cc: Network Development, Stephen Hemminger, Willem de Bruijn
In-Reply-To: <20180805.173731.1703363672930435851.davem@davemloft.net>

On Sun, Aug 5, 2018 at 8:37 PM David Miller <davem@davemloft.net> wrote:
>
> From: Willem de Bruijn <willemdebruijn.kernel@gmail.com>
> Date: Sun,  5 Aug 2018 15:48:01 -0400
>
> > From: Willem de Bruijn <willemb@google.com>
> >
> > Initialize extack in dev_set_mtu and report only if set.
> >
> > Fixes: 7a4c53bee332 ("net: report invalid mtu value via netlink extack")
> > Reported-by: syzbot <syzkaller@googlegroups.com>
> > Signed-off-by: Willem de Bruijn <willemb@google.com>
>
> Someone beat you to it :-)  And that version is in net-next.

Oops. I had totally missed that thread. Glad to see it's fixed already.

^ permalink raw reply

* Re: [PATCH] RDS is not Radio Data System
From: santosh.shilimkar @ 2018-08-06  3:41 UTC (permalink / raw)
  To: Pavel Machek; +Cc: ka-cheong.poon, kernel list, Netdev list
In-Reply-To: <20180805065920.GA8968@amd>

On 8/4/18 11:59 PM, Pavel Machek wrote:
> Hi!
> 
> Getting prompt "The RDS Protocol" (RDS) is not too helpful, and it is
> easily confused with Radio Data System (which we may want to support
> in kernel, too).
>
Fair enough. Prompt change is fine Pavel.

> I wonder if option should be named NET_RDS, instead?
> 
> And this sounds like a good idea:
> 
> (Plus, we normally have "module will be called foobar" and if unsure
> say X. What happened to those?)
>
Module name is there for a while so please use different one if you
have a conflict with it.

> diff --git a/net/rds/Kconfig b/net/rds/Kconfig
> index 41f7556..2738f14 100644
> --- a/net/rds/Kconfig
> +++ b/net/rds/Kconfig
> @@ -1,6 +1,6 @@
>   
>   config RDS
> -	tristate "The RDS Protocol"
> +	tristate "The Reliable Datagram Sockets (RDS) Protocol"
>   	depends on INET
>   	---help---
>   	  The RDS (Reliable Datagram Sockets) protocol provides reliable,
> 
Please git format this patch with your SOB and send it to netdev.
Feel free to add my ack with it.

Acked-by: Santosh Shilimkar <santosh.shilimkar@oracle.com>

^ permalink raw reply

* [PATCH net-next V2] vhost: switch to use new message format
From: Jason Wang @ 2018-08-06  3:17 UTC (permalink / raw)
  To: mst, jasowang; +Cc: netdev, linux-kernel, kvm, virtualization

We use to have message like:

struct vhost_msg {
	int type;
	union {
		struct vhost_iotlb_msg iotlb;
		__u8 padding[64];
	};
};

Unfortunately, there will be a hole of 32bit in 64bit machine because
of the alignment. This leads a different formats between 32bit API and
64bit API. What's more it will break 32bit program running on 64bit
machine.

So fixing this by introducing a new message type with an explicit
32bit reserved field after type like:

struct vhost_msg_v2 {
	__u32 type;
	__u32 reserved;
	union {
		struct vhost_iotlb_msg iotlb;
		__u8 padding[64];
	};
};

We will have a consistent ABI after switching to use this. To enable
this capability, introduce a new ioctl (VHOST_SET_BAKCEND_FEATURE) for
userspace to enable this feature (VHOST_BACKEND_F_IOTLB_V2).

Fixes: 6b1e6cc7855b ("vhost: new device IOTLB API")
Signed-off-by: Jason Wang <jasowang@redhat.com>
---
Changes from V1:
- use __u32 instead of int for type
---
 drivers/vhost/net.c        | 30 ++++++++++++++++++++
 drivers/vhost/vhost.c      | 71 ++++++++++++++++++++++++++++++++++------------
 drivers/vhost/vhost.h      | 11 ++++++-
 include/uapi/linux/vhost.h | 18 ++++++++++++
 4 files changed, 111 insertions(+), 19 deletions(-)

diff --git a/drivers/vhost/net.c b/drivers/vhost/net.c
index 367d802..4e656f8 100644
--- a/drivers/vhost/net.c
+++ b/drivers/vhost/net.c
@@ -78,6 +78,10 @@ enum {
 };
 
 enum {
+	VHOST_NET_BACKEND_FEATURES = (1ULL << VHOST_BACKEND_F_IOTLB_MSG_V2)
+};
+
+enum {
 	VHOST_NET_VQ_RX = 0,
 	VHOST_NET_VQ_TX = 1,
 	VHOST_NET_VQ_MAX = 2,
@@ -1399,6 +1403,21 @@ static long vhost_net_reset_owner(struct vhost_net *n)
 	return err;
 }
 
+static int vhost_net_set_backend_features(struct vhost_net *n, u64 features)
+{
+	int i;
+
+	mutex_lock(&n->dev.mutex);
+	for (i = 0; i < VHOST_NET_VQ_MAX; ++i) {
+		mutex_lock(&n->vqs[i].vq.mutex);
+		n->vqs[i].vq.acked_backend_features = features;
+		mutex_unlock(&n->vqs[i].vq.mutex);
+	}
+	mutex_unlock(&n->dev.mutex);
+
+	return 0;
+}
+
 static int vhost_net_set_features(struct vhost_net *n, u64 features)
 {
 	size_t vhost_hlen, sock_hlen, hdr_len;
@@ -1489,6 +1508,17 @@ static long vhost_net_ioctl(struct file *f, unsigned int ioctl,
 		if (features & ~VHOST_NET_FEATURES)
 			return -EOPNOTSUPP;
 		return vhost_net_set_features(n, features);
+	case VHOST_GET_BACKEND_FEATURES:
+		features = VHOST_NET_BACKEND_FEATURES;
+		if (copy_to_user(featurep, &features, sizeof(features)))
+			return -EFAULT;
+		return 0;
+	case VHOST_SET_BACKEND_FEATURES:
+		if (copy_from_user(&features, featurep, sizeof(features)))
+			return -EFAULT;
+		if (features & ~VHOST_NET_BACKEND_FEATURES)
+			return -EOPNOTSUPP;
+		return vhost_net_set_backend_features(n, features);
 	case VHOST_RESET_OWNER:
 		return vhost_net_reset_owner(n);
 	case VHOST_SET_OWNER:
diff --git a/drivers/vhost/vhost.c b/drivers/vhost/vhost.c
index a502f1a..6f6c42d 100644
--- a/drivers/vhost/vhost.c
+++ b/drivers/vhost/vhost.c
@@ -315,6 +315,7 @@ static void vhost_vq_reset(struct vhost_dev *dev,
 	vq->log_addr = -1ull;
 	vq->private_data = NULL;
 	vq->acked_features = 0;
+	vq->acked_backend_features = 0;
 	vq->log_base = NULL;
 	vq->error_ctx = NULL;
 	vq->kick = NULL;
@@ -1027,28 +1028,40 @@ static int vhost_process_iotlb_msg(struct vhost_dev *dev,
 ssize_t vhost_chr_write_iter(struct vhost_dev *dev,
 			     struct iov_iter *from)
 {
-	struct vhost_msg_node node;
-	unsigned size = sizeof(struct vhost_msg);
-	size_t ret;
-	int err;
+	struct vhost_iotlb_msg msg;
+	size_t offset;
+	int type, ret;
 
-	if (iov_iter_count(from) < size)
-		return 0;
-	ret = copy_from_iter(&node.msg, size, from);
-	if (ret != size)
+	ret = copy_from_iter(&type, sizeof(type), from);
+	if (ret != sizeof(type))
 		goto done;
 
-	switch (node.msg.type) {
+	switch (type) {
 	case VHOST_IOTLB_MSG:
-		err = vhost_process_iotlb_msg(dev, &node.msg.iotlb);
-		if (err)
-			ret = err;
+		/* There maybe a hole after type for V1 message type,
+		 * so skip it here.
+		 */
+		offset = offsetof(struct vhost_msg, iotlb) - sizeof(int);
+		break;
+	case VHOST_IOTLB_MSG_V2:
+		offset = sizeof(__u32);
 		break;
 	default:
 		ret = -EINVAL;
-		break;
+		goto done;
+	}
+
+	iov_iter_advance(from, offset);
+	ret = copy_from_iter(&msg, sizeof(msg), from);
+	if (ret != sizeof(msg))
+		goto done;
+	if (vhost_process_iotlb_msg(dev, &msg)) {
+		ret = -EFAULT;
+		goto done;
 	}
 
+	ret = (type == VHOST_IOTLB_MSG) ? sizeof(struct vhost_msg) :
+	      sizeof(struct vhost_msg_v2);
 done:
 	return ret;
 }
@@ -1107,13 +1120,28 @@ ssize_t vhost_chr_read_iter(struct vhost_dev *dev, struct iov_iter *to,
 		finish_wait(&dev->wait, &wait);
 
 	if (node) {
-		ret = copy_to_iter(&node->msg, size, to);
+		struct vhost_iotlb_msg *msg;
+		void *start = &node->msg;
+
+		switch (node->msg.type) {
+		case VHOST_IOTLB_MSG:
+			size = sizeof(node->msg);
+			msg = &node->msg.iotlb;
+			break;
+		case VHOST_IOTLB_MSG_V2:
+			size = sizeof(node->msg_v2);
+			msg = &node->msg_v2.iotlb;
+			break;
+		default:
+			BUG();
+			break;
+		}
 
-		if (ret != size || node->msg.type != VHOST_IOTLB_MISS) {
+		ret = copy_to_iter(start, size, to);
+		if (ret != size || msg->type != VHOST_IOTLB_MISS) {
 			kfree(node);
 			return ret;
 		}
-
 		vhost_enqueue_msg(dev, &dev->pending_list, node);
 	}
 
@@ -1126,12 +1154,19 @@ static int vhost_iotlb_miss(struct vhost_virtqueue *vq, u64 iova, int access)
 	struct vhost_dev *dev = vq->dev;
 	struct vhost_msg_node *node;
 	struct vhost_iotlb_msg *msg;
+	bool v2 = vhost_backend_has_feature(vq, VHOST_BACKEND_F_IOTLB_MSG_V2);
 
-	node = vhost_new_msg(vq, VHOST_IOTLB_MISS);
+	node = vhost_new_msg(vq, v2 ? VHOST_IOTLB_MSG_V2 : VHOST_IOTLB_MSG);
 	if (!node)
 		return -ENOMEM;
 
-	msg = &node->msg.iotlb;
+	if (v2) {
+		node->msg_v2.type = VHOST_IOTLB_MSG_V2;
+		msg = &node->msg_v2.iotlb;
+	} else {
+		msg = &node->msg.iotlb;
+	}
+
 	msg->type = VHOST_IOTLB_MISS;
 	msg->iova = iova;
 	msg->perm = access;
diff --git a/drivers/vhost/vhost.h b/drivers/vhost/vhost.h
index 6c844b9..466ef75 100644
--- a/drivers/vhost/vhost.h
+++ b/drivers/vhost/vhost.h
@@ -132,6 +132,7 @@ struct vhost_virtqueue {
 	struct vhost_umem *iotlb;
 	void *private_data;
 	u64 acked_features;
+	u64 acked_backend_features;
 	/* Log write descriptors */
 	void __user *log_base;
 	struct vhost_log *log;
@@ -147,7 +148,10 @@ struct vhost_virtqueue {
 };
 
 struct vhost_msg_node {
-  struct vhost_msg msg;
+  union {
+	  struct vhost_msg msg;
+	  struct vhost_msg_v2 msg_v2;
+  };
   struct vhost_virtqueue *vq;
   struct list_head node;
 };
@@ -238,6 +242,11 @@ static inline bool vhost_has_feature(struct vhost_virtqueue *vq, int bit)
 	return vq->acked_features & (1ULL << bit);
 }
 
+static inline bool vhost_backend_has_feature(struct vhost_virtqueue *vq, int bit)
+{
+	return vq->acked_backend_features & (1ULL << bit);
+}
+
 #ifdef CONFIG_VHOST_CROSS_ENDIAN_LEGACY
 static inline bool vhost_is_little_endian(struct vhost_virtqueue *vq)
 {
diff --git a/include/uapi/linux/vhost.h b/include/uapi/linux/vhost.h
index c51f8e5..b1e22c4 100644
--- a/include/uapi/linux/vhost.h
+++ b/include/uapi/linux/vhost.h
@@ -65,6 +65,7 @@ struct vhost_iotlb_msg {
 };
 
 #define VHOST_IOTLB_MSG 0x1
+#define VHOST_IOTLB_MSG_V2 0x2
 
 struct vhost_msg {
 	int type;
@@ -74,6 +75,15 @@ struct vhost_msg {
 	};
 };
 
+struct vhost_msg_v2 {
+	__u32 type;
+	__u32 reserved;
+	union {
+		struct vhost_iotlb_msg iotlb;
+		__u8 padding[64];
+	};
+};
+
 struct vhost_memory_region {
 	__u64 guest_phys_addr;
 	__u64 memory_size; /* bytes */
@@ -160,6 +170,14 @@ struct vhost_memory {
 #define VHOST_GET_VRING_BUSYLOOP_TIMEOUT _IOW(VHOST_VIRTIO, 0x24,	\
 					 struct vhost_vring_state)
 
+/* Set or get vhost backend capability */
+
+/* Use message type V2 */
+#define VHOST_BACKEND_F_IOTLB_MSG_V2 0x1
+
+#define VHOST_SET_BACKEND_FEATURES _IOW(VHOST_VIRTIO, 0x25, __u64)
+#define VHOST_GET_BACKEND_FEATURES _IOW(VHOST_VIRTIO, 0x26, __u64)
+
 /* VHOST_NET specific defines */
 
 /* Attach virtio net ring to a raw socket, or tap device.
-- 
2.7.4

^ permalink raw reply related

* Re: [PATCH net-next] vhost: switch to use new message format
From: Jason Wang @ 2018-08-06  3:15 UTC (permalink / raw)
  To: Michael S. Tsirkin; +Cc: kvm, virtualization, netdev, linux-kernel
In-Reply-To: <20180803105511-mutt-send-email-mst@kernel.org>



On 2018年08月03日 15:59, Michael S. Tsirkin wrote:
>> diff --git a/drivers/vhost/vhost.c b/drivers/vhost/vhost.c
>> index a502f1a..6f6c42d 100644
>> --- a/drivers/vhost/vhost.c
>> +++ b/drivers/vhost/vhost.c
>> @@ -315,6 +315,7 @@ static void vhost_vq_reset(struct vhost_dev *dev,
>>   	vq->log_addr = -1ull;
>>   	vq->private_data = NULL;
>>   	vq->acked_features = 0;
>> +	vq->acked_backend_features = 0;
>>   	vq->log_base = NULL;
>>   	vq->error_ctx = NULL;
>>   	vq->kick = NULL;
>> @@ -1027,28 +1028,40 @@ static int vhost_process_iotlb_msg(struct vhost_dev *dev,
>>   ssize_t vhost_chr_write_iter(struct vhost_dev *dev,
>>   			     struct iov_iter *from)
>>   {
>> -	struct vhost_msg_node node;
>> -	unsigned size = sizeof(struct vhost_msg);
>> -	size_t ret;
>> -	int err;
>> +	struct vhost_iotlb_msg msg;
>> +	size_t offset;
>> +	int type, ret;
>>   
>> -	if (iov_iter_count(from) < size)
>> -		return 0;
>> -	ret = copy_from_iter(&node.msg, size, from);
>> -	if (ret != size)
>> +	ret = copy_from_iter(&type, sizeof(type), from);
>> +	if (ret != sizeof(type))
>>   		goto done;
>>   
>> -	switch (node.msg.type) {
>> +	switch (type) {
>>   	case VHOST_IOTLB_MSG:
>> -		err = vhost_process_iotlb_msg(dev, &node.msg.iotlb);
>> -		if (err)
>> -			ret = err;
>> +		/* There maybe a hole after type for V1 message type,
>> +		 * so skip it here.
>> +		 */
>> +		offset = offsetof(struct vhost_msg, iotlb) - sizeof(int);
>> +		break;
>> +	case VHOST_IOTLB_MSG_V2:
>> +		offset = sizeof(__u32);
>>   		break;
>>   	default:
>>   		ret = -EINVAL;
>> -		break;
>> +		goto done;
>> +	}
>> +
>> +	iov_iter_advance(from, offset);
>> +	ret = copy_from_iter(&msg, sizeof(msg), from);
>> +	if (ret != sizeof(msg))
>> +		goto done;
>> +	if (vhost_process_iotlb_msg(dev, &msg)) {
>> +		ret = -EFAULT;
>> +		goto done;
>>   	}
>>   
>> +	ret = (type == VHOST_IOTLB_MSG) ? sizeof(struct vhost_msg) :
>> +	      sizeof(struct vhost_msg_v2);
>>   done:
>>   	return ret;
>>   }
> We can actually fix 32 bit apps too, checking the mode for v1.
> But that can wait for another patch.
>

Yes, let me do it on top.

Thanks

^ permalink raw reply

* Re: [PATCH net-next] vhost: switch to use new message format
From: Jason Wang @ 2018-08-06  3:08 UTC (permalink / raw)
  To: David Miller; +Cc: netdev, virtualization, linux-kernel, kvm, mst
In-Reply-To: <20180804.132110.184608716461100739.davem@davemloft.net>



On 2018年08月05日 04:21, David Miller wrote:
> From: Jason Wang <jasowang@redhat.com>
> Date: Fri,  3 Aug 2018 15:04:51 +0800
>
>> So fixing this by introducing a new message type with an explicit
>> 32bit reserved field after type like:
>>
>> struct vhost_msg_v2 {
>> 	int type;
>> 	__u32 reserved;
> Please use fixed sized types consistently.  Use 's32' instead of 'int'
> here.
>
> Thanks!

Ok, V2 will be posted soon.

And it looks to me u32 is sufficient.

Thanks
_______________________________________________
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization

^ permalink raw reply

* [PATCH v2] net/bridge/br_multicast: remove redundant variable "err"
From: zhong jiang @ 2018-08-06  3:07 UTC (permalink / raw)
  To: davem, stephen; +Cc: netdev, linux-kernel

The err is not modified after initalization, So remove it and make
it to be void function.

Signed-off-by: zhong jiang <zhongjiang@huawei.com>
---
v1->v2:
 -  The initalization of err  to '0' is unnecesary. so drop the change

 net/bridge/br_multicast.c | 12 +++++-------
 1 file changed, 5 insertions(+), 7 deletions(-)

diff --git a/net/bridge/br_multicast.c b/net/bridge/br_multicast.c
index 920665d..20ed7ad 100644
--- a/net/bridge/br_multicast.c
+++ b/net/bridge/br_multicast.c
@@ -1423,10 +1423,10 @@ static void br_multicast_query_received(struct net_bridge *br,
 	br_multicast_mark_router(br, port);
 }
 
-static int br_ip4_multicast_query(struct net_bridge *br,
-				  struct net_bridge_port *port,
-				  struct sk_buff *skb,
-				  u16 vid)
+static void br_ip4_multicast_query(struct net_bridge *br,
+				   struct net_bridge_port *port,
+				   struct sk_buff *skb,
+				   u16 vid)
 {
 	const struct iphdr *iph = ip_hdr(skb);
 	struct igmphdr *ih = igmp_hdr(skb);
@@ -1439,7 +1439,6 @@ static int br_ip4_multicast_query(struct net_bridge *br,
 	unsigned long now = jiffies;
 	unsigned int offset = skb_transport_offset(skb);
 	__be32 group;
-	int err = 0;
 
 	spin_lock(&br->multicast_lock);
 	if (!netif_running(br->dev) ||
@@ -1498,7 +1497,6 @@ static int br_ip4_multicast_query(struct net_bridge *br,
 
 out:
 	spin_unlock(&br->multicast_lock);
-	return err;
 }
 
 #if IS_ENABLED(CONFIG_IPV6)
@@ -1828,7 +1826,7 @@ static int br_multicast_ipv4_rcv(struct net_bridge *br,
 		err = br_ip4_multicast_igmp3_report(br, port, skb_trimmed, vid);
 		break;
 	case IGMP_HOST_MEMBERSHIP_QUERY:
-		err = br_ip4_multicast_query(br, port, skb_trimmed, vid);
+		br_ip4_multicast_query(br, port, skb_trimmed, vid);
 		break;
 	case IGMP_HOST_LEAVE_MESSAGE:
 		br_ip4_multicast_leave_group(br, port, ih->group, vid, src);
-- 
1.7.12.4

^ permalink raw reply related

* Re: [PATCH net-next] tc-testing: remove duplicate spaces in skbedit match patterns
From: David Miller @ 2018-08-06  0:39 UTC (permalink / raw)
  To: vladbu; +Cc: netdev, jhs
In-Reply-To: <1533497829-26227-1-git-send-email-vladbu@mellanox.com>

From: Vlad Buslov <vladbu@mellanox.com>
Date: Sun,  5 Aug 2018 22:37:09 +0300

> Match patterns for some skbedit tests contain duplicate whitespace that is
> not present in actual tc output. This causes tests to fail because they
> can't match required action, even when it was successfully created.
> 
> Signed-off-by: Vlad Buslov <vladbu@mellanox.com>
> Acked-by: Jamal Hadi Salim <jhs@mojatatu.com>

Applied.

^ permalink raw reply

* Re: [PATCH net-next] tc-testing: remove duplicate spaces in connmark match patterns
From: David Miller @ 2018-08-06  0:39 UTC (permalink / raw)
  To: vladbu; +Cc: netdev, jhs
In-Reply-To: <1533497804-26175-1-git-send-email-vladbu@mellanox.com>

From: Vlad Buslov <vladbu@mellanox.com>
Date: Sun,  5 Aug 2018 22:36:44 +0300

> Match patterns for some connmark tests contain duplicate whitespace that is
> not present in actual tc output. This causes tests to fail because they
> can't match required action, even when it was successfully created.
> 
> Fixes: 1dad0f9ffff7 ("tc-testing: add connmark action tests")
> Signed-off-by: Vlad Buslov <vladbu@mellanox.com>
> Acked-by: Jamal Hadi Salim <jhs@mojatatu.com>

Applied.

^ permalink raw reply

* Re: [PATCH net-next] tc-testing: flush gact actions on test teardown
From: David Miller @ 2018-08-06  0:39 UTC (permalink / raw)
  To: vladbu; +Cc: netdev, jhs
In-Reply-To: <1533497785-26126-1-git-send-email-vladbu@mellanox.com>

From: Vlad Buslov <vladbu@mellanox.com>
Date: Sun,  5 Aug 2018 22:36:25 +0300

> Test 6fb4 creates one mirred and one pipe action, but only flushes mirred
> on teardown. Leaking pipe action causes failures in other tests.
> 
> Add additional teardown command to also flush gact actions.
> 
> Signed-off-by: Vlad Buslov <vladbu@mellanox.com>
> Acked-by: Jamal Hadi Salim <jhs@mojatatu.com>

Applied.

^ permalink raw reply

* Re: [PATCH net-next] tc-testing: fix ip address in u32 test
From: David Miller @ 2018-08-06  0:39 UTC (permalink / raw)
  To: vladbu; +Cc: netdev, jhs
In-Reply-To: <1533497756-26067-1-git-send-email-vladbu@mellanox.com>

From: Vlad Buslov <vladbu@mellanox.com>
Date: Sun,  5 Aug 2018 22:35:56 +0300

> Fix expected ip address to actually match configured ip address.
> Fix test to expect single matched filter.
> 
> Signed-off-by: Vlad Buslov <vladbu@mellanox.com>
> Acked-by: Jamal Hadi Salim <jhs@mojatatu.com>

Applied.

^ permalink raw reply

* Re: [PATCH net-next 00/13] bnxt_en: Updates for net-next.
From: David Miller @ 2018-08-06  0:37 UTC (permalink / raw)
  To: michael.chan; +Cc: netdev
In-Reply-To: <1533502318-22359-1-git-send-email-michael.chan@broadcom.com>

From: Michael Chan <michael.chan@broadcom.com>
Date: Sun,  5 Aug 2018 16:51:45 -0400

> This series includes the usual firmware spec update.  The driver has
> added external phy loopback test and phy setup retry logic that is
> needed during hotplug.  In the SRIOV space, the driver has added a
> new VF resource allocation mode that requires the VF driver to
> reserve resources during IFUP.  IF state changes are now propagated
> to firmware so that firmware can release some resources during IFDOWN.
> 
> ethtool method to get firmware core dump and hwmon temperature reading
> have been added.  DSCP to user priority support has been added to
> the driver's DCBNL interface, and the CoS queue logic has been refined
> to make sure that the special RDMA Congestion Notification hardware CoS
> queue will not be used for networking traffic.

Series applied, thanks Michael.

^ permalink raw reply

* Re: [PATCH net-next] net: report netlink extack only if set
From: David Miller @ 2018-08-06  0:37 UTC (permalink / raw)
  To: willemdebruijn.kernel; +Cc: netdev, stephen, willemb
In-Reply-To: <20180805194801.173032-1-willemdebruijn.kernel@gmail.com>

From: Willem de Bruijn <willemdebruijn.kernel@gmail.com>
Date: Sun,  5 Aug 2018 15:48:01 -0400

> From: Willem de Bruijn <willemb@google.com>
> 
> Initialize extack in dev_set_mtu and report only if set.
> 
> Fixes: 7a4c53bee332 ("net: report invalid mtu value via netlink extack")
> Reported-by: syzbot <syzkaller@googlegroups.com>
> Signed-off-by: Willem de Bruijn <willemb@google.com>

Someone beat you to it :-)  And that version is in net-next.

Thanks!

^ permalink raw reply

* Re: [PATCH net] ip6_tunnel: use the right value for ipv4 min mtu check in ip6_tnl_xmit
From: David Miller @ 2018-08-06  0:35 UTC (permalink / raw)
  To: lucien.xin; +Cc: netdev, sd
In-Reply-To: <2176423fed58d51f462505d67be9e5ff0e666922.1533480367.git.lucien.xin@gmail.com>

From: Xin Long <lucien.xin@gmail.com>
Date: Sun,  5 Aug 2018 22:46:07 +0800

> According to RFC791, 68 bytes is the minimum size of IPv4 datagram every
> device must be able to forward without further fragmentation while 576
> bytes is the minimum size of IPv4 datagram every device has to be able
> to receive, so in ip6_tnl_xmit(), 68(IPV4_MIN_MTU) should be the right
> value for the ipv4 min mtu check in ip6_tnl_xmit.
> 
> While at it, change to use max() instead of if statement.
> 
> Fixes: c9fefa08190f ("ip6_tunnel: get the min mtu properly in ip6_tnl_xmit")
> Reported-by: Sabrina Dubroca <sd@queasysnail.net>
> Signed-off-by: Xin Long <lucien.xin@gmail.com>

Applied and queued up for -stable, thanks Xin.

^ permalink raw reply

* Re: pull request: bluetooth-next 2018-08-05
From: David Miller @ 2018-08-06  0:30 UTC (permalink / raw)
  To: johan.hedberg; +Cc: linux-bluetooth, netdev
In-Reply-To: <20180805061430.GA14496@x1c.home>

From: Johan Hedberg <johan.hedberg@gmail.com>
Date: Sun, 5 Aug 2018 09:14:30 +0300

> Here's the main bluetooth-next pull request for the 4.19 kernel.
> 
>  - Added support for Bluetooth Advertising Extensions
>  - Added vendor driver support to hci_h5 HCI driver
>  - Added serdev support to hci_h5 driver
>  - Added support for Qualcomm wcn3990 controller
>  - Added support for RTL8723BS and RTL8723DS controllers
>  - btusb: Added new ID for Realtek 8723DE
>  - Several other smaller fixes & cleanups
> 
> Please let me know if there are any issues pulling. Thanks.

Pulled, thanks Johan.

^ permalink raw reply

* Re: [PATCH net-next 0/3] mlxsw: Enable MC-aware mode for mlxsw ports
From: David Miller @ 2018-08-06  0:29 UTC (permalink / raw)
  To: idosch; +Cc: netdev, jiri, petrm, mlxsw
In-Reply-To: <20180805060308.7862-1-idosch@mellanox.com>

From: Ido Schimmel <idosch@mellanox.com>
Date: Sun,  5 Aug 2018 09:03:05 +0300

> Petr says:
> 
> Due to an issue in Spectrum chips, when unicast traffic shares the same
> queue as BUM traffic, and there is a congestion, the BUM traffic is
> admitted to the queue anyway, thus pushing out all UC traffic. In order
> to give unicast traffic precedence over BUM traffic, configure
> multicast-aware mode on all ports.
> 
> Under multicast-aware regime, when assigning traffic class to a packet,
> the switch doesn't merely take the value prescribed by the QTCT
> register. For BUM traffic, it instead assigns that value plus 8. That
> limits the number of available TCs, but since mlxsw currently only uses
> the lower eight anyway, it is no real loss.
> 
> The two TCs (UC and MC one) are then mapped to the same subgroup and
> strictly prioritized so that UC traffic is preferred in case of
> congestion.
> 
> In patch #1, introduce a new register, QTCTM, which enables the
> multicast-aware mode.
> 
> In patch #2, fix a typo in related code.
> 
> In patch #3, set up TCs and QTCTM to enable multicast-aware mode.

Series applied, thanks.

^ permalink raw reply

* Re: [PATCH] mellanox: fix the dport endianness in call of __inet6_lookup_established()
From: David Miller @ 2018-08-06  0:27 UTC (permalink / raw)
  To: viro; +Cc: borisp, netdev
In-Reply-To: <20180804204127.GC15082@ZenIV.linux.org.uk>

From: Al Viro <viro@ZenIV.linux.org.uk>
Date: Sat, 4 Aug 2018 21:41:27 +0100

> __inet6_lookup_established() expect th->dport passed in host-endian,
> not net-endian.  The reason is microoptimization in __inet6_lookup(),
> but if you use the lower-level helpers, you have to play by their
> rules...
>     
> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>

Mellanox folks, please review.

^ permalink raw reply

* Re: [PATCH net-next] net: sched: cls_flower: Fix an error code in fl_tmplt_create()
From: David Miller @ 2018-08-06  0:26 UTC (permalink / raw)
  To: dan.carpenter; +Cc: jhs, jiri, xiyou.wangcong, netdev, kernel-janitors
In-Reply-To: <20180803192754.vggls5m46jw6ynfc@kili.mountain>

From: Dan Carpenter <dan.carpenter@oracle.com>
Date: Fri, 3 Aug 2018 22:27:55 +0300

> We forgot to set the error code on this path, so we return NULL instead
> of an error pointer.  In the current code kzalloc() won't fail for small
> allocations so this doesn't really affect runtime.
> 
> Fixes: b95ec7eb3b4d ("net: sched: cls_flower: implement chain templates")
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

Applied, thanks Dan.

^ permalink raw reply

* Re: [PATCH][net-next] net: check extack._msg before print
From: David Miller @ 2018-08-06  0:25 UTC (permalink / raw)
  To: lirongqing; +Cc: netdev
In-Reply-To: <1533282321-17808-1-git-send-email-lirongqing@baidu.com>

From: Li RongQing <lirongqing@baidu.com>
Date: Fri,  3 Aug 2018 15:45:21 +0800

> dev_set_mtu_ext is able to fail with a valid mtu value, at that
> condition, extack._msg is not set and random since it is in stack,
> then kernel will crash when print it.
> 
> Fixes: 7a4c53bee3324a ("net: report invalid mtu value via netlink extack")
> Signed-off-by: Zhang Yu <zhangyu31@baidu.com>
> Signed-off-by: Li RongQing <lirongqing@baidu.com>

Applied, thank you.

^ permalink raw reply

* Re: [Patch net] ipv6: fix double refcount of fib6_metrics
From: David Miller @ 2018-08-06  0:23 UTC (permalink / raw)
  To: xiyou.wangcong; +Cc: netdev, sd, dsahern
In-Reply-To: <20180803062038.13272-1-xiyou.wangcong@gmail.com>

From: Cong Wang <xiyou.wangcong@gmail.com>
Date: Thu,  2 Aug 2018 23:20:38 -0700

> All the callers of ip6_rt_copy_init()/rt6_set_from() hold refcnt
> of the "from" fib6_info, so there is no need to hold fib6_metrics
> refcnt again, because fib6_metrics refcnt is only released when
> fib6_info is gone, that is, they have the same life time, so the
> whole fib6_metrics refcnt can be removed actually.
> 
> This fixes a kmemleak warning reported by Sabrina.
> 
> Fixes: 93531c674315 ("net/ipv6: separate handling of FIB entries from dst based routes")
> Reported-by: Sabrina Dubroca <sd@queasysnail.net>
> Cc: Sabrina Dubroca <sd@queasysnail.net>
> Cc: David Ahern <dsahern@gmail.com>
> Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>

Applied, thanks Cong.

^ permalink raw reply

* Re: [PATCH net-next v3] ipv6: defrag: drop non-last frags smaller than min mtu
From: David Miller @ 2018-08-06  0:21 UTC (permalink / raw)
  To: fw; +Cc: netdev, posk, edumazet
In-Reply-To: <20180803002220.20810-1-fw@strlen.de>

From: Florian Westphal <fw@strlen.de>
Date: Fri,  3 Aug 2018 02:22:20 +0200

> don't bother with pathological cases, they only waste cycles.
> IPv6 requires a minimum MTU of 1280 so we should never see fragments
> smaller than this (except last frag).
> 
> v3: don't use awkward "-offset + len"
> v2: drop IPv4 part, which added same check w. IPV4_MIN_MTU (68).
>     There were concerns that there could be even smaller frags
>     generated by intermediate nodes, e.g. on radio networks.
> 
> Cc: Peter Oskolkov <posk@google.com>
> Cc: Eric Dumazet <edumazet@google.com>
> Signed-off-by: Florian Westphal <fw@strlen.de>

Applied, thanks Florian.

^ permalink raw reply

* [PATCH bpf] bpf: btf: Change tools/lib/bpf/btf to LGPL
From: Martin KaFai Lau @ 2018-08-06  0:19 UTC (permalink / raw)
  To: netdev; +Cc: Alexei Starovoitov, Daniel Borkmann, kernel-team

This patch changes the tools/lib/bpf/btf.[ch] to LGPL which
is inline with libbpf also.

Signed-off-by: Martin KaFai Lau <kafai@fb.com>
---
 tools/lib/bpf/btf.c | 2 +-
 tools/lib/bpf/btf.h | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/tools/lib/bpf/btf.c b/tools/lib/bpf/btf.c
index 2d270c560df3..c36a3a76986a 100644
--- a/tools/lib/bpf/btf.c
+++ b/tools/lib/bpf/btf.c
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0 */
+// SPDX-License-Identifier: LGPL-2.1
 /* Copyright (c) 2018 Facebook */
 
 #include <stdlib.h>
diff --git a/tools/lib/bpf/btf.h b/tools/lib/bpf/btf.h
index e2a09a155f84..caac3a404dc5 100644
--- a/tools/lib/bpf/btf.h
+++ b/tools/lib/bpf/btf.h
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0 */
+/* SPDX-License-Identifier: LGPL-2.1 */
 /* Copyright (c) 2018 Facebook */
 
 #ifndef __BPF_BTF_H
-- 
2.17.1

^ permalink raw reply related

* Re: Linux kernel error stack
From: Florian Westphal @ 2018-08-06  0:19 UTC (permalink / raw)
  To: Michal Kubecek; +Cc: Florian Westphal, Satish Patel, netdev
In-Reply-To: <20180806000645.b3z4b7lxjhr2qaiy@unicorn.suse.cz>

Michal Kubecek <mkubecek@suse.cz> wrote:
> On Mon, Aug 06, 2018 at 01:15:37AM +0200, Florian Westphal wrote:
> > Michal Kubecek <mkubecek@suse.cz> wrote:
> > > Oops, exactly this issue was already discussed almost a year ago:
> > > 
> > >   http://lkml.kernel.org/r/20170824104824.2C318A0F3A@unicorn.suse.cz
> > > 
> > > But something more urgent came and I forgot to get back to it. :-(
> > 
> > I did not even remeber, thanks for the pointer.
> > So I think best course of action is to update man page to clearly
> > say this only works in postrouting and with udp, and is ONLY
> > intended for working around old dhcp software.
> 
> As GSO for UDP is on its way to mainline, one might get into trouble
> even with UDP if the rule is not specific enough.

Yes, we still need a fix to ignore GSO too.

^ permalink raw reply

* Re: [PATCH] net/bridge/br_multicast: remove redundant variable "err"
From: Stephen Hemminger @ 2018-08-06  0:18 UTC (permalink / raw)
  To: zhong jiang; +Cc: davem, netdev, linux-kernel
In-Reply-To: <1533478723-18361-1-git-send-email-zhongjiang@huawei.com>

On Sun, 5 Aug 2018 22:18:43 +0800
zhong jiang <zhongjiang@huawei.com> wrote:

> The err is not used after initalization, So remove it and make
> it void function.
> 
> Signed-off-by: zhong jiang <zhongjiang@huawei.com>

Makes sense to me.

Acked-by: Stephen Hemminger <stephen@networkplumber.org>

^ permalink raw reply

* Re: [PATCH net-next 0/3] ip: Use rb trees for IP frag queue.
From: David Miller @ 2018-08-06  0:17 UTC (permalink / raw)
  To: posk; +Cc: netdev, edumazet, fw
In-Reply-To: <20180802224600.43070-1-posk@google.com>

From: Peter Oskolkov <posk@google.com>
Date: Thu,  2 Aug 2018 22:45:57 +0000

> This patchset
>  * changes IPv4 defrag behavior to match that of IPv6: overlapping
>    fragments now cause the whole IP datagram to be discarded (suggested
>    by David Miller): there are no legitimate use cases for overlapping
>    fragments;
>  * changes IPv4 defrag queue from a list to a rb tree (suggested
>    by Eric Dumazet): this change removes a potential attach vector.
> 
> Upcoming patches will contain similar changes for IPv6 frag queue,
> as well as a comprehensive IP defrag self-test (temporarily delayed).

Looks good, series applied, thanks!

^ permalink raw reply

* Re: [PATCH net-next] net/tls: Mark the end in scatterlist table
From: David Miller @ 2018-08-06  0:14 UTC (permalink / raw)
  To: vakul.garg; +Cc: netdev, borisp, aviadye, davejwatson
In-Reply-To: <20180802151310.9007-1-vakul.garg@nxp.com>

From: Vakul Garg <vakul.garg@nxp.com>
Date: Thu,  2 Aug 2018 20:43:10 +0530

> Function zerocopy_from_iter() unmarks the 'end' in input sgtable while
> adding new entries in it. The last entry in sgtable remained unmarked.
> This results in KASAN error report on using apis like sg_nents(). Before
> returning, the function needs to mark the 'end' in the last entry it
> adds.
> 
> Signed-off-by: Vakul Garg <vakul.garg@nxp.com>

Yes, a properly formed scatterlist table must always have it's
end marked.

Applied, thanks.

^ 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