Netdev List
 help / color / mirror / Atom feed
* [PATCH v5 net-next 0/7] Extend socket timestamping API
From: Miroslav Lichvar @ 2017-05-18 14:07 UTC (permalink / raw)
  To: netdev; +Cc: Richard Cochran, Willem de Bruijn

Changes v4->v5:
- fix initialization of reserved fields in struct scm_ts_pktinfo

Changes v3->v4:
- added reserved fields to struct scm_ts_pktinfo
- replaced patch fixing false SW timestamps with a documentation fix
- updated OPT_TX_SWHW patch to handle false SW timestamps

Changes v2->v3:
- modified struct scm_ts_pktinfo to use fixed-width integer types
- added WARN_ON_ONCE for missing RCU lock in dev_get_by_napi_id()
- modified dev_get_by_napi_id() to not return dev in unexpected branch
- modified recv to return SCM_TIMESTAMPING_PKTINFO even if the interface
  index is unknown

Changes v1->v2:
- added separate patch for new NAPI functions 
- split code from __sock_recv_timestamp() for better readability
- fixed RCU locking
- fixed compiler warning (missing case in switch in first patch)
- inline sw_tx_timestamp() in its only user

Changes RFC->v1:
- reworked SOF_TIMESTAMPING_OPT_PKTINFO patch to not add new fields to
  skb shared info (net device is now looked up by napi_id), not require
  any changes in drivers, and restrict the cmsg to incoming packets
- renamed SOF_TIMESTAMPING_OPT_MULTIMSG to SOF_TIMESTAMPING_OPT_TX_SWHW
  and fixed its description
- moved struct scm_ts_pktinfo from errqueue.h to net_tstamp.h as it
  can't be received from the error queue anymore
- improved commit descriptions and removed incorrect comment

This patchset adds new options to the timestamping API that will be
useful for NTP implementations and possibly other applications.

The first patch specifies a timestamp filter for NTP packets. The second
patch updates drivers that can timestamp all packets, or need to list
the filter as unsupported. There is no attempt to add the support to the
phyter driver.

The third patch adds two helper functions working with NAPI ID, which is
needed by the next patch. The fourth patch adds a new option to get a
new control message with the L2 length and interface index for incoming
packets with hardware timestamps.

The fifth patch fixes documentation on number of non-zero fields in
scm_timestamping and warns about false software timestamps when
SO_TIMESTAMP(NS) is combined with SCM_TIMESTAMPING.

The sixth patch adds a new option to request both software and hardware
timestamps for outgoing packets. The seventh patch updates drivers that
assumed software timestamping cannot be used together with hardware
timestamping.

The patches have been tested on x86_64 machines with igb and e1000e
drivers.

Miroslav Lichvar (7):
  net: define receive timestamp filter for NTP
  net: ethernet: update drivers to handle HWTSTAMP_FILTER_NTP_ALL
  net: add function to retrieve original skb device using NAPI ID
  net: add new control message for incoming HW-timestamped packets
  net: fix documentation of struct scm_timestamping
  net: allow simultaneous SW and HW transmit timestamping
  net: ethernet: update drivers to make both SW and HW TX timestamps

 Documentation/networking/timestamping.txt          | 25 ++++++++++-
 drivers/net/ethernet/amd/xgbe/xgbe-drv.c           |  4 +-
 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c   |  1 +
 drivers/net/ethernet/cavium/liquidio/lio_main.c    |  1 +
 drivers/net/ethernet/cavium/liquidio/lio_vf_main.c |  1 +
 drivers/net/ethernet/cavium/octeon/octeon_mgmt.c   |  1 +
 drivers/net/ethernet/intel/e1000e/netdev.c         |  5 ++-
 drivers/net/ethernet/intel/i40e/i40e_ptp.c         |  1 +
 drivers/net/ethernet/intel/igb/igb_ptp.c           |  1 +
 drivers/net/ethernet/intel/ixgbe/ixgbe_ptp.c       |  1 +
 drivers/net/ethernet/mellanox/mlx4/en_netdev.c     |  1 +
 drivers/net/ethernet/mellanox/mlx5/core/en_clock.c |  1 +
 drivers/net/ethernet/neterion/vxge/vxge-main.c     |  1 +
 drivers/net/ethernet/qlogic/qede/qede_ptp.c        |  1 +
 drivers/net/ethernet/samsung/sxgbe/sxgbe_main.c    |  3 +-
 drivers/net/ethernet/sfc/ef10.c                    |  1 +
 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c  |  7 ++-
 drivers/net/ethernet/ti/cpsw.c                     |  1 +
 drivers/net/ethernet/tile/tilegx.c                 |  1 +
 include/linux/netdevice.h                          |  1 +
 include/linux/skbuff.h                             | 19 ++++----
 include/uapi/asm-generic/socket.h                  |  2 +
 include/uapi/linux/net_tstamp.h                    | 15 ++++++-
 net/core/dev.c                                     | 26 +++++++++++
 net/core/dev_ioctl.c                               |  1 +
 net/core/skbuff.c                                  |  4 ++
 net/socket.c                                       | 50 ++++++++++++++++++++--
 27 files changed, 153 insertions(+), 23 deletions(-)

-- 
2.9.3

^ permalink raw reply

* [PATCH v5 net-next 4/7] net: add new control message for incoming HW-timestamped packets
From: Miroslav Lichvar @ 2017-05-18 14:07 UTC (permalink / raw)
  To: netdev; +Cc: Richard Cochran, Willem de Bruijn
