<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/drivers/net/ethernet/intel/iavf, branch linux-5.14.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.</subtitle>
<id>https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-5.14.y</id>
<link rel='self' href='https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-5.14.y'/>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/'/>
<updated>2021-10-13T07:42:00Z</updated>
<entry>
<title>iavf: fix double unlock of crit_lock</title>
<updated>2021-10-13T07:42:00Z</updated>
<author>
<name>Stefan Assmann</name>
<email>sassmann@kpanic.de</email>
</author>
<published>2021-08-24T10:06:39Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=8d2a1e7fb90c912714b6c5900f883c3f95e89471'/>
<id>urn:sha1:8d2a1e7fb90c912714b6c5900f883c3f95e89471</id>
<content type='text'>
[ Upstream commit 54ee39439acd9f8b161703c6ad4f4e1835585277 ]

The crit_lock mutex could be unlocked twice as reported here
https://lists.osuosl.org/pipermail/intel-wired-lan/Week-of-Mon-20210823/025525.html

Remove the superfluous unlock. Technically the problem was already
present before 5ac49f3c2702 as that commit only replaced the locking
primitive, but no functional change.

Reported-by: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Fixes: 5ac49f3c2702 ("iavf: use mutexes for locking of critical sections")
Fixes: bac8486116b0 ("iavf: Refactor the watchdog state machine")
Signed-off-by: Stefan Assmann &lt;sassmann@kpanic.de&gt;
Signed-off-by: Tony Nguyen &lt;anthony.l.nguyen@intel.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>iavf: use mutexes for locking of critical sections</title>
<updated>2021-09-18T11:43:52Z</updated>
<author>
<name>Stefan Assmann</name>
<email>sassmann@kpanic.de</email>
</author>
<published>2021-08-04T08:22:24Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=1652cf211f0c5931cd0a95d9f6c49fed64c7dcd3'/>
<id>urn:sha1:1652cf211f0c5931cd0a95d9f6c49fed64c7dcd3</id>
<content type='text'>
[ Upstream commit 5ac49f3c2702f269d31cc37eb9308bc557953c4d ]

As follow-up to the discussion with Jakub Kicinski about iavf locking
being insufficient [1] convert iavf to use mutexes instead of bitops.
The locking logic is kept as is, just a drop-in replacement of
enum iavf_critical_section_t with separate mutexes.
The only difference is that the mutexes will be destroyed before the
module is unloaded.

[1] https://lwn.net/ml/netdev/20210316150210.00007249%40intel.com/

Signed-off-by: Stefan Assmann &lt;sassmann@kpanic.de&gt;
Tested-by: Marek Szlosek &lt;marek.szlosek@intel.com&gt;
Signed-off-by: Tony Nguyen &lt;anthony.l.nguyen@intel.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>iavf: fix locking of critical sections</title>
<updated>2021-09-18T11:43:37Z</updated>
<author>
<name>Stefan Assmann</name>
<email>sassmann@kpanic.de</email>
</author>
<published>2021-03-16T10:01:41Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=db149a8d6996fca50748f66f4efdc7245f93af74'/>
<id>urn:sha1:db149a8d6996fca50748f66f4efdc7245f93af74</id>
<content type='text'>
[ Upstream commit 226d528512cfac890a1619aea4301f3dd314fe60 ]

To avoid races between iavf_init_task(), iavf_reset_task(),
iavf_watchdog_task(), iavf_adminq_task() as well as the shutdown and
remove functions more locking is required.
The current protection by __IAVF_IN_CRITICAL_TASK is needed in
additional places.

- The reset task performs state transitions, therefore needs locking.
- The adminq task acts on replies from the PF in
  iavf_virtchnl_completion() which may alter the states.
- The init task is not only run during probe but also if a VF gets stuck
  to reinitialize it.
- The shutdown function performs a state transition.
- The remove function performs a state transition and also free's
  resources.

iavf_lock_timeout() is introduced to avoid waiting infinitely
and cause a deadlock. Rather unlock and print a warning.

Signed-off-by: Stefan Assmann &lt;sassmann@kpanic.de&gt;
Tested-by: Konrad Jankowski &lt;konrad0.jankowski@intel.com&gt;
Signed-off-by: Tony Nguyen &lt;anthony.l.nguyen@intel.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>iavf: do not override the adapter state in the watchdog task</title>
<updated>2021-09-18T11:43:37Z</updated>
<author>
<name>Stefan Assmann</name>
<email>sassmann@kpanic.de</email>
</author>
<published>2021-03-05T12:38:56Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=1cea40543748f852fb0b32b7e462895eea7c6edf'/>
<id>urn:sha1:1cea40543748f852fb0b32b7e462895eea7c6edf</id>
<content type='text'>
[ Upstream commit 22c8fd71d3a5e6fe584ccc2c1e8760e5baefd5aa ]

