<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/drivers/net/ethernet/intel/ice/ice_fdir.h, branch linux-6.18.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.</subtitle>
<id>https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-6.18.y</id>
<link rel='self' href='https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-6.18.y'/>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/'/>
<updated>2024-11-04T21:09:33Z</updated>
<entry>
<title>ice: change q_index variable type to s16 to store -1 value</title>
<updated>2024-11-04T21:09:33Z</updated>
<author>
<name>Mateusz Polchlopek</name>
<email>mateusz.polchlopek@intel.com</email>
</author>
<published>2024-10-28T16:59:22Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=64502dac974a5d9951d16015fa2e16a14e5f2bb2'/>
<id>urn:sha1:64502dac974a5d9951d16015fa2e16a14e5f2bb2</id>
<content type='text'>
Fix Flow Director not allowing to re-map traffic to 0th queue when action
is configured to drop (and vice versa).

The current implementation of ethtool callback in the ice driver forbids
change Flow Director action from 0 to -1 and from -1 to 0 with an error,
e.g:

 # ethtool -U eth2 flow-type tcp4 src-ip 1.1.1.1 loc 1 action 0
 # ethtool -U eth2 flow-type tcp4 src-ip 1.1.1.1 loc 1 action -1
 rmgr: Cannot insert RX class rule: Invalid argument

We set the value of `u16 q_index = 0` at the beginning of the function
ice_set_fdir_input_set(). In case of "drop traffic" action (which is
equal to -1 in ethtool) we store the 0 value. Later, when want to change
traffic rule to redirect to queue with index 0 it returns an error
caused by duplicate found.

Fix this behaviour by change of the type of field `q_index` from u16 to s16
in `struct ice_fdir_fltr`. This allows to store -1 in the field in case
of "drop traffic" action. What is more, change the variable type in the
function ice_set_fdir_input_set() and assign at the beginning the new
`#define ICE_FDIR_NO_QUEUE_IDX` which is -1. Later, if the action is set
to another value (point specific queue index) the variable value is
overwritten in the function.

Fixes: cac2a27cd9ab ("ice: Support IPv4 Flow Director filters")
Reviewed-by: Przemek Kitszel &lt;przemyslaw.kitszel@intel.com&gt;
Signed-off-by: Mateusz Polchlopek &lt;mateusz.polchlopek@intel.com&gt;
Reviewed-by: Simon Horman &lt;horms@kernel.org&gt;
Tested-by: Pucha Himasekhar Reddy &lt;himasekharx.reddy.pucha@intel.com&gt; (A Contingent worker at Intel)
Signed-off-by: Tony Nguyen &lt;anthony.l.nguyen@intel.com&gt;
</content>
</entry>
<entry>
<title>ice: Add a per-VF limit on number of FDIR filters</title>
<updated>2024-07-23T22:26:41Z</updated>
<author>
<name>Ahmed Zaki</name>
<email>ahmed.zaki@intel.com</email>
</author>
<published>2024-06-14T13:18:42Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=6ebbe97a488179f5dc85f2f1e0c89b486e99ee97'/>
<id>urn:sha1:6ebbe97a488179f5dc85f2f1e0c89b486e99ee97</id>
<content type='text'>
While the iavf driver adds a s/w limit (128) on the number of FDIR
filters that the VF can request, a malicious VF driver can request more
than that and exhaust the resources for other VFs.

Add a similar limit in ice.

CC: stable@vger.kernel.org
Fixes: 1f7ea1cd6a37 ("ice: Enable FDIR Configure for AVF")
Reviewed-by: Przemek Kitszel &lt;przemyslaw.kitszel@intel.com&gt;
Suggested-by: Sridhar Samudrala &lt;sridhar.samudrala@intel.com&gt;
Signed-off-by: Ahmed Zaki &lt;ahmed.zaki@intel.com&gt;
Reviewed-by: Wojciech Drewek &lt;wojciech.drewek@intel.com&gt;
Tested-by: Rafal Romanowski &lt;rafal.romanowski@intel.com&gt;
Signed-off-by: Tony Nguyen &lt;anthony.l.nguyen@intel.com&gt;
</content>
</entry>
<entry>
<title>ice: Implement 'flow-type ether' rules</title>
<updated>2024-04-12T17:34:24Z</updated>
<author>
<name>Jakub Buchocki</name>
<email>jakubx.buchocki@intel.com</email>
</author>
<published>2024-04-03T10:24:02Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=ae67389c53928418975b46d13b51fde4e40ee15f'/>
<id>urn:sha1:ae67389c53928418975b46d13b51fde4e40ee15f</id>
<content type='text'>
Add support for 'flow-type ether' Flow Director rules via ethtool.

