On 9/25/25 1:13 AM, Michael S. Tsirkin wrote:
> On Thu, Sep 25, 2025 at 11:56:09AM +0800, Xuan Zhuo wrote:
>> On Tue, 23 Sep 2025 09:19:12 -0500, Daniel Jurgens <dani...@nvidia.com> 
>> wrote:
>>> The flow filter implementaion requires minimal changes to the
>>> existing virtio_net implementation. It's cleaner to separate it into
>>> another file. In order to do so, move virtio_net.c into the new
>>> virtio_net directory, and create a makefile for it. Note the name is
>>> changed to virtio_net_main.c, so the module can retain the name
>>> virtio_net.
>>>
>>> Signed-off-by: Daniel Jurgens <dani...@nvidia.com>
>>> Reviewed-by: Parav Pandit <pa...@nvidia.com>
>>> Reviewed-by: Shahar Shitrit <shshit...@nvidia.com>
>>
>> To help this work move forward smoothly, I don't recommend splitting the
>> directory structure within this patchset. Directory reorganization can be a
>> separate effort—I've previously experimented with this myself. I'd really
>> like to see this work progress smoothly.
>>
>> Thanks.
> 
> Indeed.

It's not a hill I'm willing to die on, but breaking this up into files
makes sense. virtio_main.c is already huge, and this would make it 15%
bigger.

> 
>>
>>> ---
>>>  MAINTAINERS                                               | 2 +-
>>>  drivers/net/Makefile                                      | 2 +-
>>>  drivers/net/virtio_net/Makefile                           | 8 ++++++++
>>>  .../net/{virtio_net.c => virtio_net/virtio_net_main.c}    | 0
>>>  4 files changed, 10 insertions(+), 2 deletions(-)
>>>  create mode 100644 drivers/net/virtio_net/Makefile
>>>  rename drivers/net/{virtio_net.c => virtio_net/virtio_net_main.c} (100%)
>>>
>>> diff --git a/MAINTAINERS b/MAINTAINERS
>>> index a8a770714101..09d26c4225a9 100644
>>> --- a/MAINTAINERS
>>> +++ b/MAINTAINERS
>>> @@ -26685,7 +26685,7 @@ F:  Documentation/devicetree/bindings/virtio/
>>>  F: Documentation/driver-api/virtio/
>>>  F: drivers/block/virtio_blk.c
>>>  F: drivers/crypto/virtio/
>>> -F: drivers/net/virtio_net.c
>>> +F: drivers/net/virtio_net/
>>>  F: drivers/vdpa/
>>>  F: drivers/virtio/
>>>  F: include/linux/vdpa.h
>>> diff --git a/drivers/net/Makefile b/drivers/net/Makefile
>>> index 73bc63ecd65f..cf28992658a6 100644
>>> --- a/drivers/net/Makefile
>>> +++ b/drivers/net/Makefile
>>> @@ -33,7 +33,7 @@ obj-$(CONFIG_NET_TEAM) += team/
>>>  obj-$(CONFIG_TUN) += tun.o
>>>  obj-$(CONFIG_TAP) += tap.o
>>>  obj-$(CONFIG_VETH) += veth.o
>>> -obj-$(CONFIG_VIRTIO_NET) += virtio_net.o
>>> +obj-$(CONFIG_VIRTIO_NET) += virtio_net/
>>>  obj-$(CONFIG_VXLAN) += vxlan/
>>>  obj-$(CONFIG_GENEVE) += geneve.o
>>>  obj-$(CONFIG_BAREUDP) += bareudp.o
>>> diff --git a/drivers/net/virtio_net/Makefile 
>>> b/drivers/net/virtio_net/Makefile
>>> new file mode 100644
>>> index 000000000000..c0a4725ddd69
>>> --- /dev/null
>>> +++ b/drivers/net/virtio_net/Makefile
>>> @@ -0,0 +1,8 @@
>>> +# SPDX-License-Identifier: GPL-2.0-only
>>> +#
>>> +# Makefile for the VirtIO Net driver
>>> +#
>>> +
>>> +obj-$(CONFIG_VIRTIO_NET) += virtio_net.o
>>> +
>>> +virtio_net-objs := virtio_net_main.o
>>> diff --git a/drivers/net/virtio_net.c 
>>> b/drivers/net/virtio_net/virtio_net_main.c
>>> similarity index 100%
>>> rename from drivers/net/virtio_net.c
>>> rename to drivers/net/virtio_net/virtio_net_main.c
>>> --
>>> 2.45.0
>>>
> 


Reply via email to