In-Reply-To: <20170518140738.19617-1-mlichvar@redhat.com>

Add SOF_TIMESTAMPING_OPT_PKTINFO option to request a new control message
for incoming packets with hardware timestamps. It contains the index of
the real interface which received the packet and the length of the
packet at layer 2.

The index is useful with bonding, bridges and other interfaces, where
IP_PKTINFO doesn't allow applications to determine which PHC made the
timestamp. With the L2 length (and link speed) it is possible to
transpose preamble timestamps to trailer timestamps, which are used in
the NTP protocol.

While this information could be provided by two new socket options
independently from timestamping, it doesn't look like they would be very
useful. With this option any performance impact is limited to hardware
timestamping.

Use dev_get_by_napi_id() to get the device and its index. On kernels
with disabled CONFIG_NET_RX_BUSY_POLL or drivers not using NAPI, a zero
index will be returned in the control message.

CC: Richard Cochran <richardcochran@gmail.com>
CC: Willem de Bruijn <willemb@google.com>
Signed-off-by: Miroslav Lichvar <mlichvar@redhat.com>
---
 Documentation/networking/timestamping.txt |  9 +++++++++
 include/uapi/asm-generic/socket.h         |  2 ++
 include/uapi/linux/net_tstamp.h           | 11 ++++++++++-
 net/socket.c                              | 27 ++++++++++++++++++++++++++-
 4 files changed, 47 insertions(+), 2 deletions(-)

diff --git a/Documentation/networking/timestamping.txt b/Documentation/networking/timestamping.txt
index 96f5069..600c6bf 100644
--- a/Documentation/networking/timestamping.txt
+++ b/Documentation/networking/timestamping.txt
@@ -193,6 +193,15 @@ SOF_TIMESTAMPING_OPT_STATS:
   the transmit timestamps, such as how long a certain block of
   data was limited by peer's receiver window.
 
+SOF_TIMESTAMPING_OPT_PKTINFO:
+
+  Enable the SCM_TIMESTAMPING_PKTINFO control message for incoming
+  packets with hardware timestamps. The message contains struct
+  scm_ts_pktinfo, which supplies the index of the real interface which
+  received the packet and its length at layer 2. A valid (non-zero)
+  interface index will be returned only if CONFIG_NET_RX_BUSY_POLL is
+  enabled and the driver is using NAPI.
+
 New applications are encouraged to pass SOF_TIMESTAMPING_OPT_ID to
 disambiguate timestamps and SOF_TIMESTAMPING_OPT_TSONLY to operate
 regardless of the setting of sysctl net.core.tstamp_allow_data.
diff --git a/include/uapi/asm-generic/socket.h b/include/uapi/asm-generic/socket.h
index 2b48856..a5f6e81 100644
--- a/include/uapi/asm-generic/socket.h
+++ b/include/uapi/asm-generic/socket.h
@@ -100,4 +100,6 @@
 
 #define SO_COOKIE		57
 
+#define SCM_TIMESTAMPING_PKTINFO	58
+
 #endif /* __ASM_GENERIC_SOCKET_H */
diff --git a/include/uapi/linux/net_tstamp.h b/include/uapi/linux/net_tstamp.h
index 0749fb1..dee74d3 100644
--- a/include/uapi/linux/net_tstamp.h
+++ b/include/uapi/linux/net_tstamp.h
@@ -9,6 +9,7 @@
 #ifndef _NET_TIMESTAMPING_H
 #define _NET_TIMESTAMPING_H
 
+#include <linux/types.h>
 #include <linux/socket.h>   /* for SO_TIMESTAMPING */
 
 /* SO_TIMESTAMPING gets an integer bit field comprised of these values */
@@ -26,8 +27,9 @@ enum {
 	SOF_TIMESTAMPING_OPT_CMSG = (1<<10),
 	SOF_TIMESTAMPING_OPT_TSONLY = (1<<11),
 	SOF_TIMESTAMPING_OPT_STATS = (1<<12),
+	SOF_TIMESTAMPING_OPT_PKTINFO = (1<<13),
 
-	SOF_TIMESTAMPING_LAST = SOF_TIMESTAMPING_OPT_STATS,
+	SOF_TIMESTAMPING_LAST = SOF_TIMESTAMPING_OPT_PKTINFO,
 	SOF_TIMESTAMPING_MASK = (SOF_TIMESTAMPING_LAST - 1) |
 				 SOF_TIMESTAMPING_LAST
 };
@@ -130,4 +132,11 @@ enum hwtstamp_rx_filters {
 	HWTSTAMP_FILTER_NTP_ALL,
 };
 
+/* SCM_TIMESTAMPING_PKTINFO control message */
+struct scm_ts_pktinfo {
+	__u32 if_index;
+	__u32 pkt_length;
+	__u32 reserved[2];
+};
+
 #endif /* _NET_TIMESTAMPING_H */
diff --git a/net/socket.c b/net/socket.c
index c2564eb..67db7d8 100644
--- a/net/socket.c
+++ b/net/socket.c
@@ -662,6 +662,27 @@ static bool skb_is_err_queue(const struct sk_buff *skb)
 	return skb->pkt_type == PACKET_OUTGOING;
 }
 
