> -----Original Message----- > From: Joshua Washington <[email protected]> > Sent: Tuesday, November 14, 2023 07:12 > To: Guo, Junfeng <[email protected]>; Jeroen de Borst > <[email protected]>; Rushil Gupta <[email protected]>; Joshua > Washington <[email protected]>; Li, Xiaoyun <[email protected]> > Cc: [email protected]; [email protected]; Ferruh Yigit <[email protected]> > Subject: [PATCH v2] net/gve: fix RX buffer size alignment > > In GVE, both queue formats have RX buffer size alignment requirements > which will not always be respected when a user specifies an mbuf size. > Assuming that an mbuf size is greater than the DPDK recommended default > (2048 + 128), if the buffer size is not properly aligned with what the > device expects, the device will silently fail to create any transmit or > receive queues. > > Because no queues are created, there is no network traffic for the DPDK > program, and errors like the following are returned when attempting to > destroy queues: > > gve_adminq_parse_err(): AQ command failed with status -11 > gve_stop_tx_queues(): failed to destroy txqs > gve_adminq_parse_err(): AQ command failed with status -11 > gve_stop_rx_queues(): failed to destroy rxqs > > This change aims to remedy this by restricting the RX receive buffer > sizes to valid sizes for their respective queue formats, including both > alignment and minimum and maximum supported buffer sizes. > > Fixes: 4bec2d0b5572 ("net/gve: support queue operations") > Fixes: 1dc00f4fc74b ("net/gve: add Rx queue setup for DQO") > Cc: [email protected] > Cc: [email protected] > > Signed-off-by: Joshua Washington <[email protected]> > Reviewed-by: Rushil Gupta <[email protected]>
Acked-by: Junfeng Guo <[email protected]> Regards, Junfeng Guo > --- > drivers/net/gve/gve_ethdev.c | 5 ++++- > drivers/net/gve/gve_ethdev.h | 8 +++++++- > drivers/net/gve/gve_rx.c | 7 ++++++- > drivers/net/gve/gve_rx_dqo.c | 6 +++++- > 4 files changed, 22 insertions(+), 4 deletions(-) > > -- > 2.42.0.869.gea05f2083d-goog

