In gve_alloc_queue_page_list(), when a page allocation fails,
qpl->num_entries will be wrong. In this case priv->num_registered_pages
can underflow in gve_free_queue_page_list(), causing subsequent calls
to gve_alloc_queue_page_list() to fail.
Fixes: f5cedc84a30d ("gve: Add transmit and receive support")
Signed-off-by: Jeroen de Borst <email address hidden>
Reviewed-by: Catherine Sullivan <email address hidden>
Signed-off-by: David S. Miller <email address hidden>
(cherry picked from commit a95069ecb7092d03b2ea1c39ee04514fe9627540)
Signed-off-by: Khalid Elmously <email address hidden>
Acked-by: Kleber Sacilotto de Souza <email address hidden>
Acked-by: Connor Kuehl <email address hidden>
Acked-by: Seth Forshee <email address hidden>
Signed-off-by: Khalid Elmously <email address hidden>
desc_cnt and data_cnt should always be equal. In the case of a dropped
packet desc_cnt was still getting updated (correctly), data_cnt
was not. To eliminate this bug and prevent it from recurring this
patch combines them into one ring level cnt.
Signed-off-by: Catherine Sullivan <email address hidden>
Reviewed-by: Sagi Shahar <email address hidden>
Signed-off-by: David S. Miller <email address hidden>
(cherry picked from commit 438b43bdb95d3189e0098919f321c014ed71f410)
Signed-off-by: Khalid Elmously <email address hidden>
Acked-by: Kleber Sacilotto de Souza <email address hidden>
Acked-by: Connor Kuehl <email address hidden>
Acked-by: Seth Forshee <email address hidden>
Signed-off-by: Khalid Elmously <email address hidden>
The function gve_probe is declared static and marked EXPORT_SYMBOL, which
is at best an odd combination. Because the function is not used outside of
the drivers/net/ethernet/google/gve/gve_main.c file it is defined in, this
commit removes the EXPORT_SYMBOL() marking.
Signed-off-by: Denis Efremov <email address hidden>
Signed-off-by: David S. Miller <email address hidden>
(cherry picked from commit 14b4c48bb1ce6ff429a9288c9579cc984193ebaf)
Signed-off-by: Khalid Elmously <email address hidden>
Acked-by: Kleber Sacilotto de Souza <email address hidden>
Acked-by: Connor Kuehl <email address hidden>
Acked-by: Seth Forshee <email address hidden>
Signed-off-by: Khalid Elmously <email address hidden>