+static void put_ts_pktinfo(struct msghdr *msg, struct sk_buff *skb)
+{
+	struct scm_ts_pktinfo ts_pktinfo;
+	struct net_device *orig_dev;
+
+	if (!skb_mac_header_was_set(skb))
+		return;
+
+	memset(&ts_pktinfo, 0, sizeof(ts_pktinfo));
+
+	rcu_read_lock();
+	orig_dev = dev_get_by_napi_id(skb_napi_id(skb));
+	if (orig_dev)
+		ts_pktinfo.if_index = orig_dev->ifindex;
+	rcu_read_unlock();
+
+	ts_pktinfo.pkt_length = skb->len - skb_mac_offset(skb);
+	put_cmsg(msg, SOL_SOCKET, SCM_TIMESTAMPING_PKTINFO,
+		 sizeof(ts_pktinfo), &ts_pktinfo);
+}
+
 /*
  * called from sock_recv_timestamp() if sock_flag(sk, SOCK_RCVTSTAMP)
  */
@@ -699,8 +720,12 @@ void __sock_recv_timestamp(struct msghdr *msg, struct sock *sk,
 		empty = 0;
 	if (shhwtstamps &&
 	    (sk->sk_tsflags & SOF_TIMESTAMPING_RAW_HARDWARE) &&
-	    ktime_to_timespec_cond(shhwtstamps->hwtstamp, tss.ts + 2))
+	    ktime_to_timespec_cond(shhwtstamps->hwtstamp, tss.ts + 2)) {
 		empty = 0;
+		if ((sk->sk_tsflags & SOF_TIMESTAMPING_OPT_PKTINFO) &&
+		    !skb_is_err_queue(skb))
+			put_ts_pktinfo(msg, skb);
+	}
 	if (!empty) {
 		put_cmsg(msg, SOL_SOCKET,
 			 SCM_TIMESTAMPING, sizeof(tss), &tss);
-- 
2.9.3

^ permalink raw reply related

* [PATCH v5 net-next 5/7] net: fix documentation of struct scm_timestamping
From: Miroslav Lichvar @ 2017-05-18 14:07 UTC (permalink / raw)
  To: netdev; +Cc: Richard Cochran, Willem de Bruijn
In-Reply-To: <20170518140738.19617-1-mlichvar@redhat.com>

The scm_timestamping struct may return multiple non-zero fields, e.g.
when both software and hardware RX timestamping is enabled, or when the
SO_TIMESTAMP(NS) option is combined with SCM_TIMESTAMPING and a false
software timestamp is generated in the recvmsg() call in order to always
return a SCM_TIMESTAMP(NS) message.

CC: Richard Cochran <richardcochran@gmail.com>
CC: Willem de Bruijn <willemb@google.com>
Signed-off-by: Miroslav Lichvar <mlichvar@redhat.com>
---
 Documentation/networking/timestamping.txt | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/Documentation/networking/timestamping.txt b/Documentation/networking/timestamping.txt
index 600c6bf..74b7c61 100644
--- a/Documentation/networking/timestamping.txt
+++ b/Documentation/networking/timestamping.txt
@@ -321,7 +321,7 @@ struct scm_timestamping {
 };
 
 The structure can return up to three timestamps. This is a legacy
-feature. Only one field is non-zero at any time. Most timestamps
+feature. At least one field is non-zero at any time. Most timestamps
 are passed in ts[0]. Hardware timestamps are passed in ts[2].
 
 ts[1] used to hold hardware timestamps converted to system time.
@@ -330,6 +330,12 @@ a HW PTP clock source, to allow time conversion in userspace and
 optionally synchronize system time with a userspace PTP stack such
 as linuxptp. For the PTP clock API, see Documentation/ptp/ptp.txt.
 
+Note that if the SO_TIMESTAMP or SO_TIMESTAMPNS option is enabled
+together with SO_TIMESTAMPING using SOF_TIMESTAMPING_SOFTWARE, a false
+software timestamp will be generated in the recvmsg() call and passed
+in ts[0] when a real software timestamp is missing. For this reason it
+is not recommended to combine SO_TIMESTAMP(NS) with SO_TIMESTAMPING.
+
 2.1.1 Transmit timestamps with MSG_ERRQUEUE
 
 For transmit timestamps the outgoing packet is looped back to the
-- 
2.9.3

^ permalink raw reply related

* [PATCH v5 net-next 3/7] net: add function to retrieve original skb device using NAPI ID
From: Miroslav Lichvar @ 2017-05-18 14:07 UTC (permalink / raw)
  To: netdev; +Cc: Richard Cochran, Willem de Bruijn
In-Reply-To: <20170518140738.19617-1-mlichvar@redhat.com>

Since commit b68581778cd0 ("net: Make skb->skb_iif always track
skb->dev") skbs don't have the original index of the interface which
received the packet. This information is now needed for a new control
message related to hardware timestamping.

Instead of adding a new field to skb, we can find the device by the NAPI
ID if it is available, i.e. CONFIG_NET_RX_BUSY_POLL is enabled and the
driver is using NAPI. Add dev_get_by_napi_id() and also skb_napi_id() to
hide the CONFIG_NET_RX_BUSY_POLL ifdef.

CC: Richard Cochran <richardcochran@gmail.com>
Suggested-by: Willem de Bruijn <willemb@google.com>
Acked-by: Willem de Bruijn <willemb@google.com>
Signed-off-by: Miroslav Lichvar <mlichvar@redhat.com>
---
 include/linux/netdevice.h |  1 +
 include/linux/skbuff.h    |  9 +++++++++
 net/core/dev.c            | 26 ++++++++++++++++++++++++++
 3 files changed, 36 insertions(+)

diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index 3f39d27..b6c36d5 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -2456,6 +2456,7 @@ static inline int dev_recursion_level(void)
 struct net_device *dev_get_by_index(struct net *net, int ifindex);
 struct net_device *__dev_get_by_index(struct net *net, int ifindex);
 struct net_device *dev_get_by_index_rcu(struct net *net, int ifindex);
+struct net_device *dev_get_by_napi_id(unsigned int napi_id);
 int netdev_get_name(struct net *net, char *name, int ifindex);
 int dev_restart(struct net_device *dev);
 int skb_gro_receive(struct sk_buff **head, struct sk_buff *skb);
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h
index 7c0cb2c..1f8028c 100644
--- a/include/linux/skbuff.h
+++ b/include/linux/skbuff.h
@@ -855,6 +855,15 @@ static inline bool skb_pkt_type_ok(u32 ptype)
 	return ptype <= PACKET_OTHERHOST;
 }
 
+static inline unsigned int skb_napi_id(const struct sk_buff *skb)
+{
+#ifdef CONFIG_NET_RX_BUSY_POLL
+	return skb->napi_id;
+#else
+	return 0;
+#endif
+}
+
 void kfree_skb(struct sk_buff *skb);
 void kfree_skb_list(struct sk_buff *segs);
 void skb_tx_error(struct sk_buff *skb);
diff --git a/net/core/dev.c b/net/core/dev.c
index acd594c..6d3c452 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -162,6 +162,7 @@ static int netif_rx_internal(struct sk_buff *skb);
 static int call_netdevice_notifiers_info(unsigned long val,
 					 struct net_device *dev,
 					 struct netdev_notifier_info *info);
+static struct napi_struct *napi_by_id(unsigned int napi_id);
 
 /*
  * The @dev_base_head list is protected by @dev_base_lock and the rtnl
@@ -866,6 +867,31 @@ struct net_device *dev_get_by_index(struct net *net, int ifindex)
 EXPORT_SYMBOL(dev_get_by_index);
 
 /**
+ *	dev_get_by_napi_id - find a device by napi_id
+ *	@napi_id: ID of the NAPI struct
+ *
+ *	Search for an interface by NAPI ID. Returns %NULL if the device
+ *	is not found or a pointer to the device. The device has not had
+ *	its reference counter increased so the caller must be careful
+ *	about locking. The caller must hold RCU lock.
+ */
+
+struct net_device *dev_get_by_napi_id(unsigned int napi_id)
+{
+	struct napi_struct *napi;
+
+	WARN_ON_ONCE(!rcu_read_lock_held());
+
+	if (napi_id < MIN_NAPI_ID)
+		return NULL;
+
+	napi = napi_by_id(napi_id);
+
+	return napi ? napi->dev : NULL;
+}
+EXPORT_SYMBOL(dev_get_by_napi_id);
+
+/**
  *	netdev_get_name - get a netdevice name, knowing its ifindex.
  *	@net: network namespace
  *	@name: a pointer to the buffer where the name will be stored.
-- 
2.9.3

^ permalink raw reply related

* [PATCH v5 net-next 1/7] net: define receive timestamp filter for NTP
From: Miroslav Lichvar @ 2017-05-18 14:07 UTC (permalink / raw)
  To: netdev; +Cc: Richard Cochran, Willem de Bruijn
In-Reply-To: <20170518140738.19617-1-mlichvar@redhat.com>

Add HWTSTAMP_FILTER_NTP_ALL to the hwtstamp_rx_filters enum for
timestamping of NTP packets. There is currently only one driver
(phyter) that could support it directly.

CC: Richard Cochran <richardcochran@gmail.com>
CC: Willem de Bruijn <willemb@google.com>
Signed-off-by: Miroslav Lichvar <mlichvar@redhat.com>
---
 include/uapi/linux/net_tstamp.h | 3 +++
 net/core/dev_ioctl.c            | 2 ++
 2 files changed, 5 insertions(+)

diff --git a/include/uapi/linux/net_tstamp.h b/include/uapi/linux/net_tstamp.h
index 464dcca..0749fb1 100644
--- a/include/uapi/linux/net_tstamp.h
+++ b/include/uapi/linux/net_tstamp.h
@@ -125,6 +125,9 @@ enum hwtstamp_rx_filters {
 	HWTSTAMP_FILTER_PTP_V2_SYNC,
 	/* PTP v2/802.AS1, any layer, Delay_req packet */
 	HWTSTAMP_FILTER_PTP_V2_DELAY_REQ,
+
+	/* NTP, UDP, all versions and packet modes */
+	HWTSTAMP_FILTER_NTP_ALL,
 };
 
 #endif /* _NET_TIMESTAMPING_H */
