Re: [PATCH v3] tun: fix use-after-free when register netdev failed

2019-09-09 Thread Jason Wang
On 2019/9/10 上午10:31, Yang Yingliang wrote:   if (!(tun->flags & IFF_PERSIST) && -    tun->dev->reg_state == NETREG_REGISTERED) +    tun->dev->reg_state == NETREG_REGISTERED) { +    tun->flags &= ~TUN_DEV_REGISTERED; As I said for previous vers

Re: [PATCH v3] tun: fix use-after-free when register netdev failed

2019-09-09 Thread Yang Yingliang
On 2019/9/5 11:10, Jason Wang wrote: On 2019/9/5 上午10:03, Yang Yingliang wrote: On 2019/9/3 18:50, Jason Wang wrote: - Original Message - On 2019/9/3 14:06, Jason Wang wrote: On 2019/9/3 下午1:42, Yang Yingliang wrote: On 2019/9/3 11:03, Jason Wang wrote: On 2019/9/3 上午9:45, Yang

NULL pointer dereference in ip6_datagram_dst_update

2019-09-09 Thread Rafael D'Halleweyn
Hi, While running 5.3.0-rc8 on my laptop, I receive an NULL pointer error when trying to use IPv6 (i.e. just browsing with Firefox). I have a desktop running the same version and kernel-config without problem (but different hardware). The laptop is using wireless (Intel AX200 iwlwifi). Please

Re: [PATCH v1 net-next 00/15] tc-taprio offload for SJA1105 DSA

2019-09-09 Thread Vladimir Oltean
Hi Andrew, Joergen, Richard, On 09/09/2019, Joergen Andreasen wrote: > The 09/08/2019 22:42, Andrew Lunn wrote: >> On Sun, Sep 08, 2019 at 12:07:27PM +0100, Vladimir Oltean wrote: >> > I think Richard has been there when the taprio, etf qdiscs, SO_TXTIME >> > were first defined and developed: >>

[PATCH v2 net-next 4/7] net: dsa: sja1105: Implement the .gettimex64 system call for PTP

2019-09-09 Thread Vladimir Oltean
Through the PTP_SYS_OFFSET_EXTENDED ioctl, it is possible for userspace applications (i.e. phc2sys) to compensate for the delays incurred while reading the PHC's time. For now implement this ioctl in the driver, although the performance improvements are minimal. The goal with this patch is to rewo

[PATCH v2 net-next 7/7] net: dsa: sja1105: Move PTP data to its own private structure

2019-09-09 Thread Vladimir Oltean
Reduce the size of the sja1105_private structure when CONFIG_NET_DSA_SJA1105_PTP is not enabled. Also make the PTP code a little bit more self-contained. Signed-off-by: Vladimir Oltean --- drivers/net/dsa/sja1105/sja1105.h | 20 +-- drivers/net/dsa/sja1105/sja1105_main.c | 12 ++-- driv

[PATCH v2 net-next 3/7] net: dsa: sja1105: Switch to hardware operations for PTP

2019-09-09 Thread Vladimir Oltean
Adjusting the hardware clock (PTPCLKVAL, PTPCLKADD, PTPCLKRATE) is a requirement for the auxiliary PTP functionality of the switch (TTEthernet, PPS input, PPS output). Now that the sync precision issues have been identified (and fixed in the spi-fsl-dspi driver), we can get rid of the timecounter/

[PATCH v2 net-next 2/7] net: dsa: sja1105: Change the PTP command access pattern

2019-09-09 Thread Vladimir Oltean
The PTP command register contains enable bits for: - Putting the 64-bit PTPCLKVAL register in add/subtract or write mode - Taking timestamps off of the corrected vs free-running clock - Starting/stopping the TTEthernet scheduling - Starting/stopping PPS output - Resetting the switch When a command

[PATCH v2 net-next 5/7] net: dsa: sja1105: Restore PTP time after switch reset

2019-09-09 Thread Vladimir Oltean
The PTP time of the switch is not preserved when uploading a new static configuration. Work around this hardware oddity by reading its PTP time before a static config upload, and restoring it afterwards. Static config changes are expected to occur at runtime even in scenarios directly related to P

[PATCH v2 net-next 6/7] net: dsa: sja1105: Disallow management xmit during switch reset

2019-09-09 Thread Vladimir Oltean
The purpose here is to avoid ptp4l fail due to this condition: timed out while polling for tx timestamp increasing tx_timestamp_timeout may correct this issue, but it is likely caused by a driver bug port 1: send peer delay request failed So either reset the switch before the management fr

[PATCH v2 net-next 0/7] Hardware operations for the SJA1105 DSA PTP clock

2019-09-09 Thread Vladimir Oltean
This series performs the following changes to the PTP portion of the driver: - Deletes the timecounter/cyclecounter implementation of a free-running PHC and replaces it with actual hardware corrections of the PTP timestamping clock. - Deletes the approximation of timecounter_init() with the arg

[PATCH v2 net-next 1/7] net: dsa: sja1105: Get rid of global declaration of struct ptp_clock_info

2019-09-09 Thread Vladimir Oltean
We need priv->ptp_caps to hold a structure and not just a pointer, because we use container_of in the various PTP callbacks. Therefore, the sja1105_ptp_caps structure declared in the global memory of the driver serves no further purpose after copying it into priv->ptp_caps. So just populate priv-

Re: [PATCH v1 net-next 00/15] tc-taprio offload for SJA1105 DSA

2019-09-09 Thread Vladimir Oltean
Hi Vinicius! On 10/09/2019, Gomes, Vinicius wrote: > Hi Vladimir, > >> This is a warning that I will toss this patch series if it receives no >> series review in >> the next couple of days. > > Sorry about the delay on reviewing this. On top on the usual business, some > changes to the > IT infra

Re: [PATCH net] sctp: fix the missing put_user when dumping transport thresholds

2019-09-09 Thread Marcelo Ricardo Leitner
On Mon, Sep 09, 2019 at 03:33:29PM +0800, Xin Long wrote: > This issue causes SCTP_PEER_ADDR_THLDS sockopt not to be able to dump > a transport thresholds info. > > Fix it by adding 'goto' put_user in sctp_getsockopt_paddr_thresholds. > > Fixes: 8add543e369d ("sctp: add SCTP_FUTURE_ASSOC for SCTP

RE: [PATCH v1 net-next 00/15] tc-taprio offload for SJA1105 DSA

2019-09-09 Thread Gomes, Vinicius
Hi Vladimir, > This is a warning that I will toss this patch series if it receives no series > review in > the next couple of days. Sorry about the delay on reviewing this. On top on the usual business, some changes to the IT infrastructure here have hit my email workflow pretty hard. I am tak

Re: [PATCH] libbpf: Don't error out if getsockopt() fails for XDP_OPTIONS

2019-09-09 Thread Toke Høiland-Jørgensen
Yonghong Song writes: > On 9/9/19 10:46 AM, Toke Høiland-Jørgensen wrote: >> The xsk_socket__create() function fails and returns an error if it cannot >> get the XDP_OPTIONS through getsockopt(). However, support for XDP_OPTIONS >> was not added until kernel 5.3, so this means that creating XSK s

Re: [PATCH v4 bpf-next 1/4] capability: introduce CAP_BPF and CAP_TRACING

2019-09-09 Thread Andy Lutomirski
On Fri, Sep 6, 2019 at 4:10 PM Alexei Starovoitov wrote: > > Split BPF and perf/tracing operations that are allowed under > CAP_SYS_ADMIN into corresponding CAP_BPF and CAP_TRACING. > For backward compatibility include them in CAP_SYS_ADMIN as well. > > The end result provides simple safety model

Re: Default qdisc not correctly initialized with custom MTU

2019-09-09 Thread Cong Wang
On Mon, Sep 9, 2019 at 5:44 AM Holger Hoffstätte wrote: > I can't help but feel this is a slight bug in terms of initialization order, > and that the default qdisc should only be created when it's first being > used/attached to a link, not when the sysctls are configured. Yeah, this is because th

[net-next v2 08/15] iavf: allow permanent MAC address to change

2019-09-09 Thread Jeff Kirsher
From: Mitch Williams Allow the VF to override the "permanent" MAC address set by the host. This allows bonding to work in the case where the administrator has set the VF MAC. Note that the VF must still be set to Trusted on the host if this change is to be accepted by the PF driver. Signed-off-

[net-next v2 00/15][pull request] Intel Wired LAN Driver Updates 2019-09-09

2019-09-09 Thread Jeff Kirsher
This series contains a variety of cold and hot savoury changes to Intel drivers. Some of the fixes could be considered for stable even though the author did not request it. Hulk Robert cleans up (i.e. removes) a function that has no caller for the iavf driver. Radoslaw fixes an issue when there

[net-next v2 01/15] iavf: remove unused debug function iavf_debug_d

2019-09-09 Thread Jeff Kirsher
From: YueHaibing There is no caller of function iavf_debug_d() in tree since commit 75051ce4c5d8 ("iavf: Fix up debug print macro"), so it can be removed. Reported-by: Hulk Robot Signed-off-by: YueHaibing Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher --- drivers/net/ethernet/intel/ia

[net-next v2 14/15] igc: Add tx_csum offload functionality

2019-09-09 Thread Jeff Kirsher
From: Sasha Neftin Add IP generic TX checksum offload functionality. Signed-off-by: Sasha Neftin Tested-by: Aaron Brown Signed-off-by: Jeff Kirsher --- drivers/net/ethernet/intel/igc/igc.h | 4 + drivers/net/ethernet/intel/igc/igc_base.h| 8 ++ drivers/net/ethernet/intel/igc/ig

[net-next v2 02/15] ixgbevf: Link lost in VM on ixgbevf when restoring from freeze or suspend

2019-09-09 Thread Jeff Kirsher
From: Radoslaw Tyl This patch fixed issue in VM which shows no link when hypervisor is restored from low-power state. The driver is responsible for re-enabling any features of the device that had been disabled during suspend calls, such as IRQs and bus mastering. Signed-off-by: Radoslaw Tyl Tes

[net-next v2 11/15] i40e: Implement debug macro hw_dbg using dev_dbg

2019-09-09 Thread Jeff Kirsher
From: "Mauro S. M. Rodrigues" There are several uses of hw_dbg in the code, producing no output. This patch implements it using dev_debug. Initially the intention was to implement it using netdev_dbg, analogously to what is done in ixgbe for instance. That approach was avoided due to some early

[net-next v2 05/15] Documentation: iavf: Update the Intel LAN driver doc for iavf

2019-09-09 Thread Jeff Kirsher
Update the LAN driver documentation to include the latest feature implementation and driver capabilities. Signed-off-by: Jeff Kirsher Tested-by: Aaron Brown --- .../networking/device_drivers/intel/iavf.rst | 115 +- 1 file changed, 82 insertions(+), 33 deletions(-) diff --git

[net-next v2 12/15] i40e: Remove EMPR traces from debugfs facility

2019-09-09 Thread Jeff Kirsher
From: "Mauro S. M. Rodrigues" Since commit '5098850c9b9b ("i40e/i40evf: i40e_register.h updates")' it is no longer possible to trigger an EMP Reset from debugfs, but it's possible to request it either way, to end up with a bad reset request: echo empr > /sys/kernel/debug/i40e/0002\:01\:00.1/comm

[net-next v2 13/15] ixgbe: sync the first fragment unconditionally

2019-09-09 Thread Jeff Kirsher
From: Firo Yang In Xen environment, if Xen-swiotlb is enabled, ixgbe driver could possibly allocate a page, DMA memory buffer, for the first fragment which is not suitable for Xen-swiotlb to do DMA operations. Xen-swiotlb have to internally allocate another page for doing DMA operations. This mec

[net-next v2 07/15] igc: Add NVM checksum validation

2019-09-09 Thread Jeff Kirsher
From: Sasha Neftin Add NVM checksum validation during probe functionality. Signed-off-by: Sasha Neftin Tested-by: Aaron Brown Signed-off-by: Jeff Kirsher --- drivers/net/ethernet/intel/igc/igc_main.c | 9 + 1 file changed, 9 insertions(+) diff --git a/drivers/net/ethernet/intel/igc/

[net-next v2 03/15] e1000e: Make speed detection on hotplugging cable more reliable

2019-09-09 Thread Jeff Kirsher
From: Kai-Heng Feng After hot plugging an 1Gbps Ethernet cable with 1Gbps link partner, the MII_BMSR may report 10Mbps, renders the network rather slow. The issue has much lower fail rate after commit 59653e6497d1 ("e1000e: Make watchdog use delayed work"), which essentially introduces some dela

[net-next v2 04/15] igc: Remove useless forward declaration

2019-09-09 Thread Jeff Kirsher
From: Sasha Neftin Move igc_phy_setup_autoneg, igc_wait_autoneg and igc_set_fc_watermarks up to avoid forward declaration. It is not necessary to forward declare these static methods. Signed-off-by: Sasha Neftin Tested-by: Aaron Brown Signed-off-by: Jeff Kirsher --- drivers/net/ethernet/inte

[net-next v2 09/15] igc: Remove unneeded PCI bus defines

2019-09-09 Thread Jeff Kirsher
From: Sasha Neftin PCIe device control 2 defines does not use internally. This patch comes to clean up those. Signed-off-by: Sasha Neftin Tested-by: Aaron Brown Signed-off-by: Jeff Kirsher --- drivers/net/ethernet/intel/igc/igc_defines.h | 4 1 file changed, 4 deletions(-) diff --git a

[net-next v2 15/15] i40e: Add support for X710 device

2019-09-09 Thread Jeff Kirsher
From: Mariusz Stachura Add I40E_DEV_ID_10G_BASE_T_BC to i40e_pci_tbl Signed-off-by: Mariusz Stachura Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher --- drivers/net/ethernet/intel/i40e/i40e_main.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/ethernet/intel/i40e/i40e_m

[net-next v2 06/15] fm10k: use a local variable for the frag pointer

2019-09-09 Thread Jeff Kirsher
From: Jacob Keller In the function fm10k_xmit_frame_ring, we recently switched to using the skb_frag_size accessor instead of directly using the size member of the skb fragment. This made the for loop slightly harder to read because it created a very long line that is difficult to split up. Avoi

[net-next v2 10/15] i40e: fix hw_dbg usage in i40e_hmc_get_object_va

2019-09-09 Thread Jeff Kirsher
From: "Mauro S. M. Rodrigues" The mentioned function references a i40e_hw attribute, as parameter for hw_dbg, but it doesn't exist in the function scope. Fixes it by changing parameters from i40e_hmc_info to i40e_hw which can retrieve the necessary i40e_hmc_info. v2: - Fixed reverse xmas tree

[RFC PATCH net-next 1/2] Allow 225/8-231/8 as unicast

2019-09-09 Thread Dave Taht
This patch converts the long "reserved for future use" multicast address space, 225/8-231/8 - 120m addresses - for use as unicast addresses instead. In a comprehensive survey of all the open source code on the planet we found no users of this range. We found some official and unofficial usage of a

[RFC PATCH net-next 2/2] Reduce localhost to 127.0.0.0/16

2019-09-09 Thread Dave Taht
The 127 concept of "localhost" was basically a straight port over from original ARPANET behavior. At the time it was envisioned that many services would exist in the mainframe that would need to be individually addressable, and long predated alternative approaches such as tipc, etc. This reduces

[RFC PATCH net-next 0/2] more IPv4 unicast extensions

2019-09-09 Thread Dave Taht
Adding support in linux for the 240/4 and 0/8 ipv4 address ranges were easy, no brainer removals of obsolete support for obsolete specifications. Has anyone noticed yet? The following two patches are intended as discussion points fot my https://linuxplumbersconf.org/event/4/contributions/457/ talk

Re: [RFC bpf-next 2/7] bpf: extend bpf_pcap support to tracing programs

2019-09-09 Thread Alan Maguire
On Sun, 8 Sep 2019, Yonghong Song wrote: > For net side bpf_perf_event_output, we have > static unsigned long bpf_skb_copy(void *dst_buff, const void *skb, >unsigned long off, unsigned long len) > { > void *ptr = skb_header_pointer(skb, off, len, dst_b

Re: [PATCH net] tcp: fix tcp_ecn_withdraw_cwr() to clear TCP_ECN_QUEUE_CWR

2019-09-09 Thread Eric Dumazet
On Mon, Sep 9, 2019 at 10:56 PM Neal Cardwell wrote: > > Fix tcp_ecn_withdraw_cwr() to clear the correct bit: > TCP_ECN_QUEUE_CWR. > > Rationale: basically, TCP_ECN_DEMAND_CWR is a bit that is purely about > the behavior of data receivers, and deciding whether to reflect > incoming IP ECN CE marks

RE: [Intel-wired-lan] [PATCH] i40e: clear __I40E_VIRTCHNL_OP_PENDING on invalid min tx rate

2019-09-09 Thread Bowers, AndrewX
> -Original Message- > From: Intel-wired-lan [mailto:intel-wired-lan-boun...@osuosl.org] On > Behalf Of Stefan Assmann > Sent: Monday, September 2, 2019 11:08 PM > To: intel-wired-...@lists.osuosl.org > Cc: netdev@vger.kernel.org; da...@davemloft.net; sassm...@kpanic.de > Subject: [Intel-wi

[PATCH net] tcp: fix tcp_ecn_withdraw_cwr() to clear TCP_ECN_QUEUE_CWR

2019-09-09 Thread Neal Cardwell
Fix tcp_ecn_withdraw_cwr() to clear the correct bit: TCP_ECN_QUEUE_CWR. Rationale: basically, TCP_ECN_DEMAND_CWR is a bit that is purely about the behavior of data receivers, and deciding whether to reflect incoming IP ECN CE marks as outgoing TCP th->ece marks. The TCP_ECN_QUEUE_CWR bit is purely

[PATCH net-next] ipv6: Don't use dst gateway directly in ip6_confirm_neigh()

2019-09-09 Thread Stefano Brivio
This is the equivalent of commit 2c6b55f45d53 ("ipv6: fix neighbour resolution with raw socket") for ip6_confirm_neigh(): we can send a packet with MSG_CONFIRM on a raw socket for a connected route, so the gateway would be :: here, and we should pick the next hop using rt6_nexthop() instead. This

RE: VRF Issue Since kernel 5

2019-09-09 Thread Gowen
Hi alexis, I did this earlier today and no change. I’ll look at trying to see if the return traffic is hitting the INPUT table tomorrow with some conntrack rules and see if it hits any of those rules. If not then do you have any hints/techniques I can use to find the source of the issue? Gare

Re: [PATCH net-next v2 2/2] net: stmmac: Support enhanced addressing mode for DWMAC 4.10

2019-09-09 Thread Thierry Reding
On Mon, Sep 09, 2019 at 04:05:52PM +, Jose Abreu wrote: > From: Thierry Reding > Date: Sep/09/2019, 16:25:46 (UTC+00:00) > > > @@ -79,6 +79,10 @@ static void dwmac4_dma_init_rx_chan(void __iomem *ioaddr, > > value = value | (rxpbl << DMA_BUS_MODE_RPBL_SHIFT); > > writel(value, ioaddr

Re: [PATCH net-next v2 1/2] net: stmmac: Only enable enhanced addressing mode when needed

2019-09-09 Thread Thierry Reding
On Mon, Sep 09, 2019 at 04:07:04PM +, Jose Abreu wrote: > From: Thierry Reding > Date: Sep/09/2019, 16:25:45 (UTC+00:00) > > > @@ -92,6 +92,7 @@ struct stmmac_dma_cfg { > > int fixed_burst; > > int mixed_burst; > > bool aal; > > + bool eame; > > bools should not be used in stru

Re: ixgbe: driver drops packets routed from an IPSec interface with a "bad sa_idx" error

2019-09-09 Thread Michael Marley
On 2019-09-09 14:21, Shannon Nelson wrote: On 9/6/19 11:13 AM, Michael Marley wrote: (This is also reported at https://bugzilla.kernel.org/show_bug.cgi?id=204551, but it was recommended that I send it to this list as well.) I have a put together a router that routes traffic from several local

Re: ixgbe: driver drops packets routed from an IPSec interface with a "bad sa_idx" error

2019-09-09 Thread Shannon Nelson
On 9/6/19 11:13 AM, Michael Marley wrote: (This is also reported at https://bugzilla.kernel.org/show_bug.cgi?id=204551, but it was recommended that I send it to this list as well.) I have a put together a router that routes traffic from several local subnets from a switch attached to an i8259

[PATCH net 1/1] net/tls(TLS_SW): Fix list_del double free caused by a race condition in tls_tx_records

2019-09-09 Thread Pooja Trivedi
Enclosing tls_tx_records within lock_sock/release_sock pair to ensure write-synchronization is not sufficient because socket lock gets released under memory pressure situation by sk_wait_event while it sleeps waiting for memory, allowing another writer into tls_tx_records. This caus

Re: [PATCH] libbpf: Don't error out if getsockopt() fails for XDP_OPTIONS

2019-09-09 Thread Yonghong Song
On 9/9/19 10:46 AM, Toke Høiland-Jørgensen wrote: > The xsk_socket__create() function fails and returns an error if it cannot > get the XDP_OPTIONS through getsockopt(). However, support for XDP_OPTIONS > was not added until kernel 5.3, so this means that creating XSK sockets > always fails on ol

[PATCH net 0/1] net/tls(TLS_SW): double free in tls_tx_records

2019-09-09 Thread Pooja Trivedi
TLS module crash while running SSL record encryption using klts_send_[file] using crypto accelerator (Nitrox). Following are the preconditions and steps to reproduce the issue: Preconditions: 1) Installed 5.3-rc4 2) Nitrox5 card plugin (crypto accelerator) Steps to reproduce the issue: 1) Instal

[PATCH] libbpf: Don't error out if getsockopt() fails for XDP_OPTIONS

2019-09-09 Thread Toke Høiland-Jørgensen
The xsk_socket__create() function fails and returns an error if it cannot get the XDP_OPTIONS through getsockopt(). However, support for XDP_OPTIONS was not added until kernel 5.3, so this means that creating XSK sockets always fails on older kernels. Since the option is just used to set the zero-

Re: [PATCH bpf-next v10 2/4] bpf: new helper to obtain namespace data from current task New bpf helper bpf_get_current_pidns_info.

2019-09-09 Thread Carlos Antonio Neira Bustos
Thanks a lot, Al Viro and Yonghong for taking the time to review this patch and provide technical insights needed on this one. But how do we move this forward? Al Viro's review is clear that this will not work and we should strip the name resolution code (thanks for your detailed analysis). As th

RE: [PATCH net-next 1/5] enetc: Fix if_mode extraction

2019-09-09 Thread Claudiu Manoil
>-Original Message- >From: Andrew Lunn >Sent: Friday, September 6, 2019 10:58 PM >To: Claudiu Manoil >Cc: David S . Miller ; Alexandru Marginean >; netdev@vger.kernel.org >Subject: Re: [PATCH net-next 1/5] enetc: Fix if_mode extraction > >On Fri, Sep 06, 2019 at 05:15:40PM +0300, Claudiu

RE: [PATCH net-next v2 1/2] net: stmmac: Only enable enhanced addressing mode when needed

2019-09-09 Thread Jose Abreu
From: Thierry Reding Date: Sep/09/2019, 16:25:45 (UTC+00:00) > @@ -92,6 +92,7 @@ struct stmmac_dma_cfg { > int fixed_burst; > int mixed_burst; > bool aal; > + bool eame; bools should not be used in struct's, please change to int. --- Thanks, Jose Miguel Abreu

RE: [PATCH net-next v2 2/2] net: stmmac: Support enhanced addressing mode for DWMAC 4.10

2019-09-09 Thread Jose Abreu
From: Thierry Reding Date: Sep/09/2019, 16:25:46 (UTC+00:00) > @@ -79,6 +79,10 @@ static void dwmac4_dma_init_rx_chan(void __iomem *ioaddr, > value = value | (rxpbl << DMA_BUS_MODE_RPBL_SHIFT); > writel(value, ioaddr + DMA_CHAN_RX_CONTROL(chan)); > > + if (dma_cfg->eame) There

[PATCH iproute2-next] bpf: replace snprintf with asprintf when dealing with long buffers

2019-09-09 Thread Andrea Claudi
This reduces stack usage, as asprintf allocates memory on the heap. This indirectly fixes a snprintf truncation warning (from gcc v9.2.1): bpf.c: In function ‘bpf_get_work_dir’: bpf.c:784:49: warning: ‘snprintf’ output may be truncated before the last format character [-Wformat-truncation=] 78

[PATCH v3] net: phy: dp83867: Add SGMII mode type switching

2019-09-09 Thread Vitaly Gaiduk
This patch adds ability to switch beetween two PHY SGMII modes. Some hardware, for example, FPGA IP designs may use 6-wire mode which enables differential SGMII clock to MAC. Signed-off-by: Vitaly Gaiduk --- Changes in v3: - Fixed retaining DP83867_SGMII_TYPE bit drivers/net/phy/dp83867.c | 19

[PATCH net-next v2 1/2] net: stmmac: Only enable enhanced addressing mode when needed

2019-09-09 Thread Thierry Reding
From: Thierry Reding Enhanced addressing mode is only required when more than 32 bits need to be addressed. Add a DMA configuration parameter to enable this mode only when needed. Signed-off-by: Thierry Reding --- drivers/net/ethernet/stmicro/stmmac/dwxgmac2_dma.c | 5 - drivers/net/ethern

[PATCH net-next v2 2/2] net: stmmac: Support enhanced addressing mode for DWMAC 4.10

2019-09-09 Thread Thierry Reding
From: Thierry Reding The address width of the controller can be read from hardware feature registers much like on XGMAC. Add support for parsing the ADDR64 field so that the DMA mask can be set accordingly. This avoids getting swiotlb involved for DMA on Tegra186 and later. Also make sure that

Re: [PATCH net-next 2/2] net: stmmac: Support enhanced addressing mode for DWMAC 4.10

2019-09-09 Thread Thierry Reding
On Mon, Sep 09, 2019 at 02:36:27PM +0200, Thierry Reding wrote: > From: Thierry Reding > > The address width of the controller can be read from hardware feature > registers much like on XGMAC. Add support for parsing the ADDR64 field > so that the DMA mask can be set accordingly. > > This avoids

Re: [PATCH] tcp: Add TCP_INFO counter for packets received out-of-order

2019-09-09 Thread Eric Dumazet
On Mon, Sep 9, 2019 at 4:30 PM Thomas Higdon wrote: > > For receive-heavy cases on the server-side, we want to track the > connection quality for individual client IPs. This counter, similar to > the existing system-wide TCPOFOQueue counter in /proc/net/netstat, > tracks out-of-order packet recept

[PATCH v2] igb: add rx drop enable attribute

2019-09-09 Thread Robert Beckett
To allow userland to enable or disable dropping packets when descriptor ring is exhausted, add RX_DROP_EN private flag. This can be used in conjunction with flow control to mitigate packet storms (e.g. due to network loop or DoS) by forcing the network adapter to send pause frames whenever the rin

Re: [PATCH v2 0/4] Deterministic SPI latency with NXP DSPI driver

2019-09-09 Thread Vladimir Oltean
Hi Mark, On 09/09/2019, Mark Brown wrote: > On Thu, Sep 05, 2019 at 04:01:10AM +0300, Vladimir Oltean wrote: > >> This patchset proposes an interface from the SPI subsystem for >> software timestamping SPI transfers. There is a default implementation >> provided in the core, as well as a mechanis

[PATCH net-next 09/11] net: aquantia: implement get_ts_info ethtool

2019-09-09 Thread Igor Russkikh
From: Dmitry Bezrukov Ethtool callback with basic information on what PTP features are supported by the device. Co-developed-by: Egor Pomozov Signed-off-by: Egor Pomozov Co-developed-by: Sergey Samoilenko Signed-off-by: Sergey Samoilenko Signed-off-by: Dmitry Bezrukov Signed-off-by: Igor Ru

[PATCH net-next 11/11] net: aquantia: add support for PIN funcs

2019-09-09 Thread Igor Russkikh
From: Dmitry Bezrukov Depending on FW configuration we can manage from 0 to 3 PINs for periodic output and from 0 to 1 ext ts PIN for getting TS for external event. Ext TS PIN functionality is implemented via periodic timestamps polling directly from PHY, because right now there is now way to re

[PATCH net-next 08/11] net: aquantia: add support for ptp ioctls

2019-09-09 Thread Igor Russkikh
From: Dmitry Bezrukov Here we add support for PTP specific IOCTLs of HW timestamp get/set. These will use filters to configure flows onto the required queue ids. Co-developed-by: Egor Pomozov Signed-off-by: Egor Pomozov Co-developed-by: Sergey Samoilenko Signed-off-by: Sergey Samoilenko Sig

[PATCH net-next 07/11] net: aquantia: rx filters for ptp

2019-09-09 Thread Igor Russkikh
From: Dmitry Bezrukov We implement HW filter reservation for PTP traffic. Special location in filters table is marked as reserved, because incoming ptp traffic should be directed only to PTP designated queue. This way HW will do PTP timestamping and proper processing. Co-developed-by: Egor Pomoz

[PATCH net-next 10/11] net: aquantia: add support for Phy access

2019-09-09 Thread Igor Russkikh
From: Dmitry Bezrukov GPIO PIN control and access is done by direct phy manipulation. Here we add an aq_phy module which is able to access phy registers via MDIO access mailbox. Access is controlled via HW semaphore. Co-developed-by: Nikita Danilov Signed-off-by: Nikita Danilov Signed-off-by:

[PATCH net-next 06/11] net: aquantia: implement data PTP datapath

2019-09-09 Thread Igor Russkikh
From: Dmitry Bezrukov Here we do alloc/free IRQs for PTP rings. We also implement processing of PTP packets on TX and RX sides. Co-developed-by: Egor Pomozov Signed-off-by: Egor Pomozov Co-developed-by: Sergey Samoilenko Signed-off-by: Sergey Samoilenko Signed-off-by: Dmitry Bezrukov Signed

[PATCH net-next 00/11] net: aquantia: PTP support for AQC devices

2019-09-09 Thread Igor Russkikh
This patches introduce PTP feature support in Aquantia AQC atlantic driver. This implementation is a joined effort from a number of aquantia developers: Egor and Sergey are included as co-developers, Dmitry has implemented PIN control functionality and helped me in the overall patchset preparation

[PATCH net-next 05/11] net: aquantia: styling fixes on ptp related functions

2019-09-09 Thread Igor Russkikh
From: Dmitry Bezrukov Checkpatch and styling fixes on parts of code touched by ptp Signed-off-by: Dmitry Bezrukov Signed-off-by: Igor Russkikh --- .../net/ethernet/aquantia/atlantic/hw_atl/hw_atl_llh.c | 4 ++-- .../net/ethernet/aquantia/atlantic/hw_atl/hw_atl_llh.h | 9 ++--- 2 files

[PATCH net-next 01/11] net: aquantia: PTP skeleton declarations and callbacks

2019-09-09 Thread Igor Russkikh
From: Dmitry Bezrukov Here we add basic function for PTP clock register/unregister. We also declare FW/HW capability bits used to control PTP feature on device. PTP device is created if network card has appropriate FW that has PTP enabled in config. HW supports timestamping for PTPv2 802.AS1 and

[PATCH net-next 02/11] net: aquantia: unify styling of bit enums

2019-09-09 Thread Igor Russkikh
From: Dmitry Bezrukov Make some other bit-enums more clear about positioning, this helps on debugging and development Signed-off-by: Dmitry Bezrukov Signed-off-by: Igor Russkikh --- .../aquantia/atlantic/hw_atl/hw_atl_utils.c | 2 +- .../aquantia/atlantic/hw_atl/hw_atl_utils.h | 41 +

[PATCH net-next 03/11] net: aquantia: add basic ptp_clock callbacks

2019-09-09 Thread Igor Russkikh
From: Dmitry Bezrukov Basic HW functions implemented for adjusting frequency, adjusting time, getting and setting time. Firmware interface for PTP requests and interactions. Enable/disable PTP counters in HW on clock register/unregister Co-developed-by: Egor Pomozov Signed-off-by: Egor Pomozov

[PATCH net-next 04/11] net: aquantia: add PTP rings infrastructure

2019-09-09 Thread Igor Russkikh
From: Dmitry Bezrukov Add implementations of PTP rings alloc/free. PTP desing on this device uses two separate rings on a separate traffic class for traffic rx/tx. Third ring (hwts) is not a traffic ring, but is used only to receive timestamps of the transmitted packets. Co-developed-by: Egor

[PATCH net-next 1/2] net: stmmac: Only enable enhanced addressing mode when needed

2019-09-09 Thread Thierry Reding
From: Thierry Reding Enhanced addressing mode is only required when more than 32 bits need to be addressed. Add a DMA configuration parameter to enable this mode only when needed. Signed-off-by: Thierry Reding --- drivers/net/ethernet/stmicro/stmmac/dwxgmac2_dma.c | 5 - drivers/net/ethern

[PATCH net-next 2/2] net: stmmac: Support enhanced addressing mode for DWMAC 4.10

2019-09-09 Thread Thierry Reding
From: Thierry Reding The address width of the controller can be read from hardware feature registers much like on XGMAC. Add support for parsing the ADDR64 field so that the DMA mask can be set accordingly. This avoids getting swiotlb involved for DMA on Tegra186 and later. Also make sure that

Re: [PATCH v1 net-next 00/15] tc-taprio offload for SJA1105 DSA

2019-09-09 Thread Joergen Andreasen
The 09/08/2019 22:42, Andrew Lunn wrote: > On Sun, Sep 08, 2019 at 12:07:27PM +0100, Vladimir Oltean wrote: > > I think Richard has been there when the taprio, etf qdiscs, SO_TXTIME > > were first defined and developed: > > https://patchwork.ozlabs.org/cover/808504/ > > I expect he is capable of de

Re: VRF Issue Since kernel 5

2019-09-09 Thread Alexis Bauvin
Hi, I guess all routing from the management VRF itself is working correctly (i.e. cURLing an IP from this VRF or digging any DNS), and it is your route leakage that’s at fault. Could you try swapping the local and l3mdev rules? `ip rule del pref 0; ip rule add from all lookup local pref 1001`

[PATCH 1/2] NET: m_can: split into core library and platform adaptation

2019-09-09 Thread Felipe Balbi
A future patch will add PCI-based m_can driver. This patch makes that a lot simpler. Signed-off-by: Felipe Balbi --- drivers/net/can/m_can/Kconfig | 10 + drivers/net/can/m_can/Makefile | 1 + drivers/net/can/m_can/m_can.c | 707 ++--- drivers/net

[PATCH 2/2] NET: m_can: add PCI glue driver

2019-09-09 Thread Felipe Balbi
Some intel platforms support an MCAN controller attached to the PCI bus. This minimal driver adds support for those. Signed-off-by: Felipe Balbi --- drivers/net/can/m_can/Kconfig | 7 + drivers/net/can/m_can/Makefile| 1 + drivers/net/can/m_can/m_can_pci.c | 222 +

Re: [PATCH] ncsi-netlink: support sending NC-SI commands over Netlink interface

2019-09-09 Thread Brad Bishop
Do you have plans to upstream your yocto recipe for this repo? Yes I sure can upstream the recipe file. I had to make local changes to build ncsi-netlink for my BMC platform. Is there a group I may submit my recipe to? Hi Ben Can you try meta-openembedded? If they will not take it, I’m ha

Re: [PATCH v2 0/4] Deterministic SPI latency with NXP DSPI driver

2019-09-09 Thread Mark Brown
On Thu, Sep 05, 2019 at 04:01:10AM +0300, Vladimir Oltean wrote: > This patchset proposes an interface from the SPI subsystem for > software timestamping SPI transfers. There is a default implementation > provided in the core, as well as a mechanism for SPI slave drivers to > check which byte was

Re: VRF Issue Since kernel 5

2019-09-09 Thread Alexis Bauvin
Hi, There has been some changes regarding VRF isolation in Linux 5 IIRC, namely proper isolation of the default VRF. Some things you may try: - looking at the l3mdev_accept sysctls (e.g. `net.ipv4.tcp_l3mdev_accept`) - querying stuff from the management vrf through `ip vrf exec vrf-mgmt ` e.g

[PATCHv2 ipsec-next] xfrm: remove the unnecessary .net_exit for xfrmi

2019-09-09 Thread Xin Long
The xfrm_if(s) on each netns can be deleted when its xfrmi dev is deleted. xfrmi dev's removal can happen when: a. netns is being removed and all xfrmi devs will be deleted. b. rtnl_link_unregister(&xfrmi_link_ops) in xfrmi_fini() when xfrm_interface.ko is being unloaded. So there's no

[PATCH net-next 3/5] sctp: add SCTP_EXPOSE_POTENTIALLY_FAILED_STATE sockopt

2019-09-09 Thread Xin Long
This is a sockopt defined in section 7.3 of rfc7829: "Exposing the Potentially Failed Path State", by which users can change pf_expose per sock and asoc. Signed-off-by: Xin Long --- include/uapi/linux/sctp.h | 1 + net/sctp/socket.c | 76 +++

[PATCH net-next 5/5] sctp: add spt_pathcpthld in struct sctp_paddrthlds

2019-09-09 Thread Xin Long
Section 7.2 of rfc7829: "Peer Address Thresholds (SCTP_PEER_ADDR_THLDS) Socket Option" extends 'struct sctp_paddrthlds' with 'spt_pathcpthld' added to allow a user to change ps_retrans per sock/asoc/transport, as other 2 paddrthlds: pf_retrans, pathmaxrxt. Note that ps_retrans is not allowed to be

[PATCH net-next 2/5] sctp: add pf_expose per netns and sock and asoc

2019-09-09 Thread Xin Long
As said in rfc7829, section 3, point 12: The SCTP stack SHOULD expose the PF state of its destination addresses to the ULP as well as provide the means to notify the ULP of state transitions of its destination addresses from active to PF, and vice versa. However, it is recommended that

[PATCH net-next 4/5] sctp: add support for Primary Path Switchover

2019-09-09 Thread Xin Long
This is a new feature defined in section 5 of rfc7829: "Primary Path Switchover". By introducing a new tunable parameter: Primary.Switchover.Max.Retrans (PSMR) The primary path will be changed to another active path when the path error counter on the old primary path exceeds PSMR, so that "the

[PATCH net-next 1/5] sctp: add SCTP_ADDR_POTENTIALLY_FAILED notification

2019-09-09 Thread Xin Long
SCTP Quick failover draft section 5.1, point 5 has been removed from rfc7829. Instead, "the sender SHOULD (i) notify the Upper Layer Protocol (ULP) about this state transition", as said in section 3.2, point 8. So this patch is to add SCTP_ADDR_POTENTIALLY_FAILED, defined in section 7.1, "which is

[PATCH net-next 0/5] sctp: update from rfc7829

2019-09-09 Thread Xin Long
SCTP-PF was implemented based on a Internet-Draft in 2012: https://tools.ietf.org/html/draft-nishida-tsvwg-sctp-failover-05 It's been updated quite a few by rfc7829 in 2016. This patchset adds the following features: 1. add SCTP_ADDR_POTENTIALLY_FAILED notification 2. add pf_expose per ne

VRF Issue Since kernel 5

2019-09-09 Thread Gowen
Hi there, Dave A said this was the mailer to send this to: I’ve been using my management interface in a VRF for several months now and it’s worked perfectly – I’ve been able to update/upgrade the packages just fine and iptables works excellently with it – exactly as I needed. Since Kernel 5

[PATCH net] sctp: fix the missing put_user when dumping transport thresholds

2019-09-09 Thread Xin Long
This issue causes SCTP_PEER_ADDR_THLDS sockopt not to be able to dump a transport thresholds info. Fix it by adding 'goto' put_user in sctp_getsockopt_paddr_thresholds. Fixes: 8add543e369d ("sctp: add SCTP_FUTURE_ASSOC for SCTP_PEER_ADDR_THLDS sockopt") Signed-off-by: Xin Long --- net/sctp/soc

mta test

2019-09-09 Thread Gowen
Cannot get anything through the filter - another test

Re: [PATCH v1 net-next 00/15] tc-taprio offload for SJA1105 DSA

2019-09-09 Thread Richard Cochran
On Sun, Sep 08, 2019 at 12:07:27PM +0100, Vladimir Oltean wrote: > I think Richard has been there when the taprio, etf qdiscs, SO_TXTIME > were first defined and developed: > https://patchwork.ozlabs.org/cover/808504/ > I expect he is capable of delivering a competent review of the entire > series,