mbox series

[net-next,0/3] mvneta: access skb_shared_info only on last frag

Message ID cover.1605889258.git.lorenzo@kernel.org
Headers show
Series mvneta: access skb_shared_info only on last frag | expand

Message

Lorenzo Bianconi Nov. 20, 2020, 5:05 p.m. UTC
Build skb_shared_info on mvneta_rx_swbm stack and sync it to xdp_buff
skb_shared_info area only on the last fragment.
Avoid avoid unnecessary xdp_buff initialization in mvneta_rx_swbm routine.
This a preliminary series to complete xdp multi-buff in mvneta driver.

Lorenzo Bianconi (3):
  net: mvneta: avoid unnecessary xdp_buff initialization
  net: mvneta: move skb_shared_info in mvneta_xdp_put_buff
  net: mvneta: alloc skb_shared_info on the mvneta_rx_swbm stack

 drivers/net/ethernet/marvell/mvneta.c | 55 +++++++++++++++++----------
 1 file changed, 35 insertions(+), 20 deletions(-)

Comments

Jakub Kicinski Nov. 24, 2020, 8:26 p.m. UTC | #1
On Fri, 20 Nov 2020 18:05:41 +0100 Lorenzo Bianconi wrote:
> Build skb_shared_info on mvneta_rx_swbm stack and sync it to xdp_buff

> skb_shared_info area only on the last fragment.

> Avoid avoid unnecessary xdp_buff initialization in mvneta_rx_swbm routine.

> This a preliminary series to complete xdp multi-buff in mvneta driver.


Looks fine, but since you need this for XDP multi-buff it should
probably go via bpf-next, right?

Reviewed-by: Jakub Kicinski <kuba@kernel.org>
Lorenzo Bianconi Nov. 24, 2020, 10:18 p.m. UTC | #2
> On Fri, 20 Nov 2020 18:05:41 +0100 Lorenzo Bianconi wrote:

> > Build skb_shared_info on mvneta_rx_swbm stack and sync it to xdp_buff

> > skb_shared_info area only on the last fragment.

> > Avoid avoid unnecessary xdp_buff initialization in mvneta_rx_swbm routine.

> > This a preliminary series to complete xdp multi-buff in mvneta driver.

> 

> Looks fine, but since you need this for XDP multi-buff it should

> probably go via bpf-next, right?

> 

> Reviewed-by: Jakub Kicinski <kuba@kernel.org>


Hi Jakub,

thx for the review. Since the series changes networking-only bits I sent it for
net-next, but I agree bpf-next is better.

@Alexei, Daniel: is it fine to merge the series in bpf-next?

Regards,
Lorenzo
Daniel Borkmann Nov. 24, 2020, 10:25 p.m. UTC | #3
On 11/24/20 11:18 PM, Lorenzo Bianconi wrote:
>> On Fri, 20 Nov 2020 18:05:41 +0100 Lorenzo Bianconi wrote:

>>> Build skb_shared_info on mvneta_rx_swbm stack and sync it to xdp_buff

>>> skb_shared_info area only on the last fragment.

>>> Avoid avoid unnecessary xdp_buff initialization in mvneta_rx_swbm routine.

>>> This a preliminary series to complete xdp multi-buff in mvneta driver.

>>

>> Looks fine, but since you need this for XDP multi-buff it should

>> probably go via bpf-next, right?

>>

>> Reviewed-by: Jakub Kicinski <kuba@kernel.org>

> 

> Hi Jakub,

> 

> thx for the review. Since the series changes networking-only bits I sent it for

> net-next, but I agree bpf-next is better.

> 

> @Alexei, Daniel: is it fine to merge the series in bpf-next?


Yeah totally fine, will take it into bpf-next in a bit.

Thanks,
Daniel
Jakub Kicinski Nov. 24, 2020, 10:30 p.m. UTC | #4
On Tue, 24 Nov 2020 23:25:11 +0100 Daniel Borkmann wrote:
> On 11/24/20 11:18 PM, Lorenzo Bianconi wrote:

> >> On Fri, 20 Nov 2020 18:05:41 +0100 Lorenzo Bianconi wrote:  

> >>> Build skb_shared_info on mvneta_rx_swbm stack and sync it to xdp_buff

> >>> skb_shared_info area only on the last fragment.

> >>> Avoid avoid unnecessary xdp_buff initialization in mvneta_rx_swbm routine.

> >>> This a preliminary series to complete xdp multi-buff in mvneta driver.  

> >>

> >> Looks fine, but since you need this for XDP multi-buff it should

> >> probably go via bpf-next, right?

