Re: [PATCH next-queue v3 1/3] Revert "PCI: Make pci_enable_ptm() private"

2021-03-23 Thread Vinicius Costa Gomes
Bjorn Helgaas writes: > On Mon, Mar 22, 2021 at 09:18:20AM -0700, Vinicius Costa Gomes wrote: >> Make pci_enable_ptm() accessible from the drivers. >> >> Even if PTM still works on the platform I am using without calling >> this function, it might be possible th

Re: [PATCH next-queue v3 3/3] igc: Add support for PTP getcrosststamp()

2021-03-23 Thread Vinicius Costa Gomes
Bjorn Helgaas writes: > On Mon, Mar 22, 2021 at 09:18:22AM -0700, Vinicius Costa Gomes wrote: >> i225 has support for PCIe PTM, which allows us to implement support >> for the PTP_SYS_OFFSET_PRECISE ioctl(), implemented in the driver via >> the getcrosststamp() functi

Re: [PATCH next-queue v3 2/3] igc: Enable PCIe PTM

2021-03-23 Thread Vinicius Costa Gomes
Bjorn Helgaas writes: > On Mon, Mar 22, 2021 at 09:18:21AM -0700, Vinicius Costa Gomes wrote: >> In practice, enabling PTM also sets the enabled_ptm flag in the PCI >> device, the flag will be used for detecting if PTM is enabled before >> adding support for the SYSOFFSET_P

Re: [PATCH next-queue v3 1/3] Revert "PCI: Make pci_enable_ptm() private"

2021-03-23 Thread Vinicius Costa Gomes
Christoph Hellwig writes: > On Mon, Mar 22, 2021 at 09:18:20AM -0700, Vinicius Costa Gomes wrote: >> Make pci_enable_ptm() accessible from the drivers. >> >> Even if PTM still works on the platform I am using without calling >> this function, it might be possible th

[PATCH next-queue v3 3/3] igc: Add support for PTP getcrosststamp()

2021-03-22 Thread Vinicius Costa Gomes
others (see the variation the delay values). Signed-off-by: Vinicius Costa Gomes --- drivers/net/ethernet/intel/igc/igc.h | 1 + drivers/net/ethernet/intel/igc/igc_defines.h | 31 drivers/net/ethernet/intel/igc/igc_ptp.c | 173 +++ drivers/net/ethernet/intel/igc/i

[PATCH next-queue v3 2/3] igc: Enable PCIe PTM

2021-03-22 Thread Vinicius Costa Gomes
In practice, enabling PTM also sets the enabled_ptm flag in the PCI device, the flag will be used for detecting if PTM is enabled before adding support for the SYSOFFSET_PRECISE ioctl() (which is added by implementing the getcrosststamp() PTP function). Signed-off-by: Vinicius Costa Gomes

[PATCH next-queue v3 0/3] igc: Add support for PCIe PTM

2021-03-22 Thread Vinicius Costa Gomes
ck be done? Cheers, Vinicius Costa Gomes (3): Revert "PCI: Make pci_enable_ptm() private" igc: Enable PCIe PTM igc: Add support for PTP getcrosststamp() drivers/net/ethernet/intel/igc/igc.h | 1 + drivers/net/ethernet/intel/igc/igc_defines.h | 31 drivers/ne

[PATCH next-queue v3 1/3] Revert "PCI: Make pci_enable_ptm() private"

2021-03-22 Thread Vinicius Costa Gomes
' to check if PTM is enabled or not. This reverts commit ac6c26da29c12fa511c877c273ed5c939dc9e96c. Signed-off-by: Vinicius Costa Gomes Acked-by: Bjorn Helgaas --- drivers/pci/pci.h | 3 --- include/linux/pci.h | 7 +++ 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/dr

Re: [Intel-wired-lan] [PATCH next-queue v2 3/3] igc: Add support for PTP getcrosststamp()

2021-03-22 Thread Vinicius Costa Gomes
Miroslav Lichvar writes: > On Mon, Nov 09, 2020 at 10:10:19PM -0800, Vinicius Costa Gomes wrote: >> i225 has support for PCIe PTM, which allows us to implement support >> for the PTP_SYS_OFFSET_PRECISE ioctl(), implemented in the driver via >> the getcrosststamp() func

Re: [Intel-wired-lan] [PATCH next-queue v2 3/3] igc: Add support for PTP getcrosststamp()

2021-03-22 Thread Vinicius Costa Gomes
Hi, Richard Cochran writes: > On Tue, Nov 17, 2020 at 05:21:48PM -0800, Vinicius Costa Gomes wrote: >> Agreed that would be easiest/simplest. But what I have in hand seems to >> not like it, i.e. I have an earlier series implementing this "one shot" way >>

Re: [PATCH RFC net-next] taprio: Handle short intervals and large packets

2021-03-12 Thread Vinicius Costa Gomes
Kurt Kanzenbach writes: > When using short intervals e.g. below one millisecond, large packets won't be > transmitted at all. The software implementations checks whether the packet can > be fit into the remaining interval. Therefore, it takes the packet length and > the transmission speed into ac

Re: [PATCH net-next] net: add a helper to avoid issues with HW TX timestamping and SO_TXTIME

2021-03-10 Thread Vinicius Costa Gomes
itpick: to my ears, it seems that you meant "call"/"use" instead of "implement". > would make it easier to assess during review whether they do the right > thing in order to be compatible with hardware timestamping or not. > > Suggested-by: Vinicius Cos

Re: [PATCH net 2/2] net: enetc: allow hardware timestamping on TX queues with tc-etf enabled

