From patchwork Fri Oct 11 10:23:12 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lorenzo Bianconi X-Patchwork-Id: 1175110 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=openvswitch.org (client-ip=140.211.169.12; helo=mail.linuxfoundation.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.b="XrpPbABU"; dkim-atps=neutral Received: from mail.linuxfoundation.org (mail.linuxfoundation.org [140.211.169.12]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 46qPQC0fGTz9sP6 for ; Fri, 11 Oct 2019 21:31:45 +1100 (AEDT) Received: from mail.linux-foundation.org (localhost [127.0.0.1]) by mail.linuxfoundation.org (Postfix) with ESMTP id BDF1E13F5; Fri, 11 Oct 2019 10:31:42 +0000 (UTC) X-Original-To: ovs-dev@openvswitch.org Delivered-To: ovs-dev@mail.linuxfoundation.org Received: from smtp1.linuxfoundation.org (smtp1.linux-foundation.org [172.17.192.35]) by mail.linuxfoundation.org (Postfix) with ESMTPS id 31B46F13 for ; Fri, 11 Oct 2019 10:23:29 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [207.211.31.120]) by smtp1.linuxfoundation.org (Postfix) with ESMTP id 715D9709 for ; Fri, 11 Oct 2019 10:23:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1570789407; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=P3j9zzUQjT4WuCum+J5t2nSc4JMzhKGUN1T1o4mRd/I=; b=XrpPbABUb8nD6wM9DuV4Vk8iCSBjadtVEJFq9rJqNSq47GBndM7K2toe9f/Lv7Cuw+hA0s 1Ggqmcchy44RRX25Z8CFSZSj1XJ4/TJ4+aEfylcUrQ2JMOWDO2wKuEiCD+Zo4cBMxCzXL6 FZlVTOsMScSISj4kvxLZtGx9cfx+2iU= Received: from mail-wm1-f72.google.com (mail-wm1-f72.google.com [209.85.128.72]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-187-LnjFCQFgM-uxlVnokpW9fQ-1; Fri, 11 Oct 2019 06:23:24 -0400 Received: by mail-wm1-f72.google.com with SMTP id o188so3899146wmo.5 for ; Fri, 11 Oct 2019 03:23:24 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=dSb920orzldLz52fN6tzSF531Pz5/qIBmMweqLzESHE=; b=E2VHwX+576ZTjUnaz6psCChDYv0cMvNPoXJoNVXPLYw0pQh9YERmtZPSJ73tjZoPin stZxsqfx/gd3N4V9C5MloUZsSAmW3i1vUQ9wpcd6Tyb3wMZrcptP26KH26fkRvmBX4Fl O8VIlh3d1ur/fPJ7HeDcEIgmAtlO5YeWYH2aeZQZYRuE2T0BFBIzYJO+64aDcT8RlUlY 1lnh5feKc+uvKOyySVYtHcGdYNORdsPz5MUw5eW+IJPzsiu2gA3a4Md5G964i3IdArIg 6R3IaZP0rZmZjDeAZAK14pOuYV1Ag9qR8jiEmSTaqBuolXFYxJo1eDz0FunSoH4Aw4qR 5GWA== X-Gm-Message-State: APjAAAVma5IdEH7PaI6bIEJgXq3x1XlsZr+lO2fbCbI3NZbxp+90QkNQ 1vb2VM5iMzY64YAETs9Qcj33gfMAdsox/ZLb2joINxiQvcKRkBv9Zo9mvmN9fiv6r8vqa1QZC4M NloJPz6qAEmec/70jIA== X-Received: by 2002:a05:6000:103:: with SMTP id o3mr13194922wrx.357.1570789403402; Fri, 11 Oct 2019 03:23:23 -0700 (PDT) X-Google-Smtp-Source: APXvYqxxuFw2zSVFtMCmIoIPkL5whBiiiKkTBRUNhEw5k5XujJdcQj+2I8SZnF45bT2DYeRpgvjYKg== X-Received: by 2002:a05:6000:103:: with SMTP id o3mr13194900wrx.357.1570789403086; Fri, 11 Oct 2019 03:23:23 -0700 (PDT) Received: from localhost.localdomain.com (nat-pool-mxp-t.redhat.com. [149.6.153.186]) by smtp.gmail.com with ESMTPSA id m18sm12662454wrg.97.2019.10.11.03.23.22 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 11 Oct 2019 03:23:22 -0700 (PDT) From: Lorenzo Bianconi To: ovs-dev@openvswitch.org Date: Fri, 11 Oct 2019 12:23:12 +0200 Message-Id: <02a86755f52f596caea5da3afd3ebcb7cdb9cc5e.1570789105.git.lorenzo.bianconi@redhat.com> X-Mailer: git-send-email 2.21.0 MIME-Version: 1.0 X-MC-Unique: LnjFCQFgM-uxlVnokpW9fQ-1 X-Mimecast-Spam-Score: 0 X-Spam-Status: No, score=-4.3 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on smtp1.linux-foundation.org Subject: [ovs-dev] [PATCH] lib: packets: export compose_ipv6 routine to OVN X-BeenThere: ovs-dev@openvswitch.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: ovs-dev-bounces@openvswitch.org Errors-To: ovs-dev-bounces@openvswitch.org Remove static qualifier from compose_ipv6 definition and export it to OVN. compose_ipv6 will be used in order to add IPv6 prefix delegation support to OVN Signed-off-by: Lorenzo Bianconi --- lib/packets.c | 2 +- lib/packets.h | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/packets.c b/lib/packets.c index 3c8a50d9f..9d7cc5024 100644 --- a/lib/packets.c +++ b/lib/packets.c @@ -1557,7 +1557,7 @@ compose_arp__(struct dp_packet *b) /* This function expects packet with ethernet header with correct * l3 pointer set. */ -static void * +void * compose_ipv6(struct dp_packet *packet, uint8_t proto, const struct in6_addr *src, const struct in6_addr *dst, uint8_t key_tc, ovs_be32 key_fl, uint8_t key_hl, int size) diff --git a/lib/packets.h b/lib/packets.h index d19f6e3ca..5d7f82c45 100644 --- a/lib/packets.h +++ b/lib/packets.h @@ -1605,6 +1605,9 @@ void packet_set_igmp3_query(struct dp_packet *, uint8_t max_resp, uint8_t qqic); void packet_format_tcp_flags(struct ds *, uint16_t); const char *packet_tcp_flag_to_string(uint32_t flag); +void *compose_ipv6(struct dp_packet *packet, uint8_t proto, + const struct in6_addr *src, const struct in6_addr *dst, + uint8_t key_tc, ovs_be32 key_fl, uint8_t key_hl, int size); void compose_arp__(struct dp_packet *); void compose_arp(struct dp_packet *, uint16_t arp_op, const struct eth_addr arp_sha,