diff --git a/net/core/dev_ioctl.c b/net/core/dev_ioctl.c
index b94b1d2..8f036a7 100644
--- a/net/core/dev_ioctl.c
+++ b/net/core/dev_ioctl.c
@@ -227,6 +227,8 @@ static int net_hwtstamp_validate(struct ifreq *ifr)
 	case HWTSTAMP_FILTER_PTP_V2_DELAY_REQ:
 		rx_filter_valid = 1;
 		break;
+	case HWTSTAMP_FILTER_NTP_ALL:
+		break;
 	}
 
 	if (!tx_type_valid || !rx_filter_valid)
-- 
2.9.3

^ permalink raw reply related

* Re: [PATCH net-next V5 0/9] vhost_net rx batch dequeuing
From: David Miller @ 2017-05-18 14:08 UTC (permalink / raw)
  To: jasowang; +Cc: mst, netdev, linux-kernel
In-Reply-To: <1494994485-12994-1-git-send-email-jasowang@redhat.com>

From: Jason Wang <jasowang@redhat.com>
Date: Wed, 17 May 2017 12:14:36 +0800

> This series tries to implement rx batching for vhost-net. This is done
> by batching the dequeuing from skb_array which was exported by
> underlayer socket and pass the sbk back through msg_control to finish
> userspace copying. This is also the requirement for more batching
> implemention on rx path.
> 
> Tests shows at most 7.56% improvment bon rx pps on top of batch
> zeroing and no obvious changes for TCP_STREAM/TCP_RR result.