Create packet segment info for filter configuration based on ethtool
command parameters. Reuse infrastructure already created for
ipv4 and ipv6 flows to convert packet segment into
extraction sequence, which is later used to program the filter
inside Flow Director block of the Rx pipeline.

Rules not containing masks are processed by the Flow Director,
and support the following set of input parameters in all combinations:
src, dst, proto, vlan-etype, vlan, action.

It is possible to specify address mask in ethtool parameters but only
00:00:00:00:00 and FF:FF:FF:FF:FF are valid.
The same applies to proto, vlan-etype and vlan masks:
only 0x0000 and 0xffff masks are valid.

Testing:
  (DUT) iperf3 -s
  (DUT) ethtool -U ens785f0np0 flow-type ether dst &lt;ens785f0np0 mac&gt; \
        action 10
  (DUT) watch 'ethtool -S ens785f0np0 | grep rx_queue'
  (LP)  iperf3 -c ${DUT_IP}

  Counters increase only for:
    'rx_queue_10_packets'
    'rx_queue_10_bytes'

Signed-off-by: Jakub Buchocki &lt;jakubx.buchocki@intel.com&gt;
Co-developed-by: Mateusz Pacuszka &lt;mateuszx.pacuszka@intel.com&gt;
Signed-off-by: Mateusz Pacuszka &lt;mateuszx.pacuszka@intel.com&gt;
Reviewed-by: Przemek Kitszel &lt;przemyslaw.kitszel@intel.com&gt;
Signed-off-by: Lukasz Plachno &lt;lukasz.plachno@intel.com&gt;
Reviewed-by: Jacob Keller &lt;jacob.e.keller@intel.com&gt;
Reviewed-by: Simon Horman &lt;horms@kernel.org&gt;
Tested-by: Pucha Himasekhar Reddy &lt;himasekharx.reddy.pucha@intel.com&gt; (A Contingent worker at Intel)
Signed-off-by: Tony Nguyen &lt;anthony.l.nguyen@intel.com&gt;
</content>
</entry>
<entry>
<title>ice: Add flow director support for channel mode</title>
<updated>2021-12-30T13:16:07Z</updated>
<author>
<name>Kiran Patil</name>
<email>kiran.patil@intel.com</email>
</author>
<published>2021-12-29T18:54:33Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=40319796b7321e25d23671e525e01a1f4d85f6b6'/>
<id>urn:sha1:40319796b7321e25d23671e525e01a1f4d85f6b6</id>
<content type='text'>
Add support to enable flow-director filter when multiple TCs are
configured. Flow director filter can be configured using ethtool
(--config-ntuple option). When multiple TCs are configured, each
TC is mapped to an unique HW VSI. So VSI corresponding to queue
used in filter is identified and flow director context is updated
with correct VSI while configuring ntuple filter in HW.

Signed-off-by: Kiran Patil &lt;kiran.patil@intel.com&gt;
Signed-off-by: Amritha Nambiar &lt;amritha.nambiar@intel.com&gt;
Signed-off-by: Sudheer Mogilappagari &lt;sudheer.mogilappagari@intel.com&gt;
Tested-by: Bharathi Sreenivas &lt;bharathi.sreenivas@intel.com&gt;
Signed-off-by: Tony Nguyen &lt;anthony.l.nguyen@intel.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>ice: Cleanup after ice_status removal</title>
<updated>2021-12-14T18:19:13Z</updated>
<author>
<name>Tony Nguyen</name>
<email>anthony.l.nguyen@intel.com</email>
</author>
<published>2021-10-07T22:59:03Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=5518ac2a64423f226e922b6719cf0eb62c31e141'/>
<id>urn:sha1:5518ac2a64423f226e922b6719cf0eb62c31e141</id>
<content type='text'>
Clean up code after changing ice_status to int. Rearrange to fix reverse
Christmas tree and pull lines up where applicable.

Signed-off-by: Tony Nguyen &lt;anthony.l.nguyen@intel.com&gt;
Tested-by: Gurucharan G &lt;gurucharanx.g@intel.com&gt;
</content>
</entry>
<entry>
<title>ice: Use int for ice_status</title>
<updated>2021-12-14T18:19:13Z</updated>
<author>
<name>Tony Nguyen</name>
<email>anthony.l.nguyen@intel.com</email>
</author>
<published>2021-10-07T22:56:57Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=5e24d5984c805c644de8bf5217a820e22e28318c'/>
<id>urn:sha1:5e24d5984c805c644de8bf5217a820e22e28318c</id>
<content type='text'>
To prepare for removal of ice_status, change the variables from
ice_status to int. This eases the transition when values are changed to
return standard int error codes over enum ice_status.

