diff mbox series

[iwl-next] ixgbe: Enable XDP support when SRIOV is enabled

Message ID 20241122121317.2117826-1-martyna.szapar-mudlaw@linux.intel.com (mailing list archive)
State Awaiting Upstream
Delegated to: Netdev Maintainers
Headers show
Series [iwl-next] ixgbe: Enable XDP support when SRIOV is enabled | expand

Checks

Context Check Description
netdev/series_format warning Single patches do not need cover letters; Target tree name not specified in the subject
netdev/tree_selection success Guessed tree name to be net-next
netdev/ynl success Generated files up to date; no warnings/errors; no diff in generated;
netdev/fixes_present success Fixes tag not required for -next series
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 3 this patch: 3
netdev/build_tools success No tools touched, skip
netdev/cc_maintainers warning 5 maintainers not CCed: anthony.l.nguyen@intel.com kuba@kernel.org andrew+netdev@lunn.ch pabeni@redhat.com edumazet@google.com
netdev/build_clang success Errors and warnings before: 3 this patch: 3
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/deprecated_api success None detected
netdev/check_selftest success No net selftest shell script
netdev/verify_fixes success No Fixes tag
netdev/build_allmodconfig_warn success Errors and warnings before: 4 this patch: 4
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 9 lines checked
netdev/build_clang_rust success No Rust files in patch. Skipping build
netdev/kdoc success Errors and warnings before: 36 this patch: 36
netdev/source_inline success Was 0 now: 0

Commit Message

Szapar-Mudlaw, Martyna Nov. 22, 2024, 12:13 p.m. UTC
Remove the check that prevents XDP support when SRIOV is enabled.
There is no reason to completely forbid the user from using XDP
with SRIOV.

Reviewed-by: Przemek Kitszel <przemyslaw.kitszel@intel.com>
Signed-off-by: Martyna Szapar-Mudlaw <martyna.szapar-mudlaw@linux.intel.com>

---

Added CC netdev

---
 drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 3 ---
 1 file changed, 3 deletions(-)

Comments

Fijalkowski, Maciej Nov. 22, 2024, 3:56 p.m. UTC | #1
> 
> Remove the check that prevents XDP support when SRIOV is enabled.
> There is no reason to completely forbid the user from using XDP
> with SRIOV.

I think we need some more context here in commit message.
ixgbe HW was really short on HW queues that's why probably this restriction
was introduced in the first place.

Now I believe that driver has an ability to share XDP Tx resources with locking
being involved and that's why you can relax the previous limitation.

Correct?

> 
> Reviewed-by: Przemek Kitszel <przemyslaw.kitszel@intel.com>
> Signed-off-by: Martyna Szapar-Mudlaw <martyna.szapar-
> mudlaw@linux.intel.com>
> 
> ---
> 
> Added CC netdev
> 
> ---
>  drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 3 ---
>  1 file changed, 3 deletions(-)
> 
> diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
> b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
> index 459a539cf8db..a07e28107a42 100644
> --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
> +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
> @@ -10637,9 +10637,6 @@ static int ixgbe_xdp_setup(struct net_device
> *dev, struct bpf_prog *prog)
>  	bool need_reset;
>  	int num_queues;
> 
> -	if (adapter->flags & IXGBE_FLAG_SRIOV_ENABLED)
> -		return -EINVAL;
> -
>  	if (adapter->flags & IXGBE_FLAG_DCB_ENABLED)
>  		return -EINVAL;
> 
> --
> 2.36.1
>
Szapar-Mudlaw, Martyna Nov. 25, 2024, 8:19 p.m. UTC | #2
On 11/22/2024 4:56 PM, Fijalkowski, Maciej wrote:
>> Remove the check that prevents XDP support when SRIOV is enabled.
>> There is no reason to completely forbid the user from using XDP
>> with SRIOV.
> I think we need some more context here in commit message.
> ixgbe HW was really short on HW queues that's why probably this restriction
> was introduced in the first place.
>
> Now I believe that driver has an ability to share XDP Tx resources with locking
> being involved and that's why you can relax the previous limitation.
>
> Correct?

Right, ixgbe hardware has a limited number of hw queues. There is 
locking in place now. The reasoning behind this change is to give users 
the flexibility to use XDP with SRIOV, there may be use cases for such 
constrained scenarios, where this tradeoff is acceptable...

I'll update commit msg.

>
>> Reviewed-by: Przemek Kitszel <przemyslaw.kitszel@intel.com>
>> Signed-off-by: Martyna Szapar-Mudlaw <martyna.szapar-
>> mudlaw@linux.intel.com>
>>
>> ---
>>
>> Added CC netdev
>>
>> ---
>>   drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 3 ---
>>   1 file changed, 3 deletions(-)
>>
>> diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
>> b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
>> index 459a539cf8db..a07e28107a42 100644
>> --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
>> +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
>> @@ -10637,9 +10637,6 @@ static int ixgbe_xdp_setup(struct net_device
>> *dev, struct bpf_prog *prog)
>>   	bool need_reset;
>>   	int num_queues;
>>
>> -	if (adapter->flags & IXGBE_FLAG_SRIOV_ENABLED)
>> -		return -EINVAL;
>> -
>>   	if (adapter->flags & IXGBE_FLAG_DCB_ENABLED)
>>   		return -EINVAL;
>>
>> --
>> 2.36.1
>>
diff mbox series

Patch

diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
index 459a539cf8db..a07e28107a42 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
@@ -10637,9 +10637,6 @@  static int ixgbe_xdp_setup(struct net_device *dev, struct bpf_prog *prog)
 	bool need_reset;
 	int num_queues;
 
-	if (adapter->flags & IXGBE_FLAG_SRIOV_ENABLED)
-		return -EINVAL;
-
 	if (adapter->flags & IXGBE_FLAG_DCB_ENABLED)
 		return -EINVAL;