Series applied, thanks Jason.

^ permalink raw reply

* Re: [PATCH v2 1/3] bpf: Use 1<<16 as ceiling for immediate alignment in verifier.
From: Edward Cree @ 2017-05-18 14:10 UTC (permalink / raw)
  To: David Miller; +Cc: ast, daniel, alexei.starovoitov, netdev
In-Reply-To: <20170517.201633.1413407173876329751.davem@davemloft.net>

On 18/05/17 01:16, David Miller wrote:
> So, in C, addition (a += b) is something like:
>
> struct bpf_reg_bits {
>         u64 zero_bits;
>         u64 one_bits;
> };
>
> static void add_update_bits(struct bpf_reg_bits *a, struct bpf_reg_bits *b)
> {
>         u64 m_zeros, m_ones, m_all;
>
>         m_zeros = a->zero_bits ^ b->zero_bits;
>         m_ones = a->one_bits ^ b->one_bits;
>         m_all = m_zeros | m_ones;
No, this should be
    u64 m_a, m_b, m_all;

    m_a = a->zero_bits ^ a->one_bits; /* unknown bits in a */
    m_b = b->zero_bits ^ b->one_bits; /* unknown bits in b */
    m_all = m_a | m_b; /* unknown bits in result */
>         a->zero_bits = (a->zero_bits + b->zero_bits) | m_all;
>         a->one_bits = (a->one_bits + b->zero_bits) & ~m_all;
> }
>
> Then, is subtraction merely:
>
> static void sub_update_bits(struct bpf_reg_bits *a, struct bpf_reg_bits *b)
> {
>         u64 m_zeros, m_ones, m_all;
>
>         m_zeros = a->zero_bits ^ b->zero_bits;
>         m_ones = a->one_bits ^ b->one_bits;
>         m_all = m_zeros | m_ones;
>
>         a->zero_bits = (a->zero_bits - b->zero_bits) | m_all;
>         a->one_bits = (a->one_bits - b->zero_bits) & ~m_all;
> }
>
> Or is something different needed?
I suspect it's something different, just because I worry about what
 carries will do.

But I think Alexei's idea (mask and value) is better anyway; at the
 least it's easier to think about.

-Ed

^ permalink raw reply

* Re: [PATCH v5] net: ethernet: faraday: To support device tree usage.
From: David Miller @ 2017-05-18 14:11 UTC (permalink / raw)
  To: green.hu-Re5JQEeQqe8AvxtiuMwx3w
  Cc: netdev-u79uwXL29TY76Z2rM5mHXA, devicetree-u79uwXL29TY76Z2rM5mHXA,
	andrew-g2DYL2Zd6BY, arnd-r2nGTMty4D4, jiri-rHqAuBHg3fBzbRFIqnYvSA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	f.fainelli-Re5JQEeQqe8AvxtiuMwx3w, robh+dt-DgEjT+Ai2ygdnm+yROfE0A,
	mark.rutland-5wv7dgnIgG8
In-Reply-To: <20170517072810.GA4324@app09>

From: Greentime Hu <green.hu-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Date: Wed, 17 May 2017 15:28:19 +0800

> To support device tree usage for ftmac100.
> 
> Signed-off-by: Greentime Hu <green.hu-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>

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

^ permalink raw reply

* Re: [PATCH] udp: make function udp_skb_dtor_locked static
From: David Miller @ 2017-05-18 14:13 UTC (permalink / raw)
  To: colin.king
  Cc: pabeni, kuznet, jmorris, yoshfuji, kaber, netdev, kernel-janitors,
	linux-kernel
In-Reply-To: <20170517085036.15261-1-colin.king@canonical.com>

From: Colin King <colin.king@canonical.com>
Date: Wed, 17 May 2017 09:50:36 +0100

> From: Colin Ian King <colin.king@canonical.com>
> 
> Function udp_skb_dtor_locked does not need to be in global scope
> so make it static to fix sparse warning:
> 
> net/ipv4/udp.c: warning: symbol 'udp_skb_dtor_locked' was not
> declared. Should it be static?
> 
> Fixes: 6dfb4367cd911d ("udp: keep the sk_receive_queue held when splicing")
> Signed-off-by: Colin Ian King <colin.king@canonical.com>

Applied.

Please explcitily say "[PATCH net-next]" in your Subject line next time
so that it is clear what tree your patch is targetting.

Thanks.

^ permalink raw reply

* Re: rtlwifi: fix spelling mistake: "Pairwiase" -> "Pairwise"
From: Kalle Valo @ 2017-05-18 14:14 UTC (permalink / raw)
  To: Colin Ian King
  Cc: Larry Finger, Chaoming Li, Joe Perches, Ping-Ke Shih,
	linux-wireless, netdev
In-Reply-To: <20170503225543.10296-1-colin.king@canonical.com>

