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] [day] [month] [year] [list]
Date:   Thu, 27 May 2021 09:19:51 -0700
From:   Jakub Kicinski <kuba@...nel.org>
To:     Gatis Peisenieks <gatis@...rotik.com>
Cc:     chris.snook@...il.com, davem@...emloft.net, hkallweit1@...il.com,
        jesse.brandeburg@...el.com, dchickles@...vell.com,
        tully@...rotik.com, eric.dumazet@...il.com, netdev@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH net-next v3] atl1c: add 4 RX/TX queue support for
 Mikrotik 10/25G NIC

On Thu, 27 May 2021 16:49:22 +0300 Gatis Peisenieks wrote:
> On 2021-05-27 04:16, Jakub Kicinski wrote:
> >> +/**
> >> + * atl1c_clean_rx - NAPI Rx polling callback
> >> + * @napi: napi info
> >> + * @budget: limit of packets to clean
> >> + */
> >> +static int atl1c_clean_rx(struct napi_struct *napi, int budget)
> >>  {
> >> +	struct atl1c_rrd_ring *rrd_ring =
> >> +		container_of(napi, struct atl1c_rrd_ring, napi);
> >> +	struct atl1c_adapter *adapter = rrd_ring->adapter;
> >> +	int work_done = 0;
> >> +	unsigned long flags;
> >>  	u16 rfd_num, rfd_index;
> >> -	u16 count = 0;
> >>  	u16 length;
> >>  	struct pci_dev *pdev = adapter->pdev;
> >>  	struct net_device *netdev  = adapter->netdev;
> >> -	struct atl1c_rfd_ring *rfd_ring = &adapter->rfd_ring;
> >> -	struct atl1c_rrd_ring *rrd_ring = &adapter->rrd_ring;
> >> +	struct atl1c_rfd_ring *rfd_ring = &adapter->rfd_ring[rrd_ring->num];
> >>  	struct sk_buff *skb;
> >>  	struct atl1c_recv_ret_status *rrs;
> >>  	struct atl1c_buffer *buffer_info;
> >> 
> >> +	/* Keep link state information with original netdev */
> >> +	if (!netif_carrier_ok(adapter->netdev))
> >> +		goto quit_polling;  
> > 
> > Interesting, I see you only move this code, but why does this driver
> > stop reading packets when link goes down? Surely there may be packets
> > already on the ring which Linux should process?  
> 
> Jakub, I do not know what possible HW quirks this check might be
> covering up, so I left it there. If you feel it is safe to remove
> I can do a separate patch for that. I think it is fine for the
> HW I work with, but that is far from everything this driver supports.

No strong feelings either way. I was mostly surprised to see such code,
so I thought I'd ask in case you knew why it was there.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