Initial commit
This commit is contained in:
@@ -0,0 +1,47 @@
|
||||
From f8cf061454a3707c0c84d0fca685e84455f91362 Mon Sep 17 00:00:00 2001
|
||||
From: Suruchi Suman <surusuma@codeaurora.org>
|
||||
Date: Tue, 3 Dec 2019 12:57:38 +0530
|
||||
Subject: [qca-nss-drv] Exported set nexhop function from drv.
|
||||
|
||||
Change-Id: I3df6658bef72fe574ac9acfb7aac61785769766f
|
||||
Signed-off-by: Suruchi Suman <surusuma@codeaurora.org>
|
||||
---
|
||||
nss_phys_if.c | 9 ++++++++-
|
||||
1 file changed, 8 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/nss_phys_if.c b/nss_phys_if.c
|
||||
index 4f9b20f..0c58d95 100644
|
||||
--- a/nss_phys_if.c
|
||||
+++ b/nss_phys_if.c
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
**************************************************************************
|
||||
- * Copyright (c) 2014-2019, The Linux Foundation. All rights reserved.
|
||||
+ * Copyright (c) 2014-2020, The Linux Foundation. All rights reserved.
|
||||
* Permission to use, copy, modify, and/or distribute this software for
|
||||
* any purpose with or without fee is hereby granted, provided that the
|
||||
* above copyright notice and this permission notice appear in all copies.
|
||||
@@ -583,6 +583,12 @@ nss_tx_status_t nss_phys_if_set_nexthop(struct nss_ctx_instance *nss_ctx, uint32
|
||||
struct nss_phys_if_msg nim;
|
||||
|
||||
NSS_VERIFY_CTX_MAGIC(nss_ctx);
|
||||
+
|
||||
+ if (nexthop >= NSS_MAX_NET_INTERFACES) {
|
||||
+ nss_warning("%p: Invalid nexthop interface number: %d", nss_ctx, nexthop);
|
||||
+ return NSS_TX_FAILURE_BAD_PARAM;
|
||||
+ }
|
||||
+
|
||||
nss_info("%p: Phys If nexthop will be set to %d, id:%d\n", nss_ctx, nexthop, if_num);
|
||||
|
||||
nss_cmn_msg_init(&nim.cm, if_num, NSS_PHYS_IF_SET_NEXTHOP,
|
||||
@@ -591,6 +597,7 @@ nss_tx_status_t nss_phys_if_set_nexthop(struct nss_ctx_instance *nss_ctx, uint32
|
||||
|
||||
return nss_phys_if_msg_sync(nss_ctx, &nim);
|
||||
}
|
||||
+EXPORT_SYMBOL(nss_phys_if_set_nexthop);
|
||||
|
||||
/*
|
||||
* nss_get_state()
|
||||
--
|
||||
cgit v1.1
|
||||
|
||||
Reference in New Issue
Block a user