Colin Ian King <colin.king@canonical.com> wrote:
> From: Colin Ian King <colin.king@canonical.com>
> 
> trivial fixes to spelling mistakes in RT_TRACE messages.
> 
> Signed-off-by: Colin Ian King <colin.king@canonical.com>

Patch applied to wireless-drivers-next.git, thanks.

6b9e6f62552e rtlwifi: fix spelling mistake: "Pairwiase" -> "Pairwise"

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

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

^ permalink raw reply

* Re: rtlwifi: rtl8723ae: fix spelling mistake: "Coexistance" -> "Coexistence"
From: Kalle Valo @ 2017-05-18 14:15 UTC (permalink / raw)
  To: Colin Ian King
  Cc: Larry Finger, Chaoming Li, Joe Perches, Christian Engelmayer,
	Arnd Bergmann, linux-wireless-u79uwXL29TY76Z2rM5mHXA,
	netdev-u79uwXL29TY76Z2rM5mHXA,
	kernel-janitors-u79uwXL29TY76Z2rM5mHXA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA
In-Reply-To: <20170513223702.19748-1-colin.king-Z7WLFzj8eWMS+FvcfC7Uqw@public.gmane.org>

Colin Ian King <colin.king-Z7WLFzj8eWMS+FvcfC7Uqw@public.gmane.org> wrote:
> From: Colin Ian King <colin.king-Z7WLFzj8eWMS+FvcfC7Uqw@public.gmane.org>
> 
> Trivial fix to spelling mistake in RT_TRACE text
> 
> Signed-off-by: Colin Ian King <colin.king-Z7WLFzj8eWMS+FvcfC7Uqw@public.gmane.org>

Patch applied to wireless-drivers-next.git, thanks.

e8dc072dd50d rtlwifi: rtl8723ae: fix spelling mistake: "Coexistance" -> "Coexistence"

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

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

^ permalink raw reply

* Re: [PATCH v4] bridge: netlink: check vlan_default_pvid range
From: David Miller @ 2017-05-18 14:15 UTC (permalink / raw)
  To: tobias.jungel; +Cc: sd, nikolay, stephen, netdev
In-Reply-To: <20170517072912.13063-1-tobias.jungel@bisdn.de>

From: Tobias Jungel <tobias.jungel@bisdn.de>
Date: Wed, 17 May 2017 09:29:12 +0200

> Currently it is allowed to set the default pvid of a bridge to a value
> above VLAN_VID_MASK (0xfff). This patch adds a check to br_validate and
> returns -EINVAL in case the pvid is out of bounds.
> 
> Reproduce by calling:
> 
> [root@test ~]# ip l a type bridge
> [root@test ~]# ip l a type dummy
> [root@test ~]# ip l s bridge0 type bridge vlan_filtering 1
> [root@test ~]# ip l s bridge0 type bridge vlan_default_pvid 9999
> [root@test ~]# ip l s dummy0 master bridge0
> [root@test ~]# bridge vlan
> port	vlan ids
> bridge0	 9999 PVID Egress Untagged
> 
> dummy0	 9999 PVID Egress Untagged
> 
> Fixes: 0f963b7592ef ("bridge: netlink: add support for default_pvid")
> Acked-by: Nikolay Aleksandrov <nikolay@cumulusnetworks.com>
> Signed-off-by: Tobias Jungel <tobias.jungel@bisdn.de>

Applied and queued up for -stable, thank you.

^ permalink raw reply

* Re: [PATCH v5 16/17] tty: serdev-ttyport: return actual baudrate from ttyport_set_baudrate
From: Greg Kroah-Hartman @ 2017-05-18 14:19 UTC (permalink / raw)
  To: Stefan Wahren
  Cc: Rob Herring, David S. Miller, Mark Rutland, Jiri Slaby,
	linux-serial-u79uwXL29TY76Z2rM5mHXA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	netdev-u79uwXL29TY76Z2rM5mHXA, devicetree-u79uwXL29TY76Z2rM5mHXA,
	Lino Sanfilippo, Jakub Kicinski
In-Reply-To: <d5533816-5d87-3772-19c0-5e57e519a3f1-eS4NqCHxEME@public.gmane.org>

On Wed, May 17, 2017 at 01:58:05PM +0200, Stefan Wahren wrote:
> Hi Greg,
> 
> Am 10.05.2017 um 10:53 schrieb Stefan Wahren:
> > Instead of returning the requested baudrate, we better return the
> > actual one because it isn't always the same.
> >
> > Signed-off-by: Stefan Wahren <stefan.wahren-eS4NqCHxEME@public.gmane.org>
> > Acked-by: Rob Herring <robh-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
> > ---
> >  drivers/tty/serdev/serdev-ttyport.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/tty/serdev/serdev-ttyport.c b/drivers/tty/serdev/serdev-ttyport.c
> > index 487c88f..2cfdf34 100644
> > --- a/drivers/tty/serdev/serdev-ttyport.c
> > +++ b/drivers/tty/serdev/serdev-ttyport.c
> > @@ -151,7 +151,7 @@ static unsigned int ttyport_set_baudrate(struct serdev_controller *ctrl, unsigne
> >  
> >  	/* tty_set_termios() return not checked as it is always 0 */
> >  	tty_set_termios(tty, &ktermios);
> > -	return speed;
> > +	return ktermios.c_ospeed;
> >  }
> >  
> >  static void ttyport_set_flow_control(struct serdev_controller *ctrl, bool enable)
> 
> there is no dependency to this series. I would be happy if this could be
> applied, so i don't have to carry it for the next version.