2021-03-08 Thread Vinicius Costa Gomes
f introducing a helper, something like: skb_txtime_consumed() to make it even clearer what's going on. > > Do what other drivers do (intel igb/igc) and write zero to skb->tstamp > before taking the hardware timestamp. It's of no use to us now (we're > already on the TX confirmation path). > > Fixes: 0d08c9ec7d6e ("enetc: add support time specific departure base on the > qos etf") > Cc: Vinicius Costa Gomes > Signed-off-by: Vladimir Oltean > --- Anyway, Acked-by: Vinicius Costa Gomes Cheers, -- Vinicius

Re: [PATCH net-next v3 1/8] ethtool: Add support for configuring frame preemption

2021-03-05 Thread Vinicius Costa Gomes
Vladimir Oltean writes: > On Tue, Mar 02, 2021 at 04:40:55PM -0800, Vinicius Costa Gomes wrote: >> Hi Vladimir, >> >> Vladimir Oltean writes: >> >> > Hi Vinicius, >> > >> > On Fri, Jan 22, 2021 at 02:44:46PM -0800, Vinicius Costa Gomes wr

Re: INFO: rcu detected stall in corrupted (4)

2021-03-05 Thread Vinicius Costa Gomes
20200507 >> syz repro: https://syzkaller.appspot.com/x/repro.syz?x=14eeda2590 >> C reproducer: https://syzkaller.appspot.com/x/repro.c?x=161472f590 >> >> The issue was bisected to: >> >> commit 5a781ccbd19e4664babcbe4b4ead7aa2b9283d22 >> Author: Vi

Re: [PATCH net-next v3 1/8] ethtool: Add support for configuring frame preemption

2021-03-02 Thread Vinicius Costa Gomes
Hi Vladimir, Vladimir Oltean writes: > Hi Vinicius, > > On Fri, Jan 22, 2021 at 02:44:46PM -0800, Vinicius Costa Gomes wrote: >> Frame preemption (described in IEEE 802.3br-2016) defines the concept >> of preemptible and express queues. It allows traffic from express &g

Re: [PATCH net 1/1] net: stmmac: set TxQ mode back to DCB after disabling CBS

2021-02-05 Thread Vinicius Costa Gomes
ot;net: stmmac: Add support for CBS QDISC") > Suggested-by: Gomes, Vinicius Just a nitpick/formality, I would prefer if you used: Suggested-by: Vinicius Costa Gomes > Signed-off-by: Mohammad Athari Bin Ismail > Signed-off-by: Song, Yoong Siang Patch looks good. Acked-by: Vinicius Costa Gomes Cheers, -- Vinicius

Re: [PATCH net-next v3 0/8] ethtool: Add support for frame preemption

2021-01-29 Thread Vinicius Costa Gomes
Vladimir Oltean writes: > On Fri, Jan 22, 2021 at 02:44:45PM -0800, Vinicius Costa Gomes wrote: >> This is still an RFC because two main reasons, I want to confirm that >> this approach (per-queue settings via qdiscs, device settings via >> ethtool) looks good, even though t

Re: [PATCH net-next v3 2/8] taprio: Add support for frame preemption offload

2021-01-29 Thread Vinicius Costa Gomes
Vladimir Oltean writes: > On Fri, Jan 29, 2021 at 01:13:24PM -0800, Vinicius Costa Gomes wrote: >> > Secondly, why should at least one queue be preemptible? What's wrong >> > with frame preemption being triggered by a tc-taprio window smaller than >> > the pack

Re: [PATCH net-next v3 2/8] taprio: Add support for frame preemption offload

2021-01-29 Thread Vinicius Costa Gomes
Jakub Kicinski writes: >> > First I'm interested in the means: why check for preempt == U32_MAX when >> > you determine that all traffic classes are preemptible? What if less >> > than 32 traffic classes are used by the netdev? The check will be >> > bypassed, won't it? >> >> Good catch :-) >>

Re: [PATCH net-next v3 6/8] igc: Add support for tuning frame preemption via ethtool

2021-01-29 Thread Vinicius Costa Gomes
Vladimir Oltean writes: > On Fri, Jan 22, 2021 at 02:44:51PM -0800, Vinicius Costa Gomes wrote: >> The tc subsystem sets which queues are marked as preemptible, it's the >> role of ethtool to control more hardware specific parameters. These >> parameters include: &g

Re: [PATCH net-next v3 2/8] taprio: Add support for frame preemption offload

2021-01-29 Thread Vinicius Costa Gomes
Vladimir Oltean writes: > On Fri, Jan 22, 2021 at 02:44:47PM -0800, Vinicius Costa Gomes wrote: >> +/* It's valid to enable frame preemption without any kind of >> + * offloading being enabled, so keep it separated. >> + */ >> +if

Re: [PATCH net-next v3 5/8] igc: Avoid TX Hangs because long cycles

2021-01-29 Thread Vinicius Costa Gomes
Hi, Vladimir Oltean writes: > On Fri, Jan 22, 2021 at 02:44:50PM -0800, Vinicius Costa Gomes wrote: >> Avoid possible TX Hangs caused by using long Qbv cycles. In some >> cases, using long cycles (more than 1 second) can cause transmissions >> to be blocked for that time. A

[PATCH net-next v3 1/8] ethtool: Add support for configuring frame preemption

2021-01-22 Thread Vinicius Costa Gomes
tion there should be easier on the user. Signed-off-by: Vinicius Costa Gomes --- Documentation/networking/ethtool-netlink.rst | 38 + include/linux/ethtool.h | 23 ++- include/uapi/linux/ethtool_netlink.h | 17 +++ net/ethtool/Makefile |

[PATCH net-next v3 5/8] igc: Avoid TX Hangs because long cycles

