diff for duplicates of <5565FAC8.4020906@solarflare.com> diff --git a/a/1.txt b/N1/1.txt index 40ec004..0f52a28 100644 --- a/a/1.txt +++ b/N1/1.txt @@ -26,10 +26,10 @@ Acked-by: Edward Cree <ecree@solarflare.com> > --- a/include/linux/if_link.h > +++ b/include/linux/if_link.h > @@ -15,5 +15,6 @@ struct ifla_vf_info { -> __u32 min_tx_rate; -> __u32 max_tx_rate; -> __u32 rss_query_en; -> + __u32 trusted; +> __u32 min_tx_rate; +> __u32 max_tx_rate; +> __u32 rss_query_en; +> + __u32 trusted; > }; > #endif /* _LINUX_IF_LINK_H */ > diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h @@ -38,109 +38,107 @@ Acked-by: Edward Cree <ecree@solarflare.com> > +++ b/include/linux/netdevice.h > @@ -873,6 +873,7 @@ typedef u16 (*select_queue_fallback_t)(struct net_device *dev, > * int (*ndo_set_vf_rate)(struct net_device *dev, int vf, int min_tx_rate, -> * int max_tx_rate); +> * int max_tx_rate); > * int (*ndo_set_vf_spoofchk)(struct net_device *dev, int vf, bool setting); > + * int (*ndo_set_vf_trust)(struct net_device *dev, int vf, bool setting); > * int (*ndo_get_vf_config)(struct net_device *dev, -> * int vf, struct ifla_vf_info *ivf); +> * int vf, struct ifla_vf_info *ivf); > * int (*ndo_set_vf_link_state)(struct net_device *dev, int vf, int link_state); > @@ -1095,6 +1096,8 @@ struct net_device_ops { -> int max_tx_rate); -> int (*ndo_set_vf_spoofchk)(struct net_device *dev, -> int vf, bool setting); -> + int (*ndo_set_vf_trust)(struct net_device *dev, -> + int vf, bool setting); -> int (*ndo_get_vf_config)(struct net_device *dev, -> int vf, -> struct ifla_vf_info *ivf); +> int max_tx_rate); +> int (*ndo_set_vf_spoofchk)(struct net_device *dev, +> int vf, bool setting); +> + int (*ndo_set_vf_trust)(struct net_device *dev, +> + int vf, bool setting); +> int (*ndo_get_vf_config)(struct net_device *dev, +> int vf, +> struct ifla_vf_info *ivf); > diff --git a/include/uapi/linux/if_link.h b/include/uapi/linux/if_link.h > index afccc93..f05549c 100644 > --- a/include/uapi/linux/if_link.h > +++ b/include/uapi/linux/if_link.h > @@ -480,6 +480,7 @@ enum { -> IFLA_VF_RSS_QUERY_EN, /* RSS Redirection Table and Hash Key query -> * on/off switch -> */ -> + IFLA_VF_TRUST, /* Trust VF */ -> __IFLA_VF_MAX, +> IFLA_VF_RSS_QUERY_EN, /* RSS Redirection Table and Hash Key query +> * on/off switch +> */ +> + IFLA_VF_TRUST, /* Trust VF */ +> __IFLA_VF_MAX, > }; -> +> > @@ -529,6 +530,11 @@ struct ifla_vf_rss_query_en { -> __u32 setting; +> __u32 setting; > }; -> +> > +struct ifla_vf_trust { -> + __u32 vf; -> + __u32 setting; +> + __u32 vf; +> + __u32 setting; > +}; > + > /* VF ports management section > * -> * Nested layout of set/get msg is: +> * Nested layout of set/get msg is: > diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c > index 141ccc3..1d9205a 100644 > --- a/net/core/rtnetlink.c > +++ b/net/core/rtnetlink.c > @@ -819,7 +819,8 @@ static inline int rtnl_vfinfo_size(const struct net_device *dev, -> nla_total_size(sizeof(struct ifla_vf_spoofchk)) + -> nla_total_size(sizeof(struct ifla_vf_rate)) + -> nla_total_size(sizeof(struct ifla_vf_link_state)) + -> - nla_total_size(sizeof(struct ifla_vf_rss_query_en))); -> + nla_total_size(sizeof(struct ifla_vf_rss_query_en)) + -> + nla_total_size(sizeof(struct ifla_vf_trust))); -> return size; -> } else -> return 0; +> nla_total_size(sizeof(struct ifla_vf_spoofchk)) + +> nla_total_size(sizeof(struct ifla_vf_rate)) + +> nla_total_size(sizeof(struct ifla_vf_link_state)) + +> - nla_total_size(sizeof(struct ifla_vf_rss_query_en))); +> + nla_total_size(sizeof(struct ifla_vf_rss_query_en)) + +> + nla_total_size(sizeof(struct ifla_vf_trust))); +> return size; +> } else +> return 0; > @@ -1138,6 +1139,7 @@ static int rtnl_fill_ifinfo(struct sk_buff *skb, struct net_device *dev, -> struct ifla_vf_spoofchk vf_spoofchk; -> struct ifla_vf_link_state vf_linkstate; -> struct ifla_vf_rss_query_en vf_rss_query_en; -> + struct ifla_vf_trust vf_trust; -> -> /* -> * Not all SR-IOV capable drivers support the +> struct ifla_vf_spoofchk vf_spoofchk; +> struct ifla_vf_link_state vf_linkstate; +> struct ifla_vf_rss_query_en vf_rss_query_en; +> + struct ifla_vf_trust vf_trust; +> +> /* +> * Not all SR-IOV capable drivers support the > @@ -1147,6 +1149,7 @@ static int rtnl_fill_ifinfo(struct sk_buff *skb, struct net_device *dev, -> */ -> ivi.spoofchk = -1; -> ivi.rss_query_en = -1; -> + ivi.trusted = -1; -> memset(ivi.mac, 0, sizeof(ivi.mac)); -> /* The default value for VF link state is "auto" -> * IFLA_VF_LINK_STATE_AUTO which equals zero +> */ +> ivi.spoofchk = -1; +> ivi.rss_query_en = -1; +> + ivi.trusted = -1; +> memset(ivi.mac, 0, sizeof(ivi.mac)); +> /* The default value for VF link state is "auto" +> * IFLA_VF_LINK_STATE_AUTO which equals zero > @@ -1160,7 +1163,8 @@ static int rtnl_fill_ifinfo(struct sk_buff *skb, struct net_device *dev, -> vf_tx_rate.vf = -> vf_spoofchk.vf = -> vf_linkstate.vf = -> - vf_rss_query_en.vf = ivi.vf; -> + vf_rss_query_en.vf = -> + vf_trust.vf = ivi.vf; -> -> memcpy(vf_mac.mac, ivi.mac, sizeof(ivi.mac)); -> vf_vlan.vlan = ivi.vlan; +> vf_tx_rate.vf = +> vf_spoofchk.vf = +> vf_linkstate.vf = +> - vf_rss_query_en.vf = ivi.vf; +> + vf_rss_query_en.vf = +> + vf_trust.vf = ivi.vf; +> +> memcpy(vf_mac.mac, ivi.mac, sizeof(ivi.mac)); +> vf_vlan.vlan = ivi.vlan; > @@ -1171,6 +1175,7 @@ static int rtnl_fill_ifinfo(struct sk_buff *skb, struct net_device *dev, -> vf_spoofchk.setting = ivi.spoofchk; -> vf_linkstate.link_state = ivi.linkstate; -> vf_rss_query_en.setting = ivi.rss_query_en; -> + vf_trust.setting = ivi.trusted; -> vf = nla_nest_start(skb, IFLA_VF_INFO); -> if (!vf) { -> nla_nest_cancel(skb, vfinfo); +> vf_spoofchk.setting = ivi.spoofchk; +> vf_linkstate.link_state = ivi.linkstate; +> vf_rss_query_en.setting = ivi.rss_query_en; +> + vf_trust.setting = ivi.trusted; +> vf = nla_nest_start(skb, IFLA_VF_INFO); +> if (!vf) { +> nla_nest_cancel(skb, vfinfo); > @@ -1524,6 +1529,16 @@ static int do_setvfinfo(struct net_device *dev, struct nlattr *attr) -> ivrssq_en->setting); -> break; -> } -> + case IFLA_VF_TRUST: { -> + struct ifla_vf_trust *ivt; +> ivrssq_en->setting); +> break; +> } +> + case IFLA_VF_TRUST: { +> + struct ifla_vf_trust *ivt; > + -> + ivt = nla_data(vf); -> + err = -EOPNOTSUPP; -> + if (ops->ndo_set_vf_trust) -> + err = ops->ndo_set_vf_trust(dev, ivt->vf, -> + ivt->setting); -> + break; -> + } -> default: -> err = -EINVAL; -> break; - -The information contained in this message is confidential and is intended for the addressee(s) only. If you have received this message in error, please notify the sender immediately and delete the message. Unless you are an addressee (or authorized to receive for an addressee), you may not use, copy or disclose to anyone this message or any information contained in this message. The unauthorized use, disclosure, copying or alteration of this message is strictly prohibited. +> + ivt = nla_data(vf); +> + err = -EOPNOTSUPP; +> + if (ops->ndo_set_vf_trust) +> + err = ops->ndo_set_vf_trust(dev, ivt->vf, +> + ivt->setting); +> + break; +> + } +> default: +> err = -EINVAL; +> break; diff --git a/a/content_digest b/N1/content_digest index 76563ed..b34ef02 100644 --- a/a/content_digest +++ b/N1/content_digest @@ -1,8 +1,21 @@ "ref\07F861DC0615E0C47A872E6F3C5FCDDBD05EB28C7@BPXM14GP.gisp.nec.co.jp\0" "From\0Edward Cree <ecree@solarflare.com>\0" - "Subject\0[Intel-wired-lan] [PATCH v5 2/3] if_link: Add control trust VF\0" + "Subject\0Re: [PATCH v5 2/3] if_link: Add control trust VF\0" "Date\0Wed, 27 May 2015 18:11:36 +0100\0" - "To\0intel-wired-lan@osuosl.org\0" + "To\0Hiroshi Shimamoto <h-shimamoto@ct.jp.nec.com>\0" + "Cc\0Jeff Kirsher <jeffrey.t.kirsher@intel.com>" + intel-wired-lan@lists.osuosl.org <intel-wired-lan@lists.osuosl.org> + Skidmore + Donald C <donald.c.skidmore@intel.com> + Or Gerlitz <gerlitz.or@gmail.com> + David Miller <davem@davemloft.net> + Linux Netdev List <netdev@vger.kernel.org> + nhorman@redhat.com <nhorman@redhat.com> + sassmann@redhat.com <sassmann@redhat.com> + jogreene@redhat.com <jogreene@redhat.com> + Choi + Sy Jong <sy.jong.choi@intel.com> + " Rony Efraim <ronye@mellanox.com>\0" "\00:1\0" "b\0" "On 20/05/15 01:04, Hiroshi Shimamoto wrote:\n" @@ -33,10 +46,10 @@ "> --- a/include/linux/if_link.h\n" "> +++ b/include/linux/if_link.h\n" "> @@ -15,5 +15,6 @@ struct ifla_vf_info {\n" - "> __u32 min_tx_rate;\n" - "> __u32 max_tx_rate;\n" - "> __u32 rss_query_en;\n" - "> + __u32 trusted;\n" + "> \t__u32 min_tx_rate;\n" + "> \t__u32 max_tx_rate;\n" + "> \t__u32 rss_query_en;\n" + "> +\t__u32 trusted;\n" "> };\n" "> #endif /* _LINUX_IF_LINK_H */\n" "> diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h\n" @@ -45,111 +58,109 @@ "> +++ b/include/linux/netdevice.h\n" "> @@ -873,6 +873,7 @@ typedef u16 (*select_queue_fallback_t)(struct net_device *dev,\n" "> * int (*ndo_set_vf_rate)(struct net_device *dev, int vf, int min_tx_rate,\n" - "> * int max_tx_rate);\n" + "> *\t\t\t int max_tx_rate);\n" "> * int (*ndo_set_vf_spoofchk)(struct net_device *dev, int vf, bool setting);\n" "> + * int (*ndo_set_vf_trust)(struct net_device *dev, int vf, bool setting);\n" "> * int (*ndo_get_vf_config)(struct net_device *dev,\n" - "> * int vf, struct ifla_vf_info *ivf);\n" + "> *\t\t\t int vf, struct ifla_vf_info *ivf);\n" "> * int (*ndo_set_vf_link_state)(struct net_device *dev, int vf, int link_state);\n" "> @@ -1095,6 +1096,8 @@ struct net_device_ops {\n" - "> int max_tx_rate);\n" - "> int (*ndo_set_vf_spoofchk)(struct net_device *dev,\n" - "> int vf, bool setting);\n" - "> + int (*ndo_set_vf_trust)(struct net_device *dev,\n" - "> + int vf, bool setting);\n" - "> int (*ndo_get_vf_config)(struct net_device *dev,\n" - "> int vf,\n" - "> struct ifla_vf_info *ivf);\n" + "> \t\t\t\t\t\t int max_tx_rate);\n" + "> \tint\t\t\t(*ndo_set_vf_spoofchk)(struct net_device *dev,\n" + "> \t\t\t\t\t\t int vf, bool setting);\n" + "> +\tint\t\t\t(*ndo_set_vf_trust)(struct net_device *dev,\n" + "> +\t\t\t\t\t\t int vf, bool setting);\n" + "> \tint\t\t\t(*ndo_get_vf_config)(struct net_device *dev,\n" + "> \t\t\t\t\t\t int vf,\n" + "> \t\t\t\t\t\t struct ifla_vf_info *ivf);\n" "> diff --git a/include/uapi/linux/if_link.h b/include/uapi/linux/if_link.h\n" "> index afccc93..f05549c 100644\n" "> --- a/include/uapi/linux/if_link.h\n" "> +++ b/include/uapi/linux/if_link.h\n" "> @@ -480,6 +480,7 @@ enum {\n" - "> IFLA_VF_RSS_QUERY_EN, /* RSS Redirection Table and Hash Key query\n" - "> * on/off switch\n" - "> */\n" - "> + IFLA_VF_TRUST, /* Trust VF */\n" - "> __IFLA_VF_MAX,\n" + "> \tIFLA_VF_RSS_QUERY_EN,\t/* RSS Redirection Table and Hash Key query\n" + "> \t\t\t\t * on/off switch\n" + "> \t\t\t\t */\n" + "> +\tIFLA_VF_TRUST,\t\t/* Trust VF */\n" + "> \t__IFLA_VF_MAX,\n" "> };\n" - ">\n" + "> \n" "> @@ -529,6 +530,11 @@ struct ifla_vf_rss_query_en {\n" - "> __u32 setting;\n" + "> \t__u32 setting;\n" "> };\n" - ">\n" + "> \n" "> +struct ifla_vf_trust {\n" - "> + __u32 vf;\n" - "> + __u32 setting;\n" + "> +\t__u32 vf;\n" + "> +\t__u32 setting;\n" "> +};\n" "> +\n" "> /* VF ports management section\n" "> *\n" - "> * Nested layout of set/get msg is:\n" + "> *\tNested layout of set/get msg is:\n" "> diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c\n" "> index 141ccc3..1d9205a 100644\n" "> --- a/net/core/rtnetlink.c\n" "> +++ b/net/core/rtnetlink.c\n" "> @@ -819,7 +819,8 @@ static inline int rtnl_vfinfo_size(const struct net_device *dev,\n" - "> nla_total_size(sizeof(struct ifla_vf_spoofchk)) +\n" - "> nla_total_size(sizeof(struct ifla_vf_rate)) +\n" - "> nla_total_size(sizeof(struct ifla_vf_link_state)) +\n" - "> - nla_total_size(sizeof(struct ifla_vf_rss_query_en)));\n" - "> + nla_total_size(sizeof(struct ifla_vf_rss_query_en)) +\n" - "> + nla_total_size(sizeof(struct ifla_vf_trust)));\n" - "> return size;\n" - "> } else\n" - "> return 0;\n" + "> \t\t\t nla_total_size(sizeof(struct ifla_vf_spoofchk)) +\n" + "> \t\t\t nla_total_size(sizeof(struct ifla_vf_rate)) +\n" + "> \t\t\t nla_total_size(sizeof(struct ifla_vf_link_state)) +\n" + "> -\t\t\t nla_total_size(sizeof(struct ifla_vf_rss_query_en)));\n" + "> +\t\t\t nla_total_size(sizeof(struct ifla_vf_rss_query_en)) +\n" + "> +\t\t\t nla_total_size(sizeof(struct ifla_vf_trust)));\n" + "> \t\treturn size;\n" + "> \t} else\n" + "> \t\treturn 0;\n" "> @@ -1138,6 +1139,7 @@ static int rtnl_fill_ifinfo(struct sk_buff *skb, struct net_device *dev,\n" - "> struct ifla_vf_spoofchk vf_spoofchk;\n" - "> struct ifla_vf_link_state vf_linkstate;\n" - "> struct ifla_vf_rss_query_en vf_rss_query_en;\n" - "> + struct ifla_vf_trust vf_trust;\n" - ">\n" - "> /*\n" - "> * Not all SR-IOV capable drivers support the\n" + "> \t\t\tstruct ifla_vf_spoofchk vf_spoofchk;\n" + "> \t\t\tstruct ifla_vf_link_state vf_linkstate;\n" + "> \t\t\tstruct ifla_vf_rss_query_en vf_rss_query_en;\n" + "> +\t\t\tstruct ifla_vf_trust vf_trust;\n" + "> \n" + "> \t\t\t/*\n" + "> \t\t\t * Not all SR-IOV capable drivers support the\n" "> @@ -1147,6 +1149,7 @@ static int rtnl_fill_ifinfo(struct sk_buff *skb, struct net_device *dev,\n" - "> */\n" - "> ivi.spoofchk = -1;\n" - "> ivi.rss_query_en = -1;\n" - "> + ivi.trusted = -1;\n" - "> memset(ivi.mac, 0, sizeof(ivi.mac));\n" - "> /* The default value for VF link state is \"auto\"\n" - "> * IFLA_VF_LINK_STATE_AUTO which equals zero\n" + "> \t\t\t */\n" + "> \t\t\tivi.spoofchk = -1;\n" + "> \t\t\tivi.rss_query_en = -1;\n" + "> +\t\t\tivi.trusted = -1;\n" + "> \t\t\tmemset(ivi.mac, 0, sizeof(ivi.mac));\n" + "> \t\t\t/* The default value for VF link state is \"auto\"\n" + "> \t\t\t * IFLA_VF_LINK_STATE_AUTO which equals zero\n" "> @@ -1160,7 +1163,8 @@ static int rtnl_fill_ifinfo(struct sk_buff *skb, struct net_device *dev,\n" - "> vf_tx_rate.vf =\n" - "> vf_spoofchk.vf =\n" - "> vf_linkstate.vf =\n" - "> - vf_rss_query_en.vf = ivi.vf;\n" - "> + vf_rss_query_en.vf =\n" - "> + vf_trust.vf = ivi.vf;\n" - ">\n" - "> memcpy(vf_mac.mac, ivi.mac, sizeof(ivi.mac));\n" - "> vf_vlan.vlan = ivi.vlan;\n" + "> \t\t\t\tvf_tx_rate.vf =\n" + "> \t\t\t\tvf_spoofchk.vf =\n" + "> \t\t\t\tvf_linkstate.vf =\n" + "> -\t\t\t\tvf_rss_query_en.vf = ivi.vf;\n" + "> +\t\t\t\tvf_rss_query_en.vf =\n" + "> +\t\t\t\tvf_trust.vf = ivi.vf;\n" + "> \n" + "> \t\t\tmemcpy(vf_mac.mac, ivi.mac, sizeof(ivi.mac));\n" + "> \t\t\tvf_vlan.vlan = ivi.vlan;\n" "> @@ -1171,6 +1175,7 @@ static int rtnl_fill_ifinfo(struct sk_buff *skb, struct net_device *dev,\n" - "> vf_spoofchk.setting = ivi.spoofchk;\n" - "> vf_linkstate.link_state = ivi.linkstate;\n" - "> vf_rss_query_en.setting = ivi.rss_query_en;\n" - "> + vf_trust.setting = ivi.trusted;\n" - "> vf = nla_nest_start(skb, IFLA_VF_INFO);\n" - "> if (!vf) {\n" - "> nla_nest_cancel(skb, vfinfo);\n" + "> \t\t\tvf_spoofchk.setting = ivi.spoofchk;\n" + "> \t\t\tvf_linkstate.link_state = ivi.linkstate;\n" + "> \t\t\tvf_rss_query_en.setting = ivi.rss_query_en;\n" + "> +\t\t\tvf_trust.setting = ivi.trusted;\n" + "> \t\t\tvf = nla_nest_start(skb, IFLA_VF_INFO);\n" + "> \t\t\tif (!vf) {\n" + "> \t\t\t\tnla_nest_cancel(skb, vfinfo);\n" "> @@ -1524,6 +1529,16 @@ static int do_setvfinfo(struct net_device *dev, struct nlattr *attr)\n" - "> ivrssq_en->setting);\n" - "> break;\n" - "> }\n" - "> + case IFLA_VF_TRUST: {\n" - "> + struct ifla_vf_trust *ivt;\n" + "> \t\t\t\t\t\t\t ivrssq_en->setting);\n" + "> \t\t\tbreak;\n" + "> \t\t}\n" + "> +\t\tcase IFLA_VF_TRUST: {\n" + "> +\t\t\tstruct ifla_vf_trust *ivt;\n" "> +\n" - "> + ivt = nla_data(vf);\n" - "> + err = -EOPNOTSUPP;\n" - "> + if (ops->ndo_set_vf_trust)\n" - "> + err = ops->ndo_set_vf_trust(dev, ivt->vf,\n" - "> + ivt->setting);\n" - "> + break;\n" - "> + }\n" - "> default:\n" - "> err = -EINVAL;\n" - "> break;\n" - "\n" - The information contained in this message is confidential and is intended for the addressee(s) only. If you have received this message in error, please notify the sender immediately and delete the message. Unless you are an addressee (or authorized to receive for an addressee), you may not use, copy or disclose to anyone this message or any information contained in this message. The unauthorized use, disclosure, copying or alteration of this message is strictly prohibited. + "> +\t\t\tivt = nla_data(vf);\n" + "> +\t\t\terr = -EOPNOTSUPP;\n" + "> +\t\t\tif (ops->ndo_set_vf_trust)\n" + "> +\t\t\t\terr = ops->ndo_set_vf_trust(dev, ivt->vf,\n" + "> +\t\t\t\t\t\t\t ivt->setting);\n" + "> +\t\t\tbreak;\n" + "> +\t\t}\n" + "> \t\tdefault:\n" + "> \t\t\terr = -EINVAL;\n" + "> \t\t\tbreak;" -4171eb0fd32d1b1e755302b8ab201772a0456fb1427425e6a6db7cc112d7455f +76eec8adbcddae9f21f2ffec930735ea40310583f97f45b93426c95c6aa60267
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.