Skip to content

Commit 9c91a4f

Browse files
author
CKI KWF Bot
committed
Merge: iavf: driver update to v6.15
MR: https://gitlab.com/redhat/centos-stream/src/kernel/centos-stream-10/-/merge_requests/1052 JIRA: https://issues.redhat.com/browse/RHEL-83568 Depends: !791 Depends: !997 iavf driver update to v6.15. Skipped most of the commits related to netdev_lock(), because the core changes are not going to be in RHEL 10.1. Signed-off-by: Michal Schmidt <mschmidt@redhat.com> Approved-by: José Ignacio Tornos Martínez <jtornosm@redhat.com> Approved-by: Petr Oros <poros@redhat.com> Approved-by: Corinna Vinschen <vinschen@redhat.com> Approved-by: CKI KWF Bot <cki-ci-bot+kwf-gitlab-com@redhat.com> Merged-by: CKI GitLab Kmaint Pipeline Bot <26919896-cki-kmaint-pipeline-bot@users.noreply.gitlab.com>
2 parents 1ea32f0 + 22e40d7 commit 9c91a4f

File tree

15 files changed

+1855
-286
lines changed

15 files changed

+1855
-286
lines changed

drivers/net/ethernet/intel/Kconfig

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -258,11 +258,13 @@ config I40E_DCB
258258
config IAVF
259259
tristate
260260
select LIBIE
261+
select NET_SHAPER
261262

262263
config I40EVF
263264
tristate "Intel(R) Ethernet Adaptive Virtual Function support"
264265
select IAVF
265266
depends on PCI_MSI
267+
depends on PTP_1588_CLOCK_OPTIONAL
266268
help
267269
This driver supports virtual functions for Intel XL710,
268270
X710, X722, XXV710, and all devices advertising support for

drivers/net/ethernet/intel/iavf/Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,5 @@ obj-$(CONFIG_IAVF) += iavf.o
1313

1414
iavf-y := iavf_main.o iavf_ethtool.o iavf_virtchnl.o iavf_fdir.o \
1515
iavf_adv_rss.o iavf_txrx.o iavf_common.o iavf_adminq.o
16+
17+
iavf-$(CONFIG_PTP_1588_CLOCK) += iavf_ptp.o

drivers/net/ethernet/intel/iavf/iavf.h

Lines changed: 46 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,14 @@
3434
#include <net/tc_act/tc_gact.h>
3535
#include <net/tc_act/tc_mirred.h>
3636
#include <net/tc_act/tc_skbedit.h>
37+
#include <net/net_shaper.h>
3738

3839
#include "iavf_type.h"
3940
#include <linux/avf/virtchnl.h>
4041
#include "iavf_txrx.h"
4142
#include "iavf_fdir.h"
4243
#include "iavf_adv_rss.h"
44+
#include "iavf_types.h"
4345
#include <linux/bitmap.h>
4446

