Kees Cook
da2e08d463
i40e: Annotate struct i40e_qvlist_info with __counted_by
...
Prepare for the coming implementation by GCC and Clang of the __counted_by
attribute. Flexible array members annotated with __counted_by can have
their accesses bounds-checked at run-time via CONFIG_UBSAN_BOUNDS (for
array indexing) and CONFIG_FORTIFY_SOURCE (for strcpy/memcpy-family
functions).
As found with Coccinelle[1], add __counted_by for struct i40e_qvlist_info.
Cc: Tony Nguyen <anthony.l.nguyen@intel.com >
Cc: Shiraz Saleem <shiraz.saleem@intel.com >
Cc: Jakub Kicinski <kuba@kernel.org >
Cc: Jesse Brandeburg <jesse.brandeburg@intel.com >
Cc: Gurucharan G <gurucharanx.g@intel.com >
Cc: "Gustavo A. R. Silva" <gustavoars@kernel.org >
Link: https://github.com/kees/kernel-tools/blob/trunk/coccinelle/examples/counted_by.cocci [1]
Reviewed-by: "Gustavo A. R. Silva" <gustavoars@kernel.org >
Link: https://lore.kernel.org/r/20231003231838.work.510-kees@kernel.org
Signed-off-by: Kees Cook <keescook@chromium.org >
2023-11-30 13:39:20 -08:00
Jakub Kicinski
00edb2bac2
i40e: remove enum i40e_client_state
...
It's not used.
Signed-off-by: Jakub Kicinski <kuba@kernel.org >
Reviewed-by: Jesse Brandeburg <jesse.brandeburg@intel.com >
Tested-by: Gurucharan G <gurucharanx.g@intel.com >
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com >
2022-02-03 13:13:50 -08:00
Shiraz Saleem
fa0cf568fd
RDMA/irdma: Add irdma Kconfig/Makefile and remove i40iw
...
Add Kconfig and Makefile to build irdma driver.
Remove i40iw driver and add an alias in irdma.
Remove legacy exported symbols i40e_register_client
and i40e_unregister_client from i40e as they are no
longer used.
irdma is the replacement driver that supports X722.
Link: https://lore.kernel.org/r/20210602205138.889-16-shiraz.saleem@intel.com
Signed-off-by: Shiraz Saleem <shiraz.saleem@intel.com >
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com >
2021-06-02 20:06:36 -03:00
Shiraz Saleem
9ed7533121
i40e: Prep i40e header for aux bus conversion
...
Add the definitions to the i40e client header file in
preparation to convert i40e to use the new auxiliary bus
infrastructure. This header is shared between the 'i40e'
Intel networking driver providing RDMA support and the
'irdma' driver.
Signed-off-by: Shiraz Saleem <shiraz.saleem@intel.com >
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com >
2021-05-28 20:11:13 -07:00
Gustavo A. R. Silva
125217e096
i40e: Replace one-element array with flexible-array member
...
There is a regular need in the kernel to provide a way to declare having a
dynamically sized set of trailing elements in a structure. Kernel code
should always use “flexible array members”[1] for these cases. The older
style of one-element or zero-length arrays should no longer be used[2].
Refactor the code according to the use of a flexible-array member in struct
i40e_qvlist_info instead of one-element array, and use the struct_size()
helper.
[1] https://en.wikipedia.org/wiki/Flexible_array_member
[2] https://www.kernel.org/doc/html/v5.10/process/deprecated.html#zero-length-and-one-element-arrays
Link: https://github.com/KSPP/linux/issues/79
Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org >
Acked-by: Shiraz Saleem <shiraz.saleem@intel.com >
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com >
2021-05-26 16:16:17 -07:00
Jesse Brandeburg
3c98f9ee6b
i40e: remove unused defines
...
Remove all the unused defines as they are just dead weight.
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com >
Tested-by: Andrew Bowers <andrewx.bowers@intel.com >
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com >
2020-06-25 22:25:13 -07:00
Shiraz Saleem
fe21b6c3a6
i40e: Move client header location
...
Move i40e_client.h to include/linux/net/intel/*
since its shared between i40iw and i40e.
Signed-off-by: Shiraz Saleem <shiraz.saleem@intel.com >
Tested-by: Andrew Bowers <andrewx.bowers@intel.com >
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com >
2020-06-25 22:25:13 -07:00