[Xorp-users] [Xorp-hackers] More ideas for xorp code size improvements.

saurabh saurabh.pandya at elitecore.com
Mon Apr 19 06:15:00 PDT 2010


Thanks Ben,

Well , I will try to dig things here once I will plan for this.
Rightnow I am experimenting xorp with ISP router directly
seems not working somehow with BSR mechanism..

I am seeing that there is no PIM hello from ISP router.
Then How can i know IP of next PIM enable router to
make tunnel with?

-Thanks,
Saurabh


On 04/17/2010 12:40 AM, Ben Greear wrote:
> Maybe callbacks are too much trouble to bother with, but there
> are other areas for improvement.  For instance, this patch
> (against xorp.ct) saves  around 30KB, and it should help
> run-time and stack usage as well.
>
> diff --git a/libxipc/xrl_error.cc b/libxipc/xrl_error.cc
> index fd96af1..b6626f1 100644
> --- a/libxipc/xrl_error.cc
> +++ b/libxipc/xrl_error.cc
> @@ -116,3 +116,6 @@ XrlError::error_msg() const
>  {
>      return _errlet->error_msg();
>  }
> +
> +
> +XrlCmdError XrlCmdError::_xce_ok(XrlError::OKAY());
> diff --git a/libxipc/xrl_error.hh b/libxipc/xrl_error.hh
> index 44dd2fb..4ad2f26 100644
> --- a/libxipc/xrl_error.hh
> +++ b/libxipc/xrl_error.hh
> @@ -179,7 +179,7 @@ public:
>       * still return OKAY(), but the return list should indicate the
>       * error.
>       */
> -    static const XrlCmdError OKAY() { return XrlError::OKAY(); }
> +    static const XrlCmdError& OKAY() { return _xce_ok; }
>
>      /**
>       * Return value when the method arguments are incorrect.
> @@ -215,11 +215,12 @@ public:
>      /**
>       * @return note associated with origin of error (i.e., the reason).
>       */
> -    string note() const { return _xrl_error.note(); }
> +    const string& note() const { return _xrl_error.note(); }
>
>  private:
>      XrlCmdError(const XrlError& xe) : _xrl_error(xe) {}
>      XrlError _xrl_error;
> +    static XrlCmdError _xce_ok;
>  };
>
>  ^L
> diff --git a/libxipc/xrl_sender.hh b/libxipc/xrl_sender.hh
> index 991d40a..123bcec 100644
> --- a/libxipc/xrl_sender.hh
> +++ b/libxipc/xrl_sender.hh
> @@ -30,6 +30,7 @@ class XrlError;
>
>  /**
>   * Base for classes able to transport Xrls.
> + * See xrl_router.hh for implementor of this base class.
>   */
>  class XrlSender {
>  public:
>
>



More information about the Xorp-users mailing list