[net-next] i40e(vf): remove i40e_ethtool_stats.h header file

2018-09-07 Thread Jacob Keller
be shared across drivers as part of ethtool kernel work. Signed-off-by: Jacob Keller --- Sorry aboutthe delay, our iwl queue maintainer Jeff is on vacation, and discussion about how best to resolve this issue was/is ongoing in the IWL list. I opted to just move the contents of these

[net v2] sch_fq_codel: zero q->flows_cnt when fq_codel_init fails

2018-07-10 Thread Jacob Keller
ter dereference, since both the for-loop and memset in fq_codel_reset will be no-ops when flow_cnt is zero. Signed-off-by: Jacob Keller --- net/sched/sch_fq_codel.c | 25 ++--- 1 file changed, 18 insertions(+), 7 deletions(-) diff --git a/net/sched/sch_fq_codel.c b/net/sched/sch_f

[net] sch_fq_codel: zero q->flows_cnt when fq_codel_init fails

2018-07-09 Thread Jacob Keller
ter dereference, since both the for-loop and memset in fq_codel_reset will be no-ops when flow_cnt is zero. Signed-off-by: Jacob Keller --- net/sched/sch_fq_codel.c | 25 ++--- 1 file changed, 18 insertions(+), 7 deletions(-) diff --git a/net/sched/sch_fq_codel.c b/net/sched/sch_f

Re: [PATCH v5 03/14] PCI: Add pcie_bandwidth_capable() to compute max supported link bandwidth

2018-04-02 Thread Jacob Keller
On Mon, Apr 2, 2018 at 7:05 AM, Bjorn Helgaas wrote: > +/* PCIe speed to Mb/s reduced by encoding overhead */ > +#define PCIE_SPEED2MBS_ENC(speed) \ > + ((speed) == PCIE_SPEED_16_0GT ? (16000*(128/130)) : \ > +(speed) == PCIE_SPEED_8_0GT ? (8000*(128/130)) : \

[RFC PATCH] net: limit maximum number of packets to mark with xmit_more

2017-08-25 Thread Jacob Keller
mum number of xmit_more skbs to send in a sequence. This ensures that all drivers benefit, and allows system administrators the option to tune the value to their environment. Signed-off-by: Jacob Keller <jacob.e.kel...@intel.com> --- Stray thoughts and further questions Is this the rig

[PATCH v2] i40e/i40evf: fix out-of-bounds read of cpumask

2017-08-22 Thread Jacob Keller
uot;i40e/i40evf: fix interrupt affinity bug", 2016-09-14) Signed-off-by: Jacob Keller <jacob.e.kel...@intel.com> Cc: sta...@vger.kernel.org # 4.10+ --- This updates the commit message for the original fix, and indicates that it fixes a potential crash, as well as tagged the commit for stabl

[RFC PATCH] net: don't set __LINK_STATE_START until after dev->open() call

2017-08-07 Thread Jacob Keller
ing. Signed-off-by: Jacob Keller <jacob.e.kel...@intel.com> --- I found this as a result of debugging a race condition in the i40evf driver, in which we assumed that netif_running() would not be true until after dev->open() had been called and succeeded. Unfortunately we can't hold t

[PATCH] i40e: don't truncate match_method assignment

2016-12-09 Thread Jacob Keller
. Signed-off-by: Jacob Keller <jacob.e.kel...@intel.com> Cc: Stephen Rothwell <s...@canb.auug.org.au> Cc: Bimmy Pujari <bimmy.puj...@intel.com> --- Not sure if this was already in Jeff's queue, but since it's an obvious fix for the issue found by Stephen, I thought I'd send it out now

[PATCH RFC v1 1/2] rxclass: use ethtool_get_flow_spec_ring to display queue and VF

2016-12-06 Thread Jacob Keller
to manually parse the value. Signed-off-by: Jacob Keller <jacob.e.kel...@intel.com> --- rxclass.c | 16 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/rxclass.c b/rxclass.c index c7bfebaf6e22..7f0e765d3b47 100644 --- a/rxclass.c +++ b/rxclass.c @@ -247,11 +

[PATCH RFC v1 0/2] ethtool: add support for VF in ring_cookie

2016-12-06 Thread Jacob Keller
e to implement, and would be a much more massive project. Jacob Keller (2): rxclass: use ethtool_get_flow_spec_ring to display queue and VF ethtool: add support to specify ring_cookie as VF/queue ethtool.8.in | 3 ++- rxclass.c| 74 +++-

[PATCH RFC v1 2/2] ethtool: add support to specify ring_cookie as VF/queue

2016-12-06 Thread Jacob Keller
. This allows the user to more easily specify the matching notation as it is understood by the kernel and some drivers. Since no driver exists today with over 2,147,483,647 queues, this notation will simply fail on drivers which don't recognize the new partitioning. Signed-off-by: Jacob Keller <jacob.e.