2021-01-22 Thread Vinicius Costa Gomes
1ms. Signed-off-by: Vinicius Costa Gomes --- drivers/net/ethernet/intel/igc/igc_main.c | 4 ++-- drivers/net/ethernet/intel/igc/igc_tsn.c | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/net/ethernet/intel/igc/igc_main.c b/drivers/net/ethernet/intel/igc

[PATCH net-next v3 6/8] igc: Add support for tuning frame preemption via ethtool

2021-01-22 Thread Vinicius Costa Gomes
it's exposed via the ethtool API; - mininum fragment size multiplier: expressed in usually in the form of (1 + N)*64, this number indicates what's the size of the minimum fragment that can be preempted. Signed-off-by: Vinicius Costa Gomes --- drivers/net/ethernet/intel/igc/igc

[PATCH net-next v3 4/8] igc: Only dump registers if configured to dump HW information

2021-01-22 Thread Vinicius Costa Gomes
To avoid polluting the users logs with register dumps, only dump the adapter's registers if configured to do so. If users want to enable HW status messages they can do: $ ethtool -s IFACE msglvl hw on Signed-off-by: Vinicius Costa Gomes --- drivers/net/ethernet/intel/igc/igc_dump.c | 3 +

[PATCH net-next v3 8/8] igc: Separate TSN configurations that can be updated

2021-01-22 Thread Vinicius Costa Gomes
dirty" state, and if necessary will request an adapter reset, so "_reset" always run with a "clean" adapter. The idea is to make the process easier to follow. Signed-off-by: Vinicius Costa Gomes --- drivers/net/ethernet/intel/igc/igc_main.c | 21 ++-- drivers/net/ethernet/in

[PATCH net-next v3 7/8] igc: Add support for Frame Preemption offload

2021-01-22 Thread Vinicius Costa Gomes
After the set of queues that are marked as preemptible are exposed to the driver we can configure the hardware to enable the frame preemption functionality. Signed-off-by: Vinicius Costa Gomes --- drivers/net/ethernet/intel/igc/igc_main.c | 32 +++ 1 file changed, 32

[PATCH net-next v3 2/8] taprio: Add support for frame preemption offload

2021-01-22 Thread Vinicius Costa Gomes
Signed-off-by: Vinicius Costa Gomes --- include/linux/netdevice.h | 1 + include/net/pkt_sched.h| 4 include/uapi/linux/pkt_sched.h | 1 + net/sched/sch_taprio.c | 43 ++ 4 files changed, 44 insertions(+), 5 deletions(-) diff --git

[PATCH net-next v3 0/8] ethtool: Add support for frame preemption

2021-01-22 Thread Vinicius Costa Gomes
do ./ethtool --set-frame-preemption $IFACE fp on min-frag-size 192 Cheers, Vinicius Costa Gomes (8): ethtool: Add support for configuring frame preemption taprio: Add support for frame preemption offload igc: Set the RX packet buffer size for TSN mode igc: Only dump registers if configured t

[PATCH net-next v3 3/8] igc: Set the RX packet buffer size for TSN mode

2021-01-22 Thread Vinicius Costa Gomes
In preparation for supporting frame preemption, when entering TSN mode set the receive packet buffer to 16KB for the Express MAC, 16KB for the Preemptible MAC and 2KB for the BMC, according to the datasheet section 7.1.3.2. Signed-off-by: Vinicius Costa Gomes --- drivers/net/ethernet/intel/igc

Re: [PATCH net-next v2 6/8] igc: Add support for tuning frame preemption via ethtool

2021-01-21 Thread Vinicius Costa Gomes
Jakub Kicinski writes: > On Mon, 18 Jan 2021 16:40:26 -0800 Vinicius Costa Gomes wrote: >> +NL_SET_ERR_MSG(extack, "Invalid value for add-frag-size"); > > NL_SET_ERR_MSG_MOD Will fix. Thanks. Cheers, -- Vinicius

Re: [PATCH net-next v2 1/8] ethtool: Add support for configuring frame preemption

2021-01-21 Thread Vinicius Costa Gomes
Jakub Kicinski writes: > On Mon, 18 Jan 2021 16:40:21 -0800 Vinicius Costa Gomes wrote: >> + == == >> + ``ETHTOOL_A_CHANNELS_HEADER`` nested request header > > ETH

Re: [PATCH net-next v2 2/8] taprio: Add support for frame preemption offload

2021-01-21 Thread Vinicius Costa Gomes
Jakub Kicinski writes: > On Mon, 18 Jan 2021 16:40:22 -0800 Vinicius Costa Gomes wrote: >> Adds a way to configure which traffic classes are marked as >> preemptible and which are marked as express. >> >> Even if frame preemption is not a "real" offload, b

Re: [PATCH net-next v2 1/8] ethtool: Add support for configuring frame preemption

