mirror of
git://nv-tegra.nvidia.com/linux-nv-oot.git
synced 2025-12-23 17:55:05 +03:00
nvethernet: Add OSD IVC support
In case of virtualization the OSI functions will be handled at Ethernet Server. Add IVC support where OSD can send IVC packets to ethernet server. Ethernet Server parses the messages and calls the corresponding OSI API. Bug 2694285 Change-Id: I0f8a23d33fe3fc87e2582101a6bef6f911e1226d Signed-off-by: Nagaraj Annaiah <nannaiah@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2439193 Reviewed-by: Bhadram Varka <vbhadram@nvidia.com> Reviewed-by: Rakesh Goyal <rgoyal@nvidia.com> Reviewed-by: Ashutosh Jha <ajha@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> GVS: Gerrit_Virtual_Submit Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
committed by
Revanth Kumar Uppala
parent
c606c85e93
commit
ca57e74aea
@@ -128,13 +128,6 @@
|
||||
*/
|
||||
#define ETHER_TX_MAX_FRAME_SIZE GSO_MAX_SIZE
|
||||
|
||||
#if (KERNEL_VERSION(5, 4, 0) > LINUX_VERSION_CODE)
|
||||
/**
|
||||
* @brief Ethernet Maximum IVC BUF
|
||||
*/
|
||||
#define ETHER_MAX_IVC_BUF 128
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Check if Tx data buffer length is within bounds.
|
||||
*
|
||||
@@ -241,6 +234,22 @@ struct ether_vm_irq_data {
|
||||
struct ether_priv_data *pdata;
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief Ethernet IVC context
|
||||
*/
|
||||
struct ether_ivc_ctxt {
|
||||
/** ivc cookie */
|
||||
struct tegra_hv_ivc_cookie *ivck;
|
||||
/** ivc lock */
|
||||
spinlock_t ivck_lock;
|
||||
/** ivc work */
|
||||
struct work_struct ivc_work;
|
||||
/** wait for event */
|
||||
struct completion msg_complete;
|
||||
/** Flag to indicate ivc started or stopped */
|
||||
unsigned int ivc_state;
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief Ethernet driver private data
|
||||
*/
|
||||
@@ -363,16 +372,10 @@ struct ether_priv_data {
|
||||
unsigned int tx_lpi_enabled;
|
||||
/** Time (usec) MAC waits to enter LPI after Tx complete */
|
||||
unsigned int tx_lpi_timer;
|
||||
#if (KERNEL_VERSION(5, 4, 0) > LINUX_VERSION_CODE)
|
||||
/** ivc cookie */
|
||||
struct tegra_hv_ivc_cookie *ivck;
|
||||
/** Buffer to receive pad ivc message */
|
||||
char ivc_rx[ETHER_MAX_IVC_BUF];
|
||||
/** ivc work */
|
||||
struct work_struct ivc_work;
|
||||
/** Flag which decides stats is enabled(1) or disabled(0) */
|
||||
unsigned int use_stats;
|
||||
#endif
|
||||
/** ivc context */
|
||||
struct ether_ivc_ctxt ictxt;
|
||||
/** VM channel info data associated with VM IRQ */
|
||||
struct ether_vm_irq_data *vm_irq_data;
|
||||
#ifdef CONFIG_DEBUG_FS
|
||||
@@ -491,4 +494,18 @@ static inline int ether_selftest_get_count(struct ether_priv_data *pdata)
|
||||
*
|
||||
*/
|
||||
void osd_realloc_buf(void *priv, void *rxring, unsigned int chan);
|
||||
|
||||
/**
|
||||
* @brief osd_send_cmd - OSD ivc send cmd
|
||||
*
|
||||
* @param[in] priv: OSD private data
|
||||
* @param[in] func: data
|
||||
* @param[in] len: length of the data
|
||||
* @note
|
||||
* API Group:
|
||||
* - Initialization: Yes
|
||||
* - Run time: Yes
|
||||
* - De-initialization: Yes
|
||||
*/
|
||||
int osd_ivc_send_cmd(void *priv, void *data, unsigned int len);
|
||||
#endif /* ETHER_LINUX_H */
|
||||
|
||||
Reference in New Issue
Block a user