[PATCH] ethtool: mark mask values as ULL values

2016-11-29 Thread Jacob Keller
-off-by: Jacob Keller <jacob.e.kel...@intel.com> --- include/uapi/linux/ethtool.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/uapi/linux/ethtool.h b/include/uapi/linux/ethtool.h index ed650eef9e54..a716112b2b01 100644 --- a/include/uapi/linux/ethtool.h

[PATCH RFC v3] ethtool: implement helper to get flow_type value

2016-11-29 Thread Jacob Keller
about, and then have ethtool core do the check for us to discard frames. I haven't implemented this quite yet. Signed-off-by: Jacob Keller <jacob.e.kel...@intel.com> --- drivers/net/ethernet/mellanox/mlx4/en_ethtool.c | 4 ++-- drivers/net/ethernet/mellanox/mlx5/core/en_fs_ethtool

[PATCH RFC v2] ethtool: implement helper to get flow_type value

2016-11-28 Thread Jacob Keller
about, and then have ethtool core do the check for us to discard frames. I haven't implemented this quite yet. Signed-off-by: Jacob Keller <jacob.e.kel...@intel.com> --- drivers/net/ethernet/mellanox/mlx4/en_ethtool.c | 4 ++-- drivers/net/ethernet/mellanox/mlx5/core/en_fs_ethtool

[PATCH RFC v1] ethtool: implement helper to get flow_type value

2016-11-22 Thread Jacob Keller
about, and then have ethtool core do the check for us to discard frames. I haven't implemented this quite yet. Signed-off-by: Jacob Keller <jacob.e.kel...@intel.com> --- I plan on using this helper when fixing the mask code for ntuple filters in the Intel i40e driver. I wanted to see w

[PATCH v2] ethtool: check size of user memory before copying strings and stats

2016-03-01 Thread Jacob Keller
the expected behavior of userspace. This change shouldn't break current or previous userspace as they have consistently included the length correctly since as far back as we can check. Signed-off-by: Jacob Keller <jacob.e.kel...@intel.com> Reported-by: Alexander Duyck <alexander.du...@

[PATCH] ethtool: check size of user memory before copying strings and stats

2016-03-01 Thread Jacob Keller
the expected behavior of userspace. This change shouldn't break current or previous userspace as they have consistently included the length correctly since as far back as we can check. Signed-off-by: Jacob Keller <jacob.e.kel...@intel.com> Reported-by: Alexander Duyck <alexander.du...@

[PATCH 2/4] ethtool: ensure channel counts are within bounds during SCHANNELS

2016-02-08 Thread Jacob Keller
Add a sanity check to ensure that all requested channel sizes are within bounds, which should reduce errors in driver implementation. Signed-off-by: Jacob Keller <jacob.e.kel...@intel.com> --- net/core/ethtool.c | 15 +-- 1 file changed, 13 insertions(+), 2 deletions(-) diff

[PATCH 0/3] ethtool: correct {GS}CHANNELS and {GS}RXFH conflict

2016-02-08 Thread Jacob Keller
in this case should now no longer occur, add a dev_err message to indicate the user that we did so. Jacob Keller (4): ethtool: correctly ensure {GS}CHANNELS doesn't conflict with GS{RXFH} ethtool: ensure channel counts are within bounds during SCHANNELS ethtool: can't set combined and tx/rx channel

[PATCH 4/4] fm10k: don't reinitialize RSS flow table when RXFH configured

2016-02-08 Thread Jacob Keller
Also print an error message incase we do have to reconfigure as this should no longer happen anymore due to ethtool changes. If it somehow does occur, user should be made aware of it. Signed-off-by: Jacob Keller <jacob.e.kel...@intel.com> --- drivers/net/ethernet/intel/fm10k/fm10k_main.

[PATCH 3/4] ethtool: can't set combined and tx/rx channel counts at the same time

2016-02-08 Thread Jacob Keller
a sanity check to prevent such requests. I am not 100% sure if this is correct as I was not able to find documentation and I think it currently depended on driver implementation. Signed-off-by: Jacob Keller <jacob.e.kel...@intel.com> --- net/core/ethtool.c | 5 + 1 file changed, 5 inse

[PATCH 1/4] ethtool: correctly ensure {GS}CHANNELS doesn't conflict with GS{RXFH}

2016-02-08 Thread Jacob Keller
Rx flow table is not going to assign flows to now disabled channels. Signed-off-by: Jacob Keller <jacob.e.kel...@intel.com> --- include/linux/netdevice.h | 8 +++ net/core/ethtool.c| 59 +++ 2 files changed, 67 insertions(+) diff

[PATCH 3/4] fm10k: don't reinitialize RSS flow table when RXFH configured