2021-01-19 Thread Vinicius Costa Gomes
Hi Vladimir, Vladimir Oltean writes: > On Mon, Jan 18, 2021 at 04:40:21PM -0800, Vinicius Costa Gomes wrote: >> +int ethnl_set_preempt(struct sk_buff *skb, struct genl_info *info) >> +{ >> +struct ethnl_req_info req_info = {}; >> +struct nlattr **tb =

[PATCH net-next v2 2/8] taprio: Add support for frame preemption offload

2021-01-18 Thread Vinicius Costa Gomes
Signed-off-by: Vinicius Costa Gomes --- include/linux/netdevice.h | 1 + include/net/pkt_sched.h| 4 include/uapi/linux/pkt_sched.h | 1 + net/sched/sch_taprio.c | 41 ++ 4 files changed, 43 insertions(+), 4 deletions(-) diff --git

[PATCH net-next v2 7/8] igc: Add support for Frame Preemption offload

2021-01-18 Thread Vinicius Costa Gomes
After the set of queues that are marked as preemptible are exposed to the driver we can configure the hardware to enable the frame preemption functionality. Signed-off-by: Vinicius Costa Gomes --- drivers/net/ethernet/intel/igc/igc_main.c | 32 +++ 1 file changed, 32

[PATCH net-next v2 8/8] igc: Separate TSN configurations that can be updated

2021-01-18 Thread Vinicius Costa Gomes
dirty" state, and if necessary will request an adapter reset, so "_reset" always run with a "clean" adapter. The idea is to make the process easier to follow. Signed-off-by: Vinicius Costa Gomes --- drivers/net/ethernet/intel/igc/igc_main.c | 21 ++-- drivers/net/ethernet/in

[PATCH net-next v2 3/8] igc: Set the RX packet buffer size for TSN mode

2021-01-18 Thread Vinicius Costa Gomes
In preparation for supporting frame preemption, when entering TSN mode set the receive packet buffer to 16KB for the Express MAC, 16KB for the Preemptible MAC and 2KB for the BMC, according to the datasheet section 7.1.3.2. Signed-off-by: Vinicius Costa Gomes --- drivers/net/ethernet/intel/igc

[PATCH net-next v2 6/8] igc: Add support for tuning frame preemption via ethtool

2021-01-18 Thread Vinicius Costa Gomes
it's exposed via the ethtool API; - mininum fragment size multiplier: expressed in usually in the form of (1 + N)*64, this number indicates what's the size of the minimum fragment that can be preempted. Signed-off-by: Vinicius Costa Gomes --- drivers/net/ethernet/intel/igc/igc

[PATCH net-next v2 4/8] igc: Only dump registers if configured to dump HW information

2021-01-18 Thread Vinicius Costa Gomes
To avoid polluting the users logs with register dumps, only dump the adapter's registers if configured to do so. If users want to enable HW status messages they can do: $ ethtool -s IFACE msglvl hw on Signed-off-by: Vinicius Costa Gomes --- drivers/net/ethernet/intel/igc/igc_dump.c | 3 +

[PATCH net-next v2 5/8] igc: Avoid TX Hangs because long cycles

2021-01-18 Thread Vinicius Costa Gomes
1ms. Signed-off-by: Vinicius Costa Gomes --- drivers/net/ethernet/intel/igc/igc_main.c | 4 ++-- drivers/net/ethernet/intel/igc/igc_tsn.c | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/net/ethernet/intel/igc/igc_main.c b/drivers/net/ethernet/intel/igc

[PATCH net-next v2 1/8] ethtool: Add support for configuring frame preemption

2021-01-18 Thread Vinicius Costa Gomes
tion there should be easier on the user. Signed-off-by: Vinicius Costa Gomes --- Documentation/networking/ethtool-netlink.rst | 38 + include/linux/ethtool.h | 39 - include/uapi/linux/ethtool_netlink.h | 17 +++ net/ethtool/Makefile |

[PATCH net-next v2 0/8] ethtool: Add support for frame preemption

2021-01-18 Thread Vinicius Costa Gomes
be to enable frame preemption in the device, via ethtool, and set the minimum fragment size to 2: $ sudo ./ethtool --set-frame-preemption $IFACE fp on min-frag-size 2 Cheers, Vinicius Costa Gomes (8): ethtool: Add support for configuring frame preemption taprio: Add support for frame preemption

Re: [PATCH net] net/sched: sch_taprio: reset child qdiscs before freeing them

2020-12-16 Thread Vinicius Costa Gomes
nfiguring the taprio scheduler") > Link: > https://syzkaller.appspot.com/bug?id=f362872379bf8f0017fb667c1ab158f2d1e764ae > Reported-by: syzbot+8971da381fb5a31f5...@syzkaller.appspotmail.com > Signed-off-by: Davide Caratti > --- Acked-by: Vinicius Costa Gomes Cheers, -- Vinicius

Re: [PATCH 1/3] Add TX sending hardware timestamp.

2020-12-10 Thread Vinicius Costa Gomes
Willem de Bruijn writes: >> > If I understand correctly, you are trying to achieve a single delivery >> > time. >> > The need for two separate timestamps passed along is only because the >> > kernel is unable to do the time base conversion. >> >> Yes, a correct point. >> >> > >> > Else, ETF coul

Re: [PATCH net-next v1 0/9] ethtool: Add support for frame preemption

2020-12-07 Thread Vinicius Costa Gomes
Vladimir Oltean writes: > On Mon, Dec 07, 2020 at 02:49:35PM -0800, Vinicius Costa Gomes wrote: >> Jakub Kicinski writes: >> >> > On Tue, 1 Dec 2020 20:53:16 -0800 Vinicius Costa Gomes wrote: >> >> $ tc qdisc replace dev $IFACE parent root hand

Re: [PATCH net-next v1 1/9] ethtool: Add support for configuring frame preemption

2020-12-07 Thread Vinicius Costa Gomes
Jakub Kicinski writes: > On Mon, 07 Dec 2020 14:11:48 -0800 Vinicius Costa Gomes wrote: >> Jakub Kicinski writes: >> >> + * @min_frag_size_mult: Minimum size for all non-final fragment size, >> >> + * expressed in terms of X in '(1 + X)*64 + 4' >&

Re: [PATCH net-next v1 0/9] ethtool: Add support for frame preemption

2020-12-07 Thread Vinicius Costa Gomes
Jakub Kicinski writes: > On Tue, 1 Dec 2020 20:53:16 -0800 Vinicius Costa Gomes wrote: >> $ tc qdisc replace dev $IFACE parent root handle 100 taprio \ >> num_tc 3 \ >> map 2 2 1 0 2 2 2 2 2 2 2 2 2 2 2 2 \ >> queues 1@0 1@1 2@2 \ >> base

Re: [PATCH net-next v1 8/9] igc: Add support for exposing frame preemption stats registers

2020-12-07 Thread Vinicius Costa Gomes
Jakub Kicinski writes: > On Tue, 1 Dec 2020 20:53:24 -0800 Vinicius Costa Gomes wrote: >> Expose the Frame Preemption counters, so the number of >> express/preemptible packets can be monitored by userspace. >> >> These registers are cleared when read, so the valu

Re: [PATCH net-next v1 6/9] igc: Add support for tuning frame preemption via ethtool

2020-12-07 Thread Vinicius Costa Gomes
Jakub Kicinski writes: > On Tue, 1 Dec 2020 20:53:22 -0800 Vinicius Costa Gomes wrote: >> The tc subsystem sets which queues are marked as preemptible, it's the >> role of ethtool to control more hardware specific parameters. These >> parameters include: >> >

Re: [PATCH net-next v1 1/9] ethtool: Add support for configuring frame preemption

2020-12-07 Thread Vinicius Costa Gomes
Jakub Kicinski writes: >> diff --git a/include/linux/ethtool.h b/include/linux/ethtool.h >> index e3da25b51ae4..16d6ee29a6ac 100644 >> --- a/include/linux/ethtool.h >> +++ b/include/linux/ethtool.h >> @@ -263,6 +263,19 @@ struct ethtool_pause_stats { >> u64 rx_pause_frames; >> }; >> >> +/

[PATCH net-next v1 3/9] igc: Set the RX packet buffer size for TSN mode

2020-12-01 Thread Vinicius Costa Gomes
In preparation for supporting frame preemption, when entering TSN mode set the receive packet buffer to 16KB for the Express MAC, 16KB for the Preemptible MAC and 2KB for the BMC, according to the datasheet section 7.1.3.2. Signed-off-by: Vinicius Costa Gomes --- drivers/net/ethernet/intel/igc

[PATCH net-next v1 6/9] igc: Add support for tuning frame preemption via ethtool

2020-12-01 Thread Vinicius Costa Gomes
it's exposed via the ethtool API; - mininum fragment size multiplier: expressed in usually in the form of (1 + N)*64, this number indicates what's the size of the minimum fragment that can be preempted. Signed-off-by: Vinicius Costa Gomes --- drivers/net/ethernet/intel/igc/igc

[PATCH net-next v1 9/9] igc: Separate TSN configurations that can be updated

2020-12-01 Thread Vinicius Costa Gomes
dirty" state, and if necessary will request an adapter reset, so "_reset" always run with a "clean" adapter. The idea is to make the process easier to follow. Signed-off-by: Vinicius Costa Gomes --- drivers/net/ethernet/intel/igc/igc_main.c | 21 ++-- drivers/net/ethernet/in

[PATCH net-next v1 2/9] taprio: Add support for frame preemption offload

2020-12-01 Thread Vinicius Costa Gomes
ully, easier to understand. Signed-off-by: Vinicius Costa Gomes --- include/linux/netdevice.h | 1 + include/net/pkt_sched.h| 4 include/uapi/linux/pkt_sched.h | 1 + net/sched/sch_taprio.c | 41 ++ 4 files changed, 43 insertions(+), 4 del

[PATCH net-next v1 5/9] igc: Avoid TX Hangs because long cycles

2020-12-01 Thread Vinicius Costa Gomes
1ms. Signed-off-by: Vinicius Costa Gomes --- drivers/net/ethernet/intel/igc/igc_main.c | 4 ++-- drivers/net/ethernet/intel/igc/igc_tsn.c | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/net/ethernet/intel/igc/igc_main.c b/drivers/net/ethernet/intel/igc

[PATCH net-next v1 8/9] igc: Add support for exposing frame preemption stats registers

2020-12-01 Thread Vinicius Costa Gomes
Expose the Frame Preemption counters, so the number of express/preemptible packets can be monitored by userspace. These registers are cleared when read, so the value shown is the number of events that happened since the last read. Signed-off-by: Vinicius Costa Gomes --- drivers/net/ethernet

[PATCH net-next v1 4/9] igc: Only dump registers if configured to dump HW information

2020-12-01 Thread Vinicius Costa Gomes
To avoid polluting the users logs with register dumps, only dump the adapter's registers if configured to do so. If users want to enable HW status messages they can do: $ ethtool -s IFACE msglvl hw on Signed-off-by: Vinicius Costa Gomes --- drivers/net/ethernet/intel/igc/igc_dump.c | 3 +

[PATCH net-next v1 7/9] igc: Add support for Frame Preemption offload

2020-12-01 Thread Vinicius Costa Gomes
After the set of queues that are marked as preemptible are exposed to the driver we can configure the hardware to enable the frame preemption functionality. Signed-off-by: Vinicius Costa Gomes --- drivers/net/ethernet/intel/igc/igc_main.c | 32 +++ 1 file changed, 32

[PATCH net-next v1 1/9] ethtool: Add support for configuring frame preemption

2020-12-01 Thread Vinicius Costa Gomes
tion there should be easier on the user. Signed-off-by: Vinicius Costa Gomes --- include/linux/ethtool.h | 19 include/uapi/linux/ethtool_netlink.h | 17 +++ net/ethtool/Makefile | 2 +- net/ethtool/netlink.c| 19 net/ethtool/netlink.h

[PATCH net-next v1 0/9] ethtool: Add support for frame preemption

2020-12-01 Thread Vinicius Costa Gomes
uld be to enable frame preemption in the device, via ethtool, and set the minimum fragment size to 2: $ sudo ./ethtool --set-frame-preemption $IFACE fp on min-frag-size 2 Cheers, Vinicius Costa Gomes (9): ethtool: Add support for configuring frame preemption taprio: Add support for frame pre

Re: [Intel-wired-lan] [PATCH next-queue v2 3/3] igc: Add support for PTP getcrosststamp()

2020-11-20 Thread Vinicius Costa Gomes
Hi Jakub, Jakub Kicinski writes: > On Tue, 17 Nov 2020 17:21:48 -0800 Vinicius Costa Gomes wrote: >> > Also, what is the point of providing time measurements every 1 >> > millisecond? >> >> I sincerely have no idea. I had no power on how the hardware

Re: [Intel-wired-lan] [PATCH next-queue v2 3/3] igc: Add support for PTP getcrosststamp()

2020-11-20 Thread Vinicius Costa Gomes
Hi Richard, Richard Cochran writes: > On Wed, Nov 18, 2020 at 04:22:37PM -0800, Vinicius Costa Gomes wrote: > >> Talking with the hardware folks, they recommended using the periodic >> method, the one shot method was implemented as a debug/evaluation aid. > > I&#

Re: [Intel-wired-lan] [PATCH next-queue v2 3/3] igc: Add support for PTP getcrosststamp()

2020-11-18 Thread Vinicius Costa Gomes
Hi Richard, Richard Cochran writes: > On Tue, Nov 17, 2020 at 05:21:48PM -0800, Vinicius Costa Gomes wrote: >> Agreed that would be easiest/simplest. But what I have in hand seems to >> not like it, i.e. I have an earlier series implementing this "one shot" way >

Re: [Intel-wired-lan] [PATCH next-queue v2 3/3] igc: Add support for PTP getcrosststamp()

2020-11-17 Thread Vinicius Costa Gomes
Richard Cochran writes: > On Mon, Nov 16, 2020 at 05:06:30PM -0800, Vinicius Costa Gomes wrote: >> The PTM dialogs are a pair of messages: a Request from the endpoint (in >> my case, the NIC) to the PCIe root (or switch), and a Response from the >> other side (this messag

Re: [Intel-wired-lan] [PATCH next-queue v2 3/3] igc: Add support for PTP getcrosststamp()

2020-11-16 Thread Vinicius Costa Gomes
Hi Richard, Richard Cochran writes: > What is a PTM? Why does a PTM have dialogs? Can it talk? > > Forgive my total ignorance! :-) We are talking about PCIe PTM (Precise Time Measurement), basically it's a PTP-like protocol running on the PCIe fabric. The PTM dialogs are a pair of messages:

Re: [Intel-wired-lan] [PATCH next-queue v2 3/3] igc: Add support for PTP getcrosststamp()

2020-11-13 Thread Vinicius Costa Gomes
Hi Richard, Richard Cochran writes: > On Thu, Nov 12, 2020 at 03:46:12PM -0800, Vinicius Costa Gomes wrote: >> I wanted it so using PCIe PTM was transparent to applications, so adding >> another API wouldn't be my preference. >> >> That being said, having a

Re: [Intel-wired-lan] [PATCH next-queue v2 3/3] igc: Add support for PTP getcrosststamp()

2020-11-12 Thread Vinicius Costa Gomes
Miroslav Lichvar writes: > Considering how the existing applications work, ideally the > measurements would be performed on demand from the ioctl to minimize > the delay. If that's not possible, maybe it would be better to provide > the measurements on a descriptor at their own rate, which could

Re: [net 0/4][pull request] Intel Wired LAN Driver Updates 2020-11-10

2020-11-12 Thread Vinicius Costa Gomes
Jakub Kicinski writes: > > Pulled, thanks! > > Please double check the use of the spin lock in patch 3. Stats are > updated in an atomic context when read from /proc, you probably need > to convert that spin lock to _bh. I just did some tests with lockdep enabled, reading from /proc/net/dev in a

Re: [Intel-wired-lan] [PATCH next-queue v2 3/3] igc: Add support for PTP getcrosststamp()

2020-11-11 Thread Vinicius Costa Gomes
Hi, Miroslav Lichvar writes: > On Mon, Nov 09, 2020 at 10:10:19PM -0800, Vinicius Costa Gomes wrote: >> i225 has support for PCIe PTM, which allows us to implement support >> for the PTP_SYS_OFFSET_PRECISE ioctl(), implemented in the driver via >> the getcrosststamp() func

Re: [Intel-wired-lan] [PATCH next-queue v2 3/3] igc: Add support for PTP getcrosststamp()

2020-11-11 Thread Vinicius Costa Gomes
Miroslav Lichvar writes: > On Tue, Nov 10, 2020 at 11:06:07AM -0800, Vinicius Costa Gomes wrote: >> Miroslav Lichvar writes: >> > I suspect the estimate would be valid only when the NIC is connected >> > directly to the PTM root (PCI root complex). Is it possible to

Re: [Intel-wired-lan] [PATCH next-queue v2 3/3] igc: Add support for PTP getcrosststamp()

2020-11-10 Thread Vinicius Costa Gomes
Miroslav Lichvar writes: > On Mon, Nov 09, 2020 at 10:10:19PM -0800, Vinicius Costa Gomes wrote: >> i225 has support for PCIe PTM, which allows us to implement support >> for the PTP_SYS_OFFSET_PRECISE ioctl(), implemented in the driver via >> the getcrosststamp() func

[PATCH next-queue v2 1/3] Revert "PCI: Make pci_enable_ptm() private"

2020-11-09 Thread Vinicius Costa Gomes
' to check if PTM is enabled or not. This reverts commit ac6c26da29c12fa511c877c273ed5c939dc9e96c. Acked-by: Bjorn Helgaas Signed-off-by: Vinicius Costa Gomes --- drivers/pci/pci.h | 3 --- include/linux/pci.h | 7 +++ 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/dr

[PATCH next-queue v2 0/3] igc: Add support for PCIe PTM

2020-11-09 Thread Vinicius Costa Gomes
WN_FREQ is true, but during tests it works even when it returns false. Should that check be done? Cheers, Vinicius Costa Gomes (3): Revert "PCI: Make pci_enable_ptm() private" igc: Enable PCIe PTM igc: Add support for PTP getcrosststamp() drivers/net/ethernet/intel/igc/igc.h

[PATCH next-queue v2 2/3] igc: Enable PCIe PTM

2020-11-09 Thread Vinicius Costa Gomes
In practice, enabling PTM also sets the enabled_ptm flag in the PCI device, the flag will be used for detecting if PTM is enabled before adding support for the SYSOFFSET_PRECISE ioctl() (which is added by implementing the getcrosststamp() PTP function). Signed-off-by: Vinicius Costa Gomes

[PATCH next-queue v2 3/3] igc: Add support for PTP getcrosststamp()

2020-11-09 Thread Vinicius Costa Gomes
rks even when it returns false. Should that check be done? Signed-off-by: Vinicius Costa Gomes --- drivers/net/ethernet/intel/igc/igc.h | 7 + drivers/net/ethernet/intel/igc/igc_defines.h | 27 +++ drivers/net/ethernet/intel/igc/igc_main.c| 2 + drivers/net/ethernet/intel/igc

Re: ethtool enhancements for configuring IET Frame preemption

2020-10-12 Thread Vinicius Costa Gomes
Hi Murali, Murali Karicheri writes: > Hi Vinicius, > > On 8/17/20 6:30 PM, Vinicius Costa Gomes wrote: >> Hi Murali, >> >> I was finally able to go back to working on this, and should have >> something for review when net-next opens. >> > Do you ha

[RFC net-next v2 1/2] ethtool: Add support for configuring frame preemption

2020-10-12 Thread Vinicius Costa Gomes
tion there should be easier on the user. Signed-off-by: Vinicius Costa Gomes --- include/linux/ethtool.h | 19 include/uapi/linux/ethtool_netlink.h | 17 +++ net/ethtool/Makefile | 2 +- net/ethtool/netlink.c| 19 net/ethtool/netlink.h

[RFC net-next v2 0/2] ethtool: Add support for frame preemption

2020-10-12 Thread Vinicius Costa Gomes
he minimum fragment size to 2: $ sudo ./ethtool --set-frame-preemption $IFACE fp on min-frag-size 2 Cheers, Vinicius Costa Gomes (2): ethtool: Add support for configuring frame preemption taprio: Add support for frame preemption offload include/linux/ethtool.h | 19 include/l

[RFC net-next v2 2/2] taprio: Add support for frame preemption offload

2020-10-12 Thread Vinicius Costa Gomes
ully, easier to understand. Signed-off-by: Vinicius Costa Gomes --- include/linux/netdevice.h | 1 + include/net/pkt_sched.h| 4 include/uapi/linux/pkt_sched.h | 1 + net/sched/sch_taprio.c | 41 ++ 4 files changed, 43 insertions(+), 4 del

Re: Why ping latency is smaller with shorter send interval?

2020-10-02 Thread Vinicius Costa Gomes
Hi, Eric Dumazet writes: > > Many factors in play here. > > 1) if you keep cpus busy enough, they tend to keep in their caches > the data needed to serve your requests. In your case, time taken to > process an ICMP packet can be very different depending on how hot > cpu caches are. > > 2) Idle c

