The immediate advantage of using these PCDs is that the platform can change the 
default behavior for all started NICs, that will not be limited to the 
additional setting.  

Thanks.
Jiaxin

> -----Original Message-----
> From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of
> Subramanian, Sriram (EG Servers Platform SW)
> Sent: Thursday, February 18, 2016 3:32 PM
> To: Kinney, Michael D <michael.d.kin...@intel.com>; El-Haj-Mahmoud,
> Samer <samer.el-haj-mahm...@hpe.com>; Wu, Jiaxin
> <jiaxin...@intel.com>; Hegde, Nagaraj P <nagaraj-p.he...@hpe.com>;
> Zimmer, Vincent <vincent.zim...@intel.com>; Li, Ruth <ruth...@intel.com>;
> Ye, Ting <ting...@intel.com>; Fu, Siyuan <siyuan...@intel.com>; edk2-
> de...@lists.01.org
> Subject: Re: [edk2] Using PCD to set default policy for IPv4/IPv6
> 
> The IP4_CONFIG2 and IP6_CONFIG protocols need to know the current
> policy to decide if they need to do something during their DBStart (such as
> initiating a DHCPv4/v6 if policy is set so). It is not necessary for the 
> platform
> to have a per-NIC interface policy, or the platform may choose to set policies
> only on specific NICs. For others, and in general the protocol needs to have a
> policy to apply, for which NetworkPkg could have PCDs that are consumed by
> these protocols. With this approach, platform code can set the PCD to what
> policy the platform wants for _all_ its NICs, and it can selectively change 
> it by
> calling the set policy API.
> 
> Thanks,
> Sriram.
> 
> -----Original Message-----
> From: Kinney, Michael D [mailto:michael.d.kin...@intel.com]
> Sent: Thursday, February 18, 2016 5:48 AM
> To: El-Haj-Mahmoud, Samer; Wu, Jiaxin; Subramanian, Sriram (EG Servers
> Platform SW); Hegde, Nagaraj P; Zimmer, Vincent; Li, Ruth; Ye, Ting; Fu,
> Siyuan; edk2-devel@lists.01.org; Kinney, Michael D
> Subject: RE: Using PCD to set default policy for IPv4/IPv6
> 
> Samer,
> 
> A platform driver can be implemented to set the policy without defining
> PCDs in the MdeModulePkg or NetworkPkg.
> 
> Instead, a platform package can choose to define PCDs and potentially use
> those PCD values to set policy in calls to the EFI_IP4_CONFIG2_POLICY or
> EFI_IP6_CONFIG_POLICY.  Or it could be an algorithm or HII forms in platform
> driver to set policy.
> 
> Mike
> 
> > -----Original Message-----
> > From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of
> > El-Haj-Mahmoud, Samer
> > Sent: Wednesday, February 17, 2016 3:20 PM
> > To: Kinney, Michael D <michael.d.kin...@intel.com>; Wu, Jiaxin
> > <jiaxin...@intel.com>; Subramanian, Sriram (EG Servers Platform SW)
> > <srira...@hpe.com>; Hegde, Nagaraj P <nagaraj-p.he...@hpe.com>;
> > Zimmer, Vincent <vincent.zim...@intel.com>; Li, Ruth
> > <ruth...@intel.com>; Ye, Ting <ting...@intel.com>; Fu, Siyuan
> > <siyuan...@intel.com>; edk2-devel@lists.01.org
> > Subject: Re: [edk2] Using PCD to set default policy for IPv4/IPv6
> >
> > 1) Yes you could... that is one implementation choice. There are cases
> > where you need to start multiple adapters, just for inventory/other
> > management tasks, and you do not want all of them to default to
> > DHCP/automatic
> >
> > 2) Yes a platform driver can set the policy through the PCDs. I
> > thought this was the intention of introducing the PCDs. Previously,
> > the policy was hard-coded to DHCP/auto in the EDK2 drivers.
> >
> >
> >
> > -----Original Message-----
> > From: Kinney, Michael D [mailto:michael.d.kin...@intel.com]
> > Sent: Wednesday, February 17, 2016 3:00 PM
> > To: El-Haj-Mahmoud, Samer <samer.el-haj-mahm...@hpe.com>; Wu,
> Jiaxin
> > <jiaxin...@intel.com>; Subramanian, Sriram (EG Servers Platform SW)
> > <srira...@hpe.com>; Hegde, Nagaraj P <nagaraj-p.he...@hpe.com>;
> > Zimmer, Vincent <vincent.zim...@intel.com>; Li, Ruth
> > <ruth...@intel.com>; Ye, Ting <ting...@intel.com>; Fu, Siyuan
> > <siyuan...@intel.com>; edk2-devel@lists.01.org; Kinney, Michael D
> > <michael.d.kin...@intel.com>
> > Subject: RE: Using PCD to set default policy for IPv4/IPv6
> >
> > Hi Samer,
> >
> > 1) If there are a large number of adapters, can you choose to only
> > start the ones needed to boot?
> >
> > 2) Can't a platform driver set the policy needed for each NIC that is
> required to boot?
> >
> > Mike
> >
> >
> >
> > > -----Original Message-----
> > > From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf
> > > Of El-Haj-Mahmoud, Samer
> > > Sent: Wednesday, February 17, 2016 12:53 PM
> > > To: Kinney, Michael D <michael.d.kin...@intel.com>; Wu, Jiaxin
> > > <jiaxin...@intel.com>; Subramanian, Sriram (EG Servers Platform SW)
> > > <srira...@hpe.com>; Hegde, Nagaraj P <nagaraj-p.he...@hpe.com>;
> > > Zimmer, Vincent <vincent.zim...@intel.com>; Li, Ruth
> > > <ruth...@intel.com>; Ye, Ting <ting...@intel.com>; Fu, Siyuan
> > > <siyuan...@intel.com>; edk2-devel@lists.01.org
> > > Subject: Re: [edk2] Using PCD to set default policy for IPv4/IPv6
> > >
> > > I believe the PCDs are just to let the core drivers select the
> > > default behavior (not full configuration) of automatic/DHCP vs.
> > > Static. Today, the core drivers hard-code the default behavior to
> > > DHCP/automatic, and that is not ideal in server platforms that may have a
> large number of adapters.
> > >
> > >
> > >
> > > From: Kinney, Michael D [mailto:michael.d.kin...@intel.com]
> > > Sent: Wednesday, February 17, 2016 11:34 AM
> > > To: Wu, Jiaxin <jiaxin...@intel.com>; Subramanian, Sriram (EG
> > > Servers Platform SW) <srira...@hpe.com>; El-Haj-Mahmoud, Samer
> > > <samer.el-haj-mahm...@hpe.com>; Hegde, Nagaraj P
> > > <nagaraj-p.he...@hpe.com>; Zimmer, Vincent
> > > <vincent.zim...@intel.com>; Li, Ruth <ruth...@intel.com>; Ye, Ting
> > > <ting...@intel.com>; Fu, Siyuan <siyuan...@intel.com>;
> > > edk2-devel@lists.01.org; Kinney, Michael D
> > > <michael.d.kin...@intel.com>
> > > Subject: RE: Using PCD to set default policy for IPv4/IPv6
> > >
> > > Jiaxin,
> > >
> > > If a platform module can set the policy for each network interface,
> > > then why do we need to add PCDs?
> > >
> > > Thanks,
> > >
> > > Mike
> > >
> > > From: Wu, Jiaxin
> > > Sent: Tuesday, February 16, 2016 6:30 PM
> > > To: Kinney, Michael D
> > > <michael.d.kin...@intel.com<mailto:michael.d.kin...@intel.com>>;
> > > Subramanian, Sriram (EG Servers Platform SW)
> > > <srira...@hpe.com<mailto:sriram- s...@hpe.com>>; El-Haj-Mahmoud,
> Samer
> > > <samer.el-haj-mahm...@hpe.com<mailto:samer.el-haj-
> > > mahm...@hpe.com>>; Hegde, Nagaraj P
> > > <nagaraj-p.he...@hpe.com<mailto:nagaraj-
> > > p.he...@hpe.com>>; Zimmer, Vincent
> > > <vincent.zim...@intel.com<mailto:vincent.zim...@intel.com>>; Li,
> > > Ruth <ruth...@intel.com<mailto:ruth...@intel.com>>; Ye, Ting
> > > <ting...@intel.com<mailto:ting...@intel.com>>; Fu, Siyuan
> > > <siyuan...@intel.com<mailto:siyuan...@intel.com>>;
> > > edk2-devel@lists.01.org<mailto:edk2-
> > > de...@lists.01.org>
> > > Subject: RE: Using PCD to set default policy for IPv4/IPv6
> > >
> > > Mike,
> > > Thanks your comments.
> > > First, I agree other platform modules can also change the police by
> > > using the set operation.
> > > Second for the complete design, the proposed for the new PCDs will
> > > only be consumed by Ip4Dxe/Ip6Dxe modules. The PCDs are used by
> > > these two modules to determine the default policy, the current
> > > Ip4Dxe/Ip6Dxe driver will  make decision which more configuration
> > > information needed to be also configured. So, I think this a
> > > complete design to cover the IPv4/Ipv6
> > configuration protocol.
> > >
> > > Thanks.
> > > Jiaxin
> > >
> > > From: Kinney, Michael D
> > > Sent: Wednesday, February 17, 2016 6:10 AM
> > > To: Wu, Jiaxin <jiaxin...@intel.com<mailto:jiaxin...@intel.com>>;
> > > Subramanian, Sriram (EG Servers Platform SW)
> > > <srira...@hpe.com<mailto:srira...@hpe.com>>; El-Haj-Mahmoud,
> Samer
> > > <samer.el-haj-mahm...@hpe.com<mailto:samer.el-haj-
> mahm...@hpe.com>>;
> > > Hegde, Nagaraj P
> > > <nagaraj-p.he...@hpe.com<mailto:nagaraj-p.he...@hpe.com>>;
> Zimmer,
> > > Vincent
> <vincent.zim...@intel.com<mailto:vincent.zim...@intel.com>>;
> > > Li, Ruth <ruth...@intel.com<mailto:ruth...@intel.com>>; Ye, Ting
> > > <ting...@intel.com<mailto:ting...@intel.com>>; Fu, Siyuan
> > > <siyuan...@intel.com<mailto:siyuan...@intel.com>>;
> > > edk2-devel@lists.01.org<mailto:edk2-
> > > de...@lists.01.org>; Kinney, Michael D
> > > <michael.d.kin...@intel.com<mailto:michael.d.kin...@intel.com>>
> > > Subject: RE: Using PCD to set default policy for IPv4/IPv6
> > >
> > > Jiaxin,
> > >
> > > This proposal looks incomplete to me.  If the configuration policy
> > > is set to Ip4Config2PolicyStatic or Ip6ConfigPolicyManual, then it
> > > seems like a lot more configuration information would be required
> > > for the static or manual
> > policies.
> > >
> > > Can you also provide details on the complete design.  What modules
> > > are you proposing would use these new PCDs?  These configuration
> > > protocols provide
> > get/set operations.
> > > Why can't a platform module use the set operation to set
> > > static/manual policy along with the additional set operations to
> > > completely configure static/manual
> > policy?
> > >
> > > Thanks,
> > >
> > > Mike
> > >
> > > From: Wu, Jiaxin
> > > Sent: Monday, February 15, 2016 7:37 PM
> > > To: Subramanian, Sriram (EG Servers Platform SW)
> > > <srira...@hpe.com<mailto:sriram- s...@hpe.com>>; El-Haj-Mahmoud,
> Samer
> > > <samer.el-haj-mahm...@hpe.com<mailto:samer.el-haj-
> > > mahm...@hpe.com>>; Hegde, Nagaraj P
> > > <nagaraj-p.he...@hpe.com<mailto:nagaraj-
> > > p.he...@hpe.com>>; Zimmer, Vincent
> > > <vincent.zim...@intel.com<mailto:vincent.zim...@intel.com>>;
> Kinney,
> > > Michael D
> > > <michael.d.kin...@intel.com<mailto:michael.d.kin...@intel.com>>; Li,
> > > Ruth <ruth...@intel.com<mailto:ruth...@intel.com>>; Ye, Ting
> > > <ting...@intel.com<mailto:ting...@intel.com>>; Fu, Siyuan
> > > <siyuan...@intel.com<mailto:siyuan...@intel.com>>;
> > > edk2-devel@lists.01.org<mailto:edk2-
> > > de...@lists.01.org>
> > > Subject: Using PCD to set default policy for IPv4/IPv6
> > >
> > > Hi all,
> > >
> > > Below is the descriptions about the default policy for IPv4/IPv6 in
> > > latest UEFI Spec (Version 2.6).
> > >
> > > << P1472: The EFI_IP4_CONFIG2_POLICY defines the general
> > > configuration policy the EFI
> > > IPv4 Configuration II Protocol supports. The default policy for a
> > > newly detected communication device is beyond the scope of this
> > > document. An implementation might leave it to platform to choose the
> > > default policy.>>
> > >
> > > << P1510: The EFI_IP6_CONFIG_POLICY defines the general
> > > configuration policy the EFI
> > > IPv6 Configuration Protocol supports. The default policy for a newly
> > > detected communication device is beyond the scope of this document.
> > > An implementation might leave it to platform to choose the default
> > > policy.>>
> > >
> > > So, I propose to introduce PCD to leave it to platform to choose the
> default policy.
> > > That's meaningful to make the source code consistent with UEFI Spec.
> > > Detailed see
> > > below:
> > >
> > > ## Ip4Config2 Policy Type configuration.
> > > # 01 = The configuration policy is Ip4Config2PolicyStatic # 02 = The
> > > configuration policy is Ip4Config2PolicyDhcp # @Prompt Type Value of
> > > Ip4Config2 Policy.
> > >
> gEfiMdeModulePkgTokenSpaceGuid.PcdIp4Config2PolicyType|2|UINT8|0x1
> 00
> > > 00
> > > 002
> > >
> > > ## Ip6Config Policy Type configuration.
> > > # 01 = The configuration policy is Ip6ConfigPolicyManual # 02 = The
> > > configuration policy is Ip6ConfigPolicyAutomatic # @Prompt Type
> > > Value of Ip6Config Policy.
> > >
> gEfiNetworkPkgTokenSpaceGuid.PcdIp6ConfigPolicyType|2|UINT8|0x10000
> 0
> > > 02
> > >
> > > Do you have any opinion? If there is no objection, I will create the
> > > corresponding patches to fix it.
> > >
> > > Thanks.
> > > Jiaxin
> > > _______________________________________________
> > > edk2-devel mailing list
> > > edk2-devel@lists.01.org
> > > https://lists.01.org/mailman/listinfo/edk2-devel
> > _______________________________________________
> > edk2-devel mailing list
> > edk2-devel@lists.01.org
> > https://lists.01.org/mailman/listinfo/edk2-devel
> _______________________________________________
> edk2-devel mailing list
> edk2-devel@lists.01.org
> https://lists.01.org/mailman/listinfo/edk2-devel
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel

Reply via email to