2016-02-08 Thread Jacob Keller
Also print an error message incase we do have to reconfigure as this should no longer happen anymore due to ethtool changes. If it somehow does occur, user should be made aware of it. Signed-off-by: Jacob Keller <jacob.e.kel...@intel.com> --- drivers/net/ethernet/intel/fm10k/fm10k_main.

[PATCH v2 4/4] ethtool: support setting default Rx flow indirection table

2016-02-08 Thread Jacob Keller
Signed-off-by: Jacob Keller <jacob.e.kel...@intel.com> --- ethtool.8.in | 5 - ethtool.c| 46 -- 2 files changed, 36 insertions(+), 15 deletions(-) diff --git a/ethtool.8.in b/ethtool.8.in index eeffa70415b5..b7d56fbe4484 100644 --- a/e

[PATCH v2 0/4] ethtool: correct {GS}CHANNELS and {GS}RXFH conflict

2016-02-08 Thread Jacob Keller
separating combined vs asymmetric channels * verified behavior using fm10k driver Jacob Keller (3): ethtool: correctly ensure {GS}CHANNELS doesn't conflict with GS{RXFH} ethtool: ensure channel counts are within bounds during SCHANNELS fm10k: don't reinitialize RSS flow table when RXFH

[PATCH 2/4] ethtool: ensure channel counts are within bounds during SCHANNELS

2016-02-08 Thread Jacob Keller
Add a sanity check to ensure that all requested channel sizes are within bounds, which should reduce errors in driver implementation. Signed-off-by: Jacob Keller <jacob.e.kel...@intel.com> --- net/core/ethtool.c | 13 +++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff

[PATCH 1/4] ethtool: correctly ensure {GS}CHANNELS doesn't conflict with GS{RXFH}

2016-02-08 Thread Jacob Keller
Rx flow table is not going to assign flows to now disabled channels. Signed-off-by: Jacob Keller <jacob.e.kel...@intel.com> --- include/linux/netdevice.h | 8 +++ net/core/ethtool.c| 55 +++ 2 files changed, 63 insertions(+) diff

[PATCH 0/2] ethtool: {SG}RXFH indirection deficiency

2016-02-05 Thread Jacob Keller
if it would interfere with the current redirection table. Jacob Keller (2): ethtool: support notifying drivers when user requests default rxfh table fm10k: correctly report error when changing number of channels drivers/net/ethernet/intel/fm10k/fm10k.h | 2 ++ drivers/net/ethernet/intel

[PATCH 1/2] ethtool: support notifying drivers when user requests default rxfh table

2016-02-05 Thread Jacob Keller
and go about business. If we don't have a way to properly indicate that we've reset to default then we are not able to implement the proposed behavior, so this patch adds a new method to properly indicate that we have reset to the default indirection table. Signed-off-by: Jacob Keller

[PATCH 2/2] fm10k: correctly report error when changing number of channels

2016-02-05 Thread Jacob Keller
on the reta table. This check is only enforced if the user has manually configured the RSS indirection table, since the driver should be free to repopulate its own default configuration. Signed-off-by: Jacob Keller <jacob.e.kel...@intel.com> --- drivers/net/ethernet/intel/fm10k/f

[PATCH] ethtool: add support for dynamic mode in {SG}RXFH commands

2016-02-02 Thread Jacob Keller
Signed-off-by: Jacob Keller <jacob.e.kel...@intel.com> --- ethtool-copy.h | 8 +++- ethtool.c | 36 +++- 2 files changed, 42 insertions(+), 2 deletions(-) diff --git a/ethtool-copy.h b/ethtool-copy.h index d23ffc4c38b4..620dcea06d25 100644 --- a/e

[PATCH 1/2] ethtool: add dynamic flag to ETHTOOL_{GS}RXFH commands

2016-02-02 Thread Jacob Keller
may or may not apply the current settings and is free to change the values as necessary. The current default is set to false, as this is how most drivers appear to behave today. Signed-off-by: Jacob Keller <jacob.e.kel...@intel.com> Cc: Lendacky, Thomas <thomas.lenda...@amd.com>

[PATCH 2/2] fm10k: support dynamic mode for RSS table control

2016-02-02 Thread Jacob Keller
. If this is not possible, we will indicate that the mode is now dynamic and reset to driver defaults. Signed-off-by: Jacob Keller <jacob.e.kel...@intel.com> --- drivers/net/ethernet/intel/fm10k/fm10k.h | 1 + drivers/net/ethernet/intel/fm10k/fm10k_ethtool.c | 10 +- drivers/net/ethernet/intel

[PATCH] ethtool: add dynamic flag to {SG}RXFH

2016-02-02 Thread Jacob Keller
driver was especially problematic, and the current patch series attempts to resolve this. It is possible to have most of the behavior handled purely in driver, but then we lose any ability to communicate this to the user via ethtool. Jacob Keller (3): ethtool: add dynamic flag to ETHTOOL_{GS}RXFH