Re: [PATCH 0/7] TC-ETF support PTP clocks series

2020-10-02 Thread Vinicius Costa Gomes
Hi Erez, Erez Geva writes: > Add support for using PTP clock with > Traffic control Earliest TxTime First (ETF) Qdisc. > > Why do we need ETF to use PTP clock? > Current ETF requires to synchronization the system clock > to the PTP Hardware clock (PHC) we want to send through. > But there are

Re: [PATCH next-queue v1 1/3] Revert "PCI: Make pci_enable_ptm() private"

2020-09-28 Thread Vinicius Costa Gomes
Hi, Bjorn Helgaas writes: > On Fri, Sep 25, 2020 at 04:28:32PM -0700, Vinicius Costa Gomes wrote: >> Make pci_enable_ptm() accessible from the drivers. >> >> Even if PTM still works on the platform I am using without calling >> this this function, it might be possib

[PATCH next-queue v1 0/3] igc: Add support for PCIe PTM

2020-09-25 Thread Vinicius Costa Gomes
used when X86_FEATURE_TSC_KNOWN_FREQ is true, but during tests it works even when it returns false. Should that check be done? Cheers, Vinicius Costa Gomes (3): Revert "PCI: Make pci_enable_ptm() private" igc: Enable PCIe PTM igc: Add support for PTP getcrosststamp() drivers/ne