The iavf watchdog task overrides adapter-&gt;state to __IAVF_RESETTING
when it detects a pending reset. Then schedules iavf_reset_task() which
takes care of the reset.

The reset task is capable of handling the reset without changing
adapter-&gt;state. In fact we lose the state information when the watchdog
task prematurely changes the adapter state. This may lead to a crash if
instead of the reset task the iavf_remove() function gets called before
the reset task.
In that case (if we were in state __IAVF_RUNNING previously) the
iavf_remove() function triggers iavf_close() which fails to close the
device because of the incorrect state information.

This may result in a crash due to pending interrupts.
kernel BUG at drivers/pci/msi.c:357!
[...]
Call Trace:
 [&lt;ffffffffbddf24dd&gt;] pci_disable_msix+0x3d/0x50
 [&lt;ffffffffc08d2a63&gt;] iavf_reset_interrupt_capability+0x23/0x40 [iavf]
 [&lt;ffffffffc08d312a&gt;] iavf_remove+0x10a/0x350 [iavf]
 [&lt;ffffffffbddd3359&gt;] pci_device_remove+0x39/0xc0
 [&lt;ffffffffbdeb492f&gt;] __device_release_driver+0x7f/0xf0
 [&lt;ffffffffbdeb49c3&gt;] device_release_driver+0x23/0x30
 [&lt;ffffffffbddcabb4&gt;] pci_stop_bus_device+0x84/0xa0
 [&lt;ffffffffbddcacc2&gt;] pci_stop_and_remove_bus_device+0x12/0x20
 [&lt;ffffffffbddf361f&gt;] pci_iov_remove_virtfn+0xaf/0x160
 [&lt;ffffffffbddf3bcc&gt;] sriov_disable+0x3c/0xf0
 [&lt;ffffffffbddf3ca3&gt;] pci_disable_sriov+0x23/0x30
 [&lt;ffffffffc0667365&gt;] i40e_free_vfs+0x265/0x2d0 [i40e]
 [&lt;ffffffffc0667624&gt;] i40e_pci_sriov_configure+0x144/0x1f0 [i40e]
 [&lt;ffffffffbddd5307&gt;] sriov_numvfs_store+0x177/0x1d0
Code: 00 00 e8 3c 25 e3 ff 49 c7 86 88 08 00 00 00 00 00 00 5b 41 5c 41 5d 41 5e 41 5f 5d c3 48 8b 7b 28 e8 0d 44
RIP  [&lt;ffffffffbbbf1068&gt;] free_msi_irqs+0x188/0x190

The solution is to not touch the adapter-&gt;state in iavf_watchdog_task()
and let the reset task handle the state transition.

Signed-off-by: Stefan Assmann &lt;sassmann@kpanic.de&gt;
Tested-by: Konrad Jankowski &lt;konrad0.jankowski@intel.com&gt;
Signed-off-by: Tony Nguyen &lt;anthony.l.nguyen@intel.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>iavf: Fix ping is lost after untrusted VF had tried to change MAC</title>
<updated>2021-08-19T16:56:15Z</updated>
<author>
<name>Sylwester Dziedziuch</name>
<email>sylwesterx.dziedziuch@intel.com</email>
</author>
<published>2021-08-18T17:42:17Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=8da80c9d50220a8e4190a4eaa0dd6aeefcbbb5bf'/>
<id>urn:sha1:8da80c9d50220a8e4190a4eaa0dd6aeefcbbb5bf</id>
<content type='text'>
Make changes to MAC address dependent on the response of PF.
Disallow changes to HW MAC address and MAC filter from untrusted
VF, thanks to that ping is not lost if VF tries to change MAC.
Add a new field in iavf_mac_filter, to indicate whether there
was response from PF for given filter. Based on this field pass
or discard the filter.
If untrusted VF tried to change it's address, it's not changed.
Still filter was changed, because of that ping couldn't go through.

Fixes: c5c922b3e09b ("iavf: fix MAC address setting for VFs when filter is rejected")
Signed-off-by: Przemyslaw Patynowski &lt;przemyslawx.patynowski@intel.com&gt;
Signed-off-by: Sylwester Dziedziuch &lt;sylwesterx.dziedziuch@intel.com&gt;
Signed-off-by: Mateusz Palczewski &lt;mateusz.palczewski@intel.com&gt;
Tested-by: Gurucharan G &lt;Gurucharanx.g@intel.com&gt;
Signed-off-by: Tony Nguyen &lt;anthony.l.nguyen@intel.com&gt;
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</content>
</entry>
<entry>
<title>iavf: Set RSS LUT and key in reset handle path</title>
<updated>2021-08-09T16:59:23Z</updated>
<author>
<name>Md Fahad Iqbal Polash</name>
<email>md.fahad.iqbal.polash@intel.com</email>
</author>
<published>2021-06-04T16:53:33Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=a7550f8b1c9712894f9e98d6caf5f49451ebd058'/>
<id>urn:sha1:a7550f8b1c9712894f9e98d6caf5f49451ebd058</id>
<content type='text'>
iavf driver should set RSS LUT and key unconditionally in reset
path. Currently, the driver does not do that. This patch fixes
this issue.

