From: Gatis Peisenieks <gatis@mikrotik.com>
To: Jakub Kicinski <kuba@kernel.org>
Cc: chris.snook@gmail.com, davem@davemloft.net, hkallweit1@gmail.com,
jesse.brandeburg@intel.com, dchickles@marvell.com,
tully@mikrotik.com, eric.dumazet@gmail.com,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH net-next v3] atl1c: add 4 RX/TX queue support for Mikrotik 10/25G NIC
Date: Thu, 27 May 2021 16:49:22 +0300 [thread overview]
Message-ID: <d2651c5f20d072f99e66f9e1df3956f0@mikrotik.com> (raw)
In-Reply-To: <20210526181609.1416c4eb@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com>
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.
Thank you for reviewing this!
next prev parent reply other threads:[~2021-05-27 13:49 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-26 7:58 Gatis Peisenieks
2021-05-27 1:16 ` Jakub Kicinski
2021-05-27 13:49 ` Gatis Peisenieks [this message]
2021-05-27 16:19 ` Jakub Kicinski
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=d2651c5f20d072f99e66f9e1df3956f0@mikrotik.com \
--to=gatis@mikrotik.com \
--cc=chris.snook@gmail.com \
--cc=davem@davemloft.net \
--cc=dchickles@marvell.com \
--cc=eric.dumazet@gmail.com \
--cc=hkallweit1@gmail.com \
--cc=jesse.brandeburg@intel.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=tully@mikrotik.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®