[PATCH next-queue v1 3/3] igc: Add support for PTP getcrosststamp()

2020-09-25 Thread Vinicius Costa Gomes
rks even when it returns false. Should that check be done? Signed-off-by: Vinicius Costa Gomes --- drivers/net/ethernet/intel/igc/igc.h | 7 + drivers/net/ethernet/intel/igc/igc_defines.h | 22 +++ drivers/net/ethernet/intel/igc/igc_main.c| 2 + drivers/net/ethernet/intel/igc

[PATCH next-queue v1 2/3] igc: Enable PCIe PTM

2020-09-25 Thread Vinicius Costa Gomes
In practice, enabling PTM also sets the enabled_ptm flag in the PCI device, the flag will be used for detecting if PTM is enabled before adding support for the SYSOFFSET_PRECISE ioctl() (which is added by implementing the getcrosststamp() PTP function). Signed-off-by: Vinicius Costa Gomes

[PATCH next-queue v1 1/3] Revert "PCI: Make pci_enable_ptm() private"

2020-09-25 Thread Vinicius Costa Gomes
dev' to check if PTM is enabled or not. This reverts commit ac6c26da29c12fa511c877c273ed5c939dc9e96c. Signed-off-by: Vinicius Costa Gomes --- drivers/pci/pci.h | 3 --- include/linux/pci.h | 7 +++ 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/drivers/pci/pci.h

