mirror of
				https://github.com/torvalds/linux.git
				synced 2025-11-04 02:30:34 +02:00 
			
		
		
		
	bnxt_en: Add support to call FW to update a VNIC
Add the function bnxt_hwrm_vnic_update() to call FW to update a VNIC. This call can be used when disabling and enabling a receive ring within a VNIC. The mru which is the maximum receive size of packets received by the VNIC can be updated. Signed-off-by: Michael Chan <michael.chan@broadcom.com> Signed-off-by: David Wei <dw@davidwei.uk> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
		
							parent
							
								
									fbda8ee64b
								
							
						
					
					
						commit
						f2878cdeb7
					
				
					 2 changed files with 23 additions and 0 deletions
				
			
		| 
						 | 
					@ -10089,6 +10089,26 @@ static int __bnxt_setup_vnic(struct bnxt *bp, struct bnxt_vnic_info *vnic)
 | 
				
			||||||
	return rc;
 | 
						return rc;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					int bnxt_hwrm_vnic_update(struct bnxt *bp, struct bnxt_vnic_info *vnic,
 | 
				
			||||||
 | 
								  u8 valid)
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
						struct hwrm_vnic_update_input *req;
 | 
				
			||||||
 | 
						int rc;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						rc = hwrm_req_init(bp, req, HWRM_VNIC_UPDATE);
 | 
				
			||||||
 | 
						if (rc)
 | 
				
			||||||
 | 
							return rc;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						req->vnic_id = cpu_to_le32(vnic->fw_vnic_id);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						if (valid & VNIC_UPDATE_REQ_ENABLES_MRU_VALID)
 | 
				
			||||||
 | 
							req->mru = cpu_to_le16(vnic->mru);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						req->enables = cpu_to_le32(valid);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						return hwrm_req_send(bp, req);
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
int bnxt_hwrm_vnic_rss_cfg_p5(struct bnxt *bp, struct bnxt_vnic_info *vnic)
 | 
					int bnxt_hwrm_vnic_rss_cfg_p5(struct bnxt *bp, struct bnxt_vnic_info *vnic)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
	int rc;
 | 
						int rc;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1250,6 +1250,7 @@ struct bnxt_vnic_info {
 | 
				
			||||||
#define BNXT_MAX_CTX_PER_VNIC	8
 | 
					#define BNXT_MAX_CTX_PER_VNIC	8
 | 
				
			||||||
	u16		fw_rss_cos_lb_ctx[BNXT_MAX_CTX_PER_VNIC];
 | 
						u16		fw_rss_cos_lb_ctx[BNXT_MAX_CTX_PER_VNIC];
 | 
				
			||||||
	u16		fw_l2_ctx_id;
 | 
						u16		fw_l2_ctx_id;
 | 
				
			||||||
 | 
						u16		mru;
 | 
				
			||||||
#define BNXT_MAX_UC_ADDRS	4
 | 
					#define BNXT_MAX_UC_ADDRS	4
 | 
				
			||||||
	struct bnxt_l2_filter *l2_filters[BNXT_MAX_UC_ADDRS];
 | 
						struct bnxt_l2_filter *l2_filters[BNXT_MAX_UC_ADDRS];
 | 
				
			||||||
				/* index 0 always dev_addr */
 | 
									/* index 0 always dev_addr */
 | 
				
			||||||
| 
						 | 
					@ -2838,6 +2839,8 @@ int bnxt_hwrm_free_wol_fltr(struct bnxt *bp);
 | 
				
			||||||
int bnxt_hwrm_func_resc_qcaps(struct bnxt *bp, bool all);
 | 
					int bnxt_hwrm_func_resc_qcaps(struct bnxt *bp, bool all);
 | 
				
			||||||
int bnxt_hwrm_func_qcaps(struct bnxt *bp);
 | 
					int bnxt_hwrm_func_qcaps(struct bnxt *bp);
 | 
				
			||||||
int bnxt_hwrm_fw_set_time(struct bnxt *);
 | 
					int bnxt_hwrm_fw_set_time(struct bnxt *);
 | 
				
			||||||
 | 
					int bnxt_hwrm_vnic_update(struct bnxt *bp, struct bnxt_vnic_info *vnic,
 | 
				
			||||||
 | 
								  u8 valid);
 | 
				
			||||||
int bnxt_hwrm_vnic_rss_cfg_p5(struct bnxt *bp, struct bnxt_vnic_info *vnic);
 | 
					int bnxt_hwrm_vnic_rss_cfg_p5(struct bnxt *bp, struct bnxt_vnic_info *vnic);
 | 
				
			||||||
int __bnxt_setup_vnic_p5(struct bnxt *bp, struct bnxt_vnic_info *vnic);
 | 
					int __bnxt_setup_vnic_p5(struct bnxt *bp, struct bnxt_vnic_info *vnic);
 | 
				
			||||||
void bnxt_del_one_rss_ctx(struct bnxt *bp, struct bnxt_rss_ctx *rss_ctx,
 | 
					void bnxt_del_one_rss_ctx(struct bnxt *bp, struct bnxt_rss_ctx *rss_ctx,
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in a new issue