> >>

> >> Reviewed-by: Jakub Kicinski <kuba@kernel.org>  

> > 

> > Hi Jakub,

> > 

> > thx for the review. Since the series changes networking-only bits I sent it for

> > net-next, but I agree bpf-next is better.

> > 

> > @Alexei, Daniel: is it fine to merge the series in bpf-next?  

> 

> Yeah totally fine, will take it into bpf-next in a bit.


FWIW watch out with the Link:s, it wasn't CCed to bpf@vger.
Daniel Borkmann Nov. 24, 2020, 11 p.m. UTC | #5
On 11/24/20 11:30 PM, Jakub Kicinski wrote:
> On Tue, 24 Nov 2020 23:25:11 +0100 Daniel Borkmann wrote:

>> On 11/24/20 11:18 PM, Lorenzo Bianconi wrote:

>>>> On Fri, 20 Nov 2020 18:05:41 +0100 Lorenzo Bianconi wrote:

>>>>> Build skb_shared_info on mvneta_rx_swbm stack and sync it to xdp_buff

>>>>> skb_shared_info area only on the last fragment.

>>>>> Avoid avoid unnecessary xdp_buff initialization in mvneta_rx_swbm routine.

>>>>> This a preliminary series to complete xdp multi-buff in mvneta driver.

>>>>

>>>> Looks fine, but since you need this for XDP multi-buff it should

>>>> probably go via bpf-next, right?

>>>>

>>>> Reviewed-by: Jakub Kicinski <kuba@kernel.org>

>>>

>>> Hi Jakub,

>>>

>>> thx for the review. Since the series changes networking-only bits I sent it for

>>> net-next, but I agree bpf-next is better.

>>>

>>> @Alexei, Daniel: is it fine to merge the series in bpf-next?

>>

>> Yeah totally fine, will take it into bpf-next in a bit.

> 

> FWIW watch out with the Link:s, it wasn't CCed to bpf@vger.


@Jakub, I think it's less hassle if you take the series in. Looking closer, net-next has
commit 9c79a8ab5f12 ("net: mvneta: fix possible memory leak in mvneta_swbm_add_rx_fragment")
which bpf-next is currently lacking, and this series here is touching the part of this
code, so it will create unnecessary merge conflicts. I'll likely flush out bpf-next PR
on Thurs/Fri at latest, so bpf-next will then have everything needed once we sync back
from net-next after merge.

Thanks,
Daniel
Jakub Kicinski Nov. 24, 2020, 11:10 p.m. UTC | #6
On Wed, 25 Nov 2020 00:00:33 +0100 Daniel Borkmann wrote:
> On 11/24/20 11:30 PM, Jakub Kicinski wrote:

> > On Tue, 24 Nov 2020 23:25:11 +0100 Daniel Borkmann wrote:  

> >> On 11/24/20 11:18 PM, Lorenzo Bianconi wrote:  

> >>>> On Fri, 20 Nov 2020 18:05:41 +0100 Lorenzo Bianconi wrote:  

> >>>>> Build skb_shared_info on mvneta_rx_swbm stack and sync it to xdp_buff

> >>>>> skb_shared_info area only on the last fragment.

> >>>>> Avoid avoid unnecessary xdp_buff initialization in mvneta_rx_swbm routine.

> >>>>> This a preliminary series to complete xdp multi-buff in mvneta driver.  

> >>>>

> >>>> Looks fine, but since you need this for XDP multi-buff it should

> >>>> probably go via bpf-next, right?

> >>>>

> >>>> Reviewed-by: Jakub Kicinski <kuba@kernel.org>  

> >>>

> >>> Hi Jakub,

> >>>

> >>> thx for the review. Since the series changes networking-only bits I sent it for

> >>> net-next, but I agree bpf-next is better.

> >>>

> >>> @Alexei, Daniel: is it fine to merge the series in bpf-next?  

> >>

> >> Yeah totally fine, will take it into bpf-next in a bit.  

> > 

> > FWIW watch out with the Link:s, it wasn't CCed to bpf@vger.  

> 

> @Jakub, I think it's less hassle if you take the series in. Looking closer, net-next has

> commit 9c79a8ab5f12 ("net: mvneta: fix possible memory leak in mvneta_swbm_add_rx_fragment")

> which bpf-next is currently lacking, and this series here is touching the part of this

> code, so it will create unnecessary merge conflicts. I'll likely flush out bpf-next PR

> on Thurs/Fri at latest, so bpf-next will then have everything needed once we sync back

> from net-next after merge.


I see, applied to net-next then. Thanks!