On 12/4/2023 2:26 AM, Alexander Lobakin wrote:
yping.
>
> What is "not a constant"?
>
> ring[nta] = FIELD_PREP(IDPF_RX_BI_GEN_M,
> test_bit(__IDPF_Q_GEN_CHK, flags));
>
> Is there a problem with this ^ code?
>
> "The scripts ignored that" is not a good argumen
Refactor the i40e driver to use FIELD_GET() for mask and shift reads,
which reduces lines of code and adds clarity of intent.
This code was generated by the following coccinelle/spatch script and
then manually repaired.
While making one of the conversions, an if() check was inverted to
return ear
Refactor ice driver to use FIELD_PREP(), which reduces lines of code
and adds clarity of intent.
This code was generated by the following coccinelle/spatch script and
then manually repaired.
Several places I changed to OR into a single variable with |= instead of
using a multi-line statement with
Refactor several older Intel drivers to use FIELD_GET(), which reduces
lines of code and adds clarity of intent.
This code was generated by the following coccinelle/spatch script and
then manually repaired.
@get@
constant shift,mask;
type T;
expression a;
@@
(
-((T)((a) & mask) >> shift)
+FIELD_G
It was found while doing further testing of the previous commit
fbf32a9bab91 ("ice: field get conversion") that one of the FIELD_GET
conversions should really be a FIELD_PREP. The previous code was styled
as a match to the FIELD_GET conversion, which always worked because the
shift value was 0. Th
Most of idpf correctly uses FIELD_GET and FIELD_PREP, but a couple spots
were missed so fix those.
Automated conversion with coccinelle script and manually fixed up,
including audits for opportunities to convert to {get,encode,replace}
bits functions.
Add conversions to le16_get/encode/replace_bi
Refactor the iavf driver to use FIELD_GET() for mask and shift reads,
which reduces lines of code and adds clarity of intent.
This code was generated by the following coccinelle/spatch script and
then manually repaired in a later patch.
@get@
constant shift,mask;
type T;
expression a;
@@
-((T)((a
Refactor the ice driver to use FIELD_GET() for mask and shift reads,
which reduces lines of code and adds clarity of intent.
This code was generated by the following coccinelle/spatch script and
then manually repaired.
@get@
constant shift,mask;
type T;
expression a;
@@
-(((T)(a) & mask) >> shift
Refactor iavf driver to use FIELD_PREP(), which reduces lines of code
and adds clarity of intent.
This code was generated by the following coccinelle/spatch script and
then manually repaired.
Clean up a couple spots in the code that had repetitive
y = cpu_to_*((blah << blah_blah) & blat)
y |= cpu
Refactor the igc driver to use FIELD_GET() for mask and shift reads,
which reduces lines of code and adds clarity of intent.
This code was generated by the following coccinelle/spatch script and
then manually repaired in a later patch.
@get@
constant shift,mask;
type T;
expression a;
@@
-((T)((a)
While converting to FIELD_PREP() and FIELD_GET(), it was noticed that
some of the RSS defines had *included* the shift in their definitions.
This is completely outside of normal, such that a developer could easily
make a mistake and shift at the usage site (like when using
FIELD_PREP()).
Rename th
Refactor i40e driver to use FIELD_PREP(), which reduces lines of code
and adds clarity of intent.
This code was generated by the following coccinelle/spatch script and
then manually repaired.
Refactor one function with multiple if's to return quickly to make lines
fit in 80 columns.
@prep2@
cons
Refactor several older Intel drivers to use FIELD_PREP(), which reduces
lines of code and adds clarity of intent.
This code was generated by the following coccinelle/spatch script and
then manually repaired.
@prep2@
constant shift,mask;
type T;
expression a;
@@
-(((T)(a) << shift) & mask)
+FIELD_
Refactor igc driver to use FIELD_PREP(), which reduces lines of code
and adds clarity of intent.
This code was generated by the following coccinelle/spatch script and
then manually repaired in a later patch.
@prep2@
constant shift,mask;
type T;
expression a;
@@
-(((T)(a) << shift) & mask)
+FIELD_
After repeatedly getting review comments on new patches, and sporadic
patches to fix parts of our drivers, we should just convert the Intel code
to use FIELD_PREP() and FIELD_GET(). It's then "common" in the code and
hopefully future change-sets will see the context and do-the-right-thing.
In v2
This series is introducing the use of FIELD_GET and FIELD_PREP which
requires bitfield.h to be included. Fix all the includes in this one
change, and rearrange includes into alphabetical order to ease
readability and future maintenance.
virtchnl.h and it's usage was modified to have it's own inclu
For more than 15 years this code has passed in a request for a page and
masked off that page when read/writing. This code has been here forever,
but FIELD_PREP finds the bug when converted to use it. Change the code
to do exactly the same thing but allow the conversion to FIELD_PREP in a
later patc
The get/set_rxfh ethtool ops currently takes the rxfh (RSS) parameters
as direct function arguments. This will force us to change the API (and
all drivers' functions) every time some new parameters are added.
This is part 1/2 of the fix, as suggested in [1]:
- First simplify the code by always pr
Allow the user to set the symmetric Toeplitz hash function via:
# ethtool -X eth0 hfunc toeplitz symmetric-xor
The driver will reject any new RSS configuration if a field other than
(IP src/dst and L4 src/dst ports) is requested for hashing.
The symmetric RSS will not be supported on PFs not
From: Jeff Guo
Allow the user to set the symmetric Toeplitz hash function via:
# ethtool -X eth0 hfunc toeplitz symmetric-xor
All existing RSS configurations will be converted to symmetric unless they
have a non-symmetric field (other than IP src/dst and L4 src/dst ports)
used for hashing.
The flow director and RSS blocks use separate methods to generate a
unique 64 bit ID for the flow. This is not extendable, especially for
the RSS that already uses all 64 bit space.
Refactor the flow generation API so that the ID is generated within
ice_flow_add_prof(). The FD and RSS blocks cache
From: Qi Zhang
Refactor the driver to use a communication data structure for RSS
config. To do so we introduce the new ice_rss_hash_cfg struct, and then
pass it as an argument to several functions.
Also introduce enum ice_rss_cfg_hdr_type to specify a more granular and
flexible RSS configuration
Fix the values of the ICE_AQ_VSI_Q_OPT_RSS_* registers. Shifting is
already done when the values are used, no need to double shift. Bug was
not discovered earlier since only ICE_AQ_VSI_Q_OPT_RSS_TPLZ (Zero) is
currently used.
Also, rename ICE_AQ_VSI_Q_OPT_RSS_XXX to ICE_AQ_VSI_Q_OPT_RSS_HASH_XXX
f
Add the RSS context parameters to struct ethtool_rxfh_param and use the
get/set_rxfh to handle the RSS contexts as well.
This is part 2/2 of the fix suggested in [1]:
- Add a rss_context member to the argument struct and a capability
like cap_link_lanes_supported to indicate whether driver su
Symmetric RSS hash functions are beneficial in applications that monitor
both Tx and Rx packets of the same flow (IDS, software firewalls, ..etc).
Getting all traffic of the same flow on the same RX queue results in
higher CPU cache efficiency.
A NIC that supports "symmetric-xor" can achieve this
Patches 1 and 2 modify the get/set_rxh ethtool API to take a pointer to
struct of parameters instead of individual params. This will allow future
changes to the uAPI-shared struct ethtool_rxfh without changing the
drivers' API.
Patch 3 adds the support at the Kernel level, allowing the user to se
On 11/29/2023 9:55 PM, Lukasz Plachno wrote:
Passing v6 argument is unnecessary as flow_type is still
analyzed inside the function.
Reviewed-by: Przemek Kitszel
Signed-off-by: Lukasz Plachno
This doesn't build cleanly.
../drivers/net/ethernet/intel/ice/ice_fdir.c: In function
‘ice_fdir_c
On Thu, Nov 30, 2023 at 08:31:34PM +0100, Ivan Vecera wrote:
> Mask used for clearing PRTDCB_RETSTCC register in function
> i40e_dcb_hw_rx_ets_bw_config() is incorrect as there is used
> define I40E_PRTDCB_RETSTCC_ETSTC_SHIFT instead of define
> I40E_PRTDCB_RETSTCC_ETSTC_MASK.
>
> The PRTDCB_RETST
On Fri, Dec 01, 2023 at 08:33:36AM +0100, Przemek Kitszel wrote:
> On 11/30/23 17:58, Michal Schmidt wrote:
> > To map phy types reported by the hardware to ethtool link mode bits,
> > ice uses two lookup tables (phy_type_low_lkup, phy_type_high_lkup).
> > The "low" table has 64 elements to cover e
On Tue, 2023-12-05 at 06:19 +0100, Przemek Kitszel wrote:
> On 12/4/23 20:07, Johannes Berg wrote:
> > From: Johannes Berg
> >
> > As reported by Marc MERLIN in [1], at least one driver (igc)
>
> perhaps Reported-by tag? (I know this is RFC as of now)
I guess.
> > wants/needs to acquire the RT
On Mon, 2023-12-04 at 18:46 -0800, Marc MERLIN wrote:
>
> [13323.572484] iwlwifi :09:00.0: TB bug workaround: copied 152 bytes from
> 0xff68 to 0xfd08
> [13328.000825] iwlwifi :09:00.0: TB bug workaround: copied 1272 bytes
> from 0xfb08 to 0xff42c000
> [13367.278564] iwlwifi
On Fri, Dec 01, 2023 at 02:25:01PM +0800, Steven Zou wrote:
> According to the datasheet, the recipe association data is an 8-byte
> little-endian value. It is described as 'Bitmap of the recipe indexes
> associated with this profile', it is from 24 to 31 byte area in FW.
> Therefore, it is defined
+ Ivan Vecera
On Fri, Dec 01, 2023 at 02:25:02PM +0800, Steven Zou wrote:
> New E810 firmware supports the corresponding functionality, so the driver
> allows PFs to subscribe the same switch recipes. Then when the PF is done
> with a switch recipes, the PF can ask firmware to free that switch re
On Mon, Dec 04, 2023 at 01:28:49PM -0800, Marc MERLIN wrote:
> sauron:~# iwconfig wlp9s0
> wlp9s0IEEE 802.11 ESSID:"magicnet"
> Mode:Managed Frequency:5.2 GHz Access Point: E0:63:DA:28:03:67
> Bit Rate=866.7 Mb/s Tx-Power=22 dBm
> Retry short limit:7
Hi Alexander,
Thanks for your reply.
It's my bad, I'll follow your suggestion in v4 patch:
1. keep 'buf' as it defined before.
2. resolve memory leak as your suggestion.
3. make 'bytes_not_copied' as a return value for error path.
Thanks again,
Kunwu
On 2023/12/4 20:51, Alexander Lobakin wrote:
On 12/5/23 16:26, Pawel Chmielewski wrote:
From: Ngai-Mint Kwan
Getting coalesce settings while reset is in progress can cause NULL
pointer deference bug.
If under reset, abort get coalesce for ethtool.
Signed-off-by: Ngai-Mint Kwan
Reviewed-by: Mateusz Polchlopek
Signed-off-by: Pawel Chmiel
From: Ngai-Mint Kwan
Getting coalesce settings while reset is in progress can cause NULL
pointer deference bug.
If under reset, abort get coalesce for ethtool.
Signed-off-by: Ngai-Mint Kwan
Reviewed-by: Mateusz Polchlopek
Signed-off-by: Pawel Chmielewski
---
drivers/net/ethernet/intel/ice/ic
Change returning codes to the kernel ones instead of
the internal ones for the entire ixgbe driver.
Reviewed-by: Jacob Keller
Reviewed-by: Przemek Kitszel
Signed-off-by: Jedrzej Jagielski
---
.../net/ethernet/intel/ixgbe/ixgbe_82598.c| 36 ++---
.../net/ethernet/intel/ixgbe/ixgbe_82599.c
Currently ixgbe driver is notified of overheating events
via internal IXGBE_ERR_OVERTEMP error code.
Change the approach to use freshly introduced is_overtemp
function parameter which set when such event occurs.
Add new parameter to the check_overtemp() and handle_lasi()
phy ops.
Signed-off-by: J
A small 2 patches series removing currently used internal status codes in
ixgbe driver and converting them to the regular ones.
1st patch deals specifically with overtemp error code, the 2nd one
refactors the rest of the error codes.
Jedrzej Jagielski (2):
ixgbe: Refactor overtemp event handlin
On 11/21/2023 23:19, Jesse Brandeburg wrote:
Refactor igc driver to use FIELD_PREP(), which reduces lines of code
and adds clarity of intent.
This code was generated by the following coccinelle/spatch script and
then manually repaired in a later patch.
@prep@
constant shift,mask;
expression a;
41 matches
Mail list logo