Blame SOURCES/fcoe-utils-v1.0.29-37-fipvlan-do-fipvlan-only-on-specified-interface.patch
|
|
e343c9 |
From 4ea124c12b527457edc12dd1e65da2cc120ad928 Mon Sep 17 00:00:00 2001
|
|
|
e343c9 |
From: Vasu Dev <vasu.dev@intel.com>
|
|
|
e343c9 |
Date: Mon, 2 Feb 2015 15:12:37 -0800
|
|
|
e343c9 |
Subject: [PATCH] fipvlan: do fipvlan only on specified interface
|
|
|
e343c9 |
|
|
|
e343c9 |
Skip interface not specified on the command line to block inadvertent
|
|
|
e343c9 |
fcoe start on them.
|
|
|
e343c9 |
|
|
|
e343c9 |
This means now fipvlan will do VLAN discovery only on the specified
|
|
|
e343c9 |
interfaces in non-auto mode and therefore in turn will start fcoe
|
|
|
e343c9 |
only on them with -s option.
|
|
|
e343c9 |
|
|
|
e343c9 |
Signed-off-by: Vasu Dev <vasu.dev@intel.com>
|
|
|
e343c9 |
---
|
|
|
e343c9 |
fipvlan.c | 16 ++++++++++++++--
|
|
|
e343c9 |
1 file changed, 14 insertions(+), 2 deletions(-)
|
|
|
e343c9 |
|
|
|
e343c9 |
diff --git a/fipvlan.c b/fipvlan.c
|
|
|
e343c9 |
index 9e494ee..288b011 100644
|
|
|
e343c9 |
--- a/fipvlan.c
|
|
|
e343c9 |
+++ b/fipvlan.c
|
|
|
e343c9 |
@@ -841,9 +841,21 @@ static int send_vlan_requests(void)
|
|
|
e343c9 |
{
|
|
|
e343c9 |
struct iff *iff;
|
|
|
e343c9 |
int skipped = 0;
|
|
|
e343c9 |
+ int i;
|
|
|
e343c9 |
|
|
|
e343c9 |
- TAILQ_FOREACH(iff, &interfaces, list_node) {
|
|
|
e343c9 |
- skipped += probe_fip_interface(iff);
|
|
|
e343c9 |
+ if (config.automode) {
|
|
|
e343c9 |
+ TAILQ_FOREACH(iff, &interfaces, list_node) {
|
|
|
e343c9 |
+ skipped += probe_fip_interface(iff);
|
|
|
e343c9 |
+ }
|
|
|
e343c9 |
+ } else {
|
|
|
e343c9 |
+ for (i = 0; i < config.namec; i++) {
|
|
|
e343c9 |
+ iff = lookup_iff(0, config.namev[i]);
|
|
|
e343c9 |
+ if (!iff) {
|
|
|
e343c9 |
+ skipped++;
|
|
|
e343c9 |
+ continue;
|
|
|
e343c9 |
+ }
|
|
|
e343c9 |
+ skipped += probe_fip_interface(iff);
|
|
|
e343c9 |
+ }
|
|
|
e343c9 |
}
|
|
|
e343c9 |
return skipped;
|
|
|
e343c9 |
}
|
|
|
e343c9 |
--
|
|
|
e343c9 |
2.1.0
|
|
|
e343c9 |
|