Signed-off-by: Tony Nguyen &lt;anthony.l.nguyen@intel.com&gt;
Tested-by: Gurucharan G &lt;gurucharanx.g@intel.com&gt;
</content>
</entry>
<entry>
<title>ice: Fix macro name for IPv4 fragment flag</title>
<updated>2021-09-28T16:42:04Z</updated>
<author>
<name>Jeff Guo</name>
<email>jia.guo@intel.com</email>
</author>
<published>2021-07-16T22:16:44Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=b37e4e94c1a85251518fd381efd61f19c20548f4'/>
<id>urn:sha1:b37e4e94c1a85251518fd381efd61f19c20548f4</id>
<content type='text'>
In IPv4 header, fragment flags indicate whether the packet needs
to be fragmented or not. The value 0x20 represents MF (More Fragment); fix
the macro name to match this.

Signed-off-by: Ting Xu &lt;ting.xu@intel.com&gt;
Signed-off-by: Jeff Guo &lt;jia.guo@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;
</content>
</entry>
<entry>
<title>ice: Add more FDIR filter type for AVF</title>
<updated>2021-03-22T18:32:12Z</updated>
<author>
<name>Qi Zhang</name>
<email>qi.z.zhang@intel.com</email>
</author>
<published>2021-03-09T03:08:09Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=213528fed2f609a0d67f59337145057f63c5bb0b'/>
<id>urn:sha1:213528fed2f609a0d67f59337145057f63c5bb0b</id>
<content type='text'>
FDIR for AVF can forward
- L2TPV3 packets by matching session id.
- IPSEC ESP packets by matching security parameter index.
- IPSEC AH packets by matching security parameter index.
- NAT_T ESP packets by matching security parameter index.
- Any PFCP session packets(s field is 1).

Signed-off-by: Yahui Cao &lt;yahui.cao@intel.com&gt;
Signed-off-by: Qi Zhang &lt;qi.z.zhang@intel.com&gt;
Tested-by: Chen Bo &lt;BoX.C.Chen@intel.com&gt;
Signed-off-by: Tony Nguyen &lt;anthony.l.nguyen@intel.com&gt;
</content>
</entry>
<entry>
<title>ice: Add GTPU FDIR filter for AVF</title>
<updated>2021-03-22T18:32:12Z</updated>
<author>
<name>Qi Zhang</name>
<email>qi.z.zhang@intel.com</email>
</author>
<published>2021-03-09T03:08:08Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=ef9e4cc589cafd5c775d4501815e1ebc3110cdb6'/>
<id>urn:sha1:ef9e4cc589cafd5c775d4501815e1ebc3110cdb6</id>
<content type='text'>
Add new FDIR filter type to forward GTPU packets by matching TEID or QFI.
The filter is only enabled when COMMS DDP package is downloaded.

Signed-off-by: Yahui Cao &lt;yahui.cao@intel.com&gt;
Signed-off-by: Qi Zhang &lt;qi.z.zhang@intel.com&gt;
Tested-by: Chen Bo &lt;BoX.C.Chen@intel.com&gt;
Signed-off-by: Tony Nguyen &lt;anthony.l.nguyen@intel.com&gt;
</content>
</entry>
<entry>
<title>ice: Add non-IP Layer2 protocol FDIR filter for AVF</title>
<updated>2021-03-22T18:32:12Z</updated>
<author>
<name>Qi Zhang</name>
<email>qi.z.zhang@intel.com</email>
</author>
<published>2021-03-09T03:08:07Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=21606584f1bb4c76aeb5a113e0e8a72681a270e4'/>
<id>urn:sha1:21606584f1bb4c76aeb5a113e0e8a72681a270e4</id>
<content type='text'>
Add new filter type that allow forward non-IP Ethernet packets base on its
ethertype. The filter is only enabled when COMMS DDP package is loaded.

Signed-off-by: Yahui Cao &lt;yahui.cao@intel.com&gt;
Signed-off-by: Qi Zhang &lt;qi.z.zhang@intel.com&gt;
Tested-by: Chen Bo &lt;BoX.C.Chen@intel.com&gt;
Signed-off-by: Tony Nguyen &lt;anthony.l.nguyen@intel.com&gt;
</content>
</entry>
</feed>
