def METHOD_NAME(self, ping_config):
    """
    The packet assert test configuration contains filter for gre protocol
    and grep patterns to match the ICMP or ICMP6 echo requests.
    """
    ip_filter = {"family": AF_INET}
    m1_carrier = self.matched.host1.macvlan10
    m2_carrier = self.matched.host2.macvlan10
    m1_carrier_ip = m1_carrier.ips_filter(**ip_filter)[0]
    m2_carrier_ip = m2_carrier.ips_filter(**ip_filter)[0]
    ip1 = ping_config.client_bind
    ip2 = ping_config.destination_address
    pa_kwargs = {}
    pa_kwargs["p_filter"] = "proto gre"
    if isinstance(ip2, Ip4Address):
        pat1 = "{} > {}: GREv0, .* IP {} > {}: ICMP echo request".format(
            m1_carrier_ip, m2_carrier_ip, ip1, ip2
        )
        pat2 = "{} > {}: GREv0 \| {} > {}: ICMP echo request".format(
            m1_carrier_ip, m2_carrier_ip, ip1, ip2
        )
        grep_pattern = ["({})|({})".format(pat1, pat2)]
    elif isinstance(ip2, Ip6Address):
        pat1 = "{} > {}: GREv0, .* IP6 {} > {}: ICMP6, echo request".format(
            m1_carrier_ip, m2_carrier_ip, ip1, ip2
        )
        pat2 = "{} > {}: GREv0 \| {} > {}: ICMP6, echo request".format(
            m1_carrier_ip, m2_carrier_ip, ip1, ip2
        )
        grep_pattern = ["({})|({})".format(pat1, pat2)]
    else:
        raise Exception("The destination address is nor IPv4 or IPv6 address")
    pa_kwargs["grep_for"] = grep_pattern
    if ping_config.count:
        pa_kwargs["p_min"] = ping_config.count
    m2 = ping_config.destination
    pa_config = PacketAssertConf(m2, m2_carrier, **pa_kwargs)
    return pa_config