[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <af9b3109-c53e-1288-fd7d-8a67446c6923@aquantia.com>
Date: Tue, 15 Oct 2019 09:09:19 +0000
From: Igor Russkikh <Igor.Russkikh@...antia.com>
To: Andrew Lunn <andrew@...n.ch>
CC: "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
"davem@...emloft.net" <davem@...emloft.net>,
"richardcochran@...il.com" <richardcochran@...il.com>,
Egor Pomozov <Egor.Pomozov@...antia.com>,
Dmitry Bezrukov <Dmitry.Bezrukov@...antia.com>,
Simon Edelhaus <sedelhaus@...vell.com>,
Sergey Samoilenko <Sergey.Samoilenko@...antia.com>
Subject: Re: [PATCH v2 net-next 06/12] net: aquantia: implement data PTP
datapath
>> +static inline int aq_ptp_tm_offset_ingress_get(struct aq_ptp_s *aq_ptp)
>> +{
>> + return atomic_read(&aq_ptp->offset_ingress);
>> +}
>
> inline should not be used in C files. Let the compiler decide.
Ok
>> + atomic_set(&aq_ptp->offset_egress, egress);
>> + atomic_set(&aq_ptp->offset_ingress, ingress);
>
> It seems odd you have wrappers for atomic_read, but not atomic_set. Do
> the wrappers actually add anything?
I think no, they are just naming sugar.
Will discuss internally and probably leave direct atomic_get|set
>> + if (next_head == ring->tail)
>> + return -1;
>
> ENOMEM?
Right.
>> +
>> + ring->buff[ring->head] = skb_get(skb);
>> + ring->head = next_head;
>> +
>> + return 0;
>> +}
>> +
>
> Andrew
Thanks for your review, Andrew!
Regards,
Igor
Powered by blists - more mailing lists