Re: [Intel-wired-lan] [RFC PATCH net-next v1 05/11] intel-ethernet: make W=1 build cleanly

2020-09-11 Thread Vinicius Costa Gomes
read_phy_reg(hw, 0x2F5B, &phy_saved_data); > + e_dbg("Reading PHY register 0x2F5B failed: %d\n", ret_val); > Adding this debug statement seems unrelated. > /* Disabled the PHY transmitter */ > e1000_write_phy_reg(hw, 0x2F5B, 0x0003); Apart from this, Reviewed-by: Vinicius Costa Gomes -- Vinicius

[PATCH net v1] taprio: Fix allowing too small intervals

2020-09-09 Thread Vinicius Costa Gomes
rent link speed wouldn't allow any packet to be transmitted. Reported-by: syzbot+8267241609ae8c23b...@syzkaller.appspotmail.com Fixes: 5a781ccbd19e ("tc: Add support for configuring the taprio scheduler") Signed-off-by: Vinicius Costa Gomes --- net/sched/sch_taprio.c | 28 ++

Re: INFO: rcu detected stall in cleanup_net (4)

2020-09-09 Thread Vinicius Costa Gomes
z 20200507 >> syz repro: https://syzkaller.appspot.com/x/repro.syz?x=157c7aa590 >> C reproducer: https://syzkaller.appspot.com/x/repro.c?x=13c92ef990 >> >> The issue was bisected to: >> >> commit 5a781ccbd19e4664babcbe4b4ead7aa2b9283d22 >>

