mbox series

[v1,0/2,SRU,F:linux-bluefield,v1,0/2] UBUNTU: SAUCE: mlxbf-tmfifo: robust fix to drop over-sized packet or no Rx descriptors

Message ID cover.1685886644.git.limings@nvidia.com
Headers show
Series UBUNTU: SAUCE: mlxbf-tmfifo: robust fix to drop over-sized packet or no Rx descriptors | expand

Message

Liming Sun June 4, 2023, 1:55 p.m. UTC
BugLink: https://bugs.launchpad.net/bugs/2021749

SRU Justification:

[Impact]
This change is needed to avoid potential tmfifo console stuck when
network interface is down or receiving oversized packets.

[Fix]
Drop the Rx packets in the above cases. Since tmfifo is shared
resource for both console and networking. Dropping such network
packets can continue to process the fifo and avoid console stuck.

[Test Case]
Same functionality and testing as on BlueField-1/2/3. No functionality
change. Add negative tests:
- 'ifconfig tmfifo_net0 down' on ARM side during traffic, then verify
  rshim console doesn't stuck.
- Config MTU to 4000 on rshim host and send oversized packet with command
  'ping 192.168.100.2 -s 2000". It shouldn't cause any stuck.

[Regression Potential]
Same behavior from user perspective.

Liming Sun (2):
  mlxbf-tmfifo: Drop the Rx packet if no more descriptors
  mlxbf-tmfifo: Drop jumbo frames

 drivers/platform/mellanox/mlxbf-tmfifo.c | 98 +++++++++++++++++-------
 1 file changed, 71 insertions(+), 27 deletions(-)

Comments

Tim Gardner June 5, 2023, 1:29 p.m. UTC | #1
On 6/4/23 7:55 AM, Liming Sun wrote:
> BugLink: https://bugs.launchpad.net/bugs/2021749
> 
> SRU Justification:
> 
> [Impact]
> This change is needed to avoid potential tmfifo console stuck when
> network interface is down or receiving oversized packets.
> 
> [Fix]
> Drop the Rx packets in the above cases. Since tmfifo is shared
> resource for both console and networking. Dropping such network
> packets can continue to process the fifo and avoid console stuck.
> 
> [Test Case]
> Same functionality and testing as on BlueField-1/2/3. No functionality
> change. Add negative tests:
> - 'ifconfig tmfifo_net0 down' on ARM side during traffic, then verify
>    rshim console doesn't stuck.
> - Config MTU to 4000 on rshim host and send oversized packet with command
>    'ping 192.168.100.2 -s 2000". It shouldn't cause any stuck.
> 
> [Regression Potential]
> Same behavior from user perspective.
> 
> Liming Sun (2):
>    mlxbf-tmfifo: Drop the Rx packet if no more descriptors
>    mlxbf-tmfifo: Drop jumbo frames
> 
>   drivers/platform/mellanox/mlxbf-tmfifo.c | 98 +++++++++++++++++-------
>   1 file changed, 71 insertions(+), 27 deletions(-)
> 
Acked-by: Tim Gardner <tim.gardner@canonical.com>
Bartlomiej Zolnierkiewicz June 14, 2023, 3:58 p.m. UTC | #2
Acked-by: Bartlomiej Zolnierkiewicz <bartlomiej.zolnierkiewicz@canonical.com>

On Sun, Jun 4, 2023 at 3:56 PM Liming Sun <limings@nvidia.com> wrote:
>
> BugLink: https://bugs.launchpad.net/bugs/2021749
>
> SRU Justification:
>
> [Impact]
> This change is needed to avoid potential tmfifo console stuck when
> network interface is down or receiving oversized packets.
>
> [Fix]
> Drop the Rx packets in the above cases. Since tmfifo is shared
> resource for both console and networking. Dropping such network
> packets can continue to process the fifo and avoid console stuck.
>
> [Test Case]
> Same functionality and testing as on BlueField-1/2/3. No functionality
> change. Add negative tests:
> - 'ifconfig tmfifo_net0 down' on ARM side during traffic, then verify
>   rshim console doesn't stuck.
> - Config MTU to 4000 on rshim host and send oversized packet with command
>   'ping 192.168.100.2 -s 2000". It shouldn't cause any stuck.
>
> [Regression Potential]
> Same behavior from user perspective.
>
> Liming Sun (2):
>   mlxbf-tmfifo: Drop the Rx packet if no more descriptors
>   mlxbf-tmfifo: Drop jumbo frames
>
>  drivers/platform/mellanox/mlxbf-tmfifo.c | 98 +++++++++++++++++-------
>  1 file changed, 71 insertions(+), 27 deletions(-)
Bartlomiej Zolnierkiewicz June 14, 2023, 4:28 p.m. UTC | #3
Applied to focal:linux-bluefield/master-next. Thanks.

--
Best regards,
Bartlomiej

On Sun, Jun 4, 2023 at 3:56 PM Liming Sun <limings@nvidia.com> wrote:
>
> BugLink: https://bugs.launchpad.net/bugs/2021749
>
> SRU Justification:
>
> [Impact]
> This change is needed to avoid potential tmfifo console stuck when
> network interface is down or receiving oversized packets.
>
> [Fix]
> Drop the Rx packets in the above cases. Since tmfifo is shared
> resource for both console and networking. Dropping such network
> packets can continue to process the fifo and avoid console stuck.
>
> [Test Case]
> Same functionality and testing as on BlueField-1/2/3. No functionality
> change. Add negative tests:
> - 'ifconfig tmfifo_net0 down' on ARM side during traffic, then verify
>   rshim console doesn't stuck.
> - Config MTU to 4000 on rshim host and send oversized packet with command
>   'ping 192.168.100.2 -s 2000". It shouldn't cause any stuck.
>
> [Regression Potential]
> Same behavior from user perspective.
>
> Liming Sun (2):
>   mlxbf-tmfifo: Drop the Rx packet if no more descriptors
>   mlxbf-tmfifo: Drop jumbo frames
>
>  drivers/platform/mellanox/mlxbf-tmfifo.c | 98 +++++++++++++++++-------
>  1 file changed, 71 insertions(+), 27 deletions(-)