Unverified Commit 50e985c0 authored by openeuler-ci-bot's avatar openeuler-ci-bot Committed by Gitee
Browse files

!14914 bnxt_en: Fix receive ring space parameters when XDP is active

parents 3cf52f86 a27f9d63
Loading
Loading
Loading
Loading
+9 −1
Original line number Diff line number Diff line
@@ -3986,7 +3986,7 @@ int bnxt_set_rx_skb_mode(struct bnxt *bp, bool page_mode)
	struct net_device *dev = bp->dev;

	if (page_mode) {
		bp->flags &= ~BNXT_FLAG_AGG_RINGS;
		bp->flags &= ~(BNXT_FLAG_AGG_RINGS | BNXT_FLAG_NO_AGG_RINGS);
		bp->flags |= BNXT_FLAG_RX_PAGE_MODE;

		if (bp->xdp_prog->aux->xdp_has_frags)
@@ -12795,6 +12795,14 @@ static int bnxt_change_mtu(struct net_device *dev, int new_mtu)
		bnxt_close_nic(bp, true, false);

	dev->mtu = new_mtu;

	/* MTU change may change the AGG ring settings if an XDP multi-buffer
	 * program is attached.  We need to set the AGG rings settings and
	 * rx_skb_func accordingly.
	 */
	if (READ_ONCE(bp->xdp_prog))
		bnxt_set_rx_skb_mode(bp, true);

	bnxt_set_ring_params(bp);

	if (netif_running(dev))