Re: [PATCH v3 5/8] net: dsa: hellcreek: Add TAPRIO offloading support

2020-08-25 Thread Vinicius Costa Gomes
Hi Kurt, Kurt Kanzenbach writes: > I think so. As Vladimir pointed out, the driver should setup an identity > mapping which I already did by default. > > Can you point me your patch? Just sent it for consideration: http://patchwork.ozlabs.org/project/netdev/patch/20200825174404.2727633-1-vinic

Re: [PATCH v3 5/8] net: dsa: hellcreek: Add TAPRIO offloading support

2020-08-25 Thread Vinicius Costa Gomes
Hi Kurt, Kurt Kanzenbach writes: > On Mon Aug 24 2020, Vinicius Costa Gomes wrote: >> Hi, >> >> Kurt Kanzenbach writes: >> > [snip] >>> + /* Setup timer for schedule switch: The IP core only allows to set a >>> +* cycle start timer 8

[PATCH net-next v1] taprio: Fix using wrong queues in gate mask

2020-08-25 Thread Vinicius Costa Gomes
traffic classes to queues when applying the offload to the driver. Fixes: 9c66d1564676 ("taprio: Add support for hardware offloading") Signed-off-by: Vinicius Costa Gomes --- net/sched/sch_taprio.c | 30 -- 1 file changed, 24 insertions(+), 6 deletions(-) diff --

Re: [PATCH v3 5/8] net: dsa: hellcreek: Add TAPRIO offloading support

2020-08-25 Thread Vinicius Costa Gomes
Vladimir Oltean writes: > Hi Vinicius, > > On Mon, Aug 24, 2020 at 04:45:50PM -0700, Vinicius Costa Gomes wrote: >> Kurt Kanzenbach writes: >> > >> > With TAPRIO traffic classes and the mapping to queues can be >> > configured. The switch can als

Re: [PATCH v3 5/8] net: dsa: hellcreek: Add TAPRIO offloading support

2020-08-24 Thread Vinicius Costa Gomes
Hi, Kurt Kanzenbach writes: > The switch has support for the 802.1Qbv Time Aware Shaper (TAS). Traffic > schedules may be configured individually on each front port. Each port has > eight > egress queues. The traffic is mapped to a traffic class respectively via the > PCP > field of a VLAN tag

Re: [PATCH v3 5/8] net: dsa: hellcreek: Add TAPRIO offloading support

2020-08-24 Thread Vinicius Costa Gomes
Hi Kurt, Kurt Kanzenbach writes: >>> +static void hellcreek_setup_tc_mapping(struct hellcreek *hellcreek, >>> + struct net_device *netdev) >>> +{ >>> + int i, j; >>> + >>> + /* Setup mapping between traffic classes and port queues. */ >>> + for (i = 0; i <

Re: ethtool enhancements for configuring IET Frame preemption

2020-08-17 Thread Vinicius Costa Gomes
Hi Murali, I was finally able to go back to working on this, and should have something for review when net-next opens. Cheers, Murali Karicheri writes: > Hello Vinicius, > > Wondering what is your plan to add the support in ethtool to configure > IET frame preemption? Waiting for the next re

Re: 回复: INFO: rcu detected stall in tc_modify_qdisc

2020-07-30 Thread Vinicius Costa Gomes
Dmitry Vyukov writes: >> > >> > Also are we talking about CAP_NET_ADMIN in a user ns as well >> > (effectively nobody)? >> >> Just checked, we are talking about CAP_NET_ADMIN in user namespace as >> well. > > OK, so this is not root/admin, this is just any user. Yeah, will fix this. Thanks, --

  1   2   3   4   5   >