Fixes: 2c86ac3c7079 ("i40evf: create a generic config RSS function")
Signed-off-by: Md Fahad Iqbal Polash &lt;md.fahad.iqbal.polash@intel.com&gt;
Tested-by: Konrad Jankowski &lt;konrad0.jankowski@intel.com&gt;
Signed-off-by: Tony Nguyen &lt;anthony.l.nguyen@intel.com&gt;
</content>
</entry>
<entry>
<title>iavf: Fix an error handling path in 'iavf_probe()'</title>
<updated>2021-07-01T17:59:21Z</updated>
<author>
<name>Christophe JAILLET</name>
<email>christophe.jaillet@wanadoo.fr</email>
</author>
<published>2021-06-16T05:53:02Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=af30cbd2f4d6d66a9b6094e0aa32420bc8b20e08'/>
<id>urn:sha1:af30cbd2f4d6d66a9b6094e0aa32420bc8b20e08</id>
<content type='text'>
If an error occurs after a 'pci_enable_pcie_error_reporting()' call, it
must be undone by a corresponding 'pci_disable_pcie_error_reporting()'
call, as already done in the remove function.

Fixes: 5eae00c57f5e ("i40evf: main driver core")
Signed-off-by: Christophe JAILLET &lt;christophe.jaillet@wanadoo.fr&gt;
Signed-off-by: Tony Nguyen &lt;anthony.l.nguyen@intel.com&gt;
</content>
</entry>
<entry>
<title>iavf: clean up packet type lookup table</title>
<updated>2021-06-18T16:04:44Z</updated>
<author>
<name>Jesse Brandeburg</name>
<email>jesse.brandeburg@intel.com</email>
</author>
<published>2021-02-23T23:47:07Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=37dc8fea8656f149e0fa5a03a2736b32350fe2b1'/>
<id>urn:sha1:37dc8fea8656f149e0fa5a03a2736b32350fe2b1</id>
<content type='text'>
Remove the unused ptype struct value, which makes table init easier for
the zero entries, and use ranged initializer to remove a bunch of code
(works with gcc and clang). There is no significant functional change.

Signed-off-by: Jesse Brandeburg &lt;jesse.brandeburg@intel.com&gt;
Signed-off-by: Tony Nguyen &lt;anthony.l.nguyen@intel.com&gt;
</content>
</entry>
<entry>
<title>iavf: redefine the magic number for FDIR GTP-U header fields</title>
<updated>2021-04-23T16:34:19Z</updated>
<author>
<name>Haiyue Wang</name>
<email>haiyue.wang@intel.com</email>
</author>
<published>2021-03-31T02:08:37Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=1f70dfc542e88492a3bba3017e5e286dab7d3be6'/>
<id>urn:sha1:1f70dfc542e88492a3bba3017e5e286dab7d3be6</id>
<content type='text'>
The flex-byte for GTP-U protocol header fields uses the magic number,
which is hard to maintain and understand, define the interested fields
with meaningful macro name, based on the GTP-U protocol stack:

GTP-U header
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     | 0x1 |1|0|1|0|0|     0xff      |           Length              |
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     |                           TEID = 1654                         |
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     |    Sequence Number = 0        |N-PDU Number=0 |NextExtHdr=0x85|
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

GTP-U Extension Header (PDU Session Container)
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     |  ExtHdrLen=2  |Type=0 | Spare |0|0|   QFI     | PPI |  Spare  |
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     |                    Padding                    |NextExtHdr=0x0 |
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

Signed-off-by: Haiyue Wang &lt;haiyue.wang@intel.com&gt;
Signed-off-by: Tony Nguyen &lt;anthony.l.nguyen@intel.com&gt;
</content>
</entry>
<entry>
<title>iavf: enhance the duplicated FDIR list scan handling</title>
<updated>2021-04-23T16:03:56Z</updated>
<author>
<name>Haiyue Wang</name>
<email>haiyue.wang@intel.com</email>
</author>
<published>2021-03-31T02:08:36Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=f3b9da31f0e36a3cd3edad51131d63c044cd1ec4'/>
<id>urn:sha1:f3b9da31f0e36a3cd3edad51131d63c044cd1ec4</id>
<content type='text'>
When the FDIR entry is found, just return the result directly to break
the loop.

Signed-off-by: Haiyue Wang &lt;haiyue.wang@intel.com&gt;
Signed-off-by: Tony Nguyen &lt;anthony.l.nguyen@intel.com&gt;
</content>
</entry>
</feed>
