On 15/05/2025 10:47, Roi Dayan wrote:
> 
> 
> On 15/05/2025 10:38, Roi Dayan wrote:
>>
>>
>> On 15/05/2025 10:28, David Marchand wrote:
>>> On Thu, May 15, 2025 at 9:04 AM Roi Dayan via dev
>>> <ovs-dev@openvswitch.org> wrote:
>>>>
>>>> The callback is registered in netdev initialization but isn't
>>>> unregistered in netdev destruct. Fix it.
>>>
>>> What is the issue exactly?
>>>
>>>>
>>>> Fixes: 988fd4639149 ("netdev-dpdk: add support for the 
>>>> RTE_ETH_EVENT_INTR_RESET event.")
>>>> Change-Id: I645170825523f5b0c83f5ad3af8ea4a61cb257de
>>>> Signed-off-by: Roi Dayan <r...@nvidia.com>
>>>> Acked-by: Eli Britstein <el...@nvidia.com>
>>>> ---
>>>>  lib/netdev-dpdk.c | 8 ++++++++
>>>>  1 file changed, 8 insertions(+)
>>>>
>>>> diff --git a/lib/netdev-dpdk.c b/lib/netdev-dpdk.c
>>>> index 549887b31373..e6d9b58f914e 100644
>>>> --- a/lib/netdev-dpdk.c
>>>> +++ b/lib/netdev-dpdk.c
>>>> @@ -1762,6 +1762,10 @@ common_destruct(struct netdev_dpdk *dev)
>>>>
>>>>  static void dpdk_rx_steer_unconfigure(struct netdev_dpdk *);
>>>>
>>>> +static int
>>>> +dpdk_eth_event_callback(dpdk_port_t port_id, enum rte_eth_event_type type,
>>>> +                        void *param OVS_UNUSED, void *ret_param 
>>>> OVS_UNUSED);
>>>> +
>>>>  static void
>>>>  netdev_dpdk_destruct(struct netdev *netdev)
>>>>  {
>>>> @@ -1831,6 +1835,10 @@ netdev_dpdk_destruct(struct netdev *netdev)
>>>>          }
>>>>      }
>>>>
>>>> +    rte_eth_dev_callback_unregister(RTE_ETH_ALL,
>>>> +                                    RTE_ETH_EVENT_INTR_RESET,
>>>> +                                    dpdk_eth_event_callback, NULL);
>>>
>>> This unregisters the callback for *all* DPDK ports, not just the port
>>> associated to this OVS netdev.
>>>
>>
>> hmm, let me go over the patch again then. the issue is re-adding dpdk-port 
>> to a bridge
>> We noticed hugepages allocation keeps increasing and not freed. we traced it 
>> to
>> type INTR_USER_CALLBACK which is registered by this callback.
>>
> 
> I see it shouldn't have happen. init should have been called once.
> The leak does look from rte_eth_dev_callback_register()/INTR_USER_CALLBACK so
> I need to recheck how it happens on re-adding a port. It did stop adding the 
> unregister
> callback. sorry for the hassle for now i'll go over this again.
> 

My mistake, should have been something else. please ignore the patch. sorry 
again.

>>>
>>
> 

_______________________________________________
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to