Fri, Apr 07, 2017 at 10:27:59PM CEST, stcheng_89(a)hotmail.com wrote:
In the patch comment or in the thread?
Please send v2 of the patch, with the description
>
>
>Shuotian
>
>
>________________________________
>From: Jiri Pirko <jiri(a)resnulli.us>
>Sent: Friday, April 7, 2017 6:36 AM
>To: Shuotian Cheng
>Cc: libteam(a)lists.fedorahosted.org
>Subject: Re: [patch libteam] libteam: Add team_get_port_enabled function
>
>Fri, Apr 07, 2017 at 07:50:59AM CEST, stcheng_89(a)hotmail.com wrote:
>
>
>Please provide some basic description about what patch does, motivation,
>etc.
>
>Thanks.
>
>
>>From: Shuotian Cheng <stcheng_89(a)hotmail.com>
>>
>>Signed-off-by: Shuotian Cheng <stcheng_89(a)hotmail.com>
>>---
>> include/team.h | 2 ++
>> libteam/libteam.c | 22 ++++++++++++++++++++++
>> 2 files changed, 24 insertions(+)
>>
>>diff --git a/include/team.h b/include/team.h
>>index 20ebcf6..9ae517d 100644
>>--- a/include/team.h
>>+++ b/include/team.h
>>@@ -68,6 +68,8 @@ int team_get_bpf_hash_func(struct team_handle *th, struct
sock_fprog *fp);
>> int team_set_bpf_hash_func(struct team_handle *th, const struct sock_fprog *fp);
>> int team_set_port_enabled(struct team_handle *th,
>> uint32_t port_ifindex, bool val);
>>+int team_get_port_enabled(struct team_handle *th,
>>+ uint32_t port_ifindex, bool *enabled);
>> int team_set_port_user_linkup_enabled(struct team_handle *th,
>> uint32_t port_ifindex, bool val);
>> int team_get_port_user_linkup(struct team_handle *th,
>>diff --git a/libteam/libteam.c b/libteam/libteam.c
>>index d5f22cd..77a06dd 100644
>>--- a/libteam/libteam.c
>>+++ b/libteam/libteam.c
>>@@ -1341,6 +1341,28 @@ int team_set_port_enabled(struct team_handle *th,
>> /**
>> * @param th libteam library context
>> * @param port_ifindex port interface index
>>+ * @param enabled where the enabled state will be stored
>>+ *
>>+ * @details Gets enabled state for port identified by port_ifindex
>>+ *
>>+ * @return Zero on success or negative number in case of an error.
>>+ **/
>>+TEAM_EXPORT
>>+int team_get_port_enabled(struct team_handle *th,
>>+ uint32_t port_ifindex, bool *enabled)
>>+{
>>+ struct team_option *option;
>>+
>>+ option = team_get_option(th, "np", "enabled",
port_ifindex);
>>+ if (!option)
>>+ return -ENOENT;
>>+ *enabled = team_get_option_value_bool(option);
>>+ return 0;
>>+}
>>+
>>+/**
>>+ * @param th libteam library context
>>+ * @param port_ifindex port interface index
>> * @param val boolean value
>> *
>> * @details Enables or disable user linkup for port identified by port_ifindex
>>--
>>2.1.4
>>_______________________________________________
>>libteam mailing list -- libteam(a)lists.fedorahosted.org
>>To unsubscribe send an email to libteam-leave(a)lists.fedorahosted.org