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: <f43b61ec5e624ae78dc5d564e8735ef3@realtek.com>
Date: Tue, 30 Jul 2024 09:27:27 +0000
From: Justin Lai <justinlai0215@...ltek.com>
To: Jakub Kicinski <kuba@...nel.org>
CC: "davem@...emloft.net" <davem@...emloft.net>,
        "edumazet@...gle.com"
	<edumazet@...gle.com>,
        "pabeni@...hat.com" <pabeni@...hat.com>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
        "andrew@...n.ch"
	<andrew@...n.ch>,
        "jiri@...nulli.us" <jiri@...nulli.us>,
        "horms@...nel.org"
	<horms@...nel.org>,
        "rkannoth@...vell.com" <rkannoth@...vell.com>,
        "jdamato@...tly.com" <jdamato@...tly.com>,
        Ping-Ke Shih <pkshih@...ltek.com>, Larry Chiu <larry.chiu@...ltek.com>
Subject: RE: [PATCH net-next v25 06/13] rtase: Implement .ndo_start_xmit function

> On Mon, 29 Jul 2024 14:21:14 +0800 Justin Lai wrote:
> > +     stop_queue = !netif_subqueue_maybe_stop(dev, ring->index,
> > +                                             rtase_tx_avail(ring),
> > +
> RTASE_TX_STOP_THRS,
> > +
> RTASE_TX_START_THRS);
> > +
> > +     if (door_bell || stop_queue)
> > +             rtase_w8(tp, RTASE_TPPOLL, BIT(ring->index));
> > +
> > +     return NETDEV_TX_OK;
> > +
> > +err_dma_1:
> > +     ring->skbuff[entry] = NULL;
> > +     rtase_tx_clear_range(ring, ring->cur_idx + 1, frags);
> > +
> > +err_dma_0:
> > +     tp->stats.tx_dropped++;
> > +     dev_kfree_skb_any(skb);
> > +     return NETDEV_TX_OK;
> > +
> > +err_stop:
> > +     netif_stop_queue(dev);
> > +     tp->stats.tx_dropped++;
> > +     return NETDEV_TX_BUSY;
> 
> If you're dropping a packet you should somehow check that the previous xmit
> didn't enqueue a packet to the ring and skip the doorbell because door_bell
> was false. If that's the case you have to ring the doorbell now.
> 
> Also you shouldn't increment dropped if you return TX_BUSY.

Thank you for your response. I will modify it.
> 
> Please fix these issues in the driver you're copying from, too.

I will inform the person responsible for the R8169 of the issues we've
identified and discuss what modifications need to be made.

Thanks
Justin

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