Re: [RESEND] [PATCH bpf-next 2/3] bpf: Overwrite the element in hash map atomically

2025-03-06 Thread Nick Zavaritsky
> On 27. Feb 2025, at 04:17, Alexei Starovoitov > wrote: > > On Wed, Feb 26, 2025 at 6:43 PM Hou Tao wrote: >> lookup procedure A A: find the old element (instead of the new old) update procedure B B: delete the old element

Re: [RESEND] [PATCH bpf-next 2/3] bpf: Overwrite the element in hash map atomically

2025-02-26 Thread Hou Tao
Hi, On 2/27/2025 11:17 AM, Alexei Starovoitov wrote: > On Wed, Feb 26, 2025 at 6:43 PM Hou Tao wrote: lookup procedure A A: find the old element (instead of the new old) update procedure B B: delete the old element update pro

Re: [RESEND] [PATCH bpf-next 2/3] bpf: Overwrite the element in hash map atomically

2025-02-26 Thread Alexei Starovoitov
On Wed, Feb 26, 2025 at 6:43 PM Hou Tao wrote: > > >> > >> lookup procedure A > >> A: find the old element (instead of the new old) > >> > >> update procedure B > >> B: delete the old element > >> update procedure C on the same CPU: > >> C: r

Re: [RESEND] [PATCH bpf-next 2/3] bpf: Overwrite the element in hash map atomically

2025-02-26 Thread Hou Tao
Hi, On 2/27/2025 9:59 AM, Alexei Starovoitov wrote: > On Wed, Feb 26, 2025 at 5:48 PM Hou Tao wrote: >> Hi, >> >> On 2/27/2025 7:17 AM, Zvi Effron wrote: >>> On Tue, Feb 25, 2025 at 9:42 PM Alexei Starovoitov >>> wrote: On Tue, Feb 25, 2025 at 8:05 PM Hou Tao wrote: > Hi, > > O

Re: [RESEND] [PATCH bpf-next 2/3] bpf: Overwrite the element in hash map atomically

2025-02-26 Thread Alexei Starovoitov
On Wed, Feb 26, 2025 at 5:48 PM Hou Tao wrote: > > Hi, > > On 2/27/2025 7:17 AM, Zvi Effron wrote: > > On Tue, Feb 25, 2025 at 9:42 PM Alexei Starovoitov > > wrote: > >> On Tue, Feb 25, 2025 at 8:05 PM Hou Tao wrote: > >>> Hi, > >>> > >>> On 2/26/2025 11:24 AM, Alexei Starovoitov wrote: > O

Re: [RESEND] [PATCH bpf-next 2/3] bpf: Overwrite the element in hash map atomically

2025-02-26 Thread Hou Tao
Hi, On 2/27/2025 7:17 AM, Zvi Effron wrote: > On Tue, Feb 25, 2025 at 9:42 PM Alexei Starovoitov > wrote: >> On Tue, Feb 25, 2025 at 8:05 PM Hou Tao wrote: >>> Hi, >>> >>> On 2/26/2025 11:24 AM, Alexei Starovoitov wrote: On Sat, Feb 8, 2025 at 2:17 AM Hou Tao wrote: > Hi Toke, > >>

Re: [RESEND] [PATCH bpf-next 2/3] bpf: Overwrite the element in hash map atomically

2025-02-26 Thread Zvi Effron
On Tue, Feb 25, 2025 at 9:42 PM Alexei Starovoitov wrote: > > On Tue, Feb 25, 2025 at 8:05 PM Hou Tao wrote: > > > > Hi, > > > > On 2/26/2025 11:24 AM, Alexei Starovoitov wrote: > > > On Sat, Feb 8, 2025 at 2:17 AM Hou Tao wrote: > > >> Hi Toke, > > >> > > >> On 2/6/2025 11:05 PM, Toke Høiland-J

Re: [RESEND] [PATCH bpf-next 2/3] bpf: Overwrite the element in hash map atomically

2025-02-25 Thread Alexei Starovoitov
On Tue, Feb 25, 2025 at 8:05 PM Hou Tao wrote: > > Hi, > > On 2/26/2025 11:24 AM, Alexei Starovoitov wrote: > > On Sat, Feb 8, 2025 at 2:17 AM Hou Tao wrote: > >> Hi Toke, > >> > >> On 2/6/2025 11:05 PM, Toke Høiland-Jørgensen wrote: > >>> Hou Tao writes: > >>> > +cc Cody Haas > >

Re: [RESEND] [PATCH bpf-next 2/3] bpf: Overwrite the element in hash map atomically

2025-02-25 Thread Hou Tao
Hi, On 2/26/2025 11:24 AM, Alexei Starovoitov wrote: > On Sat, Feb 8, 2025 at 2:17 AM Hou Tao wrote: >> Hi Toke, >> >> On 2/6/2025 11:05 PM, Toke Høiland-Jørgensen wrote: >>> Hou Tao writes: >>> +cc Cody Haas Sorry for the resend. I sent the reply in the HTML format. On

Re: [RESEND] [PATCH bpf-next 2/3] bpf: Overwrite the element in hash map atomically

2025-02-25 Thread Alexei Starovoitov
On Sat, Feb 8, 2025 at 2:17 AM Hou Tao wrote: > > Hi Toke, > > On 2/6/2025 11:05 PM, Toke Høiland-Jørgensen wrote: > > Hou Tao writes: > > > >> +cc Cody Haas > >> > >> Sorry for the resend. I sent the reply in the HTML format. > >> > >> On 2/4/2025 4:28 PM, Hou Tao wrote: > >>> Currently, the upd

Re: [RESEND] [PATCH bpf-next 2/3] bpf: Overwrite the element in hash map atomically

2025-02-08 Thread Hou Tao
Hi Toke, On 2/6/2025 11:05 PM, Toke Høiland-Jørgensen wrote: > Hou Tao writes: > >> +cc Cody Haas >> >> Sorry for the resend. I sent the reply in the HTML format. >> >> On 2/4/2025 4:28 PM, Hou Tao wrote: >>> Currently, the update of existing element in hash map involves two >>> steps: >>> 1) ins

Re: [RESEND] [PATCH bpf-next 2/3] bpf: Overwrite the element in hash map atomically

2025-02-06 Thread Toke Høiland-Jørgensen
Hou Tao writes: > +cc Cody Haas > > Sorry for the resend. I sent the reply in the HTML format. > > On 2/4/2025 4:28 PM, Hou Tao wrote: >> Currently, the update of existing element in hash map involves two >> steps: >> 1) insert the new element at the head of the hash list >> 2) remove the old ele

Re: [RESEND] [PATCH bpf-next 2/3] bpf: Overwrite the element in hash map atomically

2025-02-04 Thread Hou Tao
+cc Cody Haas Sorry for the resend. I sent the reply in the HTML format. On 2/4/2025 4:28 PM, Hou Tao wrote: > Currently, the update of existing element in hash map involves two > steps: > 1) insert the new element at the head of the hash list > 2) remove the old element > > It is possible that

[PATCH bpf-next 2/3] bpf: Overwrite the element in hash map atomically

2025-02-04 Thread Hou Tao
Currently, the update of existing element in hash map involves two steps: 1) insert the new element at the head of the hash list 2) remove the old element It is possible that the concurrent lookup operation may fail to find either the old element or the new element if the lookup operation starts b