* Re: Page allocator bottleneck
From: Aaron Lu @ 2017-09-18 7:44 UTC (permalink / raw)
To: Tariq Toukan
Cc: Jesper Dangaard Brouer, David Miller, Mel Gorman, Eric Dumazet,
Alexei Starovoitov, Saeed Mahameed, Eran Ben Elisha,
Linux Kernel Network Developers, Andrew Morton, Michal Hocko,
linux-mm, Dave Hansen
In-Reply-To: <20170918073447.GB4107@intel.com>
On Mon, Sep 18, 2017 at 03:34:47PM +0800, Aaron Lu wrote:
> On Sun, Sep 17, 2017 at 07:16:15PM +0300, Tariq Toukan wrote:
> >
> > It's nice to have the option to dynamically play with the parameter.
> > But maybe we should also think of changing the default fraction guaranteed
> > to the PCP, so that unaware admins of networking servers would also benefit.
>
> I collected some performance data with will-it-scale/page_fault1 process
> mode on different machines with different pcp->batch sizes, starting
> from the default 31(calculated by zone_batchsize(), 31 is the standard
> value for any zone that has more than 1/2MiB memory), then incremented
> by 31 upwards till 527. PCP's upper limit is 6*batch.
>
> An image is plotted and attached: batch_full.png(full here means the
> number of process started equals to CPU number).
To be clear: X-axis is the value of batch size(31, 62, 93, ..., 527),
Y-axis is the value of per_process_ops, generated by will-it-scale,
higher is better.
>
> From the image:
> - For EX machines, they all see throughput increase with increased batch
> size and peaked at around batch_size=310, then fall;
> - For EP machines, Haswell-EP and Broadwell-EP also see throughput
> increase with increased batch size and peaked at batch_size=279, then
> fall, batch_size=310 also delivers pretty good result. Skylake-EP is
> quite different in that it doesn't see any obvious throughput increase
> after batch_size=93, though the trend is still increasing, but in a very
> small way and finally peaked at batch_size=403, then fall.
> Ivybridge EP behaves much like desktop ones.
> - For Desktop machines, they do not see any obvious changes with
> increased batch_size.
>
> So the default batch size(31) doesn't deliver good enough result, we
> probbaly should change the default value.
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply
* [PATCH RFC V1 net-next 4/6] net: ipv4: udp: Hook into time based transmission.
From: Richard Cochran @ 2017-09-18 7:41 UTC (permalink / raw)
To: netdev
Cc: linux-kernel, intel-wired-lan, Andre Guedes, Anna-Maria Gleixner,
David Miller, Henrik Austad, Jesus Sanchez-Palencia, John Stultz,
Thomas Gleixner, Vinicius Costa Gomes
In-Reply-To: <cover.1505719061.git.rcochran@linutronix.de>
For udp packets, copy the desired future transmit time from the CMSG
cookie into the skb.
Signed-off-by: Richard Cochran <rcochran@linutronix.de>
---
net/ipv4/udp.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/net/ipv4/udp.c b/net/ipv4/udp.c
index ef29df8648e4..669f63495877 100644
--- a/net/ipv4/udp.c
+++ b/net/ipv4/udp.c
@@ -949,6 +949,7 @@ int udp_sendmsg(struct sock *sk, struct msghdr *msg, size_t len)
}
ipc.sockc.tsflags = sk->sk_tsflags;
+ ipc.sockc.transmit_time = 0;
ipc.addr = inet->inet_saddr;
ipc.oif = sk->sk_bound_dev_if;
@@ -1050,8 +1051,10 @@ int udp_sendmsg(struct sock *sk, struct msghdr *msg, size_t len)
sizeof(struct udphdr), &ipc, &rt,
msg->msg_flags);
err = PTR_ERR(skb);
- if (!IS_ERR_OR_NULL(skb))
+ if (!IS_ERR_OR_NULL(skb)) {
+ skb->transmit_time = ipc.sockc.transmit_time;
err = udp_send_skb(skb, fl4);
+ }
goto out;
}
--
2.11.0
^ permalink raw reply related
* [PATCH RFC V1 net-next 1/6] net: Add a new socket option for a future transmit time.
From: Richard Cochran @ 2017-09-18 7:41 UTC (permalink / raw)
To: netdev
Cc: linux-kernel, intel-wired-lan, Andre Guedes, Anna-Maria Gleixner,
David Miller, Henrik Austad, Jesus Sanchez-Palencia, John Stultz,
Thomas Gleixner, Vinicius Costa Gomes
In-Reply-To: <cover.1505719061.git.rcochran@linutronix.de>
This patch introduces SO_TXTIME. User space enables this option in
order to pass a desired future transmit time in a CMSG when calling
sendmsg(2).
Signed-off-by: Richard Cochran <rcochran@linutronix.de>
---
arch/alpha/include/uapi/asm/socket.h | 3 +++
arch/frv/include/uapi/asm/socket.h | 3 +++
arch/ia64/include/uapi/asm/socket.h | 3 +++
arch/m32r/include/uapi/asm/socket.h | 3 +++
arch/mips/include/uapi/asm/socket.h | 3 +++
arch/mn10300/include/uapi/asm/socket.h | 3 +++
arch/parisc/include/uapi/asm/socket.h | 3 +++
arch/powerpc/include/uapi/asm/socket.h | 3 +++
arch/s390/include/uapi/asm/socket.h | 3 +++
arch/sparc/include/uapi/asm/socket.h | 3 +++
arch/xtensa/include/uapi/asm/socket.h | 3 +++
include/net/sock.h | 2 ++
include/uapi/asm-generic/socket.h | 3 +++
net/core/sock.c | 12 ++++++++++++
14 files changed, 50 insertions(+)
diff --git a/arch/alpha/include/uapi/asm/socket.h b/arch/alpha/include/uapi/asm/socket.h
index c6133a045352..4dfacba7820e 100644
--- a/arch/alpha/include/uapi/asm/socket.h
+++ b/arch/alpha/include/uapi/asm/socket.h
@@ -111,4 +111,7 @@
#define SO_ZEROCOPY 60
+#define SO_TXTIME 61
+#define SCM_TXTIME SO_TXTIME
+
#endif /* _UAPI_ASM_SOCKET_H */
diff --git a/arch/frv/include/uapi/asm/socket.h b/arch/frv/include/uapi/asm/socket.h
index 9abf02d6855a..ccf79fe9f35a 100644
--- a/arch/frv/include/uapi/asm/socket.h
+++ b/arch/frv/include/uapi/asm/socket.h
@@ -104,5 +104,8 @@
#define SO_ZEROCOPY 60
+#define SO_TXTIME 61
+#define SCM_TXTIME SO_TXTIME
+
#endif /* _ASM_SOCKET_H */
diff --git a/arch/ia64/include/uapi/asm/socket.h b/arch/ia64/include/uapi/asm/socket.h
index 002eb85a6941..2da305fa85ee 100644
--- a/arch/ia64/include/uapi/asm/socket.h
+++ b/arch/ia64/include/uapi/asm/socket.h
@@ -113,4 +113,7 @@
#define SO_ZEROCOPY 60
+#define SO_TXTIME 61
+#define SCM_TXTIME SO_TXTIME
+
#endif /* _ASM_IA64_SOCKET_H */
diff --git a/arch/m32r/include/uapi/asm/socket.h b/arch/m32r/include/uapi/asm/socket.h
index e268e51a38d1..4d4cde60c520 100644
--- a/arch/m32r/include/uapi/asm/socket.h
+++ b/arch/m32r/include/uapi/asm/socket.h
@@ -104,4 +104,7 @@
#define SO_ZEROCOPY 60
+#define SO_TXTIME 61
+#define SCM_TXTIME SO_TXTIME
+
#endif /* _ASM_M32R_SOCKET_H */
diff --git a/arch/mips/include/uapi/asm/socket.h b/arch/mips/include/uapi/asm/socket.h
index 6c755bc07975..b6e13bbf970c 100644
--- a/arch/mips/include/uapi/asm/socket.h
+++ b/arch/mips/include/uapi/asm/socket.h
@@ -122,4 +122,7 @@
#define SO_ZEROCOPY 60
+#define SO_TXTIME 61
+#define SCM_TXTIME SO_TXTIME
+
#endif /* _UAPI_ASM_SOCKET_H */
diff --git a/arch/mn10300/include/uapi/asm/socket.h b/arch/mn10300/include/uapi/asm/socket.h
index ac82a3f26dbf..0234496dc969 100644
--- a/arch/mn10300/include/uapi/asm/socket.h
+++ b/arch/mn10300/include/uapi/asm/socket.h
@@ -104,4 +104,7 @@
#define SO_ZEROCOPY 60
+#define SO_TXTIME 61
+#define SCM_TXTIME SO_TXTIME
+
#endif /* _ASM_SOCKET_H */
diff --git a/arch/parisc/include/uapi/asm/socket.h b/arch/parisc/include/uapi/asm/socket.h
index 3b2bf7ae703b..e2a282fefcd6 100644
--- a/arch/parisc/include/uapi/asm/socket.h
+++ b/arch/parisc/include/uapi/asm/socket.h
@@ -103,4 +103,7 @@
#define SO_ZEROCOPY 0x4035
+#define SO_TXTIME 0x4036
+#define SCM_TXTIME SO_TXTIME
+
#endif /* _UAPI_ASM_SOCKET_H */
diff --git a/arch/powerpc/include/uapi/asm/socket.h b/arch/powerpc/include/uapi/asm/socket.h
index 3c590c7c42c0..55718129ab06 100644
--- a/arch/powerpc/include/uapi/asm/socket.h
+++ b/arch/powerpc/include/uapi/asm/socket.h
@@ -17,4 +17,7 @@
#include <asm-generic/socket.h>
+#define SO_TXTIME 54
+#define SCM_TXTIME SO_TXTIME
+
#endif /* _ASM_POWERPC_SOCKET_H */
diff --git a/arch/s390/include/uapi/asm/socket.h b/arch/s390/include/uapi/asm/socket.h
index a56916c83565..bfcb29ccf33a 100644
--- a/arch/s390/include/uapi/asm/socket.h
+++ b/arch/s390/include/uapi/asm/socket.h
@@ -110,4 +110,7 @@
#define SO_ZEROCOPY 60
+#define SO_TXTIME 61
+#define SCM_TXTIME SO_TXTIME
+
#endif /* _ASM_SOCKET_H */
diff --git a/arch/sparc/include/uapi/asm/socket.h b/arch/sparc/include/uapi/asm/socket.h
index b2f5c50d0947..2217187f80f2 100644
--- a/arch/sparc/include/uapi/asm/socket.h
+++ b/arch/sparc/include/uapi/asm/socket.h
@@ -100,6 +100,9 @@
#define SO_ZEROCOPY 0x003e
+#define SO_TXTIME 0x003f
+#define SCM_TXTIME SO_TXTIME
+
/* Security levels - as per NRL IPv6 - don't actually do anything */
#define SO_SECURITY_AUTHENTICATION 0x5001
#define SO_SECURITY_ENCRYPTION_TRANSPORT 0x5002
diff --git a/arch/xtensa/include/uapi/asm/socket.h b/arch/xtensa/include/uapi/asm/socket.h
index 220059999e74..36bdbd8bd6ca 100644
--- a/arch/xtensa/include/uapi/asm/socket.h
+++ b/arch/xtensa/include/uapi/asm/socket.h
@@ -115,4 +115,7 @@
#define SO_ZEROCOPY 60
+#define SO_TXTIME 61
+#define SCM_TXTIME SO_TXTIME
+
#endif /* _XTENSA_SOCKET_H */
diff --git a/include/net/sock.h b/include/net/sock.h
index 03a362568357..1c378db1060f 100644
--- a/include/net/sock.h
+++ b/include/net/sock.h
@@ -778,6 +778,7 @@ enum sock_flags {
SOCK_FILTER_LOCKED, /* Filter cannot be changed anymore */
SOCK_SELECT_ERR_QUEUE, /* Wake select on error queue */
SOCK_RCU_FREE, /* wait rcu grace period in sk_destruct() */
+ SOCK_TXTIME,
};
#define SK_FLAGS_TIMESTAMP ((1UL << SOCK_TIMESTAMP) | (1UL << SOCK_TIMESTAMPING_RX_SOFTWARE))
@@ -1558,6 +1559,7 @@ void sock_kzfree_s(struct sock *sk, void *mem, int size);
void sk_send_sigurg(struct sock *sk);
struct sockcm_cookie {
+ u64 transmit_time;
u32 mark;
u16 tsflags;
};
diff --git a/include/uapi/asm-generic/socket.h b/include/uapi/asm-generic/socket.h
index e47c9e436221..d32e3e1bf4b6 100644
--- a/include/uapi/asm-generic/socket.h
+++ b/include/uapi/asm-generic/socket.h
@@ -106,4 +106,7 @@
#define SO_ZEROCOPY 60
+#define SO_TXTIME 61
+#define SCM_TXTIME SO_TXTIME
+
#endif /* __ASM_GENERIC_SOCKET_H */
diff --git a/net/core/sock.c b/net/core/sock.c
index 9b7b6bbb2a23..d916a4c238dd 100644
--- a/net/core/sock.c
+++ b/net/core/sock.c
@@ -1059,6 +1059,13 @@ int sock_setsockopt(struct socket *sock, int level, int optname,
sock_valbool_flag(sk, SOCK_ZEROCOPY, valbool);
break;
+ case SO_TXTIME:
+ if (ns_capable(sock_net(sk)->user_ns, CAP_NET_ADMIN))
+ sock_valbool_flag(sk, SOCK_TXTIME, valbool);
+ else
+ ret = -EPERM;
+ break;
+
default:
ret = -ENOPROTOOPT;
break;
@@ -2115,6 +2122,11 @@ int __sock_cmsg_send(struct sock *sk, struct msghdr *msg, struct cmsghdr *cmsg,
sockc->tsflags &= ~SOF_TIMESTAMPING_TX_RECORD_MASK;
sockc->tsflags |= tsflags;
break;
+ case SO_TXTIME:
+ if (!sock_flag(sk, SOCK_TXTIME))
+ return -EINVAL;
+ sockc->transmit_time = *(u64 *)CMSG_DATA(cmsg);
+ break;
/* SCM_RIGHTS and SCM_CREDENTIALS are semantically in SOL_UNIX. */
case SCM_RIGHTS:
case SCM_CREDENTIALS:
--
2.11.0
^ permalink raw reply related
* [PATCH RFC V1 net-next 6/6] net: igb: Implement time based transmission.
From: Richard Cochran @ 2017-09-18 7:41 UTC (permalink / raw)
To: netdev
Cc: linux-kernel, intel-wired-lan, Andre Guedes, Anna-Maria Gleixner,
David Miller, Henrik Austad, Jesus Sanchez-Palencia, John Stultz,
Thomas Gleixner, Vinicius Costa Gomes
In-Reply-To: <cover.1505719061.git.rcochran@linutronix.de>
This patch configures the i210 transmit queues to reserve the first queue
for time based transmit arbitration, placing all other traffic into the
second queue. This configuration is hard coded and does not make use of
the two spare queues.
Signed-off-by: Richard Cochran <rcochran@linutronix.de>
---
drivers/net/ethernet/intel/igb/e1000_82575.h | 1 +
drivers/net/ethernet/intel/igb/e1000_defines.h | 68 +++++++++++++++++++++++++-
drivers/net/ethernet/intel/igb/e1000_regs.h | 5 ++
drivers/net/ethernet/intel/igb/igb.h | 3 +-
drivers/net/ethernet/intel/igb/igb_main.c | 68 +++++++++++++++++++++++---
5 files changed, 136 insertions(+), 9 deletions(-)
diff --git a/drivers/net/ethernet/intel/igb/e1000_82575.h b/drivers/net/ethernet/intel/igb/e1000_82575.h
index acf06051e111..4c107377540d 100644
--- a/drivers/net/ethernet/intel/igb/e1000_82575.h
+++ b/drivers/net/ethernet/intel/igb/e1000_82575.h
@@ -159,6 +159,7 @@ struct e1000_adv_tx_context_desc {
/* Additional Transmit Descriptor Control definitions */
#define E1000_TXDCTL_QUEUE_ENABLE 0x02000000 /* Enable specific Tx Queue */
/* Tx Queue Arbitration Priority 0=low, 1=high */
+#define E1000_TXDCTL_HIGH_PRIORITY 0x08000000
/* Additional Receive Descriptor Control definitions */
#define E1000_RXDCTL_QUEUE_ENABLE 0x02000000 /* Enable specific Rx Queue */
diff --git a/drivers/net/ethernet/intel/igb/e1000_defines.h b/drivers/net/ethernet/intel/igb/e1000_defines.h
index 1de82f247312..51ab8d0b3dd6 100644
--- a/drivers/net/ethernet/intel/igb/e1000_defines.h
+++ b/drivers/net/ethernet/intel/igb/e1000_defines.h
@@ -352,8 +352,35 @@
/* Timestamp in Rx buffer */
#define E1000_RXPBS_CFG_TS_EN 0x80000000
-#define I210_RXPBSIZE_DEFAULT 0x000000A2 /* RXPBSIZE default */
-#define I210_TXPBSIZE_DEFAULT 0x04000014 /* TXPBSIZE default */
+/*
+ * Internal Packet Buffer Size Registers
+ * For transmit, Section 7.2.7.7 on page 312 recommends 8, 8, 4, and 4 KB.
+ * TXPB[0-3]SIZE are in KB for TxQ[0-3].
+ */
+#define RXPBSIZE 0x22
+#define BMC2OSPBSIZE 0x02
+#define TXPB0SIZE 8
+#define TXPB1SIZE 12
+#define TXPB2SIZE 0
+#define TXPB3SIZE 0
+#define OS2BMCPBSIZE 4
+
+#define TOTAL_RXTX_PBSIZE \
+ (RXPBSIZE + BMC2OSPBSIZE + \
+ TXPB0SIZE + TXPB1SIZE + TXPB2SIZE + TXPB3SIZE + OS2BMCPBSIZE)
+
+#if TOTAL_RXTX_PBSIZE > 60
+#error RX TX PBSIZE exceeds 60 KB.
+#elif TOTAL_RXTX_PBSIZE < 60
+#error RX TX PBSIZE too small.
+#endif
+
+#define I210_TXPBSIZE_DEFAULT \
+ (TXPB0SIZE | (TXPB1SIZE << 6) | (TXPB2SIZE << 12) | \
+ (TXPB3SIZE << 18) | (OS2BMCPBSIZE << 24))
+
+#define I210_RXPBSIZE_DEFAULT \
+ (RXPBSIZE | (BMC2OSPBSIZE << 6))
/* SerDes Control */
#define E1000_SCTL_DISABLE_SERDES_LOOPBACK 0x0400
@@ -1051,4 +1078,41 @@
#define E1000_VLAPQF_P_VALID(_n) (0x1 << (3 + (_n) * 4))
#define E1000_VLAPQF_QUEUE_MASK 0x03
+/* DMA TX Maximum Packet Size */
+#define E1000_DMA_TX_MAXIMUM_PACKET_SIZE (1536 >> 6) /* Units of 64 bytes. */
+
+/* TX Qav Credit Control fields */
+#define E1000_TQAVCC_QUEUEMODE_STREAM_RESERVATION BIT(31)
+
+/* Tx Qav Control */
+#define E1000_TQAVCTRL_TRANSMITMODE_QAV BIT(0)
+#define E1000_TQAVCTRL_1588_STAT_EN BIT(2)
+#define E1000_TQAVCTRL_DATA_FETCH_ARB_MOSTEMPTY BIT(4)
+#define E1000_TQAVCTRL_DATA_TRAN_ARB_CREDITSHAPER BIT(8)
+#define E1000_TQAVCTRL_DATA_TRAN_TIM BIT(9)
+#define E1000_TQAVCTRL_SP_WAIT_SR BIT(10)
+#define E1000_TQAVCTRL_FETCH_TIM_DELTA_SHIFT 16
+/*
+ * Fetch Time Delta - bits 31:16
+ *
+ * This field holds the value to be reduced from the launch time for
+ * fetch time decision. The FetchTimeDelta value is defined in 32 ns
+ * granularity.
+ *
+ * This field is 16 bits wide, and so the maximum value is:
+ *
+ * 65535 * 32 = 2097120 ~= 2 msec
+ *
+ * Is there any reason not to dial max here?
+ */
+#define E1000_FETCH_TIME_DELTA 0xffff
+
+#define E1000_DEFAULT_TQAVCTRL ( \
+ E1000_TQAVCTRL_TRANSMITMODE_QAV | \
+ E1000_TQAVCTRL_DATA_FETCH_ARB_MOSTEMPTY | \
+ E1000_TQAVCTRL_DATA_TRAN_TIM | \
+ E1000_TQAVCTRL_SP_WAIT_SR | \
+ (E1000_FETCH_TIME_DELTA << E1000_TQAVCTRL_FETCH_TIM_DELTA_SHIFT) \
+)
+
#endif
diff --git a/drivers/net/ethernet/intel/igb/e1000_regs.h b/drivers/net/ethernet/intel/igb/e1000_regs.h
index 58adbf234e07..a2ac3331877c 100644
--- a/drivers/net/ethernet/intel/igb/e1000_regs.h
+++ b/drivers/net/ethernet/intel/igb/e1000_regs.h
@@ -421,6 +421,11 @@ do { \
#define E1000_I210_FLA 0x1201C
+#define E1000_I210_TQAVCC0 0x3004
+#define E1000_I210_TQAVCC1 0x3044
+#define E1000_I210_DTXMXPKTSZ 0x355C /* DMA TX Maximum Packet Size */
+#define E1000_I210_TQAVCTRL 0x3570 /* Tx Qav Control */
+
#define E1000_INVM_DATA_REG(_n) (0x12120 + 4*(_n))
#define E1000_INVM_SIZE 64 /* Number of INVM Data Registers */
diff --git a/drivers/net/ethernet/intel/igb/igb.h b/drivers/net/ethernet/intel/igb/igb.h
index 06ffb2bc713e..95f20eee8194 100644
--- a/drivers/net/ethernet/intel/igb/igb.h
+++ b/drivers/net/ethernet/intel/igb/igb.h
@@ -328,7 +328,8 @@ enum e1000_ring_flags_t {
IGB_RING_FLAG_RX_SCTP_CSUM,
IGB_RING_FLAG_RX_LB_VLAN_BSWAP,
IGB_RING_FLAG_TX_CTX_IDX,
- IGB_RING_FLAG_TX_DETECT_HANG
+ IGB_RING_FLAG_TX_DETECT_HANG,
+ IGB_RING_FLAG_HIGH_PRIORITY
};
#define ring_uses_large_buffer(ring) \
diff --git a/drivers/net/ethernet/intel/igb/igb_main.c b/drivers/net/ethernet/intel/igb/igb_main.c
index fd4a46b03cc8..69c877290d52 100644
--- a/drivers/net/ethernet/intel/igb/igb_main.c
+++ b/drivers/net/ethernet/intel/igb/igb_main.c
@@ -1598,6 +1598,40 @@ static void igb_get_hw_control(struct igb_adapter *adapter)
ctrl_ext | E1000_CTRL_EXT_DRV_LOAD);
}
+static void igb_qav_config(struct igb_adapter *adapter)
+{
+ struct e1000_hw *hw = &adapter->hw;
+
+ /*
+ * Global Qav configuration (see 7.2.7.7 on page 312)
+ */
+ wr32(E1000_I210_DTXMXPKTSZ, 1536 >> 6);
+ wr32(E1000_I210_TQAVCTRL, (u32) E1000_DEFAULT_TQAVCTRL);
+
+ /*
+ * Per Queue (0/1) Qav configuration
+ *
+ * Note: Queue0 QueueMode must be set to 1
+ * when TransmitMode is set to Qav.
+ */
+ wr32(E1000_I210_TQAVCC0, E1000_TQAVCC_QUEUEMODE_STREAM_RESERVATION);
+}
+
+static u16 igb_select_queue(struct net_device *netdev, struct sk_buff *skb,
+ void *accel, select_queue_fallback_t fallback)
+{
+ struct igb_adapter *adapter = netdev_priv(netdev);
+ struct e1000_hw *hw = &adapter->hw;
+
+ if (hw->mac.type != e1000_i210)
+ return fallback(netdev, skb);
+
+ if (skb->transmit_time)
+ return 0;
+ else
+ return 1;
+}
+
/**
* igb_configure - configure the hardware for RX and TX
* @adapter: private board structure
@@ -1616,6 +1650,8 @@ static void igb_configure(struct igb_adapter *adapter)
igb_setup_mrqc(adapter);
igb_setup_rctl(adapter);
+ igb_qav_config(adapter);
+
igb_nfc_filter_restore(adapter);
igb_configure_tx(adapter);
igb_configure_rx(adapter);
@@ -2175,6 +2211,7 @@ static const struct net_device_ops igb_netdev_ops = {
.ndo_set_features = igb_set_features,
.ndo_fdb_add = igb_ndo_fdb_add,
.ndo_features_check = igb_features_check,
+ .ndo_select_queue = igb_select_queue,
};
/**
@@ -3062,7 +3099,11 @@ static void igb_init_queue_configuration(struct igb_adapter *adapter)
break;
}
- adapter->rss_queues = min_t(u32, max_rss_queues, num_online_cpus());
+ /*
+ * For time based Tx, we must configure four Tx queues.
+ */
+ adapter->rss_queues = hw->mac.type == e1000_i210 ?
+ max_rss_queues : min_t(u32, max_rss_queues, num_online_cpus());
igb_set_flag_queue_pairs(adapter, max_rss_queues);
}
@@ -3462,6 +3503,9 @@ void igb_configure_tx_ring(struct igb_adapter *adapter,
memset(ring->tx_buffer_info, 0,
sizeof(struct igb_tx_buffer) * ring->count);
+ if (ring->flags & IGB_RING_FLAG_HIGH_PRIORITY)
+ txdctl |= E1000_TXDCTL_HIGH_PRIORITY;
+
txdctl |= E1000_TXDCTL_QUEUE_ENABLE;
wr32(E1000_TXDCTL(reg_idx), txdctl);
}
@@ -3476,6 +3520,11 @@ static void igb_configure_tx(struct igb_adapter *adapter)
{
int i;
+ /*
+ * Reserve the first queue for time based Tx.
+ */
+ adapter->tx_ring[0]->flags |= IGB_RING_FLAG_HIGH_PRIORITY;
+
for (i = 0; i < adapter->num_tx_queues; i++)
igb_configure_tx_ring(adapter, adapter->tx_ring[i]);
}
@@ -4948,11 +4997,12 @@ static void igb_set_itr(struct igb_q_vector *q_vector)
}
}
-static void igb_tx_ctxtdesc(struct igb_ring *tx_ring, u32 vlan_macip_lens,
- u32 type_tucmd, u32 mss_l4len_idx)
+static void igb_tx_ctxtdesc(struct igb_ring *tx_ring, struct igb_tx_buffer *first,
+ u32 vlan_macip_lens, u32 type_tucmd, u32 mss_l4len_idx)
{
struct e1000_adv_tx_context_desc *context_desc;
u16 i = tx_ring->next_to_use;
+ struct timespec64 ts;
context_desc = IGB_TX_CTXTDESC(tx_ring, i);
@@ -4967,9 +5017,15 @@ static void igb_tx_ctxtdesc(struct igb_ring *tx_ring, u32 vlan_macip_lens,
mss_l4len_idx |= tx_ring->reg_idx << 4;
context_desc->vlan_macip_lens = cpu_to_le32(vlan_macip_lens);
- context_desc->seqnum_seed = 0;
context_desc->type_tucmd_mlhl = cpu_to_le32(type_tucmd);
context_desc->mss_l4len_idx = cpu_to_le32(mss_l4len_idx);
+
+ if (tx_ring->flags & IGB_RING_FLAG_HIGH_PRIORITY && tx_ring->reg_idx == 0) {
+ ts = ns_to_timespec64(first->skb->transmit_time);
+ context_desc->seqnum_seed = cpu_to_le32(ts.tv_nsec / 32);
+ } else {
+ context_desc->seqnum_seed = 0;
+ }
}
static int igb_tso(struct igb_ring *tx_ring,
@@ -5052,7 +5108,7 @@ static int igb_tso(struct igb_ring *tx_ring,
vlan_macip_lens |= (ip.hdr - skb->data) << E1000_ADVTXD_MACLEN_SHIFT;
vlan_macip_lens |= first->tx_flags & IGB_TX_FLAGS_VLAN_MASK;
- igb_tx_ctxtdesc(tx_ring, vlan_macip_lens, type_tucmd, mss_l4len_idx);
+ igb_tx_ctxtdesc(tx_ring, first, vlan_macip_lens, type_tucmd, mss_l4len_idx);
return 1;
}
@@ -5107,7 +5163,7 @@ static void igb_tx_csum(struct igb_ring *tx_ring, struct igb_tx_buffer *first)
vlan_macip_lens |= skb_network_offset(skb) << E1000_ADVTXD_MACLEN_SHIFT;
vlan_macip_lens |= first->tx_flags & IGB_TX_FLAGS_VLAN_MASK;
- igb_tx_ctxtdesc(tx_ring, vlan_macip_lens, type_tucmd, 0);
+ igb_tx_ctxtdesc(tx_ring, first, vlan_macip_lens, type_tucmd, 0);
}
#define IGB_SET_FLAG(_input, _flag, _result) \
--
2.11.0
^ permalink raw reply related
* [PATCH RFC V1 net-next 5/6] net: packet: Hook into time based transmission.
From: Richard Cochran @ 2017-09-18 7:41 UTC (permalink / raw)
To: netdev
Cc: linux-kernel, intel-wired-lan, Andre Guedes, Anna-Maria Gleixner,
David Miller, Henrik Austad, Jesus Sanchez-Palencia, John Stultz,
Thomas Gleixner, Vinicius Costa Gomes
In-Reply-To: <cover.1505719061.git.rcochran@linutronix.de>
For raw layer-2 packets, copy the desired future transmit time from
the CMSG cookie into the skb.
Signed-off-by: Richard Cochran <rcochran@linutronix.de>
---
net/packet/af_packet.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/net/packet/af_packet.c b/net/packet/af_packet.c
index c26172995511..342c6cc81a42 100644
--- a/net/packet/af_packet.c
+++ b/net/packet/af_packet.c
@@ -1984,6 +1984,7 @@ static int packet_sendmsg_spkt(struct socket *sock, struct msghdr *msg,
goto out_unlock;
}
+ sockc.transmit_time = 0;
sockc.tsflags = sk->sk_tsflags;
if (msg->msg_controllen) {
err = sock_cmsg_send(sk, msg, &sockc);
@@ -1995,6 +1996,7 @@ static int packet_sendmsg_spkt(struct socket *sock, struct msghdr *msg,
skb->dev = dev;
skb->priority = sk->sk_priority;
skb->mark = sk->sk_mark;
+ skb->transmit_time = sockc.transmit_time;
sock_tx_timestamp(sk, sockc.tsflags, &skb_shinfo(skb)->tx_flags);
@@ -2492,6 +2494,7 @@ static int tpacket_fill_skb(struct packet_sock *po, struct sk_buff *skb,
skb->dev = dev;
skb->priority = po->sk.sk_priority;
skb->mark = po->sk.sk_mark;
+ skb->transmit_time = sockc->transmit_time;
sock_tx_timestamp(&po->sk, sockc->tsflags, &skb_shinfo(skb)->tx_flags);
skb_shinfo(skb)->destructor_arg = ph.raw;
@@ -2668,6 +2671,7 @@ static int tpacket_snd(struct packet_sock *po, struct msghdr *msg)
if (unlikely(!(dev->flags & IFF_UP)))
goto out_put;
+ sockc.transmit_time = 0;
sockc.tsflags = po->sk.sk_tsflags;
if (msg->msg_controllen) {
err = sock_cmsg_send(&po->sk, msg, &sockc);
@@ -2863,6 +2867,7 @@ static int packet_snd(struct socket *sock, struct msghdr *msg, size_t len)
if (unlikely(!(dev->flags & IFF_UP)))
goto out_unlock;
+ sockc.transmit_time = 0;
sockc.tsflags = sk->sk_tsflags;
sockc.mark = sk->sk_mark;
if (msg->msg_controllen) {
@@ -2934,6 +2939,7 @@ static int packet_snd(struct socket *sock, struct msghdr *msg, size_t len)
skb->dev = dev;
skb->priority = sk->sk_priority;
skb->mark = sockc.mark;
+ skb->transmit_time = sockc.transmit_time;
if (po->has_vnet_hdr) {
err = virtio_net_hdr_to_skb(skb, &vnet_hdr, vio_le());
--
2.11.0
^ permalink raw reply related
* [PATCH RFC V1 net-next 3/6] net: ipv4: raw: Hook into time based transmission.
From: Richard Cochran @ 2017-09-18 7:41 UTC (permalink / raw)
To: netdev
Cc: linux-kernel, intel-wired-lan, Andre Guedes, Anna-Maria Gleixner,
David Miller, Henrik Austad, Jesus Sanchez-Palencia, John Stultz,
Thomas Gleixner, Vinicius Costa Gomes
In-Reply-To: <cover.1505719061.git.rcochran@linutronix.de>
For raw packets, copy the desired future transmit time from the CMSG
cookie into the skb.
Signed-off-by: Richard Cochran <rcochran@linutronix.de>
---
net/ipv4/raw.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/net/ipv4/raw.c b/net/ipv4/raw.c
index 33b70bfd1122..f6805973629b 100644
--- a/net/ipv4/raw.c
+++ b/net/ipv4/raw.c
@@ -381,6 +381,7 @@ static int raw_send_hdrinc(struct sock *sk, struct flowi4 *fl4,
skb->priority = sk->sk_priority;
skb->mark = sk->sk_mark;
+ skb->transmit_time = sockc->transmit_time;
skb_dst_set(skb, &rt->dst);
*rtp = NULL;
@@ -555,6 +556,7 @@ static int raw_sendmsg(struct sock *sk, struct msghdr *msg, size_t len)
}
ipc.sockc.tsflags = sk->sk_tsflags;
+ ipc.sockc.transmit_time = 0;
ipc.addr = inet->inet_saddr;
ipc.opt = NULL;
ipc.tx_flags = 0;
--
2.11.0
^ permalink raw reply related
* [PATCH RFC V1 net-next 2/6] net: skbuff: Add a field to support time based transmission.
From: Richard Cochran @ 2017-09-18 7:41 UTC (permalink / raw)
To: netdev
Cc: linux-kernel, intel-wired-lan, Andre Guedes, Anna-Maria Gleixner,
David Miller, Henrik Austad, Jesus Sanchez-Palencia, John Stultz,
Thomas Gleixner, Vinicius Costa Gomes
In-Reply-To: <cover.1505719061.git.rcochran@linutronix.de>
Signed-off-by: Richard Cochran <rcochran@linutronix.de>
---
include/linux/skbuff.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h
index 72299ef00061..bc7f7dcbb413 100644
--- a/include/linux/skbuff.h
+++ b/include/linux/skbuff.h
@@ -635,6 +635,7 @@ typedef unsigned char *sk_buff_data_t;
* @dst_pending_confirm: need to confirm neighbour
* @napi_id: id of the NAPI struct this skb came from
* @secmark: security marking
+ * @transmit_time: desired future transmission time in nanoseconds
* @mark: Generic packet mark
* @vlan_proto: vlan encapsulation protocol
* @vlan_tci: vlan tag control information
@@ -804,6 +805,7 @@ struct sk_buff {
#ifdef CONFIG_NETWORK_SECMARK
__u32 secmark;
#endif
+ __u64 transmit_time;
union {
__u32 mark;
--
2.11.0
^ permalink raw reply related
* [PATCH RFC V1 net-next 0/6] Time based packet transmission
From: Richard Cochran @ 2017-09-18 7:41 UTC (permalink / raw)
To: netdev
Cc: linux-kernel, intel-wired-lan, Andre Guedes, Anna-Maria Gleixner,
David Miller, Henrik Austad, Jesus Sanchez-Palencia, John Stultz,
Thomas Gleixner, Vinicius Costa Gomes
This series is an early RFC that introduces a new socket option
allowing time based transmission of packets. This option will be
useful in implementing various real time protocols over Ethernet,
including but not limited to P802.1Qbv, which is currently finding
its way into 802.1Q.
* Open questions about SO_TXTIME semantics
- What should the kernel do if the dialed Tx time is in the past?
Should the packet be sent ASAP, or should we throw an error?
- Should the kernel inform the user if it detects a missed deadline,
via the error queue for example?
- What should the timescale be for the dialed Tx time? Should the
kernel select UTC when using the SW Qdisc and the HW time
otherwise? Or should the socket option include a clockid_t?
* Things todo
- Design a Qdisc for purpose of configuring SO_TXTIME. There should
be one option to dial HW offloading or SW best effort.
- Implement the SW best effort variant. Here is my back of the
napkin sketch. Each interface has its own timerqueue keeping the
TXTIME packets in order and a FIFO for all other traffic. A guard
window starts at the earliest deadline minus the maximum MTU minus
a configurable fudge factor. The Qdisc uses a hrtimer to transmit
the next packet in the timerqueue. During the guard window, all
other traffic is defered unless the next packet can be transmitted
before the guard window expires.
* Current limitations
- The driver does not handle out of order packets. If user space
sends a packet with an earlier Tx time, then the code should stop
the queue, reshuffle the descriptors accordingly, and then
restart the queue.
- The driver does not correctly queue up packets in the distant
future. The i210 has a limited time window of +/- 0.5 seconds.
Packets with a Tx time greater than that should be deferred in
order to enqueue them later on.
* Performance measurements
1. Prepared a PC and the Device Under Test (DUT) each with an Intel
i210 card connected with a crossover cable.
2. The DUT was a Pentium(R) D CPU 2.80GHz running PREEMPT_RT
4.9.40-rt30 with about 50 usec maximum latency under cyclictest.
3. Synchronized the DUT's PHC to the PC's PHC using ptp4l.
4. Synchronized the DUT's system clock to its PHC using phc2sys.
5. Started netperf to produce some network load.
6. Measured the arrival time of the packets at the PC's PHC using
hardware time stamping.
I ran ten minute tests both with and without using the so_txtime
option, with a period was 1 millisecond. I then repeated the
so_txtime case but with a 250 microsecond period. The measured
offset from the expected period (in nanoseconds) is shown in the
following table.
| | plain preempt_rt | so_txtime | txtime @ 250 us |
|---------+------------------+---------------+-----------------|
| min: | +1.940800e+04 | +4.720000e+02 | +4.720000e+02 |
| max: | +7.556000e+04 | +5.680000e+02 | +5.760000e+02 |
| pk-pk: | +5.615200e+04 | +9.600000e+01 | +1.040000e+02 |
| mean: | +3.292776e+04 | +5.072274e+02 | +5.073602e+02 |
| stddev: | +6.514709e+03 | +1.310849e+01 | +1.507144e+01 |
| count: | 600000 | 600000 | 2400000 |
Using so_txtime, the peak to peak jitter is about 100 nanoseconds,
independent of the period. In contrast, plain preempt_rt shows a
jitter of of 56 microseconds. The average delay of 507 nanoseconds
when using so_txtime is explained by the documented input and output
delays on the i210 cards.
The test program is appended, below. If anyone is interested in
reproducing this test, I can provide helper scripts.
Thanks,
Richard
Richard Cochran (6):
net: Add a new socket option for a future transmit time.
net: skbuff: Add a field to support time based transmission.
net: ipv4: raw: Hook into time based transmission.
net: ipv4: udp: Hook into time based transmission.
net: packet: Hook into time based transmission.
net: igb: Implement time based transmission.
arch/alpha/include/uapi/asm/socket.h | 3 ++
arch/frv/include/uapi/asm/socket.h | 3 ++
arch/ia64/include/uapi/asm/socket.h | 3 ++
arch/m32r/include/uapi/asm/socket.h | 3 ++
arch/mips/include/uapi/asm/socket.h | 3 ++
arch/mn10300/include/uapi/asm/socket.h | 3 ++
arch/parisc/include/uapi/asm/socket.h | 3 ++
arch/powerpc/include/uapi/asm/socket.h | 3 ++
arch/s390/include/uapi/asm/socket.h | 3 ++
arch/sparc/include/uapi/asm/socket.h | 3 ++
arch/xtensa/include/uapi/asm/socket.h | 3 ++
drivers/net/ethernet/intel/igb/e1000_82575.h | 1 +
drivers/net/ethernet/intel/igb/e1000_defines.h | 68 +++++++++++++++++++++++++-
drivers/net/ethernet/intel/igb/e1000_regs.h | 5 ++
drivers/net/ethernet/intel/igb/igb.h | 3 +-
drivers/net/ethernet/intel/igb/igb_main.c | 68 +++++++++++++++++++++++---
include/linux/skbuff.h | 2 +
include/net/sock.h | 2 +
include/uapi/asm-generic/socket.h | 3 ++
net/core/sock.c | 12 +++++
net/ipv4/raw.c | 2 +
net/ipv4/udp.c | 5 +-
net/packet/af_packet.c | 6 +++
23 files changed, 200 insertions(+), 10 deletions(-)
--
2.11.0
---8<---
/*
* This program demonstrates transmission of UDP packets using the
* system TAI timer.
*
* Copyright (C) 2017 linutronix GmbH
*
* Large portions taken from the linuxptp stack.
* Copyright (C) 2011, 2012 Richard Cochran <richardcochran@gmail.com>
*
* Some portions taken from the sgd test program.
* Copyright (C) 2015 linutronix GmbH
*
* 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, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#define _GNU_SOURCE /*for CPU_SET*/
#include <arpa/inet.h>
#include <errno.h>
#include <fcntl.h>
#include <ifaddrs.h>
#include <linux/ethtool.h>
#include <linux/net_tstamp.h>
#include <linux/sockios.h>
#include <net/if.h>
#include <netinet/in.h>
#include <poll.h>
#include <pthread.h>
#include <sched.h>
#include <signal.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/ioctl.h>
#include <sys/socket.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <unistd.h>
#define DEFAULT_PERIOD 1000000
#define DEFAULT_DELAY 500000
#define MCAST_IPADDR "239.1.1.1"
#define UDP_PORT 7788
#ifndef SO_TXTIME
#define SO_TXTIME 61
#endif
#define pr_err(s) fprintf(stderr, s "\n")
#define pr_info(s) fprintf(stdout, s "\n")
static int running = 1, use_so_txtime = 1;
static int period_nsec = DEFAULT_PERIOD;
static int waketx_delay = DEFAULT_DELAY;
static struct in_addr mcast_addr;
static int mcast_bind(int fd, int index)
{
int err;
struct ip_mreqn req;
memset(&req, 0, sizeof(req));
req.imr_ifindex = index;
err = setsockopt(fd, IPPROTO_IP, IP_MULTICAST_IF, &req, sizeof(req));
if (err) {
pr_err("setsockopt IP_MULTICAST_IF failed: %m");
return -1;
}
return 0;
}
static int mcast_join(int fd, int index, const struct sockaddr *grp,
socklen_t grplen)
{
int err, off = 0;
struct ip_mreqn req;
struct sockaddr_in *sa = (struct sockaddr_in *) grp;
memset(&req, 0, sizeof(req));
memcpy(&req.imr_multiaddr, &sa->sin_addr, sizeof(struct in_addr));
req.imr_ifindex = index;
err = setsockopt(fd, IPPROTO_IP, IP_ADD_MEMBERSHIP, &req, sizeof(req));
if (err) {
pr_err("setsockopt IP_ADD_MEMBERSHIP failed: %m");
return -1;
}
err = setsockopt(fd, IPPROTO_IP, IP_MULTICAST_LOOP, &off, sizeof(off));
if (err) {
pr_err("setsockopt IP_MULTICAST_LOOP failed: %m");
return -1;
}
return 0;
}
static void normalize(struct timespec *ts)
{
while (ts->tv_nsec > 999999999) {
ts->tv_sec += 1;
ts->tv_nsec -= 1000000000;
}
}
static int sk_interface_index(int fd, const char *name)
{
struct ifreq ifreq;
int err;
memset(&ifreq, 0, sizeof(ifreq));
strncpy(ifreq.ifr_name, name, sizeof(ifreq.ifr_name) - 1);
err = ioctl(fd, SIOCGIFINDEX, &ifreq);
if (err < 0) {
pr_err("ioctl SIOCGIFINDEX failed: %m");
return err;
}
return ifreq.ifr_ifindex;
}
static int open_socket(const char *name, struct in_addr mc_addr, short port)
{
struct sockaddr_in addr;
int fd, index, on = 1;
memset(&addr, 0, sizeof(addr));
addr.sin_family = AF_INET;
addr.sin_addr.s_addr = htonl(INADDR_ANY);
addr.sin_port = htons(port);
fd = socket(PF_INET, SOCK_DGRAM, IPPROTO_UDP);
if (fd < 0) {
pr_err("socket failed: %m");
goto no_socket;
}
index = sk_interface_index(fd, name);
if (index < 0)
goto no_option;
if (setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, &on, sizeof(on))) {
pr_err("setsockopt SO_REUSEADDR failed: %m");
goto no_option;
}
if (bind(fd, (struct sockaddr *) &addr, sizeof(addr))) {
pr_err("bind failed: %m");
goto no_option;
}
if (setsockopt(fd, SOL_SOCKET, SO_BINDTODEVICE, name, strlen(name))) {
pr_err("setsockopt SO_BINDTODEVICE failed: %m");
goto no_option;
}
addr.sin_addr = mc_addr;
if (mcast_join(fd, index, (struct sockaddr *) &addr, sizeof(addr))) {
pr_err("mcast_join failed");
goto no_option;
}
if (mcast_bind(fd, index)) {
goto no_option;
}
if (use_so_txtime && setsockopt(fd, SOL_SOCKET, SO_TXTIME, &on, sizeof(on))) {
pr_err("setsockopt SO_TXTIME failed: %m");
goto no_option;
}
return fd;
no_option:
close(fd);
no_socket:
return -1;
}
static int udp_open(const char *name)
{
int fd;
if (!inet_aton(MCAST_IPADDR, &mcast_addr))
return -1;
fd = open_socket(name, mcast_addr, UDP_PORT);
return fd;
}
static int udp_send(int fd, void *buf, int len, __u64 txtime)
{
union {
char buf[CMSG_SPACE(sizeof(__u64))];
struct cmsghdr align;
} u;
struct sockaddr_in sin;
struct cmsghdr *cmsg;
struct msghdr msg;
struct iovec iov;
ssize_t cnt;
memset(&sin, 0, sizeof(sin));
sin.sin_family = AF_INET;
sin.sin_addr = mcast_addr;
sin.sin_port = htons(UDP_PORT);
iov.iov_base = buf;
iov.iov_len = len;
memset(&msg, 0, sizeof(msg));
msg.msg_name = &sin;
msg.msg_namelen = sizeof(sin);
msg.msg_iov = &iov;
msg.msg_iovlen = 1;
/*
* We specify the transmission time in the CMSG.
*/
if (use_so_txtime) {
msg.msg_control = u.buf;
msg.msg_controllen = sizeof(u.buf);
cmsg = CMSG_FIRSTHDR(&msg);
cmsg->cmsg_level = SOL_SOCKET;
cmsg->cmsg_type = SO_TXTIME;
cmsg->cmsg_len = CMSG_LEN(sizeof(__u64));
*((__u64 *) CMSG_DATA(cmsg)) = txtime;
}
cnt = sendmsg(fd, &msg, 0);
if (cnt < 1) {
pr_err("sendmsg failed: %m");
return cnt;
}
return cnt;
}
static unsigned char tx_buffer[256];
static int marker;
static int run_nanosleep(clockid_t clkid, int fd)
{
struct timespec ts;
int cnt, err;
__u64 txtime;
clock_gettime(clkid, &ts);
/* Start one to two seconds in the future. */
ts.tv_sec += 1;
ts.tv_nsec = 1000000000 - waketx_delay;
normalize(&ts);
txtime = ts.tv_sec * 1000000000ULL + ts.tv_nsec;
txtime += waketx_delay;
while (running) {
err = clock_nanosleep(clkid, TIMER_ABSTIME, &ts, NULL);
switch (err) {
case 0:
cnt = udp_send(fd, tx_buffer, sizeof(tx_buffer), txtime);
if (cnt != sizeof(tx_buffer)) {
pr_err("udp_send failed");
}
memset(tx_buffer, marker++, sizeof(tx_buffer));
ts.tv_nsec += period_nsec;
normalize(&ts);
txtime += period_nsec;
break;
case EINTR:
continue;
default:
fprintf(stderr, "clock_nanosleep returned %d: %s",
err, strerror(err));
return err;
}
}
return 0;
}
static int set_realtime(pthread_t thread, int priority, int cpu)
{
cpu_set_t cpuset;
struct sched_param sp;
int err, policy;
int min = sched_get_priority_min(SCHED_FIFO);
int max = sched_get_priority_max(SCHED_FIFO);
fprintf(stderr, "min %d max %d\n", min, max);
if (priority < 0) {
return 0;
}
err = pthread_getschedparam(thread, &policy, &sp);
if (err) {
fprintf(stderr, "pthread_getschedparam: %s\n", strerror(err));
return -1;
}
sp.sched_priority = priority;
err = pthread_setschedparam(thread, SCHED_FIFO, &sp);
if (err) {
fprintf(stderr, "pthread_setschedparam: %s\n", strerror(err));
return -1;
}
if (cpu < 0) {
return 0;
}
CPU_ZERO(&cpuset);
CPU_SET(cpu, &cpuset);
err = pthread_setaffinity_np(thread, sizeof(cpu_set_t), &cpuset);
if (err) {
fprintf(stderr, "pthread_setaffinity_np: %s\n", strerror(err));
return -1;
}
return 0;
}
static void usage(char *progname)
{
fprintf(stderr,
"\n"
"usage: %s [options]\n"
"\n"
" -c [num] run on CPU 'num'\n"
" -d [num] delay from wake up to transmission in nanoseconds (default %d)\n"
" -h prints this message and exits\n"
" -i [name] use network interface 'name'\n"
" -p [num] run with RT priorty 'num'\n"
" -P [num] period in nanoseconds (default %d)\n"
" -u do not use SO_TXTIME\n"
"\n",
progname, DEFAULT_DELAY, DEFAULT_PERIOD);
}
int main(int argc, char *argv[])
{
int c, cpu = -1, err, fd, priority = -1;
clockid_t clkid = CLOCK_TAI;
char *iface = NULL, *progname;
/* Process the command line arguments. */
progname = strrchr(argv[0], '/');
progname = progname ? 1 + progname : argv[0];
while (EOF != (c = getopt(argc, argv, "c:d:hi:p:P:u"))) {
switch (c) {
case 'c':
cpu = atoi(optarg);
break;
case 'd':
waketx_delay = atoi(optarg);
break;
case 'h':
usage(progname);
return 0;
case 'i':
iface = optarg;
break;
case 'p':
priority = atoi(optarg);
break;
case 'P':
period_nsec = atoi(optarg);
break;
case 'u':
use_so_txtime = 0;
break;
case '?':
usage(progname);
return -1;
}
}
if (waketx_delay > 999999999 || waketx_delay < 0) {
pr_err("Bad wake up to transmission delay.");
usage(progname);
return -1;
}
if (period_nsec < 1000) {
pr_err("Bad period.");
usage(progname);
return -1;
}
if (!iface) {
pr_err("Need a network interface.");
usage(progname);
return -1;
}
if (set_realtime(pthread_self(), priority, cpu)) {
return -1;
}
fd = udp_open(iface);
if (fd < 0) {
return -1;
}
err = run_nanosleep(clkid, fd);
close(fd);
return err;
}
^ permalink raw reply
* Re: Regression in throughput between kvm guests over virtual bridge
From: Jason Wang @ 2017-09-18 7:36 UTC (permalink / raw)
To: Matthew Rosato, netdev; +Cc: davem, mst
In-Reply-To: <55f9173b-a419-98f0-2516-cbd57299ba5d@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 4108 bytes --]
On 2017年09月18日 11:13, Jason Wang wrote:
>
>
> On 2017年09月16日 03:19, Matthew Rosato wrote:
>>> It looks like vhost is slowed down for some reason which leads to more
>>> idle time on 4.13+VHOST_RX_BATCH=1. Appreciated if you can collect the
>>> perf.diff on host, one for rx and one for tx.
>>>
>> perf data below for the associated vhost threads, baseline=4.12,
>> delta1=4.13, delta2=4.13+VHOST_RX_BATCH=1
>>
>> Client vhost:
>>
>> 60.12% -11.11% -12.34% [kernel.vmlinux] [k] raw_copy_from_user
>> 13.76% -1.28% -0.74% [kernel.vmlinux] [k] get_page_from_freelist
>> 2.00% +3.69% +3.54% [kernel.vmlinux] [k] __wake_up_sync_key
>> 1.19% +0.60% +0.66% [kernel.vmlinux] [k] __alloc_pages_nodemask
>> 1.12% +0.76% +0.86% [kernel.vmlinux] [k] copy_page_from_iter
>> 1.09% +0.28% +0.35% [vhost] [k] vhost_get_vq_desc
>> 1.07% +0.31% +0.26% [kernel.vmlinux] [k] alloc_skb_with_frags
>> 0.94% +0.42% +0.65% [kernel.vmlinux] [k] alloc_pages_current
>> 0.91% -0.19% -0.18% [kernel.vmlinux] [k] memcpy
>> 0.88% +0.26% +0.30% [kernel.vmlinux] [k] __next_zones_zonelist
>> 0.85% +0.05% +0.12% [kernel.vmlinux] [k] iov_iter_advance
>> 0.79% +0.09% +0.19% [vhost] [k] __vhost_add_used_n
>> 0.74% [kernel.vmlinux] [k] get_task_policy.part.7
>> 0.74% -0.01% -0.05% [kernel.vmlinux] [k] tun_net_xmit
>> 0.60% +0.17% +0.33% [kernel.vmlinux] [k] policy_nodemask
>> 0.58% -0.15% -0.12% [ebtables] [k] ebt_do_table
>> 0.52% -0.25% -0.22% [kernel.vmlinux] [k] __alloc_skb
>> ...
>> 0.42% +0.58% +0.59% [kernel.vmlinux] [k] eventfd_signal
>> ...
>> 0.32% +0.96% +0.93% [kernel.vmlinux] [k] finish_task_switch
>> ...
>> +1.50% +1.16% [kernel.vmlinux] [k] get_task_policy.part.9
>> +0.40% +0.42% [kernel.vmlinux] [k] __skb_get_hash_symmetr
>> +0.39% +0.40% [kernel.vmlinux] [k] _copy_from_iter_full
>> +0.24% +0.23% [vhost_net] [k] vhost_net_buf_peek
>>
>> Server vhost:
>>
>> 61.93% -10.72% -10.91% [kernel.vmlinux] [k] raw_copy_to_user
>> 9.25% +0.47% +0.86% [kernel.vmlinux] [k] free_hot_cold_page
>> 5.16% +1.41% +1.57% [vhost] [k] vhost_get_vq_desc
>> 5.12% -3.81% -3.78% [kernel.vmlinux] [k] skb_release_data
>> 3.30% +0.42% +0.55% [kernel.vmlinux] [k] raw_copy_from_user
>> 1.29% +2.20% +2.28% [kernel.vmlinux] [k] copy_page_to_iter
>> 1.24% +1.65% +0.45% [vhost_net] [k] handle_rx
>> 1.08% +3.03% +2.85% [kernel.vmlinux] [k] __wake_up_sync_key
>> 0.96% +0.70% +1.10% [vhost] [k] translate_desc
>> 0.69% -0.20% -0.22% [kernel.vmlinux] [k] tun_do_read.part.10
>> 0.69% [kernel.vmlinux] [k] tun_peek_len
>> 0.67% +0.75% +0.78% [kernel.vmlinux] [k] eventfd_signal
>> 0.52% +0.96% +0.98% [kernel.vmlinux] [k] finish_task_switch
>> 0.50% +0.05% +0.09% [vhost] [k] vhost_add_used_n
>> ...
>> +0.63% +0.58% [vhost_net] [k] vhost_net_buf_peek
>> +0.32% +0.32% [kernel.vmlinux] [k] _copy_to_iter
>> +0.19% +0.19% [kernel.vmlinux] [k] __skb_get_hash_symmetr
>> +0.11% +0.21% [vhost] [k] vhost_umem_interval_tr
>>
>
> Looks like for some unknown reason which leads more wakeups.
>
> Could you please try to attached patch to see if it solves or mitigate
> the issue?
>
> Thanks
My bad, please try this.
Thanks
[-- Attachment #2: 0001-vhost_net-conditionally-enable-tx-polling.patch --]
[-- Type: text/x-patch, Size: 898 bytes --]
>From 8be3edfcd415ba6157ab34d250127c6f2b21ff5d Mon Sep 17 00:00:00 2001
From: Jason Wang <jasowang@redhat.com>
Date: Mon, 18 Sep 2017 10:56:30 +0800
Subject: [PATCH] vhost_net: conditionally enable tx polling
Signed-off-by: Jason Wang <jasowang@redhat.com>
---
drivers/vhost/net.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/vhost/net.c b/drivers/vhost/net.c
index 58585ec..2b308e0 100644
--- a/drivers/vhost/net.c
+++ b/drivers/vhost/net.c
@@ -471,6 +471,7 @@ static void handle_tx(struct vhost_net *net)
goto out;
vhost_disable_notify(&net->dev, vq);
+ vhost_net_disable_vq(net, vq);
hdr_size = nvq->vhost_hlen;
zcopy = nvq->ubufs;
@@ -562,6 +563,8 @@ static void handle_tx(struct vhost_net *net)
% UIO_MAXIOV;
}
vhost_discard_vq_desc(vq, 1);
+ if (err == -EAGAIN)
+ vhost_net_enable_vq(net, vq);
break;
}
if (err != len)
--
2.7.4
^ permalink raw reply related
* [PATCH v2 ethtool] ethtool: Remove UDP Fragmentation Offload error prints
From: Tariq Toukan @ 2017-09-18 7:35 UTC (permalink / raw)
To: John W. Linville
Cc: netdev, Eran Ben Elisha, Michal Kubecek, Eric Dumazet,
David S. Miller, Shaker Daibes, Tariq Toukan
From: Shaker Daibes <shakerd@mellanox.com>
UFO was removed in kernel, here we remove UFO error prints when using
"ethtool -k" command.
Fixes the following issue:
Features for ens8:
Cannot get device udp-fragmentation-offload settings: Operation not
supported
Signed-off-by: Shaker Daibes <shakerd@mellanox.com>
Signed-off-by: Tariq Toukan <tariqt@mellanox.com>
---
ethtool.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/ethtool.c b/ethtool.c
index ad18704e7c5f..aeeef65e7ef3 100644
--- a/ethtool.c
+++ b/ethtool.c
@@ -2186,6 +2186,10 @@ get_features(struct cmd_context *ctx, const struct feature_defs *defs)
eval.cmd = off_flag_def[i].get_cmd;
err = send_ioctl(ctx, &eval);
if (err) {
+ if (errno == EOPNOTSUPP &&
+ off_flag_def[i].get_cmd == ETHTOOL_GUFO)
+ continue;
+
fprintf(stderr,
"Cannot get device %s settings: %m\n",
off_flag_def[i].long_name);
--
1.8.3.1
^ permalink raw reply related
* Re: Page allocator bottleneck
From: Aaron Lu @ 2017-09-18 7:34 UTC (permalink / raw)
To: Tariq Toukan
Cc: Jesper Dangaard Brouer, David Miller, Mel Gorman, Eric Dumazet,
Alexei Starovoitov, Saeed Mahameed, Eran Ben Elisha,
Linux Kernel Network Developers, Andrew Morton, Michal Hocko,
linux-mm, Dave Hansen
In-Reply-To: <6069fd36-ed0e-145c-3134-35232bf951a7@mellanox.com>
[-- Attachment #1: Type: text/plain, Size: 1563 bytes --]
On Sun, Sep 17, 2017 at 07:16:15PM +0300, Tariq Toukan wrote:
>
> It's nice to have the option to dynamically play with the parameter.
> But maybe we should also think of changing the default fraction guaranteed
> to the PCP, so that unaware admins of networking servers would also benefit.
I collected some performance data with will-it-scale/page_fault1 process
mode on different machines with different pcp->batch sizes, starting
from the default 31(calculated by zone_batchsize(), 31 is the standard
value for any zone that has more than 1/2MiB memory), then incremented
by 31 upwards till 527. PCP's upper limit is 6*batch.
An image is plotted and attached: batch_full.png(full here means the
number of process started equals to CPU number).
>From the image:
- For EX machines, they all see throughput increase with increased batch
size and peaked at around batch_size=310, then fall;
- For EP machines, Haswell-EP and Broadwell-EP also see throughput
increase with increased batch size and peaked at batch_size=279, then
fall, batch_size=310 also delivers pretty good result. Skylake-EP is
quite different in that it doesn't see any obvious throughput increase
after batch_size=93, though the trend is still increasing, but in a very
small way and finally peaked at batch_size=403, then fall.
Ivybridge EP behaves much like desktop ones.
- For Desktop machines, they do not see any obvious changes with
increased batch_size.
So the default batch size(31) doesn't deliver good enough result, we
probbaly should change the default value.
[-- Attachment #2: batch_full.png --]
[-- Type: image/png, Size: 25626 bytes --]
^ permalink raw reply
* Re: [PATCH net-next v9] openvswitch: enable NSH support
From: Yang, Yi @ 2017-09-18 7:14 UTC (permalink / raw)
To: Jiri Benc
Cc: dev-yBygre7rU0TnMu66kgdUjQ@public.gmane.org,
netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, e@erig.me,
davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org
In-Reply-To: <20170914110902.2a45f637@griffin>
On Thu, Sep 14, 2017 at 05:09:02PM +0800, Jiri Benc wrote:
> On Thu, 14 Sep 2017 16:37:59 +0800, Yi Yang wrote:
> > OVS master and 2.8 branch has merged NSH userspace
> > patch series, this patch is to enable NSH support
> > in kernel data path in order that OVS can support
> > NSH in compat mode by porting this.
>
> http://vger.kernel.org/~davem/net-next.html
I see it has been open now, v9 this patch series is still ok to
current net-next without any hunk, so please help review v9, thanks a
lot.
^ permalink raw reply
* Re: scheduling while atomic from vmci_transport_recv_stream_cb in 3.16 kernels
From: Michal Hocko @ 2017-09-18 6:11 UTC (permalink / raw)
To: Ben Hutchings
Cc: Jorgen S. Hansen, Aditya Sarwade, Thomas Hellstrom, LKML,
netdev@vger.kernel.org, Masik Petr, Sasha Levin, Stable tree
In-Reply-To: <1505495535.2825.41.camel@decadent.org.uk>
On Fri 15-09-17 18:12:15, Ben Hutchings wrote:
> On Thu, 2017-09-14 at 10:59 +0200, Michal Hocko wrote:
> > On Wed 13-09-17 18:58:13, Jorgen S. Hansen wrote:
> > [...]
> > > The patch series look good to me.
> >
> > Thanks for double checking. Ben, could you merge this to 3.16 stable
> > branch, please?
>
> I have a long list of requests to work through, but I will get to this
> eventually.
Thanks!
--
Michal Hocko
SUSE Labs
^ permalink raw reply
* [PATCH net-next] net: remove useless comments in dst.c
From: Duan Jiong @ 2017-09-18 6:00 UTC (permalink / raw)
To: netdev; +Cc: weiwan
dst gc related code has been removed in commit
5b7c9a8ff828, so those comments are no longer
useful.
Signed-off-by: Duan Jiong <jduan@fiberhome.com>
---
net/core/dst.c | 17 -----------------
1 file changed, 17 deletions(-)
diff --git a/net/core/dst.c b/net/core/dst.c
index a6c47da..a710d39 100644
--- a/net/core/dst.c
+++ b/net/core/dst.c
@@ -25,23 +25,6 @@
#include <net/dst.h>
#include <net/dst_metadata.h>
-/*
- * Theory of operations:
- * 1) We use a list, protected by a spinlock, to add
- * new entries from both BH and non-BH context.
- * 2) In order to keep spinlock held for a small delay,
- * we use a second list where are stored long lived
- * entries, that are handled by the garbage collect thread
- * fired by a workqueue.
- * 3) This list is guarded by a mutex,
- * so that the gc_task and dst_dev_event() can be synchronized.
- */
-
-/*
- * We want to keep lock & list close together
- * to dirty as few cache lines as possible in __dst_free().
- * As this is not a very strong hint, we dont force an alignment on SMP.
- */
int dst_discard_out(struct net *net, struct sock *sk, struct sk_buff *skb)
{
kfree_skb(skb);
--
2.9.3
^ permalink raw reply related
* Re: [PATCH] bnx2x: drop packets where gso_size is too big for hardware
From: Daniel Axtens @ 2017-09-18 4:41 UTC (permalink / raw)
To: Eric Dumazet
Cc: netdev, tlfalcon, Yuval.Mintz, ariel.elior, everest-linux-l2,
jay.vosburgh
In-Reply-To: <1504159341.15310.6.camel@edumazet-glaptop3.roam.corp.google.com>
Hi Eric,
>> + if (unlikely(skb_shinfo(skb)->gso_size + hlen > MAX_PACKET_SIZE)) {
>> + BNX2X_ERR("reported gso segment size plus headers "
>> + "(%d + %d) > MAX_PACKET_SIZE; dropping pkt!",
>> + skb_shinfo(skb)->gso_size, hlen);
>> +
>> + goto free_and_drop;
>> + }
>> +
>
>
> If you had this test in bnx2x_features_check(), packet could be
> segmented by core networking stack before reaching bnx2x_start_xmit() by
> clearing NETIF_F_GSO_MASK
>
> -> No drop would be involved.
>
> check i40evf_features_check() for similar logic.
So I've been experimenting with this and reading through the core
networking code. If my understanding is correct, disabling GSO will
cause the packet to be segmented, but it will be segemented into
gso_size+header length packets. So in this case (~10kB gso_size) the
resultant packets will still be too big - although at least they don't
cause a crash in that case.
We could continue with this anyway as it at least prevents the crash -
but, and I haven't been able to find a nice definitive answer to this -
are implementations of ndo_start_xmit permitted to assume that the the
skb passed in will fit within the MTU? I notice that most callers will
attempt to ensure this - for example ip_output.c, ip6_output.c and
ip_forward.c all contain calls to skb_gso_validate_mtu(). If
implementations are permitted to assume this, perhaps a fix to
openvswitch would be more appropriate?
Regards,
Daniel
^ permalink raw reply
* Re: [PATCH] vhost_net: conditionally enable tx polling
From: kbuild test robot @ 2017-09-18 4:14 UTC (permalink / raw)
To: Jason Wang; +Cc: kbuild-all, Matthew Rosato, netdev, davem, mst
In-Reply-To: <55f9173b-a419-98f0-2516-cbd57299ba5d@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 5778 bytes --]
Hi Jason,
[auto build test WARNING on vhost/linux-next]
[also build test WARNING on v4.14-rc1 next-20170915]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
url: https://github.com/0day-ci/linux/commits/Jason-Wang/vhost_net-conditionally-enable-tx-polling/20170918-112041
base: https://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git linux-next
config: x86_64-randconfig-x009-201738 (attached as .config)
compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901
reproduce:
# save the attached .config to linux build tree
make ARCH=x86_64
All warnings (new ones prefixed by >>):
drivers//vhost/net.c: In function 'handle_tx':
>> drivers//vhost/net.c:565:4: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
if (err = -EAGAIN)
^~
vim +565 drivers//vhost/net.c
442
443 /* Expects to be always run from workqueue - which acts as
444 * read-size critical section for our kind of RCU. */
445 static void handle_tx(struct vhost_net *net)
446 {
447 struct vhost_net_virtqueue *nvq = &net->vqs[VHOST_NET_VQ_TX];
448 struct vhost_virtqueue *vq = &nvq->vq;
449 unsigned out, in;
450 int head;
451 struct msghdr msg = {
452 .msg_name = NULL,
453 .msg_namelen = 0,
454 .msg_control = NULL,
455 .msg_controllen = 0,
456 .msg_flags = MSG_DONTWAIT,
457 };
458 size_t len, total_len = 0;
459 int err;
460 size_t hdr_size;
461 struct socket *sock;
462 struct vhost_net_ubuf_ref *uninitialized_var(ubufs);
463 bool zcopy, zcopy_used;
464
465 mutex_lock(&vq->mutex);
466 sock = vq->private_data;
467 if (!sock)
468 goto out;
469
470 if (!vq_iotlb_prefetch(vq))
471 goto out;
472
473 vhost_disable_notify(&net->dev, vq);
474 vhost_net_disable_vq(net, vq);
475
476 hdr_size = nvq->vhost_hlen;
477 zcopy = nvq->ubufs;
478
479 for (;;) {
480 /* Release DMAs done buffers first */
481 if (zcopy)
482 vhost_zerocopy_signal_used(net, vq);
483
484 /* If more outstanding DMAs, queue the work.
485 * Handle upend_idx wrap around
486 */
487 if (unlikely(vhost_exceeds_maxpend(net)))
488 break;
489
490 head = vhost_net_tx_get_vq_desc(net, vq, vq->iov,
491 ARRAY_SIZE(vq->iov),
492 &out, &in);
493 /* On error, stop handling until the next kick. */
494 if (unlikely(head < 0))
495 break;
496 /* Nothing new? Wait for eventfd to tell us they refilled. */
497 if (head == vq->num) {
498 if (unlikely(vhost_enable_notify(&net->dev, vq))) {
499 vhost_disable_notify(&net->dev, vq);
500 continue;
501 }
502 break;
503 }
504 if (in) {
505 vq_err(vq, "Unexpected descriptor format for TX: "
506 "out %d, int %d\n", out, in);
507 break;
508 }
509 /* Skip header. TODO: support TSO. */
510 len = iov_length(vq->iov, out);
511 iov_iter_init(&msg.msg_iter, WRITE, vq->iov, out, len);
512 iov_iter_advance(&msg.msg_iter, hdr_size);
513 /* Sanity check */
514 if (!msg_data_left(&msg)) {
515 vq_err(vq, "Unexpected header len for TX: "
516 "%zd expected %zd\n",
517 len, hdr_size);
518 break;
519 }
520 len = msg_data_left(&msg);
521
522 zcopy_used = zcopy && len >= VHOST_GOODCOPY_LEN
523 && (nvq->upend_idx + 1) % UIO_MAXIOV !=
524 nvq->done_idx
525 && vhost_net_tx_select_zcopy(net);
526
527 /* use msg_control to pass vhost zerocopy ubuf info to skb */
528 if (zcopy_used) {
529 struct ubuf_info *ubuf;
530 ubuf = nvq->ubuf_info + nvq->upend_idx;
531
532 vq->heads[nvq->upend_idx].id = cpu_to_vhost32(vq, head);
533 vq->heads[nvq->upend_idx].len = VHOST_DMA_IN_PROGRESS;
534 ubuf->callback = vhost_zerocopy_callback;
535 ubuf->ctx = nvq->ubufs;
536 ubuf->desc = nvq->upend_idx;
537 msg.msg_control = ubuf;
538 msg.msg_controllen = sizeof(ubuf);
539 ubufs = nvq->ubufs;
540 atomic_inc(&ubufs->refcount);
541 nvq->upend_idx = (nvq->upend_idx + 1) % UIO_MAXIOV;
542 } else {
543 msg.msg_control = NULL;
544 ubufs = NULL;
545 }
546
547 total_len += len;
548 if (total_len < VHOST_NET_WEIGHT &&
549 !vhost_vq_avail_empty(&net->dev, vq) &&
550 likely(!vhost_exceeds_maxpend(net))) {
551 msg.msg_flags |= MSG_MORE;
552 } else {
553 msg.msg_flags &= ~MSG_MORE;
554 }
555
556 /* TODO: Check specific error and bomb out unless ENOBUFS? */
557 err = sock->ops->sendmsg(sock, &msg, len);
558 if (unlikely(err < 0)) {
559 if (zcopy_used) {
560 vhost_net_ubuf_put(ubufs);
561 nvq->upend_idx = ((unsigned)nvq->upend_idx - 1)
562 % UIO_MAXIOV;
563 }
564 vhost_discard_vq_desc(vq, 1);
> 565 if (err = -EAGAIN)
566 vhost_net_enable_vq(net, vq);
567 break;
568 }
569 if (err != len)
570 pr_debug("Truncated TX packet: "
571 " len %d != %zd\n", err, len);
572 if (!zcopy_used)
573 vhost_add_used_and_signal(&net->dev, vq, head, 0);
574 else
575 vhost_zerocopy_signal_used(net, vq);
576 vhost_net_tx_packet(net);
577 if (unlikely(total_len >= VHOST_NET_WEIGHT)) {
578 vhost_poll_queue(&vq->poll);
579 break;
580 }
581 }
582 out:
583 mutex_unlock(&vq->mutex);
584 }
585
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 31832 bytes --]
^ permalink raw reply
* Re: [RFC PATCH] can: m_can: Support higher speed CAN-FD bitrates
From: Yang, Wenyou @ 2017-09-18 3:47 UTC (permalink / raw)
To: Sekhar Nori, Franklin S Cooper Jr, wg, mkl, mario.huettel,
socketcan, quentin.schulz, edumazet, linux-can, netdev,
linux-kernel
Cc: Wenyou Yang, Dong Aisheng
In-Reply-To: <a7e301a7-bc54-c348-bdb1-b6a0af41665f@ti.com>
On 2017/9/14 13:06, Sekhar Nori wrote:
> On Thursday 14 September 2017 03:28 AM, Franklin S Cooper Jr wrote:
>>
>> On 08/18/2017 02:39 PM, Franklin S Cooper Jr wrote:
>>> During test transmitting using CAN-FD at high bitrates (4 Mbps) only
>>> resulted in errors. Scoping the signals I noticed that only a single bit
>>> was being transmitted and with a bit more investigation realized the actual
>>> MCAN IP would go back to initialization mode automatically.
>>>
>>> It appears this issue is due to the MCAN needing to use the Transmitter
>>> Delay Compensation Mode as defined in the MCAN User's Guide. When this
>>> mode is used the User's Guide indicates that the Transmitter Delay
>>> Compensation Offset register should be set. The document mentions that this
>>> register should be set to (1/dbitrate)/2*(Func Clk Freq).
>>>
>>> Additional CAN-CIA's "Bit Time Requirements for CAN FD" document indicates
>>> that this TDC mode is only needed for data bit rates above 2.5 Mbps.
>>> Therefore, only enable this mode and only set TDCO when the data bit rate
>>> is above 2.5 Mbps.
>>>
>>> Signed-off-by: Franklin S Cooper Jr <fcooper@ti.com>
>>> ---
>>> I'm pretty surprised that this hasn't been implemented already since
>>> the primary purpose of CAN-FD is to go beyond 1 Mbps and the MCAN IP
>>> supports up to 10 Mbps.
>>>
>>> So it will be nice to get comments from users of this driver to understand
>>> if they have been able to use CAN-FD beyond 2.5 Mbps without this patch.
>>> If they haven't what did they do to get around it if they needed higher
>>> speeds.
>>>
>>> Meanwhile I plan on testing this using a more "realistic" CAN bus to insure
>>> everything still works at 5 Mbps which is the max speed of my CAN
>>> transceiver.
>> ping. Anyone has any thoughts on this?
> I added Dong who authored the m_can driver and Wenyou who added the only
> in-kernel user of the driver for any help.
I tested it on SAMA5D2 Xplained board both with and without this patch,
both work with the 4M bps data bit rate.
>
> Thanks,
> Sekhar
>
>>> drivers/net/can/m_can/m_can.c | 24 +++++++++++++++++++++++-
>>> 1 file changed, 23 insertions(+), 1 deletion(-)
>>>
>>> diff --git a/drivers/net/can/m_can/m_can.c b/drivers/net/can/m_can/m_can.c
>>> index f4947a7..720e073 100644
>>> --- a/drivers/net/can/m_can/m_can.c
>>> +++ b/drivers/net/can/m_can/m_can.c
>>> @@ -126,6 +126,12 @@ enum m_can_mram_cfg {
>>> #define DBTP_DSJW_SHIFT 0
>>> #define DBTP_DSJW_MASK (0xf << DBTP_DSJW_SHIFT)
>>>
>>> +/* Transmitter Delay Compensation Register (TDCR) */
>>> +#define TDCR_TDCO_SHIFT 8
>>> +#define TDCR_TDCO_MASK (0x7F << TDCR_TDCO_SHIFT)
>>> +#define TDCR_TDCF_SHIFT 0
>>> +#define TDCR_TDCF_MASK (0x7F << TDCR_TDCO_SHIFT)
>>> +
>>> /* Test Register (TEST) */
>>> #define TEST_LBCK BIT(4)
>>>
>>> @@ -977,6 +983,8 @@ static int m_can_set_bittiming(struct net_device *dev)
>>> const struct can_bittiming *dbt = &priv->can.data_bittiming;
>>> u16 brp, sjw, tseg1, tseg2;
>>> u32 reg_btp;
>>> + u32 enable_tdc = 0;
>>> + u32 tdco;
>>>
>>> brp = bt->brp - 1;
>>> sjw = bt->sjw - 1;
>>> @@ -991,9 +999,23 @@ static int m_can_set_bittiming(struct net_device *dev)
>>> sjw = dbt->sjw - 1;
>>> tseg1 = dbt->prop_seg + dbt->phase_seg1 - 1;
>>> tseg2 = dbt->phase_seg2 - 1;
>>> +
>>> + /* TDC is only needed for bitrates beyond 2.5 MBit/s
>>> + * Specified in the "Bit Time Requirements for CAN FD" document
>>> + */
>>> + if (dbt->bitrate > 2500000) {
>>> + enable_tdc = DBTP_TDC;
>>> + /* Equation based on Bosch's M_CAN User Manual's
>>> + * Transmitter Delay Compensation Section
>>> + */
>>> + tdco = priv->can.clock.freq / (dbt->bitrate * 2);
>>> + m_can_write(priv, M_CAN_TDCR, tdco << TDCR_TDCO_SHIFT);
>>> + }
>>> +
>>> reg_btp = (brp << DBTP_DBRP_SHIFT) | (sjw << DBTP_DSJW_SHIFT) |
>>> (tseg1 << DBTP_DTSEG1_SHIFT) |
>>> - (tseg2 << DBTP_DTSEG2_SHIFT);
>>> + (tseg2 << DBTP_DTSEG2_SHIFT) | enable_tdc;
>>> +
>>> m_can_write(priv, M_CAN_DBTP, reg_btp);
>>> }
>>>
>>>
Regards,
Wenyou Yang
^ permalink raw reply
* Re: Regression in throughput between kvm guests over virtual bridge
From: Jason Wang @ 2017-09-18 3:13 UTC (permalink / raw)
To: Matthew Rosato, netdev; +Cc: davem, mst
In-Reply-To: <7345a69d-5e47-7058-c72b-bdd0f3c69210@linux.vnet.ibm.com>
[-- Attachment #1: Type: text/plain, Size: 3468 bytes --]
On 2017年09月16日 03:19, Matthew Rosato wrote:
>> It looks like vhost is slowed down for some reason which leads to more
>> idle time on 4.13+VHOST_RX_BATCH=1. Appreciated if you can collect the
>> perf.diff on host, one for rx and one for tx.
>>
> perf data below for the associated vhost threads, baseline=4.12,
> delta1=4.13, delta2=4.13+VHOST_RX_BATCH=1
>
> Client vhost:
>
> 60.12% -11.11% -12.34% [kernel.vmlinux] [k] raw_copy_from_user
> 13.76% -1.28% -0.74% [kernel.vmlinux] [k] get_page_from_freelist
> 2.00% +3.69% +3.54% [kernel.vmlinux] [k] __wake_up_sync_key
> 1.19% +0.60% +0.66% [kernel.vmlinux] [k] __alloc_pages_nodemask
> 1.12% +0.76% +0.86% [kernel.vmlinux] [k] copy_page_from_iter
> 1.09% +0.28% +0.35% [vhost] [k] vhost_get_vq_desc
> 1.07% +0.31% +0.26% [kernel.vmlinux] [k] alloc_skb_with_frags
> 0.94% +0.42% +0.65% [kernel.vmlinux] [k] alloc_pages_current
> 0.91% -0.19% -0.18% [kernel.vmlinux] [k] memcpy
> 0.88% +0.26% +0.30% [kernel.vmlinux] [k] __next_zones_zonelist
> 0.85% +0.05% +0.12% [kernel.vmlinux] [k] iov_iter_advance
> 0.79% +0.09% +0.19% [vhost] [k] __vhost_add_used_n
> 0.74% [kernel.vmlinux] [k] get_task_policy.part.7
> 0.74% -0.01% -0.05% [kernel.vmlinux] [k] tun_net_xmit
> 0.60% +0.17% +0.33% [kernel.vmlinux] [k] policy_nodemask
> 0.58% -0.15% -0.12% [ebtables] [k] ebt_do_table
> 0.52% -0.25% -0.22% [kernel.vmlinux] [k] __alloc_skb
> ...
> 0.42% +0.58% +0.59% [kernel.vmlinux] [k] eventfd_signal
> ...
> 0.32% +0.96% +0.93% [kernel.vmlinux] [k] finish_task_switch
> ...
> +1.50% +1.16% [kernel.vmlinux] [k] get_task_policy.part.9
> +0.40% +0.42% [kernel.vmlinux] [k] __skb_get_hash_symmetr
> +0.39% +0.40% [kernel.vmlinux] [k] _copy_from_iter_full
> +0.24% +0.23% [vhost_net] [k] vhost_net_buf_peek
>
> Server vhost:
>
> 61.93% -10.72% -10.91% [kernel.vmlinux] [k] raw_copy_to_user
> 9.25% +0.47% +0.86% [kernel.vmlinux] [k] free_hot_cold_page
> 5.16% +1.41% +1.57% [vhost] [k] vhost_get_vq_desc
> 5.12% -3.81% -3.78% [kernel.vmlinux] [k] skb_release_data
> 3.30% +0.42% +0.55% [kernel.vmlinux] [k] raw_copy_from_user
> 1.29% +2.20% +2.28% [kernel.vmlinux] [k] copy_page_to_iter
> 1.24% +1.65% +0.45% [vhost_net] [k] handle_rx
> 1.08% +3.03% +2.85% [kernel.vmlinux] [k] __wake_up_sync_key
> 0.96% +0.70% +1.10% [vhost] [k] translate_desc
> 0.69% -0.20% -0.22% [kernel.vmlinux] [k] tun_do_read.part.10
> 0.69% [kernel.vmlinux] [k] tun_peek_len
> 0.67% +0.75% +0.78% [kernel.vmlinux] [k] eventfd_signal
> 0.52% +0.96% +0.98% [kernel.vmlinux] [k] finish_task_switch
> 0.50% +0.05% +0.09% [vhost] [k] vhost_add_used_n
> ...
> +0.63% +0.58% [vhost_net] [k] vhost_net_buf_peek
> +0.32% +0.32% [kernel.vmlinux] [k] _copy_to_iter
> +0.19% +0.19% [kernel.vmlinux] [k] __skb_get_hash_symmetr
> +0.11% +0.21% [vhost] [k] vhost_umem_interval_tr
>
Looks like for some unknown reason which leads more wakeups.
Could you please try to attached patch to see if it solves or mitigate
the issue?
Thanks
[-- Attachment #2: 0001-vhost_net-conditionally-enable-tx-polling.patch --]
[-- Type: text/x-patch, Size: 899 bytes --]
>From 63b276ed881c1e2a89b7ea35b6f328f70ddd6185 Mon Sep 17 00:00:00 2001
From: Jason Wang <jasowang@redhat.com>
Date: Mon, 18 Sep 2017 10:56:30 +0800
Subject: [PATCH] vhost_net: conditionally enable tx polling
Signed-off-by: Jason Wang <jasowang@redhat.com>
---
drivers/vhost/net.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/vhost/net.c b/drivers/vhost/net.c
index 58585ec..397d86a 100644
--- a/drivers/vhost/net.c
+++ b/drivers/vhost/net.c
@@ -471,6 +471,7 @@ static void handle_tx(struct vhost_net *net)
goto out;
vhost_disable_notify(&net->dev, vq);
+ vhost_net_disable_vq(net, vq);
hdr_size = nvq->vhost_hlen;
zcopy = nvq->ubufs;
@@ -562,6 +563,8 @@ static void handle_tx(struct vhost_net *net)
% UIO_MAXIOV;
}
vhost_discard_vq_desc(vq, 1);
+ if (err = -EAGAIN)
+ vhost_net_enable_vq(net, vq);
break;
}
if (err != len)
--
1.8.3.1
^ permalink raw reply related
* Re: [PATCH V2] tipc: Use bsearch library function
From: Joe Perches @ 2017-09-17 21:15 UTC (permalink / raw)
To: Jon Maloy, Thomas Meyer
Cc: Ying Xue, netdev@vger.kernel.org,
tipc-discussion@lists.sourceforge.net,
linux-kernel@vger.kernel.org, davem@davemloft.net
In-Reply-To: <DB5PR0701MB195892D3D60DAB5D7C1109AE9A620@DB5PR0701MB1958.eurprd07.prod.outlook.com>
On Sun, 2017-09-17 at 16:27 +0000, Jon Maloy wrote:
> > -----Original Message-----
> > From: Thomas Meyer [mailto:thomas@m3y3r.de]
[]
> > What about the other binary search implementation in the same file? Should
> > I try to convert it it will it get NAKed for performance reasons too?
>
> The searches for inserting and removing publications is less time critical,
> so that would be ok with me.
> If you have any more general interest in improving the code in this file
> (which is needed) it would also be appreciated.
Perhaps using an rbtree would be an improvement.
^ permalink raw reply
* Re: [PATCH net-next v2 0/7] korina: performance fixes and cleanup
From: Florian Fainelli @ 2017-09-17 20:09 UTC (permalink / raw)
To: Roman Yeryomin, netdev
In-Reply-To: <20170917172353.32225-1-roman@advem.lv>
On 09/17/2017 10:23 AM, Roman Yeryomin wrote:
> Changes from v1:
> - use GRO instead of increasing ring size
> - use NAPI_POLL_WEIGHT instead of defining own NAPI_WEIGHT
> - optimize rx descriptor flags processing
net-next is closed at the moment, but these look like reasonable
changes, I would just replace patch 7 with a patch that entirely drops
the driver specific version since that does not serve any purpose in the
context of an in-kernel driver.
Some nice clean-ups that you should also consider for future changes:
- reduce the duplication of tests/conditions in korina_send_packet(), a
lot of them are testing for the same things and setting the same
descriptor bits
- move korina_tx() to a NAPI context instead of working from hard
interrupt context
- get rid of the MIPS dma_cache_* calls and instead properly use the
DMA-API to allocate descriptors and invalidate/write-back skb->data
>
> Roman Yeryomin (7):
> net: korina: don't use overflow and underflow interrupts
> net: korina: optimize rx descriptor flags processing
> net: korina: use NAPI_POLL_WEIGHT
> net: korina: use GRO
> net: korina: whitespace cleanup
> net: korina: update authors
> net: korina: bump version
>
> drivers/net/ethernet/korina.c | 230 ++++++++++++++----------------------------
> 1 file changed, 78 insertions(+), 152 deletions(-)
>
--
Florian
^ permalink raw reply
* Re: [PATCH net-next v2 7/7] net: korina: bump version
From: Florian Fainelli @ 2017-09-17 20:01 UTC (permalink / raw)
To: Roman Yeryomin, netdev
In-Reply-To: <20170917172521.32639-1-roman@advem.lv>
On 09/17/2017 10:25 AM, Roman Yeryomin wrote:
> Signed-off-by: Roman Yeryomin <roman@advem.lv>
You can probably drop the version because it does not really make much
sense for an in-kernel driver anyway.
--
Florian
^ permalink raw reply
* Re: [REGRESSION] Warning in tcp_fastretrans_alert() of net/ipv4/tcp_input.c
From: Oleksandr Natalenko @ 2017-09-17 18:43 UTC (permalink / raw)
To: Neal Cardwell
Cc: David S. Miller, Alexey Kuznetsov, Hideaki YOSHIFUJI, Netdev,
Yuchung Cheng
In-Reply-To: <12759907.teKvueDKTR@natalenko.name>
Hi.
Just to note that it looks like disabling RACK and re-enabling FACK prevents
warning from happening:
net.ipv4.tcp_fack = 1
net.ipv4.tcp_recovery = 0
Hope I get semantics of these tunables right.
On pátek 15. září 2017 21:04:36 CEST Oleksandr Natalenko wrote:
> Hello.
>
> With net.ipv4.tcp_fack set to 0 the warning still appears:
>
> ===
> » sysctl net.ipv4.tcp_fack
> net.ipv4.tcp_fack = 0
>
> » LC_TIME=C dmesg -T | grep WARNING
> [Fri Sep 15 20:40:30 2017] WARNING: CPU: 1 PID: 711 at net/ipv4/tcp_input.c:
> 2826 tcp_fastretrans_alert+0x7c8/0x990
> [Fri Sep 15 20:40:30 2017] WARNING: CPU: 0 PID: 711 at net/ipv4/tcp_input.c:
> 2826 tcp_fastretrans_alert+0x7c8/0x990
> [Fri Sep 15 20:48:37 2017] WARNING: CPU: 1 PID: 711 at net/ipv4/tcp_input.c:
> 2826 tcp_fastretrans_alert+0x7c8/0x990
> [Fri Sep 15 20:48:55 2017] WARNING: CPU: 0 PID: 711 at net/ipv4/tcp_input.c:
> 2826 tcp_fastretrans_alert+0x7c8/0x990
>
> » ps -up 711
> USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
> root 711 4.3 0.0 0 0 ? S 18:12 7:23 [irq/123-
> enp3s0]
> ===
>
> Any suggestions?
>
> On pátek 15. září 2017 16:03:00 CEST Neal Cardwell wrote:
> > Thanks for testing that. That is a very useful data point.
> >
> > I was able to cook up a packetdrill test that could put the connection
> > in CA_Disorder with retransmitted packets out, but not in CA_Open. So
> > we do not yet have a test case to reproduce this.
> >
> > We do not see this warning on our fleet at Google. One significant
> > difference I see between our environment and yours is that it seems
> >
> > you run with FACK enabled:
> > net.ipv4.tcp_fack = 1
> >
> > Note that FACK was disabled by default (since it was replaced by RACK)
> > between kernel v4.10 and v4.11. And this is exactly the time when this
> > bug started manifesting itself for you and some others, but not our
> > fleet. So my new working hypothesis would be that this warning is due
> > to a behavior that only shows up in kernels >=4.11 when FACK is
> > enabled.
> >
> > Would you be able to disable FACK ("sysctl net.ipv4.tcp_fack=0" at
> > boot, or net.ipv4.tcp_fack=0 in /etc/sysctl.conf, or equivalent),
> > reboot, and test the kernel for a few days to see if the warning still
> > pops up?
> >
> > thanks,
> > neal
> >
> > [ps: apologies for the previous, mis-formatted post...]
^ permalink raw reply
* Re: [PATCH] hamradio: baycom: use new parport device model
From: Thomas Sailer @ 2017-09-17 18:20 UTC (permalink / raw)
To: Sudip Mukherjee, David S. Miller; +Cc: linux-kernel, linux-hams, netdev
In-Reply-To: <1505648780-4385-1-git-send-email-sudipm.mukherjee@gmail.com>
Acked-By: Thomas Sailer <t.sailer@alumni.ethz.ch>
Am 17.09.2017 um 13:46 schrieb Sudip Mukherjee:
> Modify baycom driver to use the new parallel port device model.
>
> Signed-off-by: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
> ---
>
> Not tested on real hardware, only tested on qemu and verified that the
> device is binding to the driver properly in epp_open but then unbinding
> as the device was not found.
>
> drivers/net/hamradio/baycom_epp.c | 50 +++++++++++++++++++++++++++++++++++----
> 1 file changed, 46 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/net/hamradio/baycom_epp.c b/drivers/net/hamradio/baycom_epp.c
> index 1503f10..1e62d00 100644
> --- a/drivers/net/hamradio/baycom_epp.c
> +++ b/drivers/net/hamradio/baycom_epp.c
> @@ -840,6 +840,7 @@ static int epp_open(struct net_device *dev)
> unsigned char tmp[128];
> unsigned char stat;
> unsigned long tstart;
> + struct pardev_cb par_cb;
>
> if (!pp) {
> printk(KERN_ERR "%s: parport at 0x%lx unknown\n", bc_drvname, dev->base_addr);
> @@ -859,8 +860,21 @@ static int epp_open(struct net_device *dev)
> return -EIO;
> }
> memset(&bc->modem, 0, sizeof(bc->modem));
> - bc->pdev = parport_register_device(pp, dev->name, NULL, epp_wakeup,
> - NULL, PARPORT_DEV_EXCL, dev);
> + memset(&par_cb, 0, sizeof(par_cb));
> + par_cb.wakeup = epp_wakeup;
> + par_cb.private = (void *)dev;
> + par_cb.flags = PARPORT_DEV_EXCL;
> + for (i = 0; i < NR_PORTS; i++)
> + if (baycom_device[i] == dev)
> + break;
> +
> + if (i == NR_PORTS) {
> + pr_err("%s: no device found\n", bc_drvname);
> + parport_put_port(pp);
> + return -ENODEV;
> + }
> +
> + bc->pdev = parport_register_dev_model(pp, dev->name, &par_cb, i);
> parport_put_port(pp);
> if (!bc->pdev) {
> printk(KERN_ERR "%s: cannot register parport at 0x%lx\n", bc_drvname, pp->base);
> @@ -1185,6 +1199,23 @@ MODULE_LICENSE("GPL");
>
> /* --------------------------------------------------------------------- */
>
> +static int baycom_epp_par_probe(struct pardevice *par_dev)
> +{
> + struct device_driver *drv = par_dev->dev.driver;
> + int len = strlen(drv->name);
> +
> + if (strncmp(par_dev->name, drv->name, len))
> + return -ENODEV;
> +
> + return 0;
> +}
> +
> +static struct parport_driver baycom_epp_par_driver = {
> + .name = "bce",
> + .probe = baycom_epp_par_probe,
> + .devmodel = true,
> +};
> +
> static void __init baycom_epp_dev_setup(struct net_device *dev)
> {
> struct baycom_state *bc = netdev_priv(dev);
> @@ -1204,10 +1235,15 @@ static void __init baycom_epp_dev_setup(struct net_device *dev)
>
> static int __init init_baycomepp(void)
> {
> - int i, found = 0;
> + int i, found = 0, ret;
> char set_hw = 1;
>
> printk(bc_drvinfo);
> +
> + ret = parport_register_driver(&baycom_epp_par_driver);
> + if (ret)
> + return ret;
> +
> /*
> * register net devices
> */
> @@ -1241,7 +1277,12 @@ static int __init init_baycomepp(void)
> found++;
> }
>
> - return found ? 0 : -ENXIO;
> + if (found == 0) {
> + parport_unregister_driver(&baycom_epp_par_driver);
> + return -ENXIO;
> + }
> +
> + return 0;
> }
>
> static void __exit cleanup_baycomepp(void)
> @@ -1260,6 +1301,7 @@ static void __exit cleanup_baycomepp(void)
> printk(paranoia_str, "cleanup_module");
> }
> }
> + parport_unregister_driver(&baycom_epp_par_driver);
> }
>
> module_init(init_baycomepp);
>
^ permalink raw reply
* [PATCH net-next v2 7/7] net: korina: bump version
From: Roman Yeryomin @ 2017-09-17 17:25 UTC (permalink / raw)
To: netdev
Signed-off-by: Roman Yeryomin <roman@advem.lv>
---
drivers/net/ethernet/korina.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/korina.c b/drivers/net/ethernet/korina.c
index d58aa4bfcb58..7cecd9dbc111 100644
--- a/drivers/net/ethernet/korina.c
+++ b/drivers/net/ethernet/korina.c
@@ -66,8 +66,8 @@
#include <asm/mach-rc32434/dma_v.h>
#define DRV_NAME "korina"
-#define DRV_VERSION "0.10"
-#define DRV_RELDATE "04Mar2008"
+#define DRV_VERSION "0.20"
+#define DRV_RELDATE "15Sep2017"
#define STATION_ADDRESS_HIGH(dev) (((dev)->dev_addr[0] << 8) | \
((dev)->dev_addr[1]))
--
2.11.0
^ permalink raw reply related
* [PATCH net-next v2 6/7] net: korina: update authors
From: Roman Yeryomin @ 2017-09-17 17:25 UTC (permalink / raw)
To: netdev
Signed-off-by: Roman Yeryomin <roman@advem.lv>
---
drivers/net/ethernet/korina.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/net/ethernet/korina.c b/drivers/net/ethernet/korina.c
index c26f0d84ba6b..d58aa4bfcb58 100644
--- a/drivers/net/ethernet/korina.c
+++ b/drivers/net/ethernet/korina.c
@@ -4,6 +4,7 @@
* Copyright 2004 IDT Inc. (rischelp@idt.com)
* Copyright 2006 Felix Fietkau <nbd@openwrt.org>
* Copyright 2008 Florian Fainelli <florian@openwrt.org>
+ * Copyright 2017 Roman Yeryomin <roman@advem.lv>
*
* 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
@@ -1150,5 +1151,6 @@ module_platform_driver(korina_driver);
MODULE_AUTHOR("Philip Rischel <rischelp@idt.com>");
MODULE_AUTHOR("Felix Fietkau <nbd@openwrt.org>");
MODULE_AUTHOR("Florian Fainelli <florian@openwrt.org>");
+MODULE_AUTHOR("Roman Yeryomin <roman@advem.lv>");
MODULE_DESCRIPTION("IDT RC32434 (Korina) Ethernet driver");
MODULE_LICENSE("GPL");
--
2.11.0
^ permalink raw reply related
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox