[PATCH] net/nfp: add the feature of RSS based on VXLAN inner layer
Ferruh Yigit
ferruh.yigit at amd.com
Fri Oct 14 10:42:25 CEST 2022
On 10/14/2022 2:15 AM, Chaoyong He wrote:
>> On 10/10/2022 7:28 AM, Chaoyong He wrote:
>>> Add the logics to support the feature of RSS packets based on the
>>> inner layer of VXLAN tunnel.
>>>
>>> Signed-off-by: Chaoyong He <chaoyong.he at corigine.com>
>>> Reviewed-by: Niklas Söderlund <niklas.soderlund at corigine.com>
>>>
>>> Depends-on: series-24819 ("preparation for the rte_flow offload of nfp
>>> PMD")
>>>
>>> ---
>>> drivers/net/nfp/flower/nfp_flower.c | 2 +-
>>> drivers/net/nfp/flower/nfp_flower_cmsg.c | 1 +
>>> drivers/net/nfp/flower/nfp_flower_ctrl.c | 2 +-
>>> drivers/net/nfp/flower/nfp_flower_representor.c | 2 +-
>>> drivers/net/nfp/nfp_common.c | 33 +++++++
>>> drivers/net/nfp/nfp_common.h | 4 +
>>> drivers/net/nfp/nfp_cpp_bridge.h | 2 -
>>> drivers/net/nfp/nfp_ethdev.c | 111
>> ++++++++++++++++++++++++
>>> drivers/net/nfp/nfp_ethdev_vf.c | 1 +
>>> drivers/net/nfp/nfp_rxtx.c | 1 +
>>> 10 files changed, 154 insertions(+), 5 deletions(-)
>>>
>>> diff --git a/drivers/net/nfp/flower/nfp_flower.c
>>> b/drivers/net/nfp/flower/nfp_flower.c
>>> index 3e97f5c..da96d2f 100644
>>> --- a/drivers/net/nfp/flower/nfp_flower.c
>>> +++ b/drivers/net/nfp/flower/nfp_flower.c
>>> @@ -10,9 +10,9 @@
>>> #include <ethdev_pci.h>
>>> #include <ethdev_driver.h>
>>>
>>> +#include "../nfp_ctrl.h"
>>> #include "../nfp_common.h"
>>> #include "../nfp_logs.h"
>>> -#include "../nfp_ctrl.h"
>>> #include "../nfp_cpp_bridge.h"
>>> #include "../nfp_rxtx.h"
>>> #include "../nfpcore/nfp_mip.h"
>>> diff --git a/drivers/net/nfp/flower/nfp_flower_cmsg.c
>>> b/drivers/net/nfp/flower/nfp_flower_cmsg.c
>>> index 750a629..b719eb2 100644
>>> --- a/drivers/net/nfp/flower/nfp_flower_cmsg.c
>>> +++ b/drivers/net/nfp/flower/nfp_flower_cmsg.c
>>> @@ -5,6 +5,7 @@
>>>
>>> #include "../nfpcore/nfp_nsp.h"
>>> #include "../nfp_logs.h"
>>> +#include "../nfp_ctrl.h"
>>> #include "../nfp_common.h"
>>> #include "nfp_flower.h"
>>> #include "nfp_flower_cmsg.h"
>>> diff --git a/drivers/net/nfp/flower/nfp_flower_ctrl.c
>>> b/drivers/net/nfp/flower/nfp_flower_ctrl.c
>>> index df908ef..961ca34 100644
>>> --- a/drivers/net/nfp/flower/nfp_flower_ctrl.c
>>> +++ b/drivers/net/nfp/flower/nfp_flower_ctrl.c
>>> @@ -6,9 +6,9 @@
>>> #include <rte_common.h>
>>> #include <ethdev_pci.h>
>>>
>>> +#include "../nfp_ctrl.h"
>>> #include "../nfp_common.h"
>>> #include "../nfp_logs.h"
>>> -#include "../nfp_ctrl.h"
>>> #include "../nfp_rxtx.h"
>>> #include "nfp_flower.h"
>>> #include "nfp_flower_ctrl.h"
>>> diff --git a/drivers/net/nfp/flower/nfp_flower_representor.c
>>> b/drivers/net/nfp/flower/nfp_flower_representor.c
>>> index 0e60f50..8db73e0 100644
>>> --- a/drivers/net/nfp/flower/nfp_flower_representor.c
>>> +++ b/drivers/net/nfp/flower/nfp_flower_representor.c
>>> @@ -6,9 +6,9 @@
>>> #include <rte_common.h>
>>> #include <ethdev_pci.h>
>>>
>>> +#include "../nfp_ctrl.h"
>>> #include "../nfp_common.h"
>>> #include "../nfp_logs.h"
>>> -#include "../nfp_ctrl.h"
>>> #include "../nfp_rxtx.h"
>>> #include "../nfpcore/nfp_mip.h"
>>> #include "../nfpcore/nfp_rtsym.h"
>>> diff --git a/drivers/net/nfp/nfp_common.c
>>> b/drivers/net/nfp/nfp_common.c index 07781a1..ec6a669 100644
>>> --- a/drivers/net/nfp/nfp_common.c
>>> +++ b/drivers/net/nfp/nfp_common.c
>>> @@ -37,6 +37,7 @@
>>> #include "nfpcore/nfp_rtsym.h"
>>> #include "nfpcore/nfp_nsp.h"
>>>
>>> +#include "nfp_ctrl.h"
>>> #include "nfp_common.h"
>>> #include "nfp_ctrl.h"
>>> #include "nfp_rxtx.h"
>>
>> Are above header inclusion changes related to this patch?
>
> Yes, it does relate.
> In this patch, we use a macro in `nfp_common.h`, and this macro is defined in `nfp_ctrl.h`,
> so import the dependency relations of this two header files.
> If we don't modify the related files which use these two header files, the compile process will fail.
>
OK, it is for 'NFP_NET_N_VXLAN_PORTS' which is defined in `nfp_ctrl.h`,
and used in `nfp_common.h` in this patch.
And you are including `nfp_ctrl.h` in all c files that uses
`nfp_common.h`, instead
why don't you include `nfp_ctrl.h` in `nfp_common.h`?
Because you are creating this dependency anyway, whoever includes
`nfp_common.h` will need `nfp_ctrl.h`.
Or other option can be moving 'NFP_NET_N_VXLAN_PORTS' define (and its
dependencies) to `nfp_common.h`, if it is logically makes sense.
More information about the dev
mailing list