4547
#define DEFAULT_DEBUG_LEVEL_SHIFT 3
@@ -81,7 +83,7 @@ struct iavf_vsi {
8183

8284
#define MAXIMUM_ETHERNET_VLAN_SIZE (VLAN_ETH_FRAME_LEN + ETH_FCS_LEN)
8385

84-
#define IAVF_RX_DESC(R, i) (&(((union iavf_32byte_rx_desc *)((R)->desc))[i]))
86+
#define IAVF_RX_DESC(R, i) (&(((struct iavf_rx_desc *)((R)->desc))[i]))
8587
#define IAVF_TX_DESC(R, i) (&(((struct iavf_tx_desc *)((R)->desc))[i]))
8688
#define IAVF_TX_CTXTDESC(R, i) \
8789
(&(((struct iavf_tx_context_desc *)((R)->desc))[i]))
@@ -250,6 +252,9 @@ struct iavf_cloud_filter {
250252
#define IAVF_RESET_WAIT_DETECTED_COUNT 500
251253
#define IAVF_RESET_WAIT_COMPLETE_COUNT 2000
252254

255+
#define IAVF_MAX_QOS_TC_NUM 8
256+
#define IAVF_DEFAULT_QUANTA_SIZE 1024
257+
253258
/* board specific private data structure */
254259
struct iavf_adapter {
255260
struct workqueue_struct *wq;
@@ -267,6 +272,7 @@ struct iavf_adapter {
267272
/* Lock to protect accesses to MAC and VLAN lists */
268273
spinlock_t mac_vlan_list_lock;
269274
char misc_vector_name[IFNAMSIZ + 9];
275+
u8 rxdid;
270276
int num_active_queues;
271277
int num_req_queues;
272278

@@ -336,6 +342,20 @@ struct iavf_adapter {
336342
#define IAVF_FLAG_AQ_DISABLE_CTAG_VLAN_INSERTION BIT_ULL(36)
337343
#define IAVF_FLAG_AQ_ENABLE_STAG_VLAN_INSERTION BIT_ULL(37)
338344
#define IAVF_FLAG_AQ_DISABLE_STAG_VLAN_INSERTION BIT_ULL(38)
345+
#define IAVF_FLAG_AQ_CONFIGURE_QUEUES_BW BIT_ULL(39)
346+
#define IAVF_FLAG_AQ_CFG_QUEUES_QUANTA_SIZE BIT_ULL(40)
347+
#define IAVF_FLAG_AQ_GET_QOS_CAPS BIT_ULL(41)
348+
#define IAVF_FLAG_AQ_GET_SUPPORTED_RXDIDS BIT_ULL(42)
349+
#define IAVF_FLAG_AQ_GET_PTP_CAPS BIT_ULL(43)
350+
#define IAVF_FLAG_AQ_SEND_PTP_CMD BIT_ULL(44)
351+
352+
/* AQ messages that must be sent after IAVF_FLAG_AQ_GET_CONFIG, in
353+
* order to negotiated extended capabilities.
354+
*/
355+
#define IAVF_FLAG_AQ_EXTENDED_CAPS \
356+
(IAVF_FLAG_AQ_GET_OFFLOAD_VLAN_V2_CAPS | \
357+
IAVF_FLAG_AQ_GET_SUPPORTED_RXDIDS | \
358+
IAVF_FLAG_AQ_GET_PTP_CAPS)
339359

340360
/* flags for processing extended capability messages during
341361
* __IAVF_INIT_EXTENDED_CAPS. Each capability exchange requires
@@ -347,10 +367,18 @@ struct iavf_adapter {
347367
u64 extended_caps;
348368
#define IAVF_EXTENDED_CAP_SEND_VLAN_V2 BIT_ULL(0)
349369
#define IAVF_EXTENDED_CAP_RECV_VLAN_V2 BIT_ULL(1)
370+
#define IAVF_EXTENDED_CAP_SEND_RXDID BIT_ULL(2)
371+
#define IAVF_EXTENDED_CAP_RECV_RXDID BIT_ULL(3)
372+
#define IAVF_EXTENDED_CAP_SEND_PTP BIT_ULL(4)
373+
#define IAVF_EXTENDED_CAP_RECV_PTP BIT_ULL(5)
350374

351375
#define IAVF_EXTENDED_CAPS \
352376
(IAVF_EXTENDED_CAP_SEND_VLAN_V2 | \
353-
IAVF_EXTENDED_CAP_RECV_VLAN_V2)
377+
IAVF_EXTENDED_CAP_RECV_VLAN_V2 | \
378+
IAVF_EXTENDED_CAP_SEND_RXDID | \
379+
IAVF_EXTENDED_CAP_RECV_RXDID | \
380+
IAVF_EXTENDED_CAP_SEND_PTP | \
381+
IAVF_EXTENDED_CAP_RECV_PTP)
354382

355383
/* Lock to prevent possible clobbering of
356384
* current_netdev_promisc_flags
@@ -408,14 +436,23 @@ struct iavf_adapter {
408436
VIRTCHNL_VF_OFFLOAD_FDIR_PF)
409437
#define ADV_RSS_SUPPORT(_a) ((_a)->vf_res->vf_cap_flags & \
410438
VIRTCHNL_VF_OFFLOAD_ADV_RSS_PF)
439+
#define QOS_ALLOWED(_a) ((_a)->vf_res->vf_cap_flags & \
440+
VIRTCHNL_VF_OFFLOAD_QOS)
441+
#define IAVF_RXDID_ALLOWED(a) \
442+
((a)->vf_res->vf_cap_flags & VIRTCHNL_VF_OFFLOAD_RX_FLEX_DESC)
443+
#define IAVF_PTP_ALLOWED(a) \
444+
((a)->vf_res->vf_cap_flags & VIRTCHNL_VF_CAP_PTP)
411445
struct virtchnl_vf_resource *vf_res; /* incl. all VSIs */
412446
struct virtchnl_vsi_resource *vsi_res; /* our LAN VSI */
413447
struct virtchnl_version_info pf_version;
414448
#define PF_IS_V11(_a) (((_a)->pf_version.major == 1) && \
415449
((_a)->pf_version.minor == 1))
416450
struct virtchnl_vlan_caps vlan_v2_caps;
451+
u64 supp_rxdids;
452+
struct iavf_ptp ptp;
417453
u16 msg_enable;
418454
struct iavf_eth_stats current_stats;
455+
struct virtchnl_qos_cap_list *qos_caps;
419456
struct iavf_vsi vsi;
420457
u32 aq_wait_count;
421458
/* RSS stuff */
@@ -529,37 +566,33 @@ static inline void iavf_change_state(struct iavf_adapter *adapter,
529566
iavf_state_str(adapter->state));
530567
}
531568

532-
int iavf_up(struct iavf_adapter *adapter);
533569
void iavf_down(struct iavf_adapter *adapter);
534570
int iavf_process_config(struct iavf_adapter *adapter);
535571
int iavf_parse_vf_resource_msg(struct iavf_adapter *adapter);
536572
void iavf_schedule_reset(struct iavf_adapter *adapter, u64 flags);
537573
void iavf_schedule_aq_request(struct iavf_adapter *adapter, u64 flags);
538574
void iavf_schedule_finish_config(struct iavf_adapter *adapter);
539-
void iavf_reset(struct iavf_adapter *adapter);
540575
void iavf_set_ethtool_ops(struct net_device *netdev);
541-
void iavf_update_stats(struct iavf_adapter *adapter);
542576
void iavf_free_all_tx_resources(struct iavf_adapter *adapter);
543577
void iavf_free_all_rx_resources(struct iavf_adapter *adapter);
544578

545-
void iavf_napi_add_all(struct iavf_adapter *adapter);
546-
void iavf_napi_del_all(struct iavf_adapter *adapter);
547-
548579
int iavf_send_api_ver(struct iavf_adapter *adapter);
549580
int iavf_verify_api_ver(struct iavf_adapter *adapter);
550581
int iavf_send_vf_config_msg(struct iavf_adapter *adapter);
551582
int iavf_get_vf_config(struct iavf_adapter *adapter);
552583
int iavf_get_vf_vlan_v2_caps(struct iavf_adapter *adapter);
553584
int iavf_send_vf_offload_vlan_v2_msg(struct iavf_adapter *adapter);
585+
int iavf_send_vf_supported_rxdids_msg(struct iavf_adapter *adapter);
586+
int iavf_get_vf_supported_rxdids(struct iavf_adapter *adapter);
587+
int iavf_send_vf_ptp_caps_msg(struct iavf_adapter *adapter);
588+
int iavf_get_vf_ptp_caps(struct iavf_adapter *adapter);
554589
void iavf_set_queue_vlan_tag_loc(struct iavf_adapter *adapter);
555590
u16 iavf_get_num_vlans_added(struct iavf_adapter *adapter);
556591
void iavf_irq_enable(struct iavf_adapter *adapter, bool flush);
557592
void iavf_configure_queues(struct iavf_adapter *adapter);
558-
void iavf_deconfigure_queues(struct iavf_adapter *adapter);
559593
void iavf_enable_queues(struct iavf_adapter *adapter);
560594
void iavf_disable_queues(struct iavf_adapter *adapter);
561595
void iavf_map_queues(struct iavf_adapter *adapter);
562-
int iavf_request_queues(struct iavf_adapter *adapter, int num);
563596
void iavf_add_ether_addrs(struct iavf_adapter *adapter);
564597
void iavf_del_ether_addrs(struct iavf_adapter *adapter);
565598
void iavf_add_vlans(struct iavf_adapter *adapter);
@@ -579,8 +612,9 @@ void iavf_virtchnl_completion(struct iavf_adapter *adapter,
579612
enum virtchnl_ops v_opcode,
580613
enum iavf_status v_retval, u8 *msg, u16 msglen);
581614
int iavf_config_rss(struct iavf_adapter *adapter);
582-
int iavf_lan_add_device(struct iavf_adapter *adapter);
583-
int iavf_lan_del_device(struct iavf_adapter *adapter);
615+
void iavf_cfg_queues_bw(struct iavf_adapter *adapter);
616+
void iavf_cfg_queues_quanta_size(struct iavf_adapter *adapter);
617+
void iavf_get_qos_caps(struct iavf_adapter *adapter);
584618
void iavf_enable_channels(struct iavf_adapter *adapter);
585619
void iavf_disable_channels(struct iavf_adapter *adapter);
586620
void iavf_add_cloud_filter(struct iavf_adapter *adapter);

0 commit comments

Comments
 (0)