Re: [PATCH net v1] virtio_net: Introduce skb_vnet_common_hdr to avoid typecasting

2023-08-16 Thread Feng Liu via Virtualization
On 2023-08-16 a.m.10:53, Willem de Bruijn wrote: External email: Use caution opening links or attachments Thanks for the detailed explanation. I kept virtio_net_hdr_mrg_rxbuf and virtio_net_hdr_v1_hash structures in virtio_net.h, which can be forward compatible with existing user

Re: [PATCH net v1] virtio_net: Introduce skb_vnet_common_hdr to avoid typecasting

2023-08-16 Thread Willem de Bruijn
> > > > Since legacy virtio will no longer be modified, I don't think there is > > much value is exposing this new union as UAPI. I do appreciate the > > benefit to the implementation. > > > > [1] > >

Re: [PATCH net v1] virtio_net: Introduce skb_vnet_common_hdr to avoid typecasting

2023-08-15 Thread Feng Liu via Virtualization
On 2023-08-15 p.m.2:13, Willem de Bruijn wrote: External email: Use caution opening links or attachments On Tue, Aug 15, 2023 at 12:29 PM Simon Horman wrote: On Tue, Aug 15, 2023 at 11:09:02AM -0400, Feng Liu wrote: To clarify: In general new Networking features go via the net-next

Re: [PATCH net v1] virtio_net: Introduce skb_vnet_common_hdr to avoid typecasting

2023-08-15 Thread Willem de Bruijn
On Tue, Aug 15, 2023 at 12:29 PM Simon Horman wrote: > > On Tue, Aug 15, 2023 at 11:09:02AM -0400, Feng Liu wrote: > > > > > > On 2023-08-15 a.m.6:51, Simon Horman wrote: > > > External email: Use caution opening links or attachments > > > > > > > > > On Mon, Aug 14, 2023 at 01:18:45PM -0400,

Re: [PATCH net v1] virtio_net: Introduce skb_vnet_common_hdr to avoid typecasting

2023-08-15 Thread Feng Liu via Virtualization
On 2023-08-15 a.m.6:51, Simon Horman wrote: External email: Use caution opening links or attachments On Mon, Aug 14, 2023 at 01:18:45PM -0400, Feng Liu wrote: + "David S. Miller" Eric Dumazet Jakub Kicinski Paolo Abeni Thanks for adding David S. Miller. The virtio_net

[PATCH net v1] virtio_net: Introduce skb_vnet_common_hdr to avoid typecasting

2023-08-14 Thread Feng Liu via Virtualization
The virtio_net driver currently deals with different versions and types of virtio net headers, such as virtio_net_hdr_mrg_rxbuf, virtio_net_hdr_v1_hash, etc. Due to these variations, the code relies on multiple type casts to convert memory between different structures, potentially leading to bugs