This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.
laforge gerrit-no-reply at lists.osmocom.orglaforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmo-abis/+/23957 ) Change subject: ipa: Introduce support for user-specific DSCP and priority ...................................................................... ipa: Introduce support for user-specific DSCP and priority This adds new members to struct ipa_server_link and ipa_client_conn, which can be set by the user before ipa_client_conn_open() or ipa_server_link_open() to ensure DSCP / priority values are applied from the first outgoing packet onwards. Change-Id: I5ab22d35d9b11eca47d9ea12208e5589a1a5713c --- M TODO-RELEASE M include/osmocom/abis/ipa.h M src/input/ipa.c 3 files changed, 14 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-abis refs/changes/57/23957/1 diff --git a/TODO-RELEASE b/TODO-RELEASE index d0852fc..7e2cdb0 100644 --- a/TODO-RELEASE +++ b/TODO-RELEASE @@ -7,3 +7,5 @@ # If any interfaces have been added since the last public release: c:r:a + 1. # If any interfaces have been removed or changed since the last public release: c:r:0. #library what description / commit summary line +libosmo-abis ABI break ipa_client_conn new struct members dscp, priority +libosmo-abis ABI break ipa_server_link new struct members dscp, priority diff --git a/include/osmocom/abis/ipa.h b/include/osmocom/abis/ipa.h index 4764a95..7e13a6d 100644 --- a/include/osmocom/abis/ipa.h +++ b/include/osmocom/abis/ipa.h @@ -19,6 +19,8 @@ uint16_t port; int (*accept_cb)(struct ipa_server_link *link, int fd); void *data; + uint8_t dscp; + uint8_t priority; }; struct ipa_server_link * @@ -80,6 +82,8 @@ struct msgb *pending_msg; const char *local_addr; uint16_t local_port; + uint8_t dscp; + uint8_t priority; }; struct ipa_client_conn * diff --git a/src/input/ipa.c b/src/input/ipa.c index f01ecd9..c121987 100644 --- a/src/input/ipa.c +++ b/src/input/ipa.c @@ -224,7 +224,8 @@ ret = osmo_sock_init2(AF_INET, SOCK_STREAM, IPPROTO_TCP, link->local_addr, link->local_port, link->addr, link->port, - OSMO_SOCK_F_BIND|OSMO_SOCK_F_CONNECT|OSMO_SOCK_F_NONBLOCK); + OSMO_SOCK_F_BIND|OSMO_SOCK_F_CONNECT|OSMO_SOCK_F_NONBLOCK| + OSMO_SOCK_F_DSCP(link->dscp) | OSMO_SOCK_F_PRIO(link->priority)); if (ret < 0) return ret; link->ofd->fd = ret; @@ -282,6 +283,10 @@ LOGIPA(link, LOGL_NOTICE, "accept()ed new link from %s:%u\n", inet_ntoa(sa.sin_addr), ntohs(sa.sin_port)); + /* make new fd inherit DSCP + priority of listen-socket */ + osmo_sock_set_dscp(fd, link->dscp); + osmo_sock_set_priority(fd, link->priority); + ret = link->accept_cb(link, fd); if (ret < 0) { LOGP(DLINP, LOGL_ERROR, @@ -330,7 +335,8 @@ int ret; ret = osmo_sock_init(AF_INET, SOCK_STREAM, IPPROTO_TCP, - link->addr, link->port, OSMO_SOCK_F_BIND); + link->addr, link->port, OSMO_SOCK_F_BIND| + OSMO_SOCK_F_DSCP(link->dscp) | OSMO_SOCK_F_PRIO(link->priority)); if (ret < 0) return ret; -- To view, visit https://gerrit.osmocom.org/c/libosmo-abis/+/23957 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-abis Gerrit-Branch: master Gerrit-Change-Id: I5ab22d35d9b11eca47d9ea12208e5589a1a5713c Gerrit-Change-Number: 23957 Gerrit-PatchSet: 1 Gerrit-Owner: laforge <laforge at osmocom.org> Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210428/49ec16f0/attachment.htm>