[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240612174311.7bd028e1@kernel.org>
Date: Wed, 12 Jun 2024 17:43:11 -0700
From: Jakub Kicinski <kuba@...nel.org>
To: Justin Lai <justinlai0215@...ltek.com>
Cc: <davem@...emloft.net>, <edumazet@...gle.com>, <pabeni@...hat.com>,
<linux-kernel@...r.kernel.org>, <netdev@...r.kernel.org>, <andrew@...n.ch>,
<jiri@...nulli.us>, <horms@...nel.org>, <rkannoth@...vell.com>,
<pkshih@...ltek.com>, <larry.chiu@...ltek.com>
Subject: Re: [PATCH net-next v20 07/13] rtase: Implement a function to
receive packets
On Fri, 7 Jun 2024 16:43:15 +0800 Justin Lai wrote:
> +static int rx_handler(struct rtase_ring *ring, int budget)
> +{
> + const struct rtase_private *tp = ring->ivec->tp;
> + union rtase_rx_desc *desc_base = ring->desc;
> + u32 pkt_size, cur_rx, delta, entry, status;
> + struct net_device *dev = tp->dev;
> + union rtase_rx_desc *desc;
> + struct sk_buff *skb;
> + int workdone = 0;
> +
> + cur_rx = ring->cur_idx;
> + entry = cur_rx % RTASE_NUM_DESC;
> + desc = &desc_base[entry];
> +
> + do {
> + /* make sure discriptor has been updated */
> + rmb();
Barriers are between things. What is this barrier between?
> + status = le32_to_cpu(desc->desc_status.opts1);
> +
> + if (status & RTASE_DESC_OWN)
> + break;
Powered by blists - more mailing lists