Ok, I'll take it now.

thanks,

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

^ permalink raw reply

* Re: [PATCH net-next] net: make struct net_device::tx_queue_len unsigned int
From: David Miller @ 2017-05-18 14:20 UTC (permalink / raw)
  To: adobriyan; +Cc: netdev
In-Reply-To: <20170517103044.GA28488@avx2>

From: Alexey Dobriyan <adobriyan@gmail.com>
Date: Wed, 17 May 2017 13:30:44 +0300

> 4 billion packet queue is something unthinkable so use 32-bit value
> for now.
> 
> Space savings on x86_64:
> 
> 	add/remove: 0/0 grow/shrink: 3/70 up/down: 16/-131 (-115)
> 	function                                     old     new   delta
> 	change_tx_queue_len                           94     108     +14
> 	qdisc_create                                1176    1177      +1
> 	alloc_netdev_mqs                            1124    1125      +1
> 	xenvif_alloc                                 533     532      -1
> 	x25_asy_setup                                167     166      -1
> 			...
> 	tun_queue_resize                             945     940      -5
> 	pfifo_fast_enqueue                           167     162      -5
> 	qfq_init_qdisc                               168     158     -10
> 	tap_queue_resize                             810     799     -11
> 	transmit                                     719     698     -21
> 
> Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>

Applied.

^ permalink raw reply

* Re: [PATCH net] udp: make *udp*_queue_rcv_skb() functions static
From: David Miller @ 2017-05-18 14:23 UTC (permalink / raw)
  To: pabeni; +Cc: netdev
In-Reply-To: <8c68f6f2fb91313ab71606e42c4d3d4c561b73a9.1495024097.git.pabeni@redhat.com>

From: Paolo Abeni <pabeni@redhat.com>
Date: Wed, 17 May 2017 14:52:16 +0200

> Since the udp memory accounting refactor, we don't need any more
> to export the *udp*_queue_rcv_skb(). Make them static and fix
> a couple of sparse warnings:
> 
> net/ipv4/udp.c:1615:5: warning: symbol 'udp_queue_rcv_skb' was not
> declared. Should it be static?
> net/ipv6/udp.c:572:5: warning: symbol 'udpv6_queue_rcv_skb' was not
> declared. Should it be static?
> 
> Fixes: 850cbaddb52d ("udp: use it's own memory accounting schema")
> Fixes: c915fe13cbaa ("udplite: fix NULL pointer dereference")
> Signed-off-by: Paolo Abeni <pabeni@redhat.com>

Applied.

^ permalink raw reply

* Re: [PATCH net] sctp: do not inherit ipv6_{mc|ac|fl}_list from parent
From: David Miller @ 2017-05-18 14:24 UTC (permalink / raw)
  To: eric.dumazet; +Cc: netdev, xiyou.wangcong, andreyknvl, vyasevich, nhorman
In-Reply-To: <1495030600.6465.19.camel@edumazet-glaptop3.roam.corp.google.com>

From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Wed, 17 May 2017 07:16:40 -0700

