mirror of
https://github.com/qosmio/nss-packages.git
synced 2025-12-16 16:21:53 +00:00
nss-clients: use patches vs. compiler overrides to fix warnings
Remove '-Wno-enum-conversion -Wno-unused-variable -Wno-int-conversion' from CFLAGS and instead patch the code to fix the warnings. Signed-off-by: Sean Khan <datapronix@protonmail.com>
This commit is contained in:
parent
cd4db9aa4e
commit
c5fd1f6430
@ -742,7 +742,7 @@ define Build/Compile
|
||||
CROSS_COMPILE="$(TARGET_CROSS)" \
|
||||
ARCH="$(LINUX_KARCH)" \
|
||||
M="$(PKG_BUILD_DIR)" \
|
||||
EXTRA_CFLAGS="$(EXTRA_CFLAGS) -Wno-enum-conversion -Wno-unused-variable -Wno-int-conversion" \
|
||||
EXTRA_CFLAGS="$(EXTRA_CFLAGS)" \
|
||||
DTLSMGR_DIR="$(DTLSMGR_DIR)" \
|
||||
IPSECMGR_DIR="$(IPSECMGR_DIR)" \
|
||||
SoC=$(SOC) \
|
||||
|
||||
455
qca-nss-clients/patches-11.4/0030-fixup-compiler-errors.patch
Normal file
455
qca-nss-clients/patches-11.4/0030-fixup-compiler-errors.patch
Normal file
@ -0,0 +1,455 @@
|
||||
--- a/match/nss_match.c
|
||||
+++ b/match/nss_match.c
|
||||
@@ -76,9 +76,10 @@ static nss_match_status_t nss_match_veri
|
||||
* nss_match_sync_callback()
|
||||
* Sync callback for syncing stats.
|
||||
*/
|
||||
-static void nss_match_sync_callback(void *app_data, struct nss_match_msg *nmm)
|
||||
+static void nss_match_sync_callback(void *app_data, struct nss_cmn_msg *cmm)
|
||||
{
|
||||
struct nss_ctx_instance *nss_ctx = nss_match_get_context();
|
||||
+ struct nss_match_msg *nmm = (struct nss_match_msg *)cmm;
|
||||
|
||||
switch (nmm->cm.type) {
|
||||
case NSS_MATCH_STATS_SYNC:
|
||||
--- a/nss_qdisc/nss_ppe.c
|
||||
+++ b/nss_qdisc/nss_ppe.c
|
||||
@@ -348,8 +348,8 @@ static void nss_ppe_queue_disable(struct
|
||||
/*
|
||||
* Disable queue enqueue, dequeue and flush the queue.
|
||||
*/
|
||||
- fal_qm_enqueue_ctrl_set(0, npq->q.ucast_qid, false);
|
||||
- fal_scheduler_dequeue_ctrl_set(0, npq->q.ucast_qid, false);
|
||||
+ fal_qm_enqueue_ctrl_set(0, npq->q.ucast_qid, 0);
|
||||
+ fal_scheduler_dequeue_ctrl_set(0, npq->q.ucast_qid, 0);
|
||||
fal_queue_flush(0, port_num, npq->q.ucast_qid);
|
||||
|
||||
nss_qdisc_info("Disable SSDK level0 queue scheduler successful\n");
|
||||
@@ -370,8 +370,8 @@ static void nss_ppe_queue_enable(struct
|
||||
/*
|
||||
* Enable queue enqueue and dequeue.
|
||||
*/
|
||||
- fal_qm_enqueue_ctrl_set(0, npq->q.ucast_qid, true);
|
||||
- fal_scheduler_dequeue_ctrl_set(0, npq->q.ucast_qid, true);
|
||||
+ fal_qm_enqueue_ctrl_set(0, npq->q.ucast_qid, 1);
|
||||
+ fal_scheduler_dequeue_ctrl_set(0, npq->q.ucast_qid, 1);
|
||||
|
||||
nss_qdisc_info("Enable SSDK level0 queue scheduler successful\n");
|
||||
}
|
||||
@@ -535,14 +535,14 @@ static void nss_ppe_all_queue_disable(ui
|
||||
* Disable queue enqueue, dequeue and flush the queue.
|
||||
*/
|
||||
for (offset = 0; offset < nss_ppe_max_get(port_num, NSS_PPE_UCAST_QUEUE); offset++) {
|
||||
- fal_qm_enqueue_ctrl_set(0, qid + offset, false);
|
||||
- fal_scheduler_dequeue_ctrl_set(0, qid + offset, false);
|
||||
+ fal_qm_enqueue_ctrl_set(0, qid + offset, 0);
|
||||
+ fal_scheduler_dequeue_ctrl_set(0, qid + offset, 0);
|
||||
fal_queue_flush(0, port_num, qid + offset);
|
||||
}
|
||||
|
||||
for (offset = 0; offset < nss_ppe_max_get(port_num, NSS_PPE_MCAST_QUEUE); offset++) {
|
||||
- fal_qm_enqueue_ctrl_set(0, mcast_qid + offset, false);
|
||||
- fal_scheduler_dequeue_ctrl_set(0, mcast_qid + offset, false);
|
||||
+ fal_qm_enqueue_ctrl_set(0, mcast_qid + offset, 0);
|
||||
+ fal_scheduler_dequeue_ctrl_set(0, mcast_qid + offset, 0);
|
||||
fal_queue_flush(0, port_num, mcast_qid + offset);
|
||||
}
|
||||
|
||||
@@ -563,13 +563,13 @@ static void nss_ppe_all_queue_enable(uin
|
||||
* Enable queue enqueue and dequeue.
|
||||
*/
|
||||
for (offset = 0; offset < nss_ppe_max_get(port_num, NSS_PPE_UCAST_QUEUE); offset++) {
|
||||
- fal_qm_enqueue_ctrl_set(0, qid + offset, true);
|
||||
- fal_scheduler_dequeue_ctrl_set(0, qid + offset, true);
|
||||
+ fal_qm_enqueue_ctrl_set(0, qid + offset, 1);
|
||||
+ fal_scheduler_dequeue_ctrl_set(0, qid + offset, 1);
|
||||
}
|
||||
|
||||
for (offset = 0; offset < nss_ppe_max_get(port_num, NSS_PPE_MCAST_QUEUE); offset++) {
|
||||
- fal_qm_enqueue_ctrl_set(0, mcast_qid + offset, true);
|
||||
- fal_scheduler_dequeue_ctrl_set(0, mcast_qid + offset, true);
|
||||
+ fal_qm_enqueue_ctrl_set(0, mcast_qid + offset, 1);
|
||||
+ fal_scheduler_dequeue_ctrl_set(0, mcast_qid + offset, 1);
|
||||
}
|
||||
|
||||
nss_qdisc_info("Enable SSDK level0 queue scheduler successful\n");
|
||||
@@ -608,7 +608,7 @@ static int nss_ppe_l1_queue_scheduler_co
|
||||
l1cfg.e_pri = NSS_PPE_PRIORITY_MAX - npq->scheduler.priority;
|
||||
l1cfg.c_drr_id = npq->l1c_drrid;
|
||||
l1cfg.e_drr_id = npq->l1e_drrid;
|
||||
- l1cfg.drr_frame_mode = NSS_PPE_FRAME_CRC;
|
||||
+ l1cfg.drr_frame_mode = (fal_qos_drr_frame_mode_t)NSS_PPE_FRAME_CRC;
|
||||
|
||||
nss_qdisc_trace("SSDK level1 configuration: Port:%d, l0spid:%d, c_drrid:%d, c_pri:%d, c_drr_wt:%d, e_drrid:%d, e_pri:%d, e_drr_wt:%d, l1spid:%d\n",
|
||||
port_num, npq->l0spid, l1cfg.c_drr_id, l1cfg.c_pri, l1cfg.c_drr_wt, l1cfg.e_drr_id, l1cfg.e_pri, l1cfg.e_drr_wt, l1cfg.sp_id);
|
||||
@@ -893,7 +893,7 @@ static int nss_ppe_l0_queue_scheduler_co
|
||||
l0cfg.e_pri = NSS_PPE_PRIORITY_MAX - npq->scheduler.priority;
|
||||
l0cfg.c_drr_id = npq->l0c_drrid;
|
||||
l0cfg.e_drr_id = npq->l0e_drrid;
|
||||
- l0cfg.drr_frame_mode = NSS_PPE_FRAME_CRC;
|
||||
+ l0cfg.drr_frame_mode = (fal_qos_drr_frame_mode_t)NSS_PPE_FRAME_CRC;
|
||||
|
||||
nss_qdisc_trace("SSDK level0 configuration: Port:%d, ucast_qid:%d, c_drrid:%d, c_pri:%d, c_drr_wt:%d, e_drrid:%d, e_pri:%d, e_drr_wt:%d, l0spid:%d\n",
|
||||
port_num, npq->q.ucast_qid, l0cfg.c_drr_id, l0cfg.c_pri, l0cfg.c_drr_wt, l0cfg.e_drr_id, l0cfg.e_pri, l0cfg.e_drr_wt, l0cfg.sp_id);
|
||||
@@ -1018,7 +1018,7 @@ static int nss_ppe_port_shaper_set(struc
|
||||
cfg.c_shaper_en = 1;
|
||||
cfg.cbs = npq->shaper.cburst;
|
||||
cfg.cir = (npq->shaper.crate / 1000) * 8;
|
||||
- cfg.shaper_frame_mode = NSS_PPE_FRAME_CRC;
|
||||
+ cfg.shaper_frame_mode = (fal_shaper_frame_mode_t)NSS_PPE_FRAME_CRC;
|
||||
|
||||
/*
|
||||
* Take HW scaling into consideration
|
||||
@@ -1100,7 +1100,7 @@ static int nss_ppe_flow_shaper_set(struc
|
||||
cfg.e_shaper_en = 1;
|
||||
cfg.ebs = npq->shaper.cburst;
|
||||
cfg.eir = ((npq->shaper.crate / 1000) * 8) - cfg.cir;
|
||||
- cfg.shaper_frame_mode = NSS_PPE_FRAME_CRC;
|
||||
+ cfg.shaper_frame_mode = (fal_shaper_frame_mode_t)NSS_PPE_FRAME_CRC;
|
||||
|
||||
/*
|
||||
* Take HW scaling into consideration
|
||||
@@ -1184,7 +1184,7 @@ static int nss_ppe_queue_shaper_set(stru
|
||||
cfg.e_shaper_en = 1;
|
||||
cfg.ebs = npq->shaper.cburst;
|
||||
cfg.eir = ((npq->shaper.crate / 1000) * 8) - cfg.cir;
|
||||
- cfg.shaper_frame_mode = NSS_PPE_FRAME_CRC;
|
||||
+ cfg.shaper_frame_mode = (fal_shaper_frame_mode_t)NSS_PPE_FRAME_CRC;
|
||||
|
||||
/*
|
||||
* Take HW scaling into consideration
|
||||
@@ -1252,7 +1252,6 @@ static void nss_ppe_attach_free(uint32_t
|
||||
spin_unlock_bh(&ppe_port->lock);
|
||||
|
||||
nss_qdisc_info("port:%d, type:%d, res:%px\n", port, res->type, res);
|
||||
- return;
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -2338,7 +2337,7 @@ int nss_ppe_init(struct Qdisc *sch, stru
|
||||
* nothing useful and thus we don't allocate any resource".
|
||||
*/
|
||||
nss_qdisc_trace("Qdisc parent = %px, handle=%x\n", nq->parent, nq->parent->qos_tag);
|
||||
- if ((nq->parent->npq.sub_type == NSS_SHAPER_CONFIG_PPE_SN_TYPE_HTB)) {
|
||||
+ if (nq->parent->npq.sub_type == NSS_SHAPER_CONFIG_PPE_SN_TYPE_HTB) {
|
||||
nq->npq.level = nq->parent->npq.level;
|
||||
} else {
|
||||
nq->npq.level = nq->parent->npq.level - 1;
|
||||
--- a/nss_qdisc/nss_ppe_mc.c
|
||||
+++ b/nss_qdisc/nss_ppe_mc.c
|
||||
@@ -32,8 +32,8 @@ int nss_ppe_mcast_queue_reset(struct nss
|
||||
return 0;
|
||||
}
|
||||
|
||||
- fal_qm_enqueue_ctrl_set(0, npq->q.mcast_qid, false);
|
||||
- fal_scheduler_dequeue_ctrl_set(0, npq->q.mcast_qid, false);
|
||||
+ fal_qm_enqueue_ctrl_set(0, npq->q.mcast_qid, 0);
|
||||
+ fal_scheduler_dequeue_ctrl_set(0, npq->q.mcast_qid, 0);
|
||||
fal_queue_flush(0, port_num, npq->q.mcast_qid);
|
||||
|
||||
/*
|
||||
@@ -153,8 +153,8 @@ int nss_ppe_mcast_queue_set(struct nss_q
|
||||
}
|
||||
}
|
||||
|
||||
- fal_qm_enqueue_ctrl_set(0, npq->q.mcast_qid, true);
|
||||
- fal_scheduler_dequeue_ctrl_set(0, npq->q.mcast_qid, true);
|
||||
+ fal_qm_enqueue_ctrl_set(0, npq->q.mcast_qid, 1);
|
||||
+ fal_scheduler_dequeue_ctrl_set(0, npq->q.mcast_qid, 1);
|
||||
|
||||
nss_qdisc_info("SSDK multicast queue configuration successful for port:%d\n", port_num);
|
||||
return 0;
|
||||
@@ -164,4 +164,4 @@ fail:
|
||||
npq->q.mcast_qid = 0;
|
||||
npq->q.mcast_valid = 0;
|
||||
return -EINVAL;
|
||||
-}
|
||||
\ No newline at end of file
|
||||
+}
|
||||
--- a/nss_qdisc/nss_wred.c
|
||||
+++ b/nss_qdisc/nss_wred.c
|
||||
@@ -296,7 +296,7 @@ static int nss_wred_change(struct Qdisc
|
||||
|
||||
nim.msg.shaper_configure.config.msg.shaper_node_config.qos_tag = q->nq.qos_tag;
|
||||
nim.msg.shaper_configure.config.msg.shaper_node_config.snc.wred_param.limit = qopt->limit;
|
||||
- nim.msg.shaper_configure.config.msg.shaper_node_config.snc.wred_param.weight_mode = qopt->weight_mode;
|
||||
+ nim.msg.shaper_configure.config.msg.shaper_node_config.snc.wred_param.weight_mode = (nss_shaper_config_wred_weight_mode_t)qopt->weight_mode;
|
||||
nim.msg.shaper_configure.config.msg.shaper_node_config.snc.wred_param.weight_mode_value = qopt->weight_mode_value;
|
||||
nim.msg.shaper_configure.config.msg.shaper_node_config.snc.wred_param.rap.min = qopt->rap.min;
|
||||
nim.msg.shaper_configure.config.msg.shaper_node_config.snc.wred_param.rap.max = qopt->rap.max;
|
||||
--- a/openvpn/plugins/nss_ovpn_sk.c
|
||||
+++ b/openvpn/plugins/nss_ovpn_sk.c
|
||||
@@ -156,7 +156,7 @@ static int nss_ovpn_sk_crypto_key_add(st
|
||||
return -EFAULT;
|
||||
}
|
||||
|
||||
- crypto_cfg.algo = crypto_info.config.algo;
|
||||
+ crypto_cfg.algo = (enum nss_ovpnmgr_algo)crypto_info.config.algo;
|
||||
crypto_cfg.encrypt.cipher_keylen = crypto_info.config.cipher_key_size;
|
||||
crypto_cfg.encrypt.hmac_keylen = crypto_info.config.hmac_key_size;
|
||||
crypto_cfg.decrypt.cipher_keylen = crypto_info.config.cipher_key_size;
|
||||
@@ -364,7 +364,7 @@ static int nss_ovpn_sk_tun_add(struct so
|
||||
tun_hdr.dst_port = tun_data.tun_hdr.dst_port;
|
||||
tun_hdr.hop_limit = tun_data.tun_hdr.hop_limit;
|
||||
|
||||
- crypto_cfg.algo = tun_data.crypto.config.algo;
|
||||
+ crypto_cfg.algo = (enum nss_ovpnmgr_algo)tun_data.crypto.config.algo;
|
||||
crypto_cfg.encrypt.cipher_keylen = tun_data.crypto.config.cipher_key_size;
|
||||
crypto_cfg.encrypt.hmac_keylen = tun_data.crypto.config.hmac_key_size;
|
||||
crypto_cfg.decrypt.cipher_keylen = tun_data.crypto.config.cipher_key_size;
|
||||
@@ -442,7 +442,7 @@ static int nss_ovpn_sk_tun_add(struct so
|
||||
* nss_ovpn_sk_app_dereg()
|
||||
* Deregister application.
|
||||
*/
|
||||
-static int nss_ovpn_sk_app_dereg(struct socket *sock, unsigned long argp)
|
||||
+static int nss_ovpn_sk_app_dereg(struct socket *sock)
|
||||
{
|
||||
struct nss_ovpn_sk_pinfo *pinfo = (struct nss_ovpn_sk_pinfo *)sock->sk;
|
||||
int ret;
|
||||
@@ -491,7 +491,7 @@ static int nss_ovpn_sk_app_reg(struct so
|
||||
return -EFAULT;
|
||||
}
|
||||
|
||||
- ret = nss_ovpnmgr_app_add(pinfo->dev, app.app_mode, (void *)sock);
|
||||
+ ret = nss_ovpnmgr_app_add(pinfo->dev, (enum nss_ovpnmgr_app_mode)app.app_mode, (void *)sock);
|
||||
if (ret) {
|
||||
nss_ovpn_sk_warn("%px: Failed to register application, pid=%u\n", sock, app.pid);
|
||||
dev_put(pinfo->dev);
|
||||
@@ -689,7 +689,7 @@ static int nss_ovpn_sk_recvmsg(struct so
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
- skb = skb_recv_datagram(sk, flags, MSG_DONTWAIT, &ret);
|
||||
+ skb = skb_recv_datagram(sk, flags, &ret);
|
||||
if (!skb) {
|
||||
nss_ovpn_sk_warn("%px: There are no packets in the queue.\n", sock);
|
||||
return -ENOBUFS;
|
||||
@@ -740,7 +740,7 @@ static int nss_ovpn_sk_ioctl(struct sock
|
||||
case NSS_OVPN_SK_SIOC_APP_REG:
|
||||
return nss_ovpn_sk_app_reg(sock, argp);
|
||||
case NSS_OVPN_SK_SIOC_APP_DEREG:
|
||||
- return nss_ovpn_sk_app_dereg(sock, argp);
|
||||
+ return nss_ovpn_sk_app_dereg(sock);
|
||||
case NSS_OVPN_SK_SIOC_TUN_ADD:
|
||||
return nss_ovpn_sk_tun_add(sock, argp);
|
||||
case NSS_OVPN_SK_SIOC_TUN_DEL:
|
||||
@@ -773,15 +773,12 @@ static const struct proto_ops nss_ovpn_s
|
||||
.ioctl = nss_ovpn_sk_ioctl,
|
||||
.listen = sock_no_listen,
|
||||
.shutdown = sock_no_shutdown,
|
||||
- .getsockopt = sock_no_getsockopt,
|
||||
.mmap = sock_no_mmap,
|
||||
- .sendpage = sock_no_sendpage,
|
||||
.sendmsg = nss_ovpn_sk_sendmsg,
|
||||
.recvmsg = nss_ovpn_sk_recvmsg,
|
||||
.poll = datagram_poll,
|
||||
.bind = sock_no_bind,
|
||||
.release = nss_ovpn_sk_release,
|
||||
- .setsockopt = sock_no_setsockopt,
|
||||
.accept = sock_no_accept,
|
||||
};
|
||||
|
||||
--- a/pvxlanmgr/nss_pvxlanmgr.c
|
||||
+++ b/pvxlanmgr/nss_pvxlanmgr.c
|
||||
@@ -408,7 +408,7 @@ nss_pvxlanmgr_status_t nss_pvxlanmgr_net
|
||||
if (ret != NSS_TX_SUCCESS) {
|
||||
nss_pvxlanmgr_warn("%px: Tunnel disable failed: %d\n", dev, ret);
|
||||
dev_put(dev);
|
||||
- return ret;
|
||||
+ return (nss_pvxlanmgr_status_t)ret;
|
||||
}
|
||||
|
||||
ret = nss_pvxlanmgr_tunnel_tx_msg_disable(priv->pvxlan_ctx, priv->if_num_outer);
|
||||
@@ -416,11 +416,11 @@ nss_pvxlanmgr_status_t nss_pvxlanmgr_net
|
||||
nss_pvxlanmgr_warn("%px: Tunnel disable failed: %d\n", dev, ret);
|
||||
nss_pvxlanmgr_tunnel_tx_msg_enable(priv->pvxlan_ctx, priv->if_num_host_inner, priv->if_num_outer);
|
||||
dev_put(dev);
|
||||
- return ret;
|
||||
+ return (nss_pvxlanmgr_status_t)ret;
|
||||
}
|
||||
|
||||
dev_put(dev);
|
||||
- return ret;
|
||||
+ return (nss_pvxlanmgr_status_t)ret;
|
||||
}
|
||||
EXPORT_SYMBOL(nss_pvxlanmgr_netdev_disable);
|
||||
|
||||
@@ -440,7 +440,7 @@ nss_pvxlanmgr_status_t nss_pvxlanmgr_net
|
||||
if (ret != NSS_TX_SUCCESS) {
|
||||
nss_pvxlanmgr_warn("%px: Tunnel enable failed: %d\n", dev, ret);
|
||||
dev_put(dev);
|
||||
- return ret;
|
||||
+ return (nss_pvxlanmgr_status_t)ret;
|
||||
}
|
||||
|
||||
ret = nss_pvxlanmgr_tunnel_tx_msg_enable(priv->pvxlan_ctx, priv->if_num_outer, priv->if_num_host_inner);
|
||||
@@ -448,11 +448,11 @@ nss_pvxlanmgr_status_t nss_pvxlanmgr_net
|
||||
nss_pvxlanmgr_warn("%px: Tunnel enable failed: %d\n", dev, ret);
|
||||
nss_pvxlanmgr_tunnel_tx_msg_disable(priv->pvxlan_ctx, priv->if_num_host_inner);
|
||||
dev_put(dev);
|
||||
- return ret;
|
||||
+ return (nss_pvxlanmgr_status_t)ret;
|
||||
}
|
||||
|
||||
dev_put(dev);
|
||||
- return ret;
|
||||
+ return (nss_pvxlanmgr_status_t)ret;
|
||||
}
|
||||
EXPORT_SYMBOL(nss_pvxlanmgr_netdev_enable);
|
||||
|
||||
@@ -524,7 +524,7 @@ EXPORT_SYMBOL(nss_pvxlanmgr_netdev_destr
|
||||
* nss_pvxlanmgr_netdev_create()
|
||||
* API to create a Pvxlan netdev
|
||||
*/
|
||||
-struct net_device *nss_pvxlanmgr_netdev_create()
|
||||
+struct net_device *nss_pvxlanmgr_netdev_create(void)
|
||||
{
|
||||
struct nss_pvxlanmgr_priv *priv;
|
||||
struct net_device *dev;
|
||||
--- a/pvxlanmgr/nss_pvxlanmgr_tunnel.c
|
||||
+++ b/pvxlanmgr/nss_pvxlanmgr_tunnel.c
|
||||
@@ -67,7 +67,7 @@ static inline nss_pvxlanmgr_status_t nss
|
||||
}
|
||||
|
||||
dev_put(dev);
|
||||
- return status;
|
||||
+ return (nss_pvxlanmgr_status_t)status;
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -110,7 +110,7 @@ static inline nss_pvxlanmgr_status_t nss
|
||||
}
|
||||
|
||||
dev_put(dev);
|
||||
- return status;
|
||||
+ return (nss_pvxlanmgr_status_t)status;
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -138,7 +138,7 @@ static nss_pvxlanmgr_status_t nss_pvxlan
|
||||
status = nss_pvxlanmgr_tunnel_tx_msg(ctx, &pvxlanmsg, if_num, NSS_PVXLAN_MSG_TYPE_TUNNEL_DESTROY_RULE, sizeof(struct nss_pvxlan_rule_msg));
|
||||
if (status != NSS_TX_SUCCESS) {
|
||||
nss_pvxlanmgr_warn("%px: ctx: create encap data tunnel error %d\n", ctx, status);
|
||||
- return status;
|
||||
+ return (nss_pvxlanmgr_status_t)status;
|
||||
}
|
||||
|
||||
return NSS_PVXLANMGR_SUCCESS;
|
||||
@@ -169,7 +169,7 @@ static nss_pvxlanmgr_status_t nss_pvxlan
|
||||
status = nss_pvxlanmgr_tunnel_tx_msg(ctx, &pvxlanmsg, if_num, NSS_PVXLAN_MSG_TYPE_TUNNEL_CREATE_RULE, sizeof(struct nss_pvxlan_rule_msg));
|
||||
if (status != NSS_TX_SUCCESS) {
|
||||
nss_pvxlanmgr_warn("%px: ctx: create encap data tunnel error %d\n", ctx, status);
|
||||
- return status;
|
||||
+ return (nss_pvxlanmgr_status_t)status;
|
||||
}
|
||||
|
||||
return NSS_PVXLANMGR_SUCCESS;
|
||||
@@ -482,7 +482,7 @@ nss_pvxlanmgr_status_t nss_pvxlanmgr_tun
|
||||
if_num_outer = priv->if_num_outer;
|
||||
|
||||
status = nss_pvxlanmgr_tunnel_pvxlan_rule_create(priv->pvxlan_ctx, if_num_host_inner, &pvxlan_rule);
|
||||
- nss_pvxlanmgr_info("%px: dynamic interface if_num is :%d and pvxlan tunnel status:%d\n", dev, if_num_host_inner, status);
|
||||
+ nss_pvxlanmgr_info("%px: dynamic interface if_num is :%d, if_num_outer :%d, and pvxlan tunnel status:%d\n", dev, if_num_host_inner, if_num_outer, status);
|
||||
if (status != NSS_PVXLANMGR_SUCCESS) {
|
||||
nss_pvxlanmgr_warn("%px: %d: PVXLAN rule create failed with status: %d\n", dev, if_num_host_inner, status);
|
||||
dev_put(dev);
|
||||
@@ -586,7 +586,7 @@ nss_pvxlanmgr_status_t nss_pvxlanmgr_tun
|
||||
if_num_outer = priv->if_num_outer;
|
||||
|
||||
status = nss_pvxlanmgr_tunnel_pvxlan_rule_create(priv->pvxlan_ctx, if_num_host_inner, &pvxlan_rule);
|
||||
- nss_pvxlanmgr_info("%px: dynamic interface if_num is :%d and pvxlan tunnel status:%d\n", dev, if_num_host_inner, status);
|
||||
+ nss_pvxlanmgr_info("%px: dynamic interface if_num is :%d, if_num_outer :%d, and pvxlan tunnel status:%d\n", dev, if_num_host_inner, if_num_outer, status);
|
||||
if (status != NSS_PVXLANMGR_SUCCESS) {
|
||||
nss_pvxlanmgr_warn("%px: %d: PVXLAN rule create failed with status: %d\n", dev, if_num_host_inner, status);
|
||||
dev_put(dev);
|
||||
--- a/tls/nss_tlsmgr_crypto.c
|
||||
+++ b/tls/nss_tlsmgr_crypto.c
|
||||
@@ -250,7 +250,7 @@ nss_tlsmgr_status_t nss_tlsmgr_crypto_up
|
||||
status = nss_tls_tx_msg_sync(ctx->nss_ctx, ctx->ifnum, msg_type, sizeof(*ntcu), &ntm);
|
||||
if (status != NSS_TX_SUCCESS) {
|
||||
nss_tlsmgr_warn("%px: Failed to configure decap, status:%d, error:%d", ctx, status, ntm.cm.error);
|
||||
- return false;
|
||||
+ return (nss_tlsmgr_status_t)false;
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -361,7 +361,7 @@ nss_tlsmgr_status_t nss_tlsmgr_crypto_up
|
||||
if (status != NSS_TX_SUCCESS) {
|
||||
nss_tlsmgr_crypto_free(crypto);
|
||||
nss_tlsmgr_warn("%px: Failed to configure decap, status:%d, error:%d", ctx, status, ntm.cm.error);
|
||||
- return false;
|
||||
+ return (nss_tlsmgr_status_t)false;
|
||||
}
|
||||
|
||||
/*
|
||||
--- a/vlan/nss_vlan_mgr.c
|
||||
+++ b/vlan/nss_vlan_mgr.c
|
||||
@@ -448,8 +448,8 @@ static int nss_vlan_mgr_bond_configure_p
|
||||
/*
|
||||
* Fields for match
|
||||
*/
|
||||
- v->eg_xlt_rule.vsi_valid = true; /* Use vsi as search key*/
|
||||
- v->eg_xlt_rule.vsi_enable = true; /* Use vsi as search key*/
|
||||
+ v->eg_xlt_rule.vsi_valid = 1; /* Use vsi as search key*/
|
||||
+ v->eg_xlt_rule.vsi_enable = 1; /* Use vsi as search key*/
|
||||
v->eg_xlt_rule.vsi = vsi; /* Use vsi as search key*/
|
||||
v->eg_xlt_rule.s_tagged = 0x7; /* Accept tagged/untagged/priority tagged svlan */
|
||||
v->eg_xlt_rule.c_tagged = 0x7; /* Accept tagged/untagged/priority tagged cvlan */
|
||||
@@ -612,8 +612,8 @@ static int nss_vlan_mgr_configure_ppe(st
|
||||
/*
|
||||
* Fields for match
|
||||
*/
|
||||
- v->eg_xlt_rule.vsi_valid = true; /* Use vsi as search key*/
|
||||
- v->eg_xlt_rule.vsi_enable = true; /* Use vsi as search key*/
|
||||
+ v->eg_xlt_rule.vsi_valid = 1; /* Use vsi as search key*/
|
||||
+ v->eg_xlt_rule.vsi_enable = 1; /* Use vsi as search key*/
|
||||
v->eg_xlt_rule.vsi = vsi; /* Use vsi as search key*/
|
||||
v->eg_xlt_rule.s_tagged = 0x7; /* Accept tagged/untagged/priority tagged svlan */
|
||||
v->eg_xlt_rule.c_tagged = 0x7; /* Accept tagged/untagged/priority tagged cvlan */
|
||||
@@ -1817,8 +1817,8 @@ void nss_vlan_mgr_add_vlan_rule(struct n
|
||||
/*
|
||||
* Fields for match
|
||||
*/
|
||||
- eg_xlt_rule.vsi_valid = true; /* Use vsi as search key */
|
||||
- eg_xlt_rule.vsi_enable = true; /* Use vsi as search key */
|
||||
+ eg_xlt_rule.vsi_valid = 1; /* Use vsi as search key */
|
||||
+ eg_xlt_rule.vsi_enable = 1; /* Use vsi as search key */
|
||||
eg_xlt_rule.vsi = bridge_vsi; /* Use vsi as search key */
|
||||
eg_xlt_rule.s_tagged = 0x7; /* Accept tagged/untagged/priority tagged svlan */
|
||||
eg_xlt_rule.c_tagged = 0x7; /* Accept tagged/untagged/priority tagged cvlan */
|
||||
@@ -1885,8 +1885,8 @@ void nss_vlan_mgr_del_vlan_rule(struct n
|
||||
/*
|
||||
* Fields for match
|
||||
*/
|
||||
- eg_xlt_rule.vsi_valid = true; /* Use vsi as search key */
|
||||
- eg_xlt_rule.vsi_enable = true; /* Use vsi as search key */
|
||||
+ eg_xlt_rule.vsi_valid = 1; /* Use vsi as search key */
|
||||
+ eg_xlt_rule.vsi_enable = 1; /* Use vsi as search key */
|
||||
eg_xlt_rule.vsi = bridge_vsi; /* Use vsi as search key */
|
||||
eg_xlt_rule.s_tagged = 0x7; /* Accept tagged/untagged/priority tagged svlan */
|
||||
eg_xlt_rule.c_tagged = 0x7; /* Accept tagged/untagged/priority tagged cvlan */
|
||||
--- a/wifi_meshmgr/nss_wifi_meshmgr.c
|
||||
+++ b/wifi_meshmgr/nss_wifi_meshmgr.c
|
||||
@@ -1637,9 +1637,6 @@ nss_wifi_meshmgr_config_mesh_exception(n
|
||||
break;
|
||||
|
||||
case NSS_WIFI_MESH_US_MESH_PROXY_NOT_FOUND:
|
||||
- ifnum = decap_ifnum;
|
||||
- break;
|
||||
-
|
||||
case NSS_WIFI_MESH_US_MESH_PATH_NOT_FOUND:
|
||||
ifnum = decap_ifnum;
|
||||
break;
|
||||
@@ -1702,10 +1699,10 @@ nss_wifi_meshmgr_config_mesh_exception_s
|
||||
ret = wait_for_completion_timeout(&wmesh_ctx->complete, msecs_to_jiffies(NSS_WIFI_MESH_TX_TIMEOUT));
|
||||
if (!ret) {
|
||||
nss_wifi_meshmgr_warn("%px: WiFi mesh msg tx failed due to timeout\n", &wmgr_ctx);
|
||||
- wmesh_ctx->response = NSS_WIFI_MESHMGR_FAILURE_SYNC_TIMEOUT;
|
||||
+ wmesh_ctx->response = (nss_tx_status_t)NSS_WIFI_MESHMGR_FAILURE_SYNC_TIMEOUT;
|
||||
}
|
||||
|
||||
- nss_status = wmesh_ctx->response;
|
||||
+ nss_status = (nss_wifi_meshmgr_status_t)wmesh_ctx->response;
|
||||
up(&wmesh_ctx->sem);
|
||||
|
||||
nss_wifi_meshmgr_ref_dec(wmesh_ctx);
|
||||
442
qca-nss-clients/patches/0030-fixup-compiler-errors.patch
Normal file
442
qca-nss-clients/patches/0030-fixup-compiler-errors.patch
Normal file
@ -0,0 +1,442 @@
|
||||
--- a/match/nss_match.c
|
||||
+++ b/match/nss_match.c
|
||||
@@ -76,9 +76,10 @@ static nss_match_status_t nss_match_veri
|
||||
* nss_match_sync_callback()
|
||||
* Sync callback for syncing stats.
|
||||
*/
|
||||
-static void nss_match_sync_callback(void *app_data, struct nss_match_msg *nmm)
|
||||
+static void nss_match_sync_callback(void *app_data, struct nss_cmn_msg *cmm)
|
||||
{
|
||||
struct nss_ctx_instance *nss_ctx = nss_match_get_context();
|
||||
+ struct nss_match_msg *nmm = (struct nss_match_msg *)cmm;
|
||||
|
||||
switch (nmm->cm.type) {
|
||||
case NSS_MATCH_STATS_SYNC:
|
||||
--- a/nss_qdisc/nss_ppe.c
|
||||
+++ b/nss_qdisc/nss_ppe.c
|
||||
@@ -348,8 +348,8 @@ static void nss_ppe_queue_disable(struct
|
||||
/*
|
||||
* Disable queue enqueue, dequeue and flush the queue.
|
||||
*/
|
||||
- fal_qm_enqueue_ctrl_set(0, npq->q.ucast_qid, false);
|
||||
- fal_scheduler_dequeue_ctrl_set(0, npq->q.ucast_qid, false);
|
||||
+ fal_qm_enqueue_ctrl_set(0, npq->q.ucast_qid, 0);
|
||||
+ fal_scheduler_dequeue_ctrl_set(0, npq->q.ucast_qid, 0);
|
||||
fal_queue_flush(0, port_num, npq->q.ucast_qid);
|
||||
|
||||
nss_qdisc_info("Disable SSDK level0 queue scheduler successful\n");
|
||||
@@ -370,8 +370,8 @@ static void nss_ppe_queue_enable(struct
|
||||
/*
|
||||
* Enable queue enqueue and dequeue.
|
||||
*/
|
||||
- fal_qm_enqueue_ctrl_set(0, npq->q.ucast_qid, true);
|
||||
- fal_scheduler_dequeue_ctrl_set(0, npq->q.ucast_qid, true);
|
||||
+ fal_qm_enqueue_ctrl_set(0, npq->q.ucast_qid, 1);
|
||||
+ fal_scheduler_dequeue_ctrl_set(0, npq->q.ucast_qid, 1);
|
||||
|
||||
nss_qdisc_info("Enable SSDK level0 queue scheduler successful\n");
|
||||
}
|
||||
@@ -535,14 +535,14 @@ static void nss_ppe_all_queue_disable(ui
|
||||
* Disable queue enqueue, dequeue and flush the queue.
|
||||
*/
|
||||
for (offset = 0; offset < nss_ppe_max_get(port_num, NSS_PPE_UCAST_QUEUE); offset++) {
|
||||
- fal_qm_enqueue_ctrl_set(0, qid + offset, false);
|
||||
- fal_scheduler_dequeue_ctrl_set(0, qid + offset, false);
|
||||
+ fal_qm_enqueue_ctrl_set(0, qid + offset, 0);
|
||||
+ fal_scheduler_dequeue_ctrl_set(0, qid + offset, 0);
|
||||
fal_queue_flush(0, port_num, qid + offset);
|
||||
}
|
||||
|
||||
for (offset = 0; offset < nss_ppe_max_get(port_num, NSS_PPE_MCAST_QUEUE); offset++) {
|
||||
- fal_qm_enqueue_ctrl_set(0, mcast_qid + offset, false);
|
||||
- fal_scheduler_dequeue_ctrl_set(0, mcast_qid + offset, false);
|
||||
+ fal_qm_enqueue_ctrl_set(0, mcast_qid + offset, 0);
|
||||
+ fal_scheduler_dequeue_ctrl_set(0, mcast_qid + offset, 0);
|
||||
fal_queue_flush(0, port_num, mcast_qid + offset);
|
||||
}
|
||||
|
||||
@@ -563,13 +563,13 @@ static void nss_ppe_all_queue_enable(uin
|
||||
* Enable queue enqueue and dequeue.
|
||||
*/
|
||||
for (offset = 0; offset < nss_ppe_max_get(port_num, NSS_PPE_UCAST_QUEUE); offset++) {
|
||||
- fal_qm_enqueue_ctrl_set(0, qid + offset, true);
|
||||
- fal_scheduler_dequeue_ctrl_set(0, qid + offset, true);
|
||||
+ fal_qm_enqueue_ctrl_set(0, qid + offset, 1);
|
||||
+ fal_scheduler_dequeue_ctrl_set(0, qid + offset, 1);
|
||||
}
|
||||
|
||||
for (offset = 0; offset < nss_ppe_max_get(port_num, NSS_PPE_MCAST_QUEUE); offset++) {
|
||||
- fal_qm_enqueue_ctrl_set(0, mcast_qid + offset, true);
|
||||
- fal_scheduler_dequeue_ctrl_set(0, mcast_qid + offset, true);
|
||||
+ fal_qm_enqueue_ctrl_set(0, mcast_qid + offset, 1);
|
||||
+ fal_scheduler_dequeue_ctrl_set(0, mcast_qid + offset, 1);
|
||||
}
|
||||
|
||||
nss_qdisc_info("Enable SSDK level0 queue scheduler successful\n");
|
||||
@@ -642,7 +642,7 @@ static int nss_ppe_l1_queue_scheduler_co
|
||||
l1cfg.e_pri = NSS_PPE_PRIORITY_MAX - npq->scheduler.priority;
|
||||
l1cfg.c_drr_id = npq->l1c_drrid;
|
||||
l1cfg.e_drr_id = npq->l1e_drrid;
|
||||
- l1cfg.drr_frame_mode = NSS_PPE_FRAME_CRC;
|
||||
+ l1cfg.drr_frame_mode = (fal_qos_drr_frame_mode_t)NSS_PPE_FRAME_CRC;
|
||||
|
||||
nss_qdisc_trace("SSDK level1 configuration: Port:%d, l0spid:%d, c_drrid:%d, c_pri:%d, c_drr_wt:%d, e_drrid:%d, e_pri:%d, e_drr_wt:%d, l1spid:%d\n",
|
||||
port_num, npq->l0spid, l1cfg.c_drr_id, l1cfg.c_pri, l1cfg.c_drr_wt, l1cfg.e_drr_id, l1cfg.e_pri, l1cfg.e_drr_wt, l1cfg.sp_id);
|
||||
@@ -935,7 +935,7 @@ static int nss_ppe_l0_queue_scheduler_co
|
||||
l0cfg.e_pri = NSS_PPE_PRIORITY_MAX - npq->scheduler.priority;
|
||||
l0cfg.c_drr_id = npq->l0c_drrid;
|
||||
l0cfg.e_drr_id = npq->l0e_drrid;
|
||||
- l0cfg.drr_frame_mode = NSS_PPE_FRAME_CRC;
|
||||
+ l0cfg.drr_frame_mode = (fal_qos_drr_frame_mode_t)NSS_PPE_FRAME_CRC;
|
||||
|
||||
nss_qdisc_trace("SSDK level0 configuration: Port:%d, ucast_qid:%d, c_drrid:%d, c_pri:%d, c_drr_wt:%d, e_drrid:%d, e_pri:%d, e_drr_wt:%d, l0spid:%d\n",
|
||||
port_num, npq->q.ucast_qid, l0cfg.c_drr_id, l0cfg.c_pri, l0cfg.c_drr_wt, l0cfg.e_drr_id, l0cfg.e_pri, l0cfg.e_drr_wt, l0cfg.sp_id);
|
||||
@@ -1059,7 +1059,7 @@ static int nss_ppe_port_shaper_set(struc
|
||||
cfg.c_shaper_en = 1;
|
||||
cfg.cbs = npq->shaper.cburst;
|
||||
cfg.cir = (npq->shaper.crate / 1000) * 8;
|
||||
- cfg.shaper_frame_mode = NSS_PPE_FRAME_CRC;
|
||||
+ cfg.shaper_frame_mode = (fal_shaper_frame_mode_t)NSS_PPE_FRAME_CRC;
|
||||
|
||||
/*
|
||||
* Take HW scaling into consideration
|
||||
@@ -1141,7 +1141,7 @@ static int nss_ppe_flow_shaper_set(struc
|
||||
cfg.e_shaper_en = 1;
|
||||
cfg.ebs = npq->shaper.cburst;
|
||||
cfg.eir = ((npq->shaper.crate / 1000) * 8) - cfg.cir;
|
||||
- cfg.shaper_frame_mode = NSS_PPE_FRAME_CRC;
|
||||
+ cfg.shaper_frame_mode = (fal_shaper_frame_mode_t)NSS_PPE_FRAME_CRC;
|
||||
|
||||
/*
|
||||
* Take HW scaling into consideration
|
||||
@@ -1225,7 +1225,7 @@ static int nss_ppe_queue_shaper_set(stru
|
||||
cfg.e_shaper_en = 1;
|
||||
cfg.ebs = npq->shaper.cburst;
|
||||
cfg.eir = ((npq->shaper.crate / 1000) * 8) - cfg.cir;
|
||||
- cfg.shaper_frame_mode = NSS_PPE_FRAME_CRC;
|
||||
+ cfg.shaper_frame_mode = (fal_shaper_frame_mode_t)NSS_PPE_FRAME_CRC;
|
||||
|
||||
/*
|
||||
* Take HW scaling into consideration
|
||||
@@ -1293,7 +1293,6 @@ static void nss_ppe_attach_free(uint32_t
|
||||
spin_unlock_bh(&ppe_port->lock);
|
||||
|
||||
nss_qdisc_info("port:%d, type:%d, res:%px\n", port, res->type, res);
|
||||
- return;
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -2379,7 +2378,7 @@ int nss_ppe_init(struct Qdisc *sch, stru
|
||||
* nothing useful and thus we don't allocate any resource".
|
||||
*/
|
||||
nss_qdisc_trace("Qdisc parent = %px, handle=%x\n", nq->parent, nq->parent->qos_tag);
|
||||
- if ((nq->parent->npq.sub_type == NSS_SHAPER_CONFIG_PPE_SN_TYPE_HTB)) {
|
||||
+ if (nq->parent->npq.sub_type == NSS_SHAPER_CONFIG_PPE_SN_TYPE_HTB) {
|
||||
nq->npq.level = nq->parent->npq.level;
|
||||
} else {
|
||||
nq->npq.level = nq->parent->npq.level - 1;
|
||||
--- a/nss_qdisc/nss_ppe_mc.c
|
||||
+++ b/nss_qdisc/nss_ppe_mc.c
|
||||
@@ -32,8 +32,8 @@ int nss_ppe_mcast_queue_reset(struct nss
|
||||
return 0;
|
||||
}
|
||||
|
||||
- fal_qm_enqueue_ctrl_set(0, npq->q.mcast_qid, false);
|
||||
- fal_scheduler_dequeue_ctrl_set(0, npq->q.mcast_qid, false);
|
||||
+ fal_qm_enqueue_ctrl_set(0, npq->q.mcast_qid, 0);
|
||||
+ fal_scheduler_dequeue_ctrl_set(0, npq->q.mcast_qid, 0);
|
||||
fal_queue_flush(0, port_num, npq->q.mcast_qid);
|
||||
|
||||
/*
|
||||
@@ -153,8 +153,8 @@ int nss_ppe_mcast_queue_set(struct nss_q
|
||||
}
|
||||
}
|
||||
|
||||
- fal_qm_enqueue_ctrl_set(0, npq->q.mcast_qid, true);
|
||||
- fal_scheduler_dequeue_ctrl_set(0, npq->q.mcast_qid, true);
|
||||
+ fal_qm_enqueue_ctrl_set(0, npq->q.mcast_qid, 1);
|
||||
+ fal_scheduler_dequeue_ctrl_set(0, npq->q.mcast_qid, 1);
|
||||
|
||||
nss_qdisc_info("SSDK multicast queue configuration successful for port:%d\n", port_num);
|
||||
return 0;
|
||||
@@ -164,4 +164,4 @@ fail:
|
||||
npq->q.mcast_qid = 0;
|
||||
npq->q.mcast_valid = 0;
|
||||
return -EINVAL;
|
||||
-}
|
||||
\ No newline at end of file
|
||||
+}
|
||||
--- a/nss_qdisc/nss_wred.c
|
||||
+++ b/nss_qdisc/nss_wred.c
|
||||
@@ -291,7 +291,7 @@ static int nss_wred_change(struct Qdisc
|
||||
|
||||
nim.msg.shaper_configure.config.msg.shaper_node_config.qos_tag = q->nq.qos_tag;
|
||||
nim.msg.shaper_configure.config.msg.shaper_node_config.snc.wred_param.limit = qopt->limit;
|
||||
- nim.msg.shaper_configure.config.msg.shaper_node_config.snc.wred_param.weight_mode = qopt->weight_mode;
|
||||
+ nim.msg.shaper_configure.config.msg.shaper_node_config.snc.wred_param.weight_mode = (nss_shaper_config_wred_weight_mode_t)qopt->weight_mode;
|
||||
nim.msg.shaper_configure.config.msg.shaper_node_config.snc.wred_param.weight_mode_value = qopt->weight_mode_value;
|
||||
nim.msg.shaper_configure.config.msg.shaper_node_config.snc.wred_param.rap.min = qopt->rap.min;
|
||||
nim.msg.shaper_configure.config.msg.shaper_node_config.snc.wred_param.rap.max = qopt->rap.max;
|
||||
--- a/openvpn/plugins/nss_ovpn_sk.c
|
||||
+++ b/openvpn/plugins/nss_ovpn_sk.c
|
||||
@@ -156,7 +156,7 @@ static int nss_ovpn_sk_crypto_key_add(st
|
||||
return -EFAULT;
|
||||
}
|
||||
|
||||
- crypto_cfg.algo = crypto_info.config.algo;
|
||||
+ crypto_cfg.algo = (enum nss_ovpnmgr_algo)crypto_info.config.algo;
|
||||
crypto_cfg.encrypt.cipher_keylen = crypto_info.config.cipher_key_size;
|
||||
crypto_cfg.encrypt.hmac_keylen = crypto_info.config.hmac_key_size;
|
||||
crypto_cfg.decrypt.cipher_keylen = crypto_info.config.cipher_key_size;
|
||||
@@ -364,7 +364,7 @@ static int nss_ovpn_sk_tun_add(struct so
|
||||
tun_hdr.dst_port = tun_data.tun_hdr.dst_port;
|
||||
tun_hdr.hop_limit = tun_data.tun_hdr.hop_limit;
|
||||
|
||||
- crypto_cfg.algo = tun_data.crypto.config.algo;
|
||||
+ crypto_cfg.algo = (enum nss_ovpnmgr_algo)tun_data.crypto.config.algo;
|
||||
crypto_cfg.encrypt.cipher_keylen = tun_data.crypto.config.cipher_key_size;
|
||||
crypto_cfg.encrypt.hmac_keylen = tun_data.crypto.config.hmac_key_size;
|
||||
crypto_cfg.decrypt.cipher_keylen = tun_data.crypto.config.cipher_key_size;
|
||||
@@ -442,7 +442,7 @@ static int nss_ovpn_sk_tun_add(struct so
|
||||
* nss_ovpn_sk_app_dereg()
|
||||
* Deregister application.
|
||||
*/
|
||||
-static int nss_ovpn_sk_app_dereg(struct socket *sock, unsigned long argp)
|
||||
+static int nss_ovpn_sk_app_dereg(struct socket *sock)
|
||||
{
|
||||
struct nss_ovpn_sk_pinfo *pinfo = (struct nss_ovpn_sk_pinfo *)sock->sk;
|
||||
int ret;
|
||||
@@ -491,7 +491,7 @@ static int nss_ovpn_sk_app_reg(struct so
|
||||
return -EFAULT;
|
||||
}
|
||||
|
||||
- ret = nss_ovpnmgr_app_add(pinfo->dev, app.app_mode, (void *)sock);
|
||||
+ ret = nss_ovpnmgr_app_add(pinfo->dev, (enum nss_ovpnmgr_app_mode)app.app_mode, (void *)sock);
|
||||
if (ret) {
|
||||
nss_ovpn_sk_warn("%px: Failed to register application, pid=%u\n", sock, app.pid);
|
||||
dev_put(pinfo->dev);
|
||||
@@ -689,7 +689,7 @@ static int nss_ovpn_sk_recvmsg(struct so
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
- skb = skb_recv_datagram(sk, flags, MSG_DONTWAIT, &ret);
|
||||
+ skb = skb_recv_datagram(sk, flags, &ret);
|
||||
if (!skb) {
|
||||
nss_ovpn_sk_warn("%px: There are no packets in the queue.\n", sock);
|
||||
return -ENOBUFS;
|
||||
@@ -740,7 +740,7 @@ static int nss_ovpn_sk_ioctl(struct sock
|
||||
case NSS_OVPN_SK_SIOC_APP_REG:
|
||||
return nss_ovpn_sk_app_reg(sock, argp);
|
||||
case NSS_OVPN_SK_SIOC_APP_DEREG:
|
||||
- return nss_ovpn_sk_app_dereg(sock, argp);
|
||||
+ return nss_ovpn_sk_app_dereg(sock);
|
||||
case NSS_OVPN_SK_SIOC_TUN_ADD:
|
||||
return nss_ovpn_sk_tun_add(sock, argp);
|
||||
case NSS_OVPN_SK_SIOC_TUN_DEL:
|
||||
@@ -773,15 +773,12 @@ static const struct proto_ops nss_ovpn_s
|
||||
.ioctl = nss_ovpn_sk_ioctl,
|
||||
.listen = sock_no_listen,
|
||||
.shutdown = sock_no_shutdown,
|
||||
- .getsockopt = sock_no_getsockopt,
|
||||
.mmap = sock_no_mmap,
|
||||
- .sendpage = sock_no_sendpage,
|
||||
.sendmsg = nss_ovpn_sk_sendmsg,
|
||||
.recvmsg = nss_ovpn_sk_recvmsg,
|
||||
.poll = datagram_poll,
|
||||
.bind = sock_no_bind,
|
||||
.release = nss_ovpn_sk_release,
|
||||
- .setsockopt = sock_no_setsockopt,
|
||||
.accept = sock_no_accept,
|
||||
};
|
||||
|
||||
--- a/pvxlanmgr/nss_pvxlanmgr.c
|
||||
+++ b/pvxlanmgr/nss_pvxlanmgr.c
|
||||
@@ -408,7 +408,7 @@ nss_pvxlanmgr_status_t nss_pvxlanmgr_net
|
||||
if (ret != NSS_TX_SUCCESS) {
|
||||
nss_pvxlanmgr_warn("%px: Tunnel disable failed: %d\n", dev, ret);
|
||||
dev_put(dev);
|
||||
- return ret;
|
||||
+ return (nss_pvxlanmgr_status_t)ret;
|
||||
}
|
||||
|
||||
ret = nss_pvxlanmgr_tunnel_tx_msg_disable(priv->pvxlan_ctx, priv->if_num_outer);
|
||||
@@ -416,11 +416,11 @@ nss_pvxlanmgr_status_t nss_pvxlanmgr_net
|
||||
nss_pvxlanmgr_warn("%px: Tunnel disable failed: %d\n", dev, ret);
|
||||
nss_pvxlanmgr_tunnel_tx_msg_enable(priv->pvxlan_ctx, priv->if_num_host_inner, priv->if_num_outer);
|
||||
dev_put(dev);
|
||||
- return ret;
|
||||
+ return (nss_pvxlanmgr_status_t)ret;
|
||||
}
|
||||
|
||||
dev_put(dev);
|
||||
- return ret;
|
||||
+ return (nss_pvxlanmgr_status_t)ret;
|
||||
}
|
||||
EXPORT_SYMBOL(nss_pvxlanmgr_netdev_disable);
|
||||
|
||||
@@ -440,7 +440,7 @@ nss_pvxlanmgr_status_t nss_pvxlanmgr_net
|
||||
if (ret != NSS_TX_SUCCESS) {
|
||||
nss_pvxlanmgr_warn("%px: Tunnel enable failed: %d\n", dev, ret);
|
||||
dev_put(dev);
|
||||
- return ret;
|
||||
+ return (nss_pvxlanmgr_status_t)ret;
|
||||
}
|
||||
|
||||
ret = nss_pvxlanmgr_tunnel_tx_msg_enable(priv->pvxlan_ctx, priv->if_num_outer, priv->if_num_host_inner);
|
||||
@@ -448,11 +448,11 @@ nss_pvxlanmgr_status_t nss_pvxlanmgr_net
|
||||
nss_pvxlanmgr_warn("%px: Tunnel enable failed: %d\n", dev, ret);
|
||||
nss_pvxlanmgr_tunnel_tx_msg_disable(priv->pvxlan_ctx, priv->if_num_host_inner);
|
||||
dev_put(dev);
|
||||
- return ret;
|
||||
+ return (nss_pvxlanmgr_status_t)ret;
|
||||
}
|
||||
|
||||
dev_put(dev);
|
||||
- return ret;
|
||||
+ return (nss_pvxlanmgr_status_t)ret;
|
||||
}
|
||||
EXPORT_SYMBOL(nss_pvxlanmgr_netdev_enable);
|
||||
|
||||
@@ -524,7 +524,7 @@ EXPORT_SYMBOL(nss_pvxlanmgr_netdev_destr
|
||||
* nss_pvxlanmgr_netdev_create()
|
||||
* API to create a Pvxlan netdev
|
||||
*/
|
||||
-struct net_device *nss_pvxlanmgr_netdev_create()
|
||||
+struct net_device *nss_pvxlanmgr_netdev_create(void)
|
||||
{
|
||||
struct nss_pvxlanmgr_priv *priv;
|
||||
struct net_device *dev;
|
||||
--- a/pvxlanmgr/nss_pvxlanmgr_tunnel.c
|
||||
+++ b/pvxlanmgr/nss_pvxlanmgr_tunnel.c
|
||||
@@ -67,7 +67,7 @@ static inline nss_pvxlanmgr_status_t nss
|
||||
}
|
||||
|
||||
dev_put(dev);
|
||||
- return status;
|
||||
+ return (nss_pvxlanmgr_status_t)status;
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -110,7 +110,7 @@ static inline nss_pvxlanmgr_status_t nss
|
||||
}
|
||||
|
||||
dev_put(dev);
|
||||
- return status;
|
||||
+ return (nss_pvxlanmgr_status_t)status;
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -138,7 +138,7 @@ static nss_pvxlanmgr_status_t nss_pvxlan
|
||||
status = nss_pvxlanmgr_tunnel_tx_msg(ctx, &pvxlanmsg, if_num, NSS_PVXLAN_MSG_TYPE_TUNNEL_DESTROY_RULE, sizeof(struct nss_pvxlan_rule_msg));
|
||||
if (status != NSS_TX_SUCCESS) {
|
||||
nss_pvxlanmgr_warn("%px: ctx: create encap data tunnel error %d\n", ctx, status);
|
||||
- return status;
|
||||
+ return (nss_pvxlanmgr_status_t)status;
|
||||
}
|
||||
|
||||
return NSS_PVXLANMGR_SUCCESS;
|
||||
@@ -169,7 +169,7 @@ static nss_pvxlanmgr_status_t nss_pvxlan
|
||||
status = nss_pvxlanmgr_tunnel_tx_msg(ctx, &pvxlanmsg, if_num, NSS_PVXLAN_MSG_TYPE_TUNNEL_CREATE_RULE, sizeof(struct nss_pvxlan_rule_msg));
|
||||
if (status != NSS_TX_SUCCESS) {
|
||||
nss_pvxlanmgr_warn("%px: ctx: create encap data tunnel error %d\n", ctx, status);
|
||||
- return status;
|
||||
+ return (nss_pvxlanmgr_status_t)status;
|
||||
}
|
||||
|
||||
return NSS_PVXLANMGR_SUCCESS;
|
||||
@@ -482,7 +482,7 @@ nss_pvxlanmgr_status_t nss_pvxlanmgr_tun
|
||||
if_num_outer = priv->if_num_outer;
|
||||
|
||||
status = nss_pvxlanmgr_tunnel_pvxlan_rule_create(priv->pvxlan_ctx, if_num_host_inner, &pvxlan_rule);
|
||||
- nss_pvxlanmgr_info("%px: dynamic interface if_num is :%d and pvxlan tunnel status:%d\n", dev, if_num_host_inner, status);
|
||||
+ nss_pvxlanmgr_info("%px: dynamic interface if_num is :%d, if_num_outer :%d, and pvxlan tunnel status:%d\n", dev, if_num_host_inner, if_num_outer, status);
|
||||
if (status != NSS_PVXLANMGR_SUCCESS) {
|
||||
nss_pvxlanmgr_warn("%px: %d: PVXLAN rule create failed with status: %d\n", dev, if_num_host_inner, status);
|
||||
dev_put(dev);
|
||||
@@ -586,7 +586,7 @@ nss_pvxlanmgr_status_t nss_pvxlanmgr_tun
|
||||
if_num_outer = priv->if_num_outer;
|
||||
|
||||
status = nss_pvxlanmgr_tunnel_pvxlan_rule_create(priv->pvxlan_ctx, if_num_host_inner, &pvxlan_rule);
|
||||
- nss_pvxlanmgr_info("%px: dynamic interface if_num is :%d and pvxlan tunnel status:%d\n", dev, if_num_host_inner, status);
|
||||
+ nss_pvxlanmgr_info("%px: dynamic interface if_num is :%d, if_num_outer :%d, and pvxlan tunnel status:%d\n", dev, if_num_host_inner, if_num_outer, status);
|
||||
if (status != NSS_PVXLANMGR_SUCCESS) {
|
||||
nss_pvxlanmgr_warn("%px: %d: PVXLAN rule create failed with status: %d\n", dev, if_num_host_inner, status);
|
||||
dev_put(dev);
|
||||
--- a/tls/nss_tlsmgr_crypto.c
|
||||
+++ b/tls/nss_tlsmgr_crypto.c
|
||||
@@ -250,7 +250,7 @@ nss_tlsmgr_status_t nss_tlsmgr_crypto_up
|
||||
status = nss_tls_tx_msg_sync(ctx->nss_ctx, ctx->ifnum, msg_type, sizeof(*ntcu), &ntm);
|
||||
if (status != NSS_TX_SUCCESS) {
|
||||
nss_tlsmgr_warn("%px: Failed to configure decap, status:%d, error:%d", ctx, status, ntm.cm.error);
|
||||
- return false;
|
||||
+ return (nss_tlsmgr_status_t)false;
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -361,7 +361,7 @@ nss_tlsmgr_status_t nss_tlsmgr_crypto_up
|
||||
if (status != NSS_TX_SUCCESS) {
|
||||
nss_tlsmgr_crypto_free(crypto);
|
||||
nss_tlsmgr_warn("%px: Failed to configure decap, status:%d, error:%d", ctx, status, ntm.cm.error);
|
||||
- return false;
|
||||
+ return (nss_tlsmgr_status_t)false;
|
||||
}
|
||||
|
||||
/*
|
||||
--- a/vlan/nss_vlan_mgr.c
|
||||
+++ b/vlan/nss_vlan_mgr.c
|
||||
@@ -448,8 +448,8 @@ static int nss_vlan_mgr_bond_configure_p
|
||||
/*
|
||||
* Fields for match
|
||||
*/
|
||||
- v->eg_xlt_rule.vsi_valid = true; /* Use vsi as search key*/
|
||||
- v->eg_xlt_rule.vsi_enable = true; /* Use vsi as search key*/
|
||||
+ v->eg_xlt_rule.vsi_valid = 1; /* Use vsi as search key*/
|
||||
+ v->eg_xlt_rule.vsi_enable = 1; /* Use vsi as search key*/
|
||||
v->eg_xlt_rule.vsi = vsi; /* Use vsi as search key*/
|
||||
v->eg_xlt_rule.s_tagged = 0x7; /* Accept tagged/untagged/priority tagged svlan */
|
||||
v->eg_xlt_rule.c_tagged = 0x7; /* Accept tagged/untagged/priority tagged cvlan */
|
||||
@@ -612,8 +612,8 @@ static int nss_vlan_mgr_configure_ppe(st
|
||||
/*
|
||||
* Fields for match
|
||||
*/
|
||||
- v->eg_xlt_rule.vsi_valid = true; /* Use vsi as search key*/
|
||||
- v->eg_xlt_rule.vsi_enable = true; /* Use vsi as search key*/
|
||||
+ v->eg_xlt_rule.vsi_valid = 1; /* Use vsi as search key*/
|
||||
+ v->eg_xlt_rule.vsi_enable = 1; /* Use vsi as search key*/
|
||||
v->eg_xlt_rule.vsi = vsi; /* Use vsi as search key*/
|
||||
v->eg_xlt_rule.s_tagged = 0x7; /* Accept tagged/untagged/priority tagged svlan */
|
||||
v->eg_xlt_rule.c_tagged = 0x7; /* Accept tagged/untagged/priority tagged cvlan */
|
||||
@@ -1805,8 +1805,8 @@ void nss_vlan_mgr_add_vlan_rule(struct n
|
||||
/*
|
||||
* Fields for match
|
||||
*/
|
||||
- eg_xlt_rule.vsi_valid = true; /* Use vsi as search key */
|
||||
- eg_xlt_rule.vsi_enable = true; /* Use vsi as search key */
|
||||
+ eg_xlt_rule.vsi_valid = 1; /* Use vsi as search key */
|
||||
+ eg_xlt_rule.vsi_enable = 1; /* Use vsi as search key */
|
||||
eg_xlt_rule.vsi = bridge_vsi; /* Use vsi as search key */
|
||||
eg_xlt_rule.s_tagged = 0x7; /* Accept tagged/untagged/priority tagged svlan */
|
||||
eg_xlt_rule.c_tagged = 0x7; /* Accept tagged/untagged/priority tagged cvlan */
|
||||
@@ -1873,8 +1873,8 @@ void nss_vlan_mgr_del_vlan_rule(struct n
|
||||
/*
|
||||
* Fields for match
|
||||
*/
|
||||
- eg_xlt_rule.vsi_valid = true; /* Use vsi as search key */
|
||||
- eg_xlt_rule.vsi_enable = true; /* Use vsi as search key */
|
||||
+ eg_xlt_rule.vsi_valid = 1; /* Use vsi as search key */
|
||||
+ eg_xlt_rule.vsi_enable = 1; /* Use vsi as search key */
|
||||
eg_xlt_rule.vsi = bridge_vsi; /* Use vsi as search key */
|
||||
eg_xlt_rule.s_tagged = 0x7; /* Accept tagged/untagged/priority tagged svlan */
|
||||
eg_xlt_rule.c_tagged = 0x7; /* Accept tagged/untagged/priority tagged cvlan */
|
||||
--- a/wifi_meshmgr/nss_wifi_meshmgr.c
|
||||
+++ b/wifi_meshmgr/nss_wifi_meshmgr.c
|
||||
@@ -1637,9 +1637,6 @@ nss_wifi_meshmgr_config_mesh_exception(n
|
||||
break;
|
||||
|
||||
case NSS_WIFI_MESH_US_MESH_PROXY_NOT_FOUND:
|
||||
- ifnum = decap_ifnum;
|
||||
- break;
|
||||
-
|
||||
case NSS_WIFI_MESH_US_MESH_PATH_NOT_FOUND:
|
||||
ifnum = decap_ifnum;
|
||||
break;
|
||||
Loading…
Reference in New Issue
Block a user