lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CACKFLimf=8QnGvtsRkxf1YbYheXpdWJ=vzyEH=+vfgPPJ7c6KQ@mail.gmail.com>
Date: Wed, 26 Feb 2025 19:35:38 -0800
From: Michael Chan <michael.chan@...adcom.com>
To: Jakub Kicinski <kuba@...nel.org>, Andrew Gospodarek <andrew.gospodarek@...adcom.com>
Cc: davem@...emloft.net, netdev@...r.kernel.org, edumazet@...gle.com, 
	pabeni@...hat.com, andrew+netdev@...n.ch, horms@...nel.org, 
	pavan.chebbi@...adcom.com
Subject: Re: [PATCH net-next 2/9] eth: bnxt: don't run xdp programs on
 fallback traffic

On Wed, Feb 26, 2025 at 1:10 PM Jakub Kicinski <kuba@...nel.org> wrote:

> @@ -2159,6 +2159,10 @@ static int bnxt_rx_pkt(struct bnxt *bp, struct bnxt_cp_ring_info *cpr,
>         len = flags >> RX_CMP_LEN_SHIFT;
>         dma_addr = rx_buf->mapping;
>
> +       dev = bp->dev;
> +       if (cmp_type == CMP_TYPE_RX_L2_CMP)
> +               dev = bnxt_get_pkt_dev(bp, RX_CMP_CFA_CODE(rxcmp1));
> +
>         if (bnxt_xdp_attached(bp, rxr)) {
>                 bnxt_xdp_buff_init(bp, rxr, cons, data_ptr, len, &xdp);
>                 if (agg_bufs) {
> @@ -2171,7 +2175,7 @@ static int bnxt_rx_pkt(struct bnxt *bp, struct bnxt_cp_ring_info *cpr,
>                 xdp_active = true;
>         }
>
> -       if (xdp_active) {
> +       if (xdp_active && dev == bp->dev) {

If we skip the XDP program, we still need to do this check in
bnxt_rx_xdp() because we may be using the XDP TX ring:
         tx_avail = bnxt_tx_avail(bp, txr);
        /* If the tx ring is not full, we must not update the rx producer yet
         * because we may still be transmitting on some BDs.
         */
        if (tx_avail != bp->tx_ring_size)
                *event &= ~BNXT_RX_EVENT;

>                 if (bnxt_rx_xdp(bp, rxr, cons, &xdp, data, &data_ptr, &len, event)) {
>                         rc = 1;
>                         goto next_rx;

Download attachment "smime.p7s" of type "application/pkcs7-signature" (4209 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