> From: Eric Dumazet <edumazet@google.com>
> 
> SCTP needs fixes similar to 83eaddab4378 ("ipv6/dccp: do not inherit
> ipv6_mc_list from parent"), otherwise bad things can happen.
> 
> Signed-off-by: Eric Dumazet <edumazet@google.com>
> Reported-by: Andrey Konovalov <andreyknvl@google.com>
> Tested-by: Andrey Konovalov <andreyknvl@google.com>

Applied and queued up for -stable, thanks.

^ permalink raw reply

* Re: [PATCH net,stable] qmi_wwan: add another Lenovo EM74xx device ID
From: David Miller @ 2017-05-18 14:25 UTC (permalink / raw)
  To: bjorn; +Cc: netdev, linux-usb
In-Reply-To: <20170517143141.28483-1-bjorn@mork.no>

From: Bjørn Mork <bjorn@mork.no>
Date: Wed, 17 May 2017 16:31:41 +0200

> In their infinite wisdom, and never ending quest for end user frustration,
> Lenovo has decided to use a new USB device ID for the wwan modules in
> their 2017 laptops.  The actual hardware is still the Sierra Wireless
> EM7455 or EM7430, depending on region.
> 
> Signed-off-by: Bjørn Mork <bjorn@mork.no>

Applied and queued up for -stable, thank you.

^ permalink raw reply

* Re: [PATCH net-next 1/8] net/wan/fsl_ucc_hdlc: cleanup debug traces
From: David Miller @ 2017-05-18 14:29 UTC (permalink / raw)
  To: holger.brunck; +Cc: netdev, qiang.zhao
In-Reply-To: <20170517152439.8817-1-holger.brunck@keymile.com>

From: Holger Brunck <holger.brunck@keymile.com>
Date: Wed, 17 May 2017 17:24:32 +0200

> Some of the tracing seems to be remaining traces for basic driver
> development. They can be removed now, as they cause noisy printouts.
> 
> Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
> Cc: Zhao Qiang <qiang.zhao@nxp.com>

Applied.

^ permalink raw reply

* Re: [PATCH net-next 3/8] net/wan/fsl_ucc_hdlc: fix wrong indentation
From: David Miller @ 2017-05-18 14:29 UTC (permalink / raw)
  To: holger.brunck; +Cc: netdev, qiang.zhao
In-Reply-To: <20170517152439.8817-3-holger.brunck@keymile.com>

From: Holger Brunck <holger.brunck@keymile.com>
Date: Wed, 17 May 2017 17:24:34 +0200

> Signed-off-by: Holger Brunck <holger.brunck@keymile.com>

Applied.

^ permalink raw reply

* Re: [PATCH net-next 2/8] net/wan/fsl_ucc_hdlc: fix unitialized variable warnings
From: David Miller @ 2017-05-18 14:29 UTC (permalink / raw)
  To: holger.brunck; +Cc: netdev, qiang.zhao
In-Reply-To: <20170517152439.8817-2-holger.brunck@keymile.com>

From: Holger Brunck <holger.brunck@keymile.com>
Date: Wed, 17 May 2017 17:24:33 +0200

> This fixes the following compiler warnings:
> drivers/net/wan/fsl_ucc_hdlc.c: In function 'ucc_hdlc_poll':
> warning: 'skb' may be used uninitialized in this function
> [-Wmaybe-uninitialized]
>   skb->mac_header = skb->data - skb->head;
> 
> and
> 
> drivers/net/wan/fsl_ucc_hdlc.c: In function 'ucc_hdlc_probe':
> drivers/net/wan/fsl_ucc_hdlc.c:1127:3: warning: 'utdm' may be used
> uninitialized in this function [-Wmaybe-uninitialized]
>    kfree(utdm);
> 
> Signed-off-by: Holger Brunck <holger.brunck@keymile.com>

Applied.

^ permalink raw reply

* Re: [PATCH net-next 4/8] net/wan/fsl_ucc_hdlc: fix incorrect memory allocation
From: David Miller @ 2017-05-18 14:29 UTC (permalink / raw)
  To: holger.brunck; +Cc: netdev, qiang.zhao
In-Reply-To: <20170517152439.8817-4-holger.brunck@keymile.com>

From: Holger Brunck <holger.brunck@keymile.com>
Date: Wed, 17 May 2017 17:24:35 +0200

> We need space for the struct qe_bd and not for a pointer to this struct.
> 
> Signed-off-by: Holger Brunck <holger.brunck@keymile.com>

Applied.

^ permalink raw reply

* Re: [PATCH net-next 5/8] net/wan/fsl_ucc_hdlc: call qe_setbrg only for loopback mode
From: David Miller @ 2017-05-18 14:29 UTC (permalink / raw)
  To: holger.brunck; +Cc: netdev, qiang.zhao
In-Reply-To: <20170517152439.8817-5-holger.brunck@keymile.com>

From: Holger Brunck <holger.brunck@keymile.com>
Date: Wed, 17 May 2017 17:24:36 +0200

> We can't assume that we are always in loopback mode if rx and tx clock
> have the same clock source. If we want to use HDLC busmode we also have
> the same clock source but we are not in loopback mode. So move the
> setting of the baudrate generator after the check for property for the
> loopback mode.
> 
> Signed-off-by: Holger Brunck <holger.brunck@keymile.com>

Applied.

^ permalink raw reply

* Re: [PATCH net-next 6/8] fsl/qe: add bit description for SYNL register for GUMR
From: David Miller @ 2017-05-18 14:29 UTC (permalink / raw)
  To: holger.brunck; +Cc: netdev, qiang.zhao
In-Reply-To: <20170517152439.8817-6-holger.brunck@keymile.com>

From: Holger Brunck <holger.brunck@keymile.com>
Date: Wed, 17 May 2017 17:24:37 +0200

> Add the bitmask for the two bit SYNL register according to the QUICK
> Engine Reference Manual.
> 
> Signed-off-by: Holger Brunck <holger.brunck@keymile.com>

Applied.

^ permalink raw reply

* Re: [PATCH net-next 8/8] powerpc/85xx/kmcent2: use hdlc busmode for UCC1
From: David Miller @ 2017-05-18 14:29 UTC (permalink / raw)
  To: holger.brunck; +Cc: netdev
In-Reply-To: <20170517152439.8817-8-holger.brunck@keymile.com>

From: Holger Brunck <holger.brunck@keymile.com>
Date: Wed, 17 May 2017 17:24:39 +0200

> Signed-off-by: Holger Brunck <holger.brunck@keymile.com>

Applied.

^ permalink raw reply

* Re: [PATCH net-next 7/8] net/wan/fsl_ucc_hdlc: add hdlc-bus support
From: David Miller @ 2017-05-18 14:29 UTC (permalink / raw)
  To: holger.brunck; +Cc: netdev, qiang.zhao
In-Reply-To: <20170517152439.8817-7-holger.brunck@keymile.com>

From: Holger Brunck <holger.brunck@keymile.com>
Date: Wed, 17 May 2017 17:24:38 +0200

> This adds support for hdlc-bus mode to the fsl_ucc_hdlc driver. This can
> be enabled with the "fsl,hdlc-bus" property in the DTS node of the
> corresponding ucc.
> 
> This aligns the configuration of the UPSMR and GUMR registers to what is
> done in our ucc_hdlc driver (that only support hdlc-bus mode) and with
> the QuickEngine's documentation for hdlc-bus mode.
> 
> GUMR/SYNL is set to AUTO for the busmode as in this case the CD signal
> is ignored. The brkpt_support is enabled to set the HBM1 bit in the
> CMXUCR register to configure an open-drain connected HDLC bus.
> 
> Signed-off-by: Holger Brunck <holger.brunck@keymile.com>

Applied.

^ 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