[PATCH v9 01/25] net: Introduce direct data placement tcp offload

Shai Malin smalin at nvidia.com
Thu Jan 19 11:25:22 PST 2023


On Thu, 19 Jan 2023 at 12:57, Paolo Abeni wrote:
> 
> Hi,
> 
> I'm sorry for the very late feedback.
> 
> On Tue, 2023-01-17 at 17:35 +0200, Aurelien Aptel wrote:
> > diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c
> > index cc072d2cfcd8..c711614604a6 100644
> > --- a/net/ipv4/tcp_input.c
> > +++ b/net/ipv4/tcp_input.c
> > @@ -5234,6 +5234,10 @@ tcp_collapse(struct sock *sk, struct
> sk_buff_head *list, struct rb_root *root,
> >               memcpy(nskb->cb, skb->cb, sizeof(skb->cb));
> >  #ifdef CONFIG_TLS_DEVICE
> >               nskb->decrypted = skb->decrypted;
> > +#endif
> > +#ifdef CONFIG_ULP_DDP
> > +             nskb->ulp_ddp = skb->ulp_ddp;
> > +             nskb->ulp_crc = skb->ulp_crc;
> >  #endif
> >               TCP_SKB_CB(nskb)->seq = TCP_SKB_CB(nskb)->end_seq = start;
> >               if (list)
> > @@ -5267,6 +5271,10 @@ tcp_collapse(struct sock *sk, struct
> sk_buff_head *list, struct rb_root *root,
> >  #ifdef CONFIG_TLS_DEVICE
> >                               if (skb->decrypted != nskb->decrypted)
> >                                       goto end;
> > +#endif
> > +#ifdef CONFIG_ULP_DDP
> > +                             if (skb_is_ulp_crc(skb) != skb_is_ulp_crc(nskb))
> > +                                     goto end;
> >  #endif
> >                       }
> >               }
> 
> I *think* a similar check is additionally needed in tcp_try_coalesce().

Thanks!
It is needed in tcp_try_coalesce() when SKBs are merged. 
We will fix it in the next iteration.

> Possibly even in tcp_shift_skb_data().

In tcp_shift_skb_data() it's not needed.

> 
> Cheers,
> 
> Paolo



More